[BioC] GoStats

David martin vilanew at gmail.com
Tue Mar 29 15:33:15 CEST 2011


Hi ,
I'm a bit confused in the way of using my data.

My input is a list of genes( in fact a list of targeted genes for 
microRNAs). The first step is to get the GoTerms associated to these 
genes and then i would like to do hyperg to obtain significant 
dysregulated Goterms. ALl the examples i went through use affy data or 
so so i'm not sure this is correct. I would appreciate your feedback


library("GOstats")
library("GSEABase")
library(org.Hs.eg.db)


data="genes.txt" # A list of genes ( "MED13"    "ENDOD1"   "RAP2C" 
"ACSL1" ...)
  g=read.table(file=data)
genes <- as.character(g[,1])

# Get Mapping to GO
frame<-merge(toTable(org.Hs.egALIAS2EG[genes]), toTable(org.Hs.egGO), 
by.x= "gene_id", by.y="gene_id")

goframeData = data.frame(frame$go_id, frame$Evidence, frame$gene_id)
goFrame = GOFrame(goframeData, organism = "Homo sapiens")
goAllFrame = GOAllFrame(goFrame)


#From here i'm a bit confused. Since i have my list of Goterms do i need 
to use the universe data ?? or do i apply a hyperg on the above data. 
Thanks for your input.

gsc <- GeneSetCollection(goAllFrame, setType = GOCollection())
universe = Lkeys(org.Hs.egGO)
params <- GSEAGOHyperGParams(name = "My Custom GSEA based annot 
Params",geneSetCollection = gsc, geneIds = unique(frame$gene_id), 
universeGeneIds = universe,ontology = "BP", pvalueCutoff = 0.05, 
conditional = FALSE,testDirection = "over")



More information about the Bioconductor mailing list