[BioC] Extracting data sub set from loaded data.

James W. MacDonald jmacdon at med.umich.edu
Wed Oct 24 17:21:00 CEST 2007


Hi Elliott,

elliott harrison wrote:
> Dear BioC,
> 
> I'm drawing a blank on the archives but I'm sure someone can help point
> me to the right place.
> I have raw data from Agilent whole genome array in R in a dataset (RG)
> imported using  read.maimages.
>>From analysis in a different software I have a list of probes I wish to
> analyse independently.
> How do I load the list of probes into R and then use it to extract data
> from my loaded data and create a new dataset?
> Or do I have to reload the data with just the probes I'm interested in?

According to the help file for subsetting in limma (accessed either via 
help.start() or ?"[.RGList"), you can subset an RGList just like 
anything else. Something like

newRGList <- fullRGList[theprobevector,]

should work. Alternatively you could extract the probe names from the 
RGList and then use match() to get a numeric vector.

vec <- match(theprobevector, allprobes)
newRGList <- fullRGList[vec,]

Apparently you can also convert to an exprSet (I assume now you can 
convert to an ExpressionSet, but Gordon will have to comment on that 
possibility), which also has capabilities for subsetting via a vector of 
probe names.

Best,

Jim


> 
> Many Thanks
> 
> Elliott
> 
> 
> This message has been scanned for viruses by BlackSpider...{{dropped:3}}
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



More information about the Bioconductor mailing list