subset GEO data by platform
2
0
Entering edit mode
@jeremiah-h-savage-4102
Last seen 9.6 years ago
I'm working with some data sets which have several platforms, but would like to just work with data from one platform at a time. The code below does NOT work, but it is where I'm at. Can somebody give me a hint on how to modify the lapply() to do what i would like? Thanks, Jeremiah ---------------- library(GEOquery) geodata <- parseGEO("GSE5720.soft") gplnames <- names(GPLList(geodata)) j <- 1 while(j <= length(gplnames)) { gsmdata <- lapply(GSMList(geodata), function(x) { gplnames[j] == Meta(x)$platform_id # this line does nothing, # I would like to alter it so only # one platform is applied. }) # would like 'gsmdata' to now hold half of data # in 'geodata', but it holds all of the data j <- j+1 } [[alternative HTML version deleted]]
• 726 views
ADD COMMENT
0
Entering edit mode
@jeremiah-h-savage-4102
Last seen 9.6 years ago
I've worked around this problem by doing the following: gplnames <- names(GPLList(geodata)) numgpl <- length(gplnames) gsmdata <- GSMList(geodata) j <- 1 while(j <= numgpl) { accumgsm <- list() for(i in gsmdata) { if(gplnames[j] == Meta(i)$platform_id) accumgsm <- append(accumgsm, i) } j <- j + 1 } On Mon, Jun 28, 2010 at 12:56 PM, Jeremiah H. Savage < jeremiahsavage@gmail.com> wrote: > I'm working with some data sets which have several platforms, but would > like to just work with data from one platform at a time. > > The code below does NOT work, but it is where I'm at. Can somebody give me > a hint on how to modify the lapply() to do what i would like? > > Thanks, > Jeremiah > > > ---------------- > library(GEOquery) > geodata <- parseGEO("GSE5720.soft") > gplnames <- names(GPLList(geodata)) > j <- 1 > while(j <= length(gplnames)) > { > gsmdata <- lapply(GSMList(geodata), function(x) { > gplnames[j] == Meta(x)$platform_id # this line does nothing, > # I would like to alter it so only > # one platform is applied. > }) > > # would like 'gsmdata' to now hold half of data > # in 'geodata', but it holds all of the data > j <- j+1 > } > > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
On Mon, Jun 28, 2010 at 3:56 PM, Jeremiah H. Savage < jeremiahsavage@gmail.com> wrote: > I'm working with some data sets which have several platforms, but would > like > to just work with data from one platform at a time. > > Hi, Jeremiah. library(GEOquery) gsedat = getGEO("GSE5720") names(gsedat) [1] "GSE5720-GPL96_series_matrix.txt.gz" "GSE5720-GPL97_series_matrix.txt.gz" gsedat[[1]] is, then, and ExpressionSet and includes only GPL96 platform data. gsedat[[2]] is an ExpressionSet and contains only GPL97 data. Hope that helps. Sean > The code below does NOT work, but it is where I'm at. Can somebody give me > a > hint on how to modify the lapply() to do what i would like? > > Thanks, > Jeremiah > > > ---------------- > library(GEOquery) > geodata <- parseGEO("GSE5720.soft") > gplnames <- names(GPLList(geodata)) > j <- 1 > while(j <= length(gplnames)) > { > gsmdata <- lapply(GSMList(geodata), function(x) { > gplnames[j] == Meta(x)$platform_id # this line does nothing, > # I would like to alter it so only > # one platform is applied. > }) > > # would like 'gsmdata' to now hold half of data > # in 'geodata', but it holds all of the data > j <- j+1 > } > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > 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

Login before adding your answer.

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