Question: GEO2R Gene Expression
1
gravatar for nkline
20 months ago by
nkline10
nkline10 wrote:

Hello,

I would like to automate the following process that uses GEO2R to analyze gene expression. For each contig I provide, this is the workflow I follow:

  1. browse to https://www.ncbi.nlm.nih.gov/geo/geo2r/?acc=GSE36545
  2. click Profile Graph
  3. Enter ID: assembledIsotigs_Contig9526
  4. click Set
  5. click Sample Values
  6. copy results from pop-up window:

 

Instead of going through the above workflow for each contig, is it possible to automate the process using something like the getGEO() function ?

Thanks!

geoquery • 308 views
ADD COMMENTlink modified 20 months ago by Sean Davis21k • written 20 months ago by nkline10
Answer: GEO2R Gene Expression
1
gravatar for Sean Davis
20 months ago by
Sean Davis21k
United States
Sean Davis21k wrote:

How about something like this:

‚Äčlibrary(GEOquery)
g = getGEO('GSE36545')[[1]]
barplot(exprs(g)['assembledIsotigs_Contig9526', ], horiz = TRUE, las=2, cex.names = 0.5)

Tinker with the plot to order samples as you see fit. For example, to order by tumor status:

barplot(exprs(g)['assembledIsotigs_Contig9526', order(pData(g)[, 'tumor status:ch1'])], horiz = TRUE, las=2, cex.names = 0.5)

 

ADD COMMENTlink modified 20 months ago • written 20 months ago by Sean Davis21k

Thanks Sean. Now I know how to create a bar plot. Ultimately, I would like the result as a tab-delimited file with sample, title, and value (just like it appears in the image above). Any idea how to make that happen with getGEO()?

ADD REPLYlink written 20 months ago by nkline10
tabler = function(g, gene_id) { 
    vals = exprs(g)[gene_id, ] 
    pd = pData(g) 
    return(data.frame(sample = sampleNames(g), title=pd$title, values = vals )) 
} 
tabler(g, "assembledIsotigs_Contig9526")
ADD REPLYlink modified 20 months ago • written 20 months ago by Sean Davis21k
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 16.09
Traffic: 339 users visited in the last hour