We recently ran into a problem of GOstats package:
Below is how we performed GO enrichment analysis, both the background and input genes are vector of characters containing entrez gene ID.
###set up backgrourd genes x<-org.Hs.egGO mapped_genes<-mappedkeys(x) ###set up input genes go_object<-sample_to_be_test ###Enrichment analysis: class(go_object)<-"character" universe<-mapped_genes params<-new('GOHyperGParams', geneIds=go_object, universeGeneIds=universe, ontology='BP', pvalueCutoff=0.001, conditional=F, testDirection='over', annotation="org.Hs.eg.db") #for human hgOver<-hyperGTest(params) #hgOver #remove # for pipeline checking result<-summary(hgOver)
After the run, we want to see what genes are in each enriched go_term.
First of all, probeSetSummary(hgOver) does not work, it returned warning message:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘columns’ for signature ‘"function"’
Then we converted the input entrez_ID to go_id to manually sort out the genes in each category.
We found the "count" for a given go_id in result doesn't fit with the number of genes carrying the go_id.
Is there a solution to this? If the count is wrong, is the statistic analysis after the gene counting still useful.
Thanks for answering my questions.
For the second part of my post, let me give you a example to show you my question:
Here is the summary result, and GO:0010951 is enriched and there are 16 "counts", I assume the 16 "counts" means there are 16 genes in the input has GO_id of GO:0010951.
"GOBPID" "Pvalue" "OddsRatio" "ExpCount" "Count" "Size" "Term"
"1" "GO:0010951" "2.818657e-13" " 15.091097" " 1.32794395" "16" " 128" "negative regulation of endopeptidase activity"
But when I converting all the input gene IDs to go_id, this is what I got: (there are way more genes with the enriched go_id than what is reported). Do you know why or how the "counts" is counted?
"entrezgene" "go_id" "name_1006"
" 5272" "GO:0010951" "negative regulation of endopeptidase activity"
" 128817" "GO:0010951" "negative regulation of endopeptidase activity"
" 5269" "GO:0010951" "negative regulation of endopeptidase activity"
" 327657" "GO:0010951" "negative regulation of endopeptidase activity"
" 256394" "GO:0010951" "negative regulation of endopeptidase activity"
" 721" "GO:0010951" "negative regulation of endopeptidase activity"
"100293534" "GO:0010951" "negative regulation of endopeptidase activity"
" 1472" "GO:0010951" "negative regulation of endopeptidase activity"
" 140880" "GO:0010951" "negative regulation of endopeptidase activity"
" 145264" "GO:0010951" "negative regulation of endopeptidase activity"
" 1473" "GO:0010951" "negative regulation of endopeptidase activity"
" 1470" "GO:0010951" "negative regulation of endopeptidase activity"
" 10047" "GO:0010951" "negative regulation of endopeptidase activity"
" 720" "GO:0010951" "negative regulation of endopeptidase activity"
" 5271" "GO:0010951" "negative regulation of endopeptidase activity"
" 12" "GO:0010951" "negative regulation of endopeptidase activity"
" 5104" "GO:0010951" "negative regulation of endopeptidase activity"
" 1469" "GO:0010951" "negative regulation of endopeptidase activity"
" 5267" "GO:0010951" "negative regulation of endopeptidase activity"
" 144568" "GO:0010951" "negative regulation of endopeptidase activity"
" 1471" "GO:0010951" "negative regulation of endopeptidase activity"
" 26998" "GO:0010951" "negative regulation of endopeptidase activity"
" 6906" "GO:0010951" "negative regulation of endopeptidase activity"
" 866" "GO:0010951" "negative regulation of endopeptidase activity"
" 5265" "GO:0010951" "negative regulation of endopeptidase activity"
Thank you so much!
L