source: orange-bioinformatics/docs/reference-html/obiKEGG.htm @ 1662:427f1876f3e6

Revision 1662:427f1876f3e6, 5.6 KB checked in by mitar, 2 years ago (diff)

Revamped documentation.

Line 
1<html>
2
3<head>
4<title>obiKEGG: Interface to KEGG(Kyoto Encyclopedia of Genes and Genomes)</title>
5<link rel=stylesheet href="style.css" type="text/css">
6<link rel=stylesheet href="style-print.css" type="text/css" media=print>
7</head>
8
9<body>
10<h1>obiKEGG: Interface to KEGG (Kyoto Encyclopedia of Genes and Genomes)</h1>
11<p>obiKEGG is an interface to data and information from <a href="http://www.genome.jp/kegg/">Kyoto Encyclopedia of Genes and Genomes</a>. The module supports a programmable access to KEGG pathways and information on genes.</p>
12
13<h2>Local data manipulation</h2>
14<h2><index>Update</index></h2>
15<p>Is a class used for managing local KEGG database copy.</p>
16<p class=section>Methods</p>
17<dl class=attributes>
18    <dt>getinstance(local_database_path=None, progressCallback=None)</dt>
19    <dd>Return an instance of the Update class initialized to local_database_path. progressCallback will be used to report progress an all download progress.</dd>
20   
21    <dt>UpdateOrganism(org)</dt>
22    <dd>Download organism specific pathways and genes to the local database</dd>
23   
24    <dt>UpdateReference()</dt>
25    <dd>Download reference pathways</dd>
26   
27    <dt>UpdateEnzymeAndCompounds()</dt>
28    <dd>Downloads enzyme and compound data</dd>
29</dl>
30
31<h2><index>KEGGOrganism</index></h2>
32<p><code>KEGGOrgansim</code> is a class for easy access to organism specific data.</p>
33<p class=section>Attributes</p>
34<dl class=attributes>
35    <dt>org</dt>
36    <dd>Kegg organism code (e.g. "hsa")</dd>
37    <dt>local_database_path</dt>
38    <dd>Path to the local database. If <code>None</code> the <code>obiKEGG.default_database_path</code> will be used</dd>
39</dl>
40<p class="header">Example: construction</p>
41<xmp class="code">org = KEGGOrganism("hsa", local_database_path="C:\\kegg")</xmp>
42<p class=section>Methods</p>
43<dl class=attributes>
44    <dt>list_pathways()</dt>
45    <dd>Return a list of all organism specific pathways.</dd>
46   
47    <dt>get_linked_pathways(pathway_id)</dt>
48    <dd>Return a list of all organism specific pathways that pathway with <code>pathway_id</code> links to.</dd>
49   
50    <dt>get_genes()</dt>
51    <dd>Return a list of all specific genes</dd>
52   
53    <dt>get_genes_by_pathway(pathway_id)</dt>
54    <dd>Return a set of all organism specific genes that are in the pathway with <code>pathway_id</code>.</dd>
55   
56    <dt>get_enzymes_by_pathway(pathway_id)</dt>
57    <dd>Return a set of all organism specific enzymes that are in the pathway with <code>pathway_id</code>.</dd>
58   
59    <dt>get_compounds_by_pathway(pathway_id)</dt>
60    <dd>Return a set of all organism specific compounds that are in the pathway with <code>pathway_id</code>.</dd>
61   
62    <dt>get_pathways_by_genes(genes)</dt>
63    <dd>Return a list of all organism specific pathways that contain all the genes.</dd>
64   
65    <dt>get_enriched_pathways_by_genes(genes, reference=None, callback=None)</dt>
66    <dd>Return a dictionary with enriched pathways ids as keys and (list_of_genes, p_value, num_of_reference_genes) tuples as items.</dd>
67   
68    <dt>get_pathways_by_enzymes(enzymes)</dt>
69    <dd>Return a list of all organism specific pathways that contain all the enzymes.</dd>
70   
71    <dt>get_pathways_by_compounds(compounds)</dt>
72    <dd>Return a list of all organism specific pathways that contain all the compounds.</dd>
73   
74    <dt>get_enzymes_by_compound(compound)</dt>
75    <dd>Return a list of all organism specific enzymes that are involved in a reaction with <code>compound</code>.</dd>
76   
77    <dt>get_compounds_by_enzyme(enzyme)</dt>
78    <dd>Return a list of all compounds that are involved in a reaction with the <code>enzyme</code>.</dd>
79   
80    <dt>get_genes_by_enzyme(enzyme)</dt>
81    <dd>Return a list of all genes that are involved with the production of <code>enzyme</code>.</dd>
82   
83    <dt>get_enzymes_by_gene(gene)</dt>
84    <dd>Return a list of all enzymes that are a product of <code>gene</code>.</dd>
85   
86    <dt>get_unique_gene_ids(genes, caseSensitive=True)</dt>
87    <dd>Return a tuple with three elements. The first is a dictionary mapping from unique gene ids to gene names in <code>genes</code>, the second is a list of conflicting gene names and the third is a list of unknown genes.</dd>
88   
89</dl>
90
91<h3>Examples<h3>
92
93<p class="header">Getting enriched pathways</p>
94<xmp class="code">org = KEGGOrganism("hsa")
95genes, _, _ = org.get_unique_gene_ids([...])
96res = orng.get_enriched_pathways(genes)
97for p_id, (genes, p_value, refCount) in res.items():
98    print "Pathway id %s with p-value %.4f" %(p_id, p_value)</xmp>
99
100
101<h2><index>KEGGPathway</index></h2>
102<p><code>KEGGPathway</code> is a class for pathway specific data</p>
103<p class=section>Attributes</p>
104<dl class=attributes>
105    <dt>pathway_id</dt>
106    <dd>Kegg pathway id code (e.g. "hsa:00052")</dd>
107    <dt>local_database_path</dt>
108    <dd>Path to the local database. If <code>None</code> the <code>obiKEGG.default_database_path</code> will be used</dd>
109</dl>
110<p class=section>Methods</p>
111<dl class=attributes>
112    <dt>get_image()</dt>
113    <dd>Return an PIL image of the pathway</dd>
114   
115    <dt>get_colored_image(objects)</dt>
116    <dd>Return an PIL image of the pathway with marked <code>objects</code></dd>
117   
118    <dt>get_bounding_box(object)</dt>
119    <dd>Return a bounding box of the form (x1, y1, x2, y2) of <code>object</code> on the pathway image</dd>
120   
121    <dt>get_bounding_box_dict()</dt>
122    <dd>Return a dictionary mapping all objects on the pathways to bounding boxes (x1, y1, x2, y2) on the pathway image</dd>
123   
124    <dt>get_genes()</dt>
125    <dd>Return all genes on the pathway</dd>
126   
127    <dt>get_enzymes()</dt>
128    <dd>Return all enzymes on the pathway</dd>
129   
130    <dt>get_compounds()</dt>
131    <dd>Return all compounds on the pathway</dd>
132   
133</dl>
134
135<h3>Example<h3>
136<p class="header">Retrieval of enriched pathway images with marked genes</p>
137<xmp class="code">for p_id, (genes, _, _) in res.items():
138    pathway = KEGGPathway(p_id)
139    image = pathway.get_colored_image(genes)
140    image.save(p_id)</xmp>
Note: See TracBrowser for help on using the repository browser.