Thank you again.

Following your previous answer I have tried to use the sva package.

I have read the documentation PDF file. I have run the following code on
the data -

> biocLite("sva")
> biocLite("affy")
> library(affy)
> RMAdata<-justRMA(celfile.path=dataDir)
> pheno = read.phenoData("pheno_data.txt", header = TRUE, row.names = 1)

My pheno data file contains 6 columns and a header line, the first two
columns are array and sample id numbers and the rest are the variables to
adjust for.
Now I wish to describe the model to be fit by creating a model matrix.
In the sva documentation file code example, it is unclear to me, what is
the 'cancer' variable

> mod = model.matrix(~as.factor(cancer), data=pheno)
is it a vector with no header and the sample status?
(I did not manage to get bladderbatch library through R).

If I try to create a model matrix using only the batch (scan date) variable

> mod=model.matrix(~as.factor(batch),data=pheno)

I received the following error:
Error in as.data.frame.default(data, optional = TRUE):

cannot coerce class 'structure("AnnotatedDataFrame", package = "Biobase")'
into a data.frame

Is there a way to consider more than 1 variable known batch correction (e.g
scan date, gender) in describing the model matrix?
If there is another documentation source to refer to regarding this issue I
will appreciate it (as this seems like a basic question).

My R version:
------------------------------------------------------
> version
               _
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          14.0
year           2011
month          10
day            31
svn rev        57496
language       R
version.string R version 2.14.0 (2011-10-31)

Thank you!

Lilach


On Sat, Dec 24, 2011 at 8:45 PM, Dan Tenenbaum <dtenenba@fhcrc.org> wrote:

> On Sat, Dec 24, 2011 at 6:09 AM, Lilach Traivish
> <lilachtraivish@gmail.com> wrote:
> > Dear list members,
> >
> > I applied ComBat to control for batch effect in Affymetrix microarray
> data.
> >
> > I managed to get results from ComBat only when adding the skip parameter
> as
> > follows:
> > ComBat('exp_data.txt','sample_information_file.txt',skip=1);
> >
> > However, the header row of the results file misses one value - at the end
> > of the header row.
> > The missing sample same is actually of the first sample which is present
> in
> > the sample information file. Thus, I assume that all the sample names are
> > given in an offset of 1. Is is possible that this is the case? As I wish
> to
> > use the output of ComBat as an input for differential expression
> analysis,
> > how can this issue be resolved?
>
> It looks like you are not asking about the ComBat method in the sva
> package, but instead a script that is not a part of Bioconductor.
>
> You should probably contact the maintainer of that script
> (cplaisier@systemsbiology.org).
>
> Dan
>
> >
> > Thanks in advance
> >
> > Regards,
> > Lilach
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

