source: orange-bioinformatics/doc/modules/geneMatch.py @ 879:ac1dfc4bff67

Revision 879:ac1dfc4bff67, 588 bytes checked in by markotoplak, 5 years ago (diff)

obiGene: documentation example added.

Line 
1import obiGene
2import obiKEGG
3
4targets = obiKEGG.KEGGOrganism("9606").get_genes() #human NCBI ID
5
6gmkegg = obiGene.GMKEGG("9606")
7gmgo = obiGene.GMGO("9606")
8gmkegggo = obiGene.matcher([[gmkegg, gmgo]], direct=False)
9
10gmkegg.set_targets(targets)
11gmgo.set_targets(targets)
12gmkegggo.set_targets(targets)
13
14genes = [ "cct7", "pls1", "gdi1", "nfkb2", "dlg7" ]
15
16print "%12s" % "gene", "%12s" % "KEGG", "%12s" % "GO", "%12s" % "KEGG+GO"
17for gene in genes:
18    print "%12s" % gene, "%12s" % gmkegg.umatch(gene), \
19          "%12s" % gmgo.umatch(gene), \
20          "%12s" % gmkegggo.umatch(gene)
21
Note: See TracBrowser for help on using the repository browser.