Question: How To Get Gene Id And Name Into Samr From Geoquery
0
gravatar for Brian Repko
7.8 years ago by
Brian Repko10
Minneapolis, MN, USA
Brian Repko10 wrote:

New to R/Bioconductor and all that so forgive my lack of R chops or understanding of objects like ExpressionSet. Just finished reading the manuals...

I am looking to create a function that takes a GDS id and various control GSM ids and find the most up-regulated gene and most down-regulated gene. Looking at GDS1731 with controls of GSM84549, GSM84550, GSM84551, I can setup the following:

library('GEOquery')
library('samr')
gds <- getGEO('GDS1731')
eset <- GDS2eSet(gds)
x = exprs(eset)
y = c(rep(1,3),rep(2,9))
data <- list(x = x, y = y, logged2 = FALSE)
samr.out <- samr(data = data, resp.type = "Two class unpaired", assay.type = "array")
delta.table <- samr.compute.delta.table(samr.out)
delta=.5
siggenes.table <- samr.compute.siggenes.table(samr.out, delta, data, delta.table)
up_genes <- siggenes.table$genes.up
lo_genes <- siggenes.table$genes.lo

And then take the first row of upgenes or logenes.

What I can't figure out is how to get the geneid and genenames into the mix. They look like parameters to the SAM method but not samr. Nor are they parameters to the samr.compute.siggenes.table - that I can see. Also its not clear to me how to get geneid and genenames out of the ExpressionSet - all depending on what gene identifier I want to use and what is in the GDS/GPL.

Any clues thoughts?

gene • 2.9k views
ADD COMMENTlink written 7.8 years ago by Brian Repko10
1
gravatar for Sean Davis
7.8 years ago by
Sean Davis25k
National Institutes of Health, Bethesda, MD
Sean Davis25k wrote:

To access data about genes from an ExpressionSet, use the fData() method.

gene_data_frame = fData(eset)
ADD COMMENTlink written 7.8 years ago by Sean Davis25k

Thanks Sean - I was able to figure out where in the ExpressionSet these were based on the great documentation for ExpressionSets. But needed to figure out how to get that into samr.

ADD REPLYlink written 7.8 years ago by Brian Repko10
1
gravatar for Brian Repko
7.8 years ago by
Brian Repko10
Minneapolis, MN, USA
Brian Repko10 wrote:

Apparently the list of geneids and genenames can be added to the x (list) parameter passed into samr methods.

fd <- featureData(eset)    
data <- list(x = x, y = y, logged2 = FALSE, geneid = as.character(pData(fd)[,3], genenames = as.character(pData(fd)[,4])

And that did it (looks like they get reversed in samr code so you'll need to switch the 3 and 4 around)

One can also use the SAM method rather than samr which has explicit parameters listed in the documentation for geneids and genenames.

ADD COMMENTlink written 7.8 years ago by Brian Repko10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 598 users visited in the last hour