GEO2R Gene Expression
1
1
Entering edit mode
nkline ▴ 10
@nkline-15239
Last seen 6.1 years ago

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 • 1.3k views
ADD COMMENT
1
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode
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 REPLY

Login before adding your answer.

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