Skip to content

Instantly share code, notes, and snippets.

@bobthecat
Created May 16, 2012 06:35
Show Gist options
  • Save bobthecat/2708076 to your computer and use it in GitHub Desktop.
Save bobthecat/2708076 to your computer and use it in GitHub Desktop.
Obtaining a gene list from data in GEO
library(GEOquery); library(RankProd); library(mouse4302.db)
## Download the data from GEO
gse12499 <- getGEO('GSE12499',GSEMatrix=TRUE)
e <- exprs(gse12499[[1]])
dim(e)
[1] 45101 10
## Rank Product
eRP <- RP(e[,c(1:3, 7:10)], cl=c(0,0,0,1,1,1,1), rand = 123)
table <- topGene(eRP, cutoff=0.001, method="pfp", logged=TRUE,
logbase=2, gene.names=rownames(e))
up <- unique(as.vector(unlist(mget(rownames(table$Table1), envir=mouse4302ENTREZID))))
down <- unique(as.vector(unlist(mget(rownames(table$Table2), envir=mouse4302ENTREZID))))
glist <- c(up, down)
glist <- glist[!is.na(glist)]
length(glist)
[1] 274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment