[BioC] Specifying Sample Names in ReadAffy;

Rafael A. Irizarry ririzarr at jhsph.edu
Sat Jul 5 03:19:28 MEST 2003


On Fri, 4 Jul 2003, Paul Boutros wrote:

> Hello all,
> 
> I would like to be able to specify the sampleNames parameter to ReadAffy to 
> ease later parsing and analysis of the data somewhat.  The documentation 
> (Textual description of affy vignete and ?ReadAffy) indicates that I need to 
> set up a character array with both the file-names and the desired sample-
> names.  This is what I have used (limited data-set for testing):
> 
> > samples.files <- c(
> 	"RAE230A_043003_IM01T_LH.CEL",
> 	"RAE230A_043003_IM02T_LH.CEL",
> 	"RAE230A_043003_IM03T_LH.CEL",
> 	"RAE230A_043003_IM04T_LH.CEL",
>           );
> 
> > samples.names <- c(
> 	"LET",
> 	"LEC",
> 	"WWT",
> 	"WWC",
>           );
> 
> > Data <- ReadAffy(
> 	filenames = samples.files);
> 	sampleNames = samples.animals,
> 	);
> 

i don't get this error. make sure you syntax is correct. 
i usueally get this error when i forget to type filenmaes in
ReadAffy(filenames=file.names), like this: ReadAffy(file.names).
and are you sure you want samples.animals? in looking
at this i found that ReadAffy (via read.affybatch) has a bug. it
ignores the sampleNames argument. this bug has been fixed and should
appear in release version 1.2.30 and devel version 1.3.5.

in the meantime you can try not using the sampleNames argument and later
use

colnames(exprs(Data)) <- sample.names
rownames(pData(Data)) <- sample.names


> But this fails with the error:
> 
> Error in sub(pattern, replacement, x, ignore.case, extended) : 
>         invalid argument
> In addition: Warning message: 
> sampleNames not same length as filenames. Using filenames as sampleNames instead
>  in: ReadAffy(filenames = samples.files, sampleNames = samples.animals,
> 
> So I tested:
> > length(samples.files);
> [1] 4
> > length(samples.names);
> [1] 4
> 
> Have I misunderstood the purpose of the sampleNames argument?  Or ss there 
> another way of changing the "column" names in an eSet and in write.exprs() 
> output?
> 
> Any suggestions much appreciated!
> Paul
> 
> ----------------------------------------
> This mail sent through www.mywaterloo.ca
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list