HyperGTest 'count' value
1
0
Entering edit mode
Mary Kindall ▴ 70
@mary-kindall-5600
Last seen 10.2 years ago
Hi all I am trying to run HyperGTest on KEGG. The help 'HyperGResult-accessors {Category}' describe count as: "geneCounts returns an "integer" vector: for each category term tested, the number of genes from the gene set that are annotated at the term." > hypTest <- new("KEGGHyperGParams", geneIds = dGenes, + annotation = "org.Mm.eg.db", pvalueCutoff = 0.05, testDirection='over') > hypRes <- hyperGTest(hypTest) > hypRes Gene to KEGG test for over-representation 147 KEGG ids tested (25 have p < 0.05) Selected gene set size: 191 Gene universe size: 5874 Annotation package: org.Mm.eg > goRes <- summary(hypRes) > dim(goRes) [1] 25 7 > head(goRes) KEGGID Pvalue OddsRatio ExpCount Count Size Term 1 04020 2.602986e-08 4.987598 5.084193 21 178 Calcium signaling pathway 2 04080 6.360363e-08 3.920560 7.911919 26 277 Neuroactive ligand-receptor interaction 3... My test shows that 21 of my genes are annotated with 'Calcium signaling pathway'. However, when I check what are those genes I only get 7 and not 21. I am confused if I am doing it correctly. I am using the following code to get all the genes (ENtrez IDs) for 'Calcium signaling pathway' > k2name <- as.list(KEGGPATHID2NAME) #Mapping between kegg ID to kegg pathway name > k2name['04020'] $`04020` [1] "Calcium signaling pathway" >kpath <- as.list(org.Mm.egPATH2EG) # Remove pathway identifiers that do not map to any entrez gene id >kpath2Entrez <- kpath[!is.na(kpath)] > kpath2Entrez['04020'] $`04020` [1] "11441" "11513" "11514" "11515" "11540" "11541" "11548" "11549" "11550" "11554" "11555" "11556" "11607" "11608" "11739" [16] "11740" "11937" "11938" "11941" "12061" "12062" "12182" "12286" "12287" "12288" "12289" "12290" "12291" "12292" "12313" [31] "12314" "12315" "12322" "12323" "12325" "12326" "12425" "12426" "12494" "12669" "12671" "13488" "13492" "13617" "13618" [46] "13649" "13866" "13867" "13869" "14062" "14672" "14675" "14676" "14680" "14682" "14683" "14810" "14811" "14813" "14814" [61] "14816" "14829" "15465" "15466" "15558" "15559" "15560" "15562" "15563" "15564" "15565" "15566" "16438" "16439" "16440" [76] "16867" "18125" "18126" "18127" "18216" "18430" "18436" "18438" "18439" "18440" "18573" "18574" "18575" "18595" "18596" [91] "18679" "18682" "18747" "18749" "18750" "18751" "18752" "18795" "18796" "18797" "18798" "18799" "18802" "18803" "18821" [106] "19055" "19056" "19057" "19058" "19059" "19108" "19204" "19216" "19218" "19220" "19229" "20190" "20191" "20192" "20541" [121] "20698" "21336" "21337" "21338" "21390" "21924" "21925" "22045" "22063" "22333" "22334" "22335" "26361" "53313" "54140" [136] "54652" "56398" "56632" "57260" "58226" "58861" "67738" "67972" "68961" "70086" "70261" "70405" "72469" "73333" "74055" [151] "80796" "94045" "102093" "104110" "104111" "107589" "108058" "108071" "110094" "110891" "110893" "114875" "170732" "210044" "213435" [166] "213788" "228139" "228550" "228785" "231602" "234779" "239556" "243764" "320404" "320707" "381290" "432530" "494124" intersect(kpath2Entrez['04020'], ourGenes) #results in only 7 genes. Thanks [[alternative HTML version deleted]]
Annotation Category Annotation Category • 1.0k views
ADD COMMENT
0
Entering edit mode
Mary Kindall ▴ 70
@mary-kindall-5600
Last seen 10.2 years ago
Working... Mistake in code Thanks On Mon, Nov 12, 2012 at 10:37 AM, Mary Kindall <mary.kindall@gmail.com>wrote: > Hi all > I am trying to run HyperGTest on KEGG. > > The help 'HyperGResult-accessors {Category}' describe count as: > > "geneCounts > returns an "integer" vector: for each category term tested, the number of > genes from the gene set that are annotated at the term." > > > > hypTest <- new("KEGGHyperGParams", geneIds = dGenes, > + annotation = "org.Mm.eg.db", pvalueCutoff = 0.05, > testDirection='over') > > hypRes <- hyperGTest(hypTest) > > hypRes > Gene to KEGG test for over-representation > 147 KEGG ids tested (25 have p < 0.05) > Selected gene set size: 191 > Gene universe size: 5874 > Annotation package: org.Mm.eg > > goRes <- summary(hypRes) > > dim(goRes) > [1] 25 7 > > head(goRes) > KEGGID Pvalue OddsRatio ExpCount Count Size > Term > 1 04020 2.602986e-08 4.987598 5.084193 21 178 Calcium > signaling pathway > 2 04080 6.360363e-08 3.920560 7.911919 26 277 Neuroactive > ligand-receptor interaction > 3... > > > My test shows that 21 of my genes are annotated with 'Calcium signaling > pathway'. However, when I check what are those genes I only get 7 and not > 21. I am confused if I am doing it correctly. > > I am using the following code to get all the genes (ENtrez IDs) for > 'Calcium signaling pathway' > > > > k2name <- as.list(KEGGPATHID2NAME) #Mapping between kegg ID to kegg > pathway name > > k2name['04020'] > $`04020` > [1] "Calcium signaling pathway" > > >kpath <- as.list(org.Mm.egPATH2EG) > # Remove pathway identifiers that do not map to any entrez gene id > >kpath2Entrez <- kpath[!is.na(kpath)] > > > kpath2Entrez['04020'] > $`04020` > [1] "11441" "11513" "11514" "11515" "11540" "11541" "11548" > "11549" "11550" "11554" "11555" "11556" "11607" "11608" "11739" > [16] "11740" "11937" "11938" "11941" "12061" "12062" "12182" > "12286" "12287" "12288" "12289" "12290" "12291" "12292" "12313" > [31] "12314" "12315" "12322" "12323" "12325" "12326" "12425" > "12426" "12494" "12669" "12671" "13488" "13492" "13617" "13618" > [46] "13649" "13866" "13867" "13869" "14062" "14672" "14675" > "14676" "14680" "14682" "14683" "14810" "14811" "14813" "14814" > [61] "14816" "14829" "15465" "15466" "15558" "15559" "15560" > "15562" "15563" "15564" "15565" "15566" "16438" "16439" "16440" > [76] "16867" "18125" "18126" "18127" "18216" "18430" "18436" > "18438" "18439" "18440" "18573" "18574" "18575" "18595" "18596" > [91] "18679" "18682" "18747" "18749" "18750" "18751" "18752" > "18795" "18796" "18797" "18798" "18799" "18802" "18803" "18821" > [106] "19055" "19056" "19057" "19058" "19059" "19108" "19204" > "19216" "19218" "19220" "19229" "20190" "20191" "20192" "20541" > [121] "20698" "21336" "21337" "21338" "21390" "21924" "21925" > "22045" "22063" "22333" "22334" "22335" "26361" "53313" "54140" > [136] "54652" "56398" "56632" "57260" "58226" "58861" "67738" > "67972" "68961" "70086" "70261" "70405" "72469" "73333" "74055" > [151] "80796" "94045" "102093" "104110" "104111" "107589" "108058" > "108071" "110094" "110891" "110893" "114875" "170732" "210044" "213435" > [166] "213788" "228139" "228550" "228785" "231602" "234779" "239556" > "243764" "320404" "320707" "381290" "432530" "494124" > > > > > intersect(kpath2Entrez['04020'], ourGenes) #results in only 7 genes. > > Thanks > > -- ------------- Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

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