Extracting data sub set from loaded data.
2
0
Entering edit mode
@elliot-harrison-2391
Last seen 9.6 years ago
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.
• 707 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour ago
United States
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
ADD COMMENT
0
Entering edit mode
@elliot-harrison-2391
Last seen 9.6 years ago
Hi Jim, Thanks for the reply (and to all those who replied). I understand what you are telling me to do (I think) but am having trouble achieving it. I got a list of probes from my full data set like this. RPL = R$genes[6] 44998 A_23_P90369 44999 A_32_P38745 45000 A_24_P246406 45001 A_23_P5757 45002 A_24_P926284 45003 A_23_P1331 45004 A_23_P164289 I've loaded my interesting probes like this. b=read.csv("600probes.txt", sep="\t", header=T) b 586 A_23_P337726 587 A_23_P251095 588 A_24_P277934 589 A_23_P205499 590 A_23_P85236 591 A_24_P335202 592 A_23_P203920 593 A_24_P146211 I've tried to match the 2 lists > vec <- match(b, RPL) > vec [1] NA Match against the main data set > vec <- match(b, R) > vec [1] NA Match against the corresponding value in the data set > vec <- match(b, R$Genes[6]) > vec [1] NA I'm missing something obvious I know but a little more nudging would be appreciated. Many Thanks Elliott -----Original Message----- From: James W. MacDonald [mailto:jmacdon@med.umich.edu] Sent: Wednesday, October 24, 2007 4:21 PM To: elliott harrison Cc: bioconductor at stat.math.ethz.ch Subject: Re: [BioC] Extracting data sub set from loaded data. 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 This message has been scanned for viruses by BlackSpider...{{dropped:3}}
ADD COMMENT

Login before adding your answer.

Traffic: 767 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6