extract intensity values from AffyBatch
2
0
Entering edit mode
Assa Yeroslaviz ★ 1.5k
@assa-yeroslaviz-1597
Last seen 5 weeks ago
Germany
Hi, I'm trying to extract a matrix of intensity values from an AffyBatch object. I know I can have them using > Intensity(AffyBatch) or >exprs(AffyBatch) but I would like to have a full matrix with the probe names. Unfortunately I can't find a way of doing it. There are several way of extracting the names of the probes, but not in the same order or magnitude compared to the intensity array. > length(geneNames(rawData))[1] 18952> length(probeNames(rawData))[1] 265358> dim(intensity(rawData))[1] 535824 12> dim(exprs(rawData))[1] 535824 12 Does anyone has an idea of how to extract these Values into a matrix. I have the original CEL files. Even a way outside of R will be welcome. Thanks Assa [[alternative HTML version deleted]]
probe probe • 4.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 23 hours ago
United States
Hi Assa, On 5/18/2011 3:46 AM, Assa Yeroslaviz wrote: > Hi, > > I'm trying to extract a matrix of intensity values from an AffyBatch object. > > I know I can have them using >> Intensity(AffyBatch) > or >> exprs(AffyBatch) > > but I would like to have a full matrix with the probe names. > Unfortunately I can't find a way of doing it. There isn't IIRC a direct way of doing this. Here is an example of one way using the Dilution dataset. > library(affydata) > data(Dilution) > pms <- pm(Dilution, LISTRUE=TRUE) > for(i in names(pms)) row.names(pms[[i]]) <- rep(i, nrow(pms[[i]])) > pms2 <- do.call("rbind", pms) > head(pms2) 20A 20B 10A 10B 100_g_at 221.3 146.3 192 116.0 100_g_at 685.0 479.0 493 328.3 100_g_at 1126.3 724.3 849 498.3 100_g_at 205.0 126.5 136 97.0 100_g_at 580.8 341.8 374 226.0 100_g_at 161.3 109.5 139 92.3 You can do the analogous thing for MM probes using the mm() function. Best, Jim > > There are several way of extracting the names of the probes, but not in the > same order or magnitude compared to the intensity array. > >> length(geneNames(rawData))[1] 18952> length(probeNames(rawData))[1] 265358> dim(intensity(rawData))[1] 535824 12> dim(exprs(rawData))[1] 535824 12 > > Does anyone has an idea of how to extract these Values into a matrix. I have > the original CEL files. > > Even a way outside of R will be welcome. > > Thanks > > Assa > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > 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 Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
ADD COMMENT
0
Entering edit mode
@saurabh-bundela-4498
Last seen 10.3 years ago
Hi, I think you can first convert AffyBatch obejct into ExpressionSet data type (by using preprocessing algorithms like rma, plier, gcrma etc) and than by using method 'exprs' you should get full matrix with probe names.... >>>sample code library(affy) #Import cel files into R data<-ReadAffy() #preprocess AffyBatch object 'data' with RMA data2<-rma(data) #extracting matrix data3<-exprs(data2) #converting matrix to data frame data4<-as.data.frame(data3) names(data4)[1]<-"ProbesetID" #exporting data matrix to external tab-delimited file for downstream analysis write.table(data4,"Data.txt",sep="\t") <<<<<< Best Regards, Saurabh On Wed, May 18, 2011 at 1:16 PM, Assa Yeroslaviz <frymor@gmail.com> wrote: > Hi, > > I'm trying to extract a matrix of intensity values from an AffyBatch > object. > > I know I can have them using > > Intensity(AffyBatch) > or > >exprs(AffyBatch) > > but I would like to have a full matrix with the probe names. > Unfortunately I can't find a way of doing it. > > There are several way of extracting the names of the probes, but not in the > same order or magnitude compared to the intensity array. > > > length(geneNames(rawData))[1] 18952> length(probeNames(rawData))[1] > 265358> dim(intensity(rawData))[1] 535824 12> dim(exprs(rawData))[1] > 535824 12 > > Does anyone has an idea of how to extract these Values into a matrix. I > have > the original CEL files. > > Even a way outside of R will be welcome. > > Thanks > > Assa > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Hi, thanks for the response. Unfortunately this wasn't what I meant. I know about the way of extracting the normalized data. What I want is the raw data values for each of the probes on a probes set. Assa On Wed, May 18, 2011 at 10:31, Saurabh Bundela <saurabh.bundela@gmail.com>wrote: > Hi, > > I think you can first convert AffyBatch obejct into ExpressionSet data type > (by using preprocessing algorithms like rma, plier, gcrma etc) and than by > using method 'exprs' you should get full matrix with probe names.... > > >>>sample code > > library(affy) > #Import cel files into R > data<-ReadAffy() > #preprocess AffyBatch object 'data' with RMA > data2<-rma(data) > #extracting matrix > data3<-exprs(data2) > #converting matrix to data frame > data4<-as.data.frame(data3) > names(data4)[1]<-"ProbesetID" > #exporting data matrix to external tab-delimited file for downstream > analysis > write.table(data4,"Data.txt",sep="\t") > <<<<<< > > > Best Regards, > > Saurabh > > On Wed, May 18, 2011 at 1:16 PM, Assa Yeroslaviz <frymor@gmail.com> wrote: > >> Hi, >> >> I'm trying to extract a matrix of intensity values from an AffyBatch >> object. >> >> I know I can have them using >> > Intensity(AffyBatch) >> or >> >exprs(AffyBatch) >> >> but I would like to have a full matrix with the probe names. >> Unfortunately I can't find a way of doing it. >> >> There are several way of extracting the names of the probes, but not in >> the >> same order or magnitude compared to the intensity array. >> >> > length(geneNames(rawData))[1] 18952> length(probeNames(rawData))[1] >> 265358> dim(intensity(rawData))[1] 535824 12> dim(exprs(rawData))[1] >> 535824 12 >> >> Does anyone has an idea of how to extract these Values into a matrix. I >> have >> the original CEL files. >> >> Even a way outside of R will be welcome. >> >> Thanks >> >> Assa >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Hi, Well I am not very sure, how to get exactly get it.... However you can get probe level intensity data (Perfect match and Mis-match probes) using affy methods like probes, pm, mm etc. Please try this code data<-ReadAffy() pm<-as.data.frame(probes(data,which="pm")) mm<-as.data.frame(probes(data,which="mm")) names(pm)[1]<-"ProbesetID" names(mm)[1]<-"ProbesetID" write.table(pm,"PM.txt",sep="\t") write.table(mm,"MM.txt",sep="\t") This should give two files with probe intensities from perfect match and mis match probes, hope it'll be useful Best Regards, Saurabh On Wed, May 18, 2011 at 3:10 PM, Assa Yeroslaviz <frymor@gmail.com> wrote: > Hi, > > thanks for the response. Unfortunately this wasn't what I meant. > I know about the way of extracting the normalized data. What I want is the > raw data values for each of the probes on a probes set. > > Assa > > On Wed, May 18, 2011 at 10:31, Saurabh Bundela <saurabh.bundela@gmail.com>wrote: > >> Hi, >> >> I think you can first convert AffyBatch obejct into ExpressionSet data >> type (by using preprocessing algorithms like rma, plier, gcrma etc) and than >> by using method 'exprs' you should get full matrix with probe names.... >> >> >>>sample code >> >> library(affy) >> #Import cel files into R >> data<-ReadAffy() >> #preprocess AffyBatch object 'data' with RMA >> data2<-rma(data) >> #extracting matrix >> data3<-exprs(data2) >> #converting matrix to data frame >> data4<-as.data.frame(data3) >> names(data4)[1]<-"ProbesetID" >> #exporting data matrix to external tab-delimited file for downstream >> analysis >> write.table(data4,"Data.txt",sep="\t") >> <<<<<< >> >> >> Best Regards, >> >> Saurabh >> >> On Wed, May 18, 2011 at 1:16 PM, Assa Yeroslaviz <frymor@gmail.com>wrote: >> >>> Hi, >>> >>> I'm trying to extract a matrix of intensity values from an AffyBatch >>> object. >>> >>> I know I can have them using >>> > Intensity(AffyBatch) >>> or >>> >exprs(AffyBatch) >>> >>> but I would like to have a full matrix with the probe names. >>> Unfortunately I can't find a way of doing it. >>> >>> There are several way of extracting the names of the probes, but not in >>> the >>> same order or magnitude compared to the intensity array. >>> >>> > length(geneNames(rawData))[1] 18952> length(probeNames(rawData))[1] >>> 265358> dim(intensity(rawData))[1] 535824 12> dim(exprs(rawData))[1] >>> 535824 12 >>> >>> Does anyone has an idea of how to extract these Values into a matrix. I >>> have >>> the original CEL files. >>> >>> Even a way outside of R will be welcome. >>> >>> Thanks >>> >>> Assa >>> >>> [[alternative HTML version deleted]] >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor@r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >> >> > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Maybe you could use the expresso() function from the affy library and only do the summarization step (i.e. skip normalization background correction etc). Should give you what I *think* you're looking for. Paul. On Wed, May 18, 2011 at 11:22 AM, Saurabh Bundela <saurabh.bundela at="" gmail.com=""> wrote: > Hi, > > Well I am not very sure, how to get exactly get it.... However you can get > probe level intensity data (Perfect match and Mis-match probes) using affy > methods like probes, pm, mm etc. > > Please try this code > > data<-ReadAffy() > pm<-as.data.frame(probes(data,which="pm")) > mm<-as.data.frame(probes(data,which="mm")) > names(pm)[1]<-"ProbesetID" > names(mm)[1]<-"ProbesetID" > write.table(pm,"PM.txt",sep="\t") > write.table(mm,"MM.txt",sep="\t") > > This should give two files with probe intensities from perfect match and mis > match probes, hope it'll be useful > > Best Regards, > > Saurabh > > > On Wed, May 18, 2011 at 3:10 PM, Assa Yeroslaviz <frymor at="" gmail.com=""> wrote: > >> Hi, >> >> thanks for the response. Unfortunately this wasn't what I meant. >> I know about the way of extracting the normalized data. What I want is the >> raw data values for each of the probes on a probes set. >> >> Assa >> >> On Wed, May 18, 2011 at 10:31, Saurabh Bundela <saurabh.bundela at="" gmail.com="">wrote: >> >>> Hi, >>> >>> I think you can first convert AffyBatch obejct into ExpressionSet data >>> type (by using preprocessing algorithms like rma, plier, gcrma etc) and than >>> by using method 'exprs' you should get full matrix with probe names.... >>> >>> >>>sample code >>> >>> library(affy) >>> #Import cel files into R >>> data<-ReadAffy() >>> #preprocess AffyBatch object 'data' with RMA >>> data2<-rma(data) >>> #extracting matrix >>> data3<-exprs(data2) >>> #converting matrix to data frame >>> data4<-as.data.frame(data3) >>> names(data4)[1]<-"ProbesetID" >>> #exporting data matrix to external tab-delimited file for downstream >>> analysis >>> write.table(data4,"Data.txt",sep="\t") >>> <<<<<< >>> >>> >>> Best Regards, >>> >>> Saurabh >>> >>> On Wed, May 18, 2011 at 1:16 PM, Assa Yeroslaviz <frymor at="" gmail.com="">wrote: >>> >>>> Hi, >>>> >>>> I'm trying to extract a matrix of intensity values from an AffyBatch >>>> object. >>>> >>>> I know I can have them using >>>> > Intensity(AffyBatch) >>>> or >>>> >exprs(AffyBatch) >>>> >>>> but I would like to have a full matrix with the probe names. >>>> Unfortunately I can't find a way of doing it. >>>> >>>> There are several way of extracting the names of the probes, but not in >>>> the >>>> same order or magnitude compared to the intensity array. >>>> >>>> > length(geneNames(rawData))[1] 18952> length(probeNames(rawData))[1] >>>> 265358> dim(intensity(rawData))[1] 535824 ? ? 12> dim(exprs(rawData))[1] >>>> 535824 ? ? 12 >>>> >>>> Does anyone has an idea of how to extract these Values into a matrix. I >>>> have >>>> the original CEL files. >>>> >>>> Even a way outside of R will be welcome. >>>> >>>> Thanks >>>> >>>> Assa >>>> >>>> ? ? ? ?[[alternative HTML version deleted]] >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at r-project.org >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: >>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>> >>> >>> >> > > ? ? ? ?[[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Paul Geeleher (PhD Student) School of Mathematics, Statistics and Applied Mathematics National University of Ireland Galway Ireland -- www.bioinformaticstutorials.com
ADD REPLY

Login before adding your answer.

Traffic: 524 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