[BioC] ComBat
Valerie Obenchain
vobencha at fhcrc.org
Mon Jan 7 19:22:16 CET 2013
Hi Gayatri,
Following the example on the ComBat man page as you have done, I see 2
covariates, not 3.
The model matrix shows 'cancer' and 'normal' covariates:
> head(mod)
(Intercept) as.factor(cancer)Cancer as.factor(cancer)Normal
GSM71019.CEL 1 0 1
GSM71020.CEL 1 0 1
...
...
The intercept is not considered a categorical covariate.
I've cc'd the package authors in case they have something else to add.
Valerie
On 01/03/2013 01:31 PM, Gayatri Iyer wrote:
> Hi,
> I am trying to run my microarray data through ComBat(in sva packge).Below
> is my sampleinfo file.
> When I run it with these commands
>
> batch = sampleinfo$Batch
> mod = model.matrix(~as.factor(Covariate), data=sampleinfo)
> combat_edata = ComBat(dat=edata, batch=batch, mod=mod, par.prior=TRUE,
> prior.plots=FALSE)
> I dont get any error and it runs with this message.
> Found 10 batches
> Found 3 categorical covariate(s)
> Standardizing Data across genes
> Fitting L/S model and finding priors
> Finding parametric adjustments
> Adjusting the Data
>
> But the problem is I have 4 covariate not three.
>
> I even ran the example dataset in SVA package
> ## Load data
> library(bladderbatch)
> data(bladderdata)
>
> ## Obtain phenotypic data
> pheno = pData(bladderEset)
> edata = exprs(bladderEset)
> batch = pheno$batch
> mod = model.matrix(~as.factor(cancer), data=pheno)
>
> ## Correct for batch using ComBat
> combat_edata = ComBat(dat=edata, batch=batch, mod=mod, par.prior=TRUE,
> prior.plots=FALSE)
> This also give
> Found 2 categorical covariate(s) when there are three covariates in this
> dataset.
>
>
> Please help,
> Thank you,
> Gayatri
>
> Array name Sample name Batch Covariate C3D1 1 1 1 C3D2 2 1 1 C3D3 3 1 1
> C3D5 4 2 1 C3D14 5 6 1 C3D15 6 6 1 C3D16 7 7 1 C3D17 8 7 1 C3D18 9 7 1
> S3D7 10 3 2 S3D8 11 4 2 S3D9 12 4 2 S3D10 13 4 2 S3D11 14 5 2 S3D12 15
> 5 2 S3D19 16 8 2 S3D20 17 8 2 S3D21 18 9 2 S3D22 19 9 2 S3D23 20 10 2
> S3D24 21 10 2 C25D1 22 1 3 C25D2 23 1 3 C25D3 24 2 3 C25D5 25 3 3
> C25D14 26 6 3 C25D15 27 6 3 C25D16 28 7 3 C25D17 29 7 3 C25D18 30 8 3
> S25D7 31 3 4 S25D8 32 4 4 S25D9 33 4 4 S25D10 34 5 4 S25D11 35 5 4
> S25D12 36 5 4 S25D19 37 8 4 S25D21 38 9 4
>
> S25D23
> 39 10
>
> 4
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor
mailing list