[BioC] Specifying Sample Names in ReadAffy;

James MacDonald jmacdon at med.umich.edu
Sat Jul 5 09:18:53 MEST 2003


Is it a typo in your email or did you really do the following:

 samples.names <- c(
 	"LET",
 	"LEC",
 	"WWT",
 	"WWC",
           )
 

Data <- ReadAffy(
	filenames = samples.files);
 	sampleNames = samples.animals,
	)

If so, try changing sampleNames=samples.animals to
sampleNames=samples.names.

Jim



James W. MacDonald
UMCCC Microarray Core Facility
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

>>> ririzarr at jhsph.edu 07/05/03 02:19AM >>>
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 
>

_______________________________________________
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