[BioC] Best way to import GCOS tab-delimited life

Sean Davis sdavis2 at mail.nih.gov
Thu Mar 1 13:39:49 CET 2007


On Thursday 01 March 2007 06:48, Daniel Brewer wrote:
> Sean Davis wrote:
> > On Thursday 01 March 2007 05:31, Daniel Brewer wrote:
> >> What is the best way to import (what I believe is) a Affymetrix GCOS
> >> produced tab-delimited results file for use with limma and the like?
> >>
> >> Unfortunately I do not have access to the CEL files.
> >
> > I'm not sure what format the files are, but you might want to look at
> > read.maimages() in the limma package.  Alternatively, you can use
> > read.table for each array and then put the columns together any way you
> > like using R commands.  There might be better ways, besides the two
> > mentioned here.
> >
> > Sean
>
> Thanks.
>
> Just for completeness, here is the first couple of lines of one of the
> files:
> 	Descriptions	Met 1_Signal	Met 1_Detection	Met 1_Detection p-value	Met
> 2_Signal	Met 2_Detection	Met 2_Detection p-value	Met 3_Signal	Met
> 3_Detection	Met 3_Detection p-value	Met 4_Signal	Met 4_Detection	Met
> 4_Detection p-value	Met 5_Signal	Met 5_Detection	Met 5_Detection
> p-value	Met 6_Signal	Met 6_Detection	Met 6_Detection p-value	Met
> 7_Signal	Met 7_Detection	Met 7_Detection p-value	Met 8_Signal	Met
> 8_Detection	Met 8_Detection p-value
> AFFX-BioB-5_at	"J04423 E coli bioB gene biotin synthetase  (-5, -M, -3
> represent transcript regions 5 prime, Middle, and 3 prime
> respectively)"	624.4	P	0.002275	955.7	P	0.000857	629.5	P	0.002275
> 819.4	P	0.000972	456.4	P	0.001593	498	P	0.002275	470.7	P	0.002275
> 1141.6	P	0.000509

So, just read this with read.table().  Then, you can get various matrices like 
so:

dat <- read.table(....)

signalMatrix <- as.matrix(dat[,seq(2,ncol(dat),3)]) # extract every third 
column starting with the second column
detectionMatrix <- as.matrix(dat[,seq(3,ncol(dat),3]) # And start with the 
third column, etc.
....

You can use these matrices to make whatever data structure you like, or just 
use the matrix directly with limma.

Sean



More information about the Bioconductor mailing list