ngoto-bio 1.2.9.9001

Sign up to get free protection for your applications and to get access to all the features.
Files changed (424) hide show
  1. data/ChangeLog +2046 -0
  2. data/README.rdoc +223 -0
  3. data/README_DEV.rdoc +285 -0
  4. data/Rakefile +70 -0
  5. data/bin/bioruby +44 -0
  6. data/bin/br_biofetch.rb +47 -0
  7. data/bin/br_bioflat.rb +293 -0
  8. data/bin/br_biogetseq.rb +45 -0
  9. data/bin/br_pmfetch.rb +421 -0
  10. data/bioruby.gemspec +463 -0
  11. data/bioruby.gemspec.erb +79 -0
  12. data/doc/Changes-0.7.rd +369 -0
  13. data/doc/Changes-1.3.rdoc +195 -0
  14. data/doc/KEGG_API.rd +1843 -0
  15. data/doc/KEGG_API.rd.ja +1834 -0
  16. data/doc/Tutorial.rd +1296 -0
  17. data/doc/Tutorial.rd.ja +2640 -0
  18. data/etc/bioinformatics/seqdatabase.ini +210 -0
  19. data/extconf.rb +2 -0
  20. data/lib/bio/alignment.rb +2518 -0
  21. data/lib/bio/appl/bl2seq/report.rb +334 -0
  22. data/lib/bio/appl/blast/ddbj.rb +142 -0
  23. data/lib/bio/appl/blast/format0.rb +1438 -0
  24. data/lib/bio/appl/blast/format8.rb +83 -0
  25. data/lib/bio/appl/blast/genomenet.rb +263 -0
  26. data/lib/bio/appl/blast/ncbioptions.rb +220 -0
  27. data/lib/bio/appl/blast/remote.rb +105 -0
  28. data/lib/bio/appl/blast/report.rb +767 -0
  29. data/lib/bio/appl/blast/rexml.rb +144 -0
  30. data/lib/bio/appl/blast/rpsblast.rb +277 -0
  31. data/lib/bio/appl/blast/wublast.rb +671 -0
  32. data/lib/bio/appl/blast/xmlparser.rb +236 -0
  33. data/lib/bio/appl/blast.rb +505 -0
  34. data/lib/bio/appl/blat/report.rb +530 -0
  35. data/lib/bio/appl/clustalw/report.rb +152 -0
  36. data/lib/bio/appl/clustalw.rb +219 -0
  37. data/lib/bio/appl/emboss.rb +203 -0
  38. data/lib/bio/appl/fasta/format10.rb +325 -0
  39. data/lib/bio/appl/fasta.rb +235 -0
  40. data/lib/bio/appl/gcg/msf.rb +212 -0
  41. data/lib/bio/appl/gcg/seq.rb +195 -0
  42. data/lib/bio/appl/genscan/report.rb +552 -0
  43. data/lib/bio/appl/hmmer/report.rb +683 -0
  44. data/lib/bio/appl/hmmer.rb +126 -0
  45. data/lib/bio/appl/iprscan/report.rb +374 -0
  46. data/lib/bio/appl/mafft/report.rb +226 -0
  47. data/lib/bio/appl/mafft.rb +259 -0
  48. data/lib/bio/appl/muscle.rb +52 -0
  49. data/lib/bio/appl/paml/baseml/report.rb +32 -0
  50. data/lib/bio/appl/paml/baseml.rb +95 -0
  51. data/lib/bio/appl/paml/codeml/rates.rb +67 -0
  52. data/lib/bio/appl/paml/codeml/report.rb +67 -0
  53. data/lib/bio/appl/paml/codeml.rb +242 -0
  54. data/lib/bio/appl/paml/common.rb +348 -0
  55. data/lib/bio/appl/paml/common_report.rb +38 -0
  56. data/lib/bio/appl/paml/yn00/report.rb +32 -0
  57. data/lib/bio/appl/paml/yn00.rb +103 -0
  58. data/lib/bio/appl/phylip/alignment.rb +129 -0
  59. data/lib/bio/appl/phylip/distance_matrix.rb +96 -0
  60. data/lib/bio/appl/probcons.rb +41 -0
  61. data/lib/bio/appl/psort/report.rb +457 -0
  62. data/lib/bio/appl/psort.rb +548 -0
  63. data/lib/bio/appl/pts1.rb +263 -0
  64. data/lib/bio/appl/sim4/report.rb +485 -0
  65. data/lib/bio/appl/sim4.rb +124 -0
  66. data/lib/bio/appl/sosui/report.rb +151 -0
  67. data/lib/bio/appl/spidey/report.rb +593 -0
  68. data/lib/bio/appl/targetp/report.rb +267 -0
  69. data/lib/bio/appl/tcoffee.rb +55 -0
  70. data/lib/bio/appl/tmhmm/report.rb +231 -0
  71. data/lib/bio/command.rb +593 -0
  72. data/lib/bio/compat/features.rb +157 -0
  73. data/lib/bio/compat/references.rb +128 -0
  74. data/lib/bio/data/aa.rb +349 -0
  75. data/lib/bio/data/codontable.rb +722 -0
  76. data/lib/bio/data/na.rb +223 -0
  77. data/lib/bio/db/aaindex.rb +357 -0
  78. data/lib/bio/db/biosql/biosql_to_biosequence.rb +67 -0
  79. data/lib/bio/db/biosql/sequence.rb +508 -0
  80. data/lib/bio/db/embl/common.rb +352 -0
  81. data/lib/bio/db/embl/embl.rb +500 -0
  82. data/lib/bio/db/embl/embl_to_biosequence.rb +85 -0
  83. data/lib/bio/db/embl/format_embl.rb +190 -0
  84. data/lib/bio/db/embl/sptr.rb +1283 -0
  85. data/lib/bio/db/embl/swissprot.rb +42 -0
  86. data/lib/bio/db/embl/trembl.rb +41 -0
  87. data/lib/bio/db/embl/uniprot.rb +42 -0
  88. data/lib/bio/db/fantom.rb +597 -0
  89. data/lib/bio/db/fasta/defline.rb +532 -0
  90. data/lib/bio/db/fasta/fasta_to_biosequence.rb +63 -0
  91. data/lib/bio/db/fasta/format_fasta.rb +97 -0
  92. data/lib/bio/db/fasta.rb +410 -0
  93. data/lib/bio/db/genbank/common.rb +307 -0
  94. data/lib/bio/db/genbank/ddbj.rb +22 -0
  95. data/lib/bio/db/genbank/format_genbank.rb +187 -0
  96. data/lib/bio/db/genbank/genbank.rb +250 -0
  97. data/lib/bio/db/genbank/genbank_to_biosequence.rb +86 -0
  98. data/lib/bio/db/genbank/genpept.rb +60 -0
  99. data/lib/bio/db/genbank/refseq.rb +18 -0
  100. data/lib/bio/db/gff.rb +1846 -0
  101. data/lib/bio/db/go.rb +481 -0
  102. data/lib/bio/db/kegg/brite.rb +41 -0
  103. data/lib/bio/db/kegg/compound.rb +131 -0
  104. data/lib/bio/db/kegg/drug.rb +98 -0
  105. data/lib/bio/db/kegg/enzyme.rb +148 -0
  106. data/lib/bio/db/kegg/expression.rb +155 -0
  107. data/lib/bio/db/kegg/genes.rb +263 -0
  108. data/lib/bio/db/kegg/genome.rb +241 -0
  109. data/lib/bio/db/kegg/glycan.rb +166 -0
  110. data/lib/bio/db/kegg/keggtab.rb +357 -0
  111. data/lib/bio/db/kegg/kgml.rb +256 -0
  112. data/lib/bio/db/kegg/orthology.rb +136 -0
  113. data/lib/bio/db/kegg/reaction.rb +82 -0
  114. data/lib/bio/db/kegg/taxonomy.rb +331 -0
  115. data/lib/bio/db/lasergene.rb +209 -0
  116. data/lib/bio/db/litdb.rb +107 -0
  117. data/lib/bio/db/medline.rb +326 -0
  118. data/lib/bio/db/nbrf.rb +191 -0
  119. data/lib/bio/db/newick.rb +658 -0
  120. data/lib/bio/db/nexus.rb +1854 -0
  121. data/lib/bio/db/pdb/atom.rb +77 -0
  122. data/lib/bio/db/pdb/chain.rb +210 -0
  123. data/lib/bio/db/pdb/chemicalcomponent.rb +224 -0
  124. data/lib/bio/db/pdb/model.rb +148 -0
  125. data/lib/bio/db/pdb/pdb.rb +1911 -0
  126. data/lib/bio/db/pdb/residue.rb +176 -0
  127. data/lib/bio/db/pdb/utils.rb +399 -0
  128. data/lib/bio/db/pdb.rb +29 -0
  129. data/lib/bio/db/prosite.rb +597 -0
  130. data/lib/bio/db/rebase.rb +456 -0
  131. data/lib/bio/db/soft.rb +404 -0
  132. data/lib/bio/db/transfac.rb +375 -0
  133. data/lib/bio/db.rb +329 -0
  134. data/lib/bio/feature.rb +139 -0
  135. data/lib/bio/io/biosql/biodatabase.rb +64 -0
  136. data/lib/bio/io/biosql/bioentry.rb +29 -0
  137. data/lib/bio/io/biosql/bioentry_dbxref.rb +11 -0
  138. data/lib/bio/io/biosql/bioentry_path.rb +12 -0
  139. data/lib/bio/io/biosql/bioentry_qualifier_value.rb +10 -0
  140. data/lib/bio/io/biosql/bioentry_reference.rb +10 -0
  141. data/lib/bio/io/biosql/bioentry_relationship.rb +10 -0
  142. data/lib/bio/io/biosql/biosequence.rb +11 -0
  143. data/lib/bio/io/biosql/comment.rb +7 -0
  144. data/lib/bio/io/biosql/config/database.yml +20 -0
  145. data/lib/bio/io/biosql/dbxref.rb +13 -0
  146. data/lib/bio/io/biosql/dbxref_qualifier_value.rb +12 -0
  147. data/lib/bio/io/biosql/location.rb +32 -0
  148. data/lib/bio/io/biosql/location_qualifier_value.rb +11 -0
  149. data/lib/bio/io/biosql/ontology.rb +10 -0
  150. data/lib/bio/io/biosql/reference.rb +9 -0
  151. data/lib/bio/io/biosql/seqfeature.rb +32 -0
  152. data/lib/bio/io/biosql/seqfeature_dbxref.rb +11 -0
  153. data/lib/bio/io/biosql/seqfeature_path.rb +11 -0
  154. data/lib/bio/io/biosql/seqfeature_qualifier_value.rb +20 -0
  155. data/lib/bio/io/biosql/seqfeature_relationship.rb +11 -0
  156. data/lib/bio/io/biosql/taxon.rb +12 -0
  157. data/lib/bio/io/biosql/taxon_name.rb +9 -0
  158. data/lib/bio/io/biosql/term.rb +27 -0
  159. data/lib/bio/io/biosql/term_dbxref.rb +11 -0
  160. data/lib/bio/io/biosql/term_path.rb +12 -0
  161. data/lib/bio/io/biosql/term_relationship.rb +13 -0
  162. data/lib/bio/io/biosql/term_relationship_term.rb +11 -0
  163. data/lib/bio/io/biosql/term_synonym.rb +10 -0
  164. data/lib/bio/io/das.rb +461 -0
  165. data/lib/bio/io/dbget.rb +194 -0
  166. data/lib/bio/io/ddbjxml.rb +638 -0
  167. data/lib/bio/io/ebisoap.rb +158 -0
  168. data/lib/bio/io/ensembl.rb +229 -0
  169. data/lib/bio/io/fastacmd.rb +163 -0
  170. data/lib/bio/io/fetch.rb +195 -0
  171. data/lib/bio/io/flatfile/autodetection.rb +545 -0
  172. data/lib/bio/io/flatfile/bdb.rb +253 -0
  173. data/lib/bio/io/flatfile/buffer.rb +237 -0
  174. data/lib/bio/io/flatfile/index.rb +1381 -0
  175. data/lib/bio/io/flatfile/indexer.rb +805 -0
  176. data/lib/bio/io/flatfile/splitter.rb +297 -0
  177. data/lib/bio/io/flatfile.rb +473 -0
  178. data/lib/bio/io/higet.rb +73 -0
  179. data/lib/bio/io/hinv.rb +442 -0
  180. data/lib/bio/io/keggapi.rb +805 -0
  181. data/lib/bio/io/ncbirest.rb +733 -0
  182. data/lib/bio/io/ncbisoap.rb +155 -0
  183. data/lib/bio/io/pubmed.rb +307 -0
  184. data/lib/bio/io/registry.rb +292 -0
  185. data/lib/bio/io/soapwsdl.rb +119 -0
  186. data/lib/bio/io/sql.rb +186 -0
  187. data/lib/bio/location.rb +867 -0
  188. data/lib/bio/map.rb +410 -0
  189. data/lib/bio/pathway.rb +960 -0
  190. data/lib/bio/reference.rb +602 -0
  191. data/lib/bio/sequence/aa.rb +125 -0
  192. data/lib/bio/sequence/adapter.rb +108 -0
  193. data/lib/bio/sequence/common.rb +310 -0
  194. data/lib/bio/sequence/compat.rb +123 -0
  195. data/lib/bio/sequence/dblink.rb +54 -0
  196. data/lib/bio/sequence/format.rb +358 -0
  197. data/lib/bio/sequence/format_raw.rb +23 -0
  198. data/lib/bio/sequence/generic.rb +24 -0
  199. data/lib/bio/sequence/na.rb +491 -0
  200. data/lib/bio/sequence.rb +456 -0
  201. data/lib/bio/shell/core.rb +578 -0
  202. data/lib/bio/shell/demo.rb +146 -0
  203. data/lib/bio/shell/interface.rb +218 -0
  204. data/lib/bio/shell/irb.rb +95 -0
  205. data/lib/bio/shell/object.rb +71 -0
  206. data/lib/bio/shell/plugin/blast.rb +42 -0
  207. data/lib/bio/shell/plugin/codon.rb +218 -0
  208. data/lib/bio/shell/plugin/das.rb +58 -0
  209. data/lib/bio/shell/plugin/emboss.rb +23 -0
  210. data/lib/bio/shell/plugin/entry.rb +105 -0
  211. data/lib/bio/shell/plugin/flatfile.rb +101 -0
  212. data/lib/bio/shell/plugin/keggapi.rb +181 -0
  213. data/lib/bio/shell/plugin/midi.rb +430 -0
  214. data/lib/bio/shell/plugin/obda.rb +45 -0
  215. data/lib/bio/shell/plugin/psort.rb +56 -0
  216. data/lib/bio/shell/plugin/seq.rb +247 -0
  217. data/lib/bio/shell/plugin/soap.rb +87 -0
  218. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/bioruby_generator.rb +29 -0
  219. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_classes.rhtml +4 -0
  220. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_log.rhtml +27 -0
  221. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_methods.rhtml +11 -0
  222. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_modules.rhtml +4 -0
  223. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_variables.rhtml +7 -0
  224. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-bg.gif +0 -0
  225. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-gem.png +0 -0
  226. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-link.gif +0 -0
  227. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby.css +368 -0
  228. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby.rhtml +47 -0
  229. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_controller.rb +144 -0
  230. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb +47 -0
  231. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/commands.rhtml +8 -0
  232. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/history.rhtml +10 -0
  233. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/index.rhtml +26 -0
  234. data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/spinner.gif +0 -0
  235. data/lib/bio/shell/script.rb +25 -0
  236. data/lib/bio/shell/setup.rb +109 -0
  237. data/lib/bio/shell/web.rb +102 -0
  238. data/lib/bio/shell.rb +44 -0
  239. data/lib/bio/tree.rb +852 -0
  240. data/lib/bio/util/color_scheme/buried.rb +59 -0
  241. data/lib/bio/util/color_scheme/helix.rb +59 -0
  242. data/lib/bio/util/color_scheme/hydropathy.rb +64 -0
  243. data/lib/bio/util/color_scheme/nucleotide.rb +31 -0
  244. data/lib/bio/util/color_scheme/strand.rb +59 -0
  245. data/lib/bio/util/color_scheme/taylor.rb +50 -0
  246. data/lib/bio/util/color_scheme/turn.rb +59 -0
  247. data/lib/bio/util/color_scheme/zappo.rb +50 -0
  248. data/lib/bio/util/color_scheme.rb +191 -0
  249. data/lib/bio/util/contingency_table.rb +370 -0
  250. data/lib/bio/util/restriction_enzyme/analysis.rb +249 -0
  251. data/lib/bio/util/restriction_enzyme/analysis_basic.rb +217 -0
  252. data/lib/bio/util/restriction_enzyme/cut_symbol.rb +107 -0
  253. data/lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb +130 -0
  254. data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb +103 -0
  255. data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb +38 -0
  256. data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb +76 -0
  257. data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb +107 -0
  258. data/lib/bio/util/restriction_enzyme/double_stranded.rb +321 -0
  259. data/lib/bio/util/restriction_enzyme/enzymes.yaml +7061 -0
  260. data/lib/bio/util/restriction_enzyme/range/cut_range.rb +24 -0
  261. data/lib/bio/util/restriction_enzyme/range/cut_ranges.rb +47 -0
  262. data/lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb +67 -0
  263. data/lib/bio/util/restriction_enzyme/range/sequence_range/calculated_cuts.rb +242 -0
  264. data/lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb +51 -0
  265. data/lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb +41 -0
  266. data/lib/bio/util/restriction_enzyme/range/sequence_range.rb +257 -0
  267. data/lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb +77 -0
  268. data/lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb +135 -0
  269. data/lib/bio/util/restriction_enzyme/single_strand.rb +200 -0
  270. data/lib/bio/util/restriction_enzyme/single_strand_complement.rb +23 -0
  271. data/lib/bio/util/restriction_enzyme/string_formatting.rb +111 -0
  272. data/lib/bio/util/restriction_enzyme.rb +228 -0
  273. data/lib/bio/util/sirna.rb +288 -0
  274. data/lib/bio.rb +300 -0
  275. data/rdoc.zsh +8 -0
  276. data/sample/any2fasta.rb +59 -0
  277. data/sample/biofetch.rb +475 -0
  278. data/sample/color_scheme_na.rb +91 -0
  279. data/sample/dbget +37 -0
  280. data/sample/demo_sequence.rb +158 -0
  281. data/sample/enzymes.rb +78 -0
  282. data/sample/fasta2tab.rb +99 -0
  283. data/sample/fastagrep.rb +72 -0
  284. data/sample/fastasort.rb +54 -0
  285. data/sample/fsplit.rb +51 -0
  286. data/sample/gb2fasta.rb +30 -0
  287. data/sample/gb2tab.rb +325 -0
  288. data/sample/gbtab2mysql.rb +161 -0
  289. data/sample/genes2nuc.rb +33 -0
  290. data/sample/genes2pep.rb +33 -0
  291. data/sample/genes2tab.rb +81 -0
  292. data/sample/genome2rb.rb +29 -0
  293. data/sample/genome2tab.rb +76 -0
  294. data/sample/goslim.rb +303 -0
  295. data/sample/gt2fasta.rb +47 -0
  296. data/sample/na2aa.rb +34 -0
  297. data/sample/pmfetch.rb +42 -0
  298. data/sample/pmsearch.rb +42 -0
  299. data/sample/psortplot_html.rb +214 -0
  300. data/sample/ssearch2tab.rb +96 -0
  301. data/sample/tdiary.rb +158 -0
  302. data/sample/tfastx2tab.rb +100 -0
  303. data/sample/vs-genes.rb +212 -0
  304. data/setup.rb +1596 -0
  305. data/test/data/HMMER/hmmpfam.out +64 -0
  306. data/test/data/HMMER/hmmsearch.out +88 -0
  307. data/test/data/SOSUI/sample.report +11 -0
  308. data/test/data/TMHMM/sample.report +21 -0
  309. data/test/data/aaindex/DAYM780301 +30 -0
  310. data/test/data/aaindex/PRAM900102 +20 -0
  311. data/test/data/bl2seq/cd8a_cd8b_blastp.bl2seq +53 -0
  312. data/test/data/bl2seq/cd8a_p53_e-5blastp.bl2seq +37 -0
  313. data/test/data/blast/2.2.15.blastp.m7 +876 -0
  314. data/test/data/blast/b0002.faa +15 -0
  315. data/test/data/blast/b0002.faa.m0 +128 -0
  316. data/test/data/blast/b0002.faa.m7 +65 -0
  317. data/test/data/blast/b0002.faa.m8 +1 -0
  318. data/test/data/blast/blastp-multi.m7 +188 -0
  319. data/test/data/command/echoarg2.bat +1 -0
  320. data/test/data/embl/AB090716.embl +65 -0
  321. data/test/data/embl/AB090716.embl.rel89 +63 -0
  322. data/test/data/fasta/example1.txt +75 -0
  323. data/test/data/fasta/example2.txt +21 -0
  324. data/test/data/genscan/sample.report +63 -0
  325. data/test/data/iprscan/merged.raw +32 -0
  326. data/test/data/iprscan/merged.txt +74 -0
  327. data/test/data/paml/codeml/control_file.txt +30 -0
  328. data/test/data/paml/codeml/output.txt +78 -0
  329. data/test/data/paml/codeml/rates +217 -0
  330. data/test/data/prosite/prosite.dat +2233 -0
  331. data/test/data/refseq/nm_126355.entret +64 -0
  332. data/test/data/rpsblast/misc.rpsblast +193 -0
  333. data/test/data/soft/GDS100_partial.soft +92 -0
  334. data/test/data/soft/GSE3457_family_partial.soft +874 -0
  335. data/test/data/uniprot/p53_human.uniprot +1456 -0
  336. data/test/functional/bio/appl/test_pts1.rb +115 -0
  337. data/test/functional/bio/io/test_ensembl.rb +229 -0
  338. data/test/functional/bio/io/test_soapwsdl.rb +52 -0
  339. data/test/functional/bio/sequence/test_output_embl.rb +51 -0
  340. data/test/functional/bio/test_command.rb +301 -0
  341. data/test/runner.rb +23 -0
  342. data/test/unit/bio/appl/bl2seq/test_report.rb +134 -0
  343. data/test/unit/bio/appl/blast/test_ncbioptions.rb +112 -0
  344. data/test/unit/bio/appl/blast/test_report.rb +1135 -0
  345. data/test/unit/bio/appl/blast/test_rpsblast.rb +398 -0
  346. data/test/unit/bio/appl/genscan/test_report.rb +182 -0
  347. data/test/unit/bio/appl/hmmer/test_report.rb +342 -0
  348. data/test/unit/bio/appl/iprscan/test_report.rb +338 -0
  349. data/test/unit/bio/appl/mafft/test_report.rb +63 -0
  350. data/test/unit/bio/appl/paml/codeml/test_rates.rb +45 -0
  351. data/test/unit/bio/appl/paml/codeml/test_report.rb +45 -0
  352. data/test/unit/bio/appl/paml/test_codeml.rb +174 -0
  353. data/test/unit/bio/appl/sosui/test_report.rb +81 -0
  354. data/test/unit/bio/appl/targetp/test_report.rb +146 -0
  355. data/test/unit/bio/appl/test_blast.rb +277 -0
  356. data/test/unit/bio/appl/test_fasta.rb +130 -0
  357. data/test/unit/bio/appl/test_pts1.rb +77 -0
  358. data/test/unit/bio/appl/tmhmm/test_report.rb +126 -0
  359. data/test/unit/bio/data/test_aa.rb +90 -0
  360. data/test/unit/bio/data/test_codontable.rb +107 -0
  361. data/test/unit/bio/data/test_na.rb +80 -0
  362. data/test/unit/bio/db/embl/test_common.rb +117 -0
  363. data/test/unit/bio/db/embl/test_embl.rb +214 -0
  364. data/test/unit/bio/db/embl/test_embl_rel89.rb +219 -0
  365. data/test/unit/bio/db/embl/test_embl_to_bioseq.rb +203 -0
  366. data/test/unit/bio/db/embl/test_sptr.rb +1812 -0
  367. data/test/unit/bio/db/embl/test_uniprot.rb +31 -0
  368. data/test/unit/bio/db/kegg/test_genes.rb +45 -0
  369. data/test/unit/bio/db/pdb/test_pdb.rb +152 -0
  370. data/test/unit/bio/db/test_aaindex.rb +197 -0
  371. data/test/unit/bio/db/test_fasta.rb +250 -0
  372. data/test/unit/bio/db/test_gff.rb +1190 -0
  373. data/test/unit/bio/db/test_lasergene.rb +95 -0
  374. data/test/unit/bio/db/test_medline.rb +127 -0
  375. data/test/unit/bio/db/test_newick.rb +293 -0
  376. data/test/unit/bio/db/test_nexus.rb +364 -0
  377. data/test/unit/bio/db/test_prosite.rb +1437 -0
  378. data/test/unit/bio/db/test_rebase.rb +101 -0
  379. data/test/unit/bio/db/test_soft.rb +138 -0
  380. data/test/unit/bio/io/flatfile/test_autodetection.rb +375 -0
  381. data/test/unit/bio/io/flatfile/test_buffer.rb +251 -0
  382. data/test/unit/bio/io/flatfile/test_splitter.rb +369 -0
  383. data/test/unit/bio/io/test_ddbjxml.rb +80 -0
  384. data/test/unit/bio/io/test_ensembl.rb +109 -0
  385. data/test/unit/bio/io/test_fastacmd.rb +42 -0
  386. data/test/unit/bio/io/test_flatfile.rb +488 -0
  387. data/test/unit/bio/io/test_soapwsdl.rb +32 -0
  388. data/test/unit/bio/sequence/test_aa.rb +103 -0
  389. data/test/unit/bio/sequence/test_common.rb +373 -0
  390. data/test/unit/bio/sequence/test_compat.rb +69 -0
  391. data/test/unit/bio/sequence/test_dblink.rb +58 -0
  392. data/test/unit/bio/sequence/test_na.rb +330 -0
  393. data/test/unit/bio/shell/plugin/test_seq.rb +185 -0
  394. data/test/unit/bio/test_alignment.rb +1025 -0
  395. data/test/unit/bio/test_command.rb +349 -0
  396. data/test/unit/bio/test_db.rb +96 -0
  397. data/test/unit/bio/test_feature.rb +144 -0
  398. data/test/unit/bio/test_location.rb +599 -0
  399. data/test/unit/bio/test_map.rb +230 -0
  400. data/test/unit/bio/test_pathway.rb +499 -0
  401. data/test/unit/bio/test_reference.rb +252 -0
  402. data/test/unit/bio/test_sequence.rb +329 -0
  403. data/test/unit/bio/test_shell.rb +18 -0
  404. data/test/unit/bio/test_tree.rb +593 -0
  405. data/test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb +299 -0
  406. data/test/unit/bio/util/restriction_enzyme/analysis/test_cut_ranges.rb +103 -0
  407. data/test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb +240 -0
  408. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb +101 -0
  409. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb +75 -0
  410. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb +73 -0
  411. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb +53 -0
  412. data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb +104 -0
  413. data/test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb +83 -0
  414. data/test/unit/bio/util/restriction_enzyme/test_analysis.rb +246 -0
  415. data/test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb +44 -0
  416. data/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb +115 -0
  417. data/test/unit/bio/util/restriction_enzyme/test_single_strand.rb +147 -0
  418. data/test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb +147 -0
  419. data/test/unit/bio/util/restriction_enzyme/test_string_formatting.rb +60 -0
  420. data/test/unit/bio/util/test_color_scheme.rb +33 -0
  421. data/test/unit/bio/util/test_contingency_table.rb +94 -0
  422. data/test/unit/bio/util/test_restriction_enzyme.rb +42 -0
  423. data/test/unit/bio/util/test_sirna.rb +245 -0
  424. metadata +484 -0
data/doc/KEGG_API.rd ADDED
@@ -0,0 +1,1843 @@
1
+ =begin
2
+
3
+ $Id: KEGG_API.rd,v 1.5 2006/12/27 13:40:45 k Exp $
4
+
5
+ Copyright (C) 2003-2006 Toshiaki Katayama <k@bioruby.org>
6
+
7
+ = KEGG API
8
+
9
+ KEGG API is a web service to use the KEGG system from your program via
10
+ SOAP/WSDL.
11
+
12
+ We have been making the ((<KEGG|URL:/kegg/>)) system available at
13
+ ((<GenomeNet|URL:/>)). KEGG is a suite of databases including GENES,
14
+ SSDB, PATHWAY, LIGAND, LinkDB, etc. for genome research and related
15
+ research areas in molecular and cellular biology. These databases and
16
+ associated computation services are available via WWW and the user
17
+ interfaces are built on web browsers. Thus, the interfaces are
18
+ designed to be accessed by humans, not by machines, which means that
19
+ it is troublesome for the researchers who want to use KEGG in an
20
+ automated manner. Besides, from the database developer's side, it is
21
+ impossible to prepare all the CGI programs that satisfy a variety of
22
+ users' needs.
23
+
24
+ In recent years, the Internet technology for
25
+ application-to-application communication referred to as the
26
+ ((<web service|URL:http://www.oreillynet.com/lpt/a/webservices/2002/02/12/webservicefaqs.html>))
27
+ is improving at a rapid rate. For exmaple, Google, a popular Internet
28
+ search engine, provides the web service called the
29
+ ((<Google Web API|URL:http://www.google.com/apis/>)).
30
+ The service enables users to
31
+ develop software that accesses and manipulates a massive amount of web
32
+ documents that are constantly refreshed. In the field of genome
33
+ research, a similar kind of web service called
34
+ ((<DAS|URL:http://www.biodas.org/>)) (distributed annotation system)
35
+ has been used on several web sites, including
36
+ ((<Ensembl|URL:http://www.ensembl.org/>)),
37
+ ((<Wormbase|URL:http://www.wormbase.org/>)),
38
+ ((<Flybase|URL:http://www.flybase.org/>)),
39
+ ((<SGD|URL:http://www.yeastgenome.org/>)),
40
+ ((<TIGR|URL:http://www.tigr.org/>)).
41
+
42
+ With the background and the trends noted above, we have started developing
43
+ a new web service called KEGG API using
44
+ ((<SOAP|URL:http://www.w3.org/TR/SOAP/>)) and
45
+ ((<WSDL|URL:http://www.w3.org/TR/wsdl20/>)).
46
+ The service has been tested with
47
+ ((<Ruby|URL:http://www.ruby-lang.org/>))
48
+ (Ruby 1.8.2 or Ruby 1.6.8 with
49
+ ((<SOAP4R|URL:http://raa.ruby-lang.org/project/soap4r/>))
50
+ version 1.4.8.1) and
51
+ ((<Perl|URL:http://www.perl.org/>))
52
+ (((<SOAP::Lite|URL:http://www.soaplite.com/>)) version 0.55) languages.
53
+ Although the service has not been tested with clients written in other
54
+ languages, it should work if the language can treat SOAP/WSDL.
55
+
56
+ The ((<BioRuby|URL:http://bioruby.org/>)) project prepared a Ruby
57
+ library to handle the KEGG API, so users of the Ruby language should
58
+ check out the latest release of the BioRuby distribution.
59
+
60
+ For the general information on KEGG API, see the following
61
+ page at GenomeNet:
62
+
63
+ * ((<URL:http://www.genome.jp/kegg/soap/>))
64
+
65
+ == Table of contents
66
+
67
+ * ((<Introduction>))
68
+ * ((<KEGG API Quick Start>))
69
+ * ((<Quick Start with Perl>))
70
+ * ((<Perl FAQ>))
71
+ * ((<Quick Start with Ruby>))
72
+ * ((<Quick Start with Python>))
73
+ * ((<Quick Start with Java>))
74
+ * ((<KEGG API Reference>))
75
+ * ((<WSDL file>))
76
+ * ((<Terminology>))
77
+ * ((<Returned values>))
78
+ * ((<SSDBRelation>)), ((<ArrayOfSSDBRelation>))
79
+ * ((<MotifResult>)), ((<ArrayOfMotifResult>))
80
+ * ((<Definition>)), ((<ArrayOfDefinition>))
81
+ * ((<LinkDBRelation>)), ((<ArrayOfLinkDBRelation>))
82
+ * ((<PathwayElement>)), ((<ArrayOfPathwayElement>))
83
+ * ((<PathwayElementRelation>)), ((<ArrayOfPathwayElementRelation>))
84
+ * ((<Subtype>)), ((<ArrayOfSubtype>))
85
+ * ((<StructureAlignment>)), ((<ArrayOfStructureAlignment>))
86
+ * ((<Methods>))
87
+ * ((<Meta information>))
88
+ * ((<list_databases>))
89
+ * ((<list_organisms>))
90
+ * ((<list_pathways>))
91
+ * ((<DBGET>))
92
+ * ((<binfo>))
93
+ * ((<bfind>))
94
+ * ((<bget>))
95
+ * ((<btit>))
96
+ * ((<bconv>))
97
+ * ((<LinkDB>))
98
+ * ((<Database cross references>))
99
+ * ((<get_linkdb_by_entry>))
100
+ * ((<get_linkdb_between_databases>))
101
+ * ((<Relation among genes and enzymes>))
102
+ * ((<get_genes_by_enzyme>))
103
+ * ((<get_enzymes_by_gene>))
104
+ * ((<Relation among enzymes, compounds and reactions>))
105
+ * ((<get_enzymes_by_compound>))
106
+ * ((<get_enzymes_by_glycan>))
107
+ * ((<get_enzymes_by_reaction>))
108
+ * ((<get_compounds_by_enzyme>))
109
+ * ((<get_compounds_by_reaction>))
110
+ * ((<get_glycans_by_enzyme>))
111
+ * ((<get_glycans_by_reaction>))
112
+ * ((<get_reactions_by_enzyme>))
113
+ * ((<get_reactions_by_compound>))
114
+ * ((<get_reactions_by_glycan>))
115
+ * ((<SSDB>))
116
+ * ((<get_best_best_neighbors_by_gene>))
117
+ * ((<get_best_neighbors_by_gene>))
118
+ * ((<get_reverse_best_neighbors_by_gene>))
119
+ * ((<get_paralogs_by_gene>))
120
+ * ((<Motif>))
121
+ * ((<get_motifs_by_gene>))
122
+ * ((<get_genes_by_motifs>))
123
+ * ((<KO>))
124
+ * ((<get_ko_by_gene>))
125
+ * ((<get_ko_by_ko_class>))
126
+ * ((<get_genes_by_ko_class>))
127
+ * ((<get_genes_by_ko>))
128
+ * ((<PATHWAY>))
129
+ * ((<Coloring pathways>))
130
+ * ((<mark_pathway_by_objects>))
131
+ * ((<color_pathway_by_objects>))
132
+ * ((<color_pathway_by_elements>))
133
+ * ((<get_html_of_marked_pathway_by_objects>))
134
+ * ((<get_html_of_colored_pathway_by_objects>))
135
+ * ((<get_html_of_colored_pathway_by_elements>))
136
+ * ((<Relations of objects on the pathway>))
137
+ * ((<get_element_relations_by_pathway>))
138
+ * ((<Objects on the pathway>))
139
+ * ((<get_elements_by_pathway>))
140
+ * ((<get_genes_by_pathway>))
141
+ * ((<get_enzymes_by_pathway>))
142
+ * ((<get_compounds_by_pathway>))
143
+ * ((<get_glycans_by_pathway>))
144
+ * ((<get_reactions_by_pathway>))
145
+ * ((<get_kos_by_pathway>))
146
+ * ((<Pathways by objects>))
147
+ * ((<get_pathways_by_genes>))
148
+ * ((<get_pathways_by_enzymes>))
149
+ * ((<get_pathways_by_compounds>))
150
+ * ((<get_pathways_by_glycans>))
151
+ * ((<get_pathways_by_reactions>))
152
+ * ((<get_pathways_by_kos>))
153
+ * ((<Relation among pathways>))
154
+ * ((<get_linked_pathways>))
155
+ * ((<GENES>))
156
+ * ((<get_genes_by_organism>))
157
+ * ((<GENOME>))
158
+ * ((<get_number_of_genes_by_organism>))
159
+ * ((<LIGAND>))
160
+ * ((<convert_mol_to_kcf>))
161
+ * ((<search_compounds_by_name>))
162
+ * ((<search_drugs_by_name>))
163
+ * ((<search_glycans_by_name>))
164
+ * ((<search_compounds_by_composition>))
165
+ * ((<search_drugs_by_composition>))
166
+ * ((<search_glycans_by_composition>))
167
+ * ((<search_compounds_by_mass>))
168
+ * ((<search_drugs_by_mass>))
169
+ * ((<search_glycans_by_mass>))
170
+ * ((<search_compounds_by_subcomp>))
171
+ * ((<search_drugs_by_subcomp>))
172
+ * ((<search_glycans_by_kcam>))
173
+
174
+ == Introduction
175
+
176
+ This guide explains how to use the KEGG API in your programs for
177
+ searching and retrieving data from the KEGG database.
178
+
179
+ == KEGG API Quick Start
180
+
181
+ As always, the best way to become familar with it is by looking at an
182
+ example. In this document, sample codes written in several languages
183
+ are shown. After understanding the first exsample, try other APIs.
184
+
185
+ Firstly, you have to install the SOAP related libraries for the
186
+ programming language of your choice.
187
+
188
+ === Quick Start with Perl
189
+
190
+ In the case of Perl, you need to install the following packages:
191
+
192
+ * ((<SOAP Lite|URL:http://www.soaplite.com/>)) (tested with 0.60)
193
+ * Note: SOAP Lite > 0.60 is reported to have errors in some methods for now.
194
+ * ((<MIME-Base64|URL:http://search.cpan.org/author/GAAS/MIME-Base64/>))
195
+ * ((<LWP|URL:http://search.cpan.org/author/GAAS/libwww-perl/>))
196
+ * ((<URI|URL:http://search.cpan.org/author/GAAS/URI/>))
197
+
198
+ Here's a first example in Perl language.
199
+
200
+ #!/usr/bin/env perl
201
+
202
+ use SOAP::Lite;
203
+
204
+ $wsdl = 'http://soap.genome.jp/KEGG.wsdl';
205
+
206
+ $serv = SOAP::Lite->service($wsdl);
207
+
208
+ $offset = 1;
209
+ $limit = 5;
210
+
211
+ $top5 = $serv->get_best_neighbors_by_gene('eco:b0002', $offset, $limit);
212
+
213
+ foreach $hit (@{$top5}) {
214
+ print "$hit->{genes_id1}\t$hit->{genes_id2}\t$hit->{sw_score}\n";
215
+ }
216
+
217
+ The output will be
218
+
219
+ eco:b0002 eco:b0002 5283
220
+ eco:b0002 ecj:JW0001 5283
221
+ eco:b0002 sfx:S0002 5271
222
+ eco:b0002 sfl:SF0002 5271
223
+ eco:b0002 ecc:c0003 5269
224
+
225
+ showing that eco:b0002 has Smith-Waterman score 5271 with sfl:SF0002
226
+ as a 4th hit among the entire KEGG/GENES database (here, "eco" means
227
+ E. coli K-12 MG1655 and "sfl" means Shigella flexneri 2457T in the
228
+ KEGG organism codes).
229
+
230
+ The method internally searches the KEGG/SSDB (Sequence Similarity
231
+ Database) database which contains information about the amino acid
232
+ sequence similarities among all protein coding genes in the complete
233
+ genomes, together with information about best hits and bidirectional
234
+ best hits (best-best hits). The relation of gene x in genome A and
235
+ gene y in genome B is called bidirectional best hits, when x is the
236
+ best hit of query y against all genes in A and vice versa, and it is
237
+ often used as an operational definition of ortholog.
238
+
239
+ Next example simply lists PATHWAYs for E. coli ("eco") in KEGG
240
+ database.
241
+
242
+ #!/usr/bin/env perl
243
+
244
+ use SOAP::Lite;
245
+
246
+ $wsdl = 'http://soap.genome.jp/KEGG.wsdl';
247
+
248
+ $results = SOAP::Lite
249
+ -> service($wsdl)
250
+ -> list_pathways("eco");
251
+
252
+ foreach $path (@{$results}) {
253
+ print "$path->{entry_id}\t$path->{definition}\n";
254
+ }
255
+
256
+ This example colors the boxes corresponding to the E. coli genes b1002
257
+ and b2388 on a Glycolysis pathway of E. coli (path:eco00010).
258
+
259
+ #!/usr/bin/env perl
260
+
261
+ use SOAP::Lite;
262
+
263
+ $wsdl = 'http://soap.genome.jp/KEGG.wsdl';
264
+
265
+ $serv = SOAP::Lite -> service($wsdl);
266
+
267
+ $genes = SOAP::Data->type(array => ["eco:b1002", "eco:b2388"]);
268
+
269
+ $result = $serv -> mark_pathway_by_objects("path:eco00010", $genes);
270
+
271
+ print $result; # URL of the generated image
272
+
273
+ === Perl FAQ
274
+
275
+ If you use the KEGG API methods which requires arguments in
276
+ ArrayOfstring datatype, you must need following modifications
277
+ depending on the version of SOAP::Lite.
278
+
279
+ ==== SOAP::Lite version <= 0.60
280
+
281
+ As you see in the above example, you always need to convert a Perl's array
282
+ into a SOAP object expicitly in SOAP::Lite by
283
+
284
+ SOAP::Data->type(array => [value1, value2, .. ])
285
+
286
+ when you pass an array as the argument for any KEGG API method.
287
+
288
+ ==== SOAP::Lite version > 0.60
289
+
290
+ You should use version >= 0.69 as the versions between 0.61-0.68 contain bugs.
291
+
292
+ You need to add following code to your program to pass the array of
293
+ string and/or int data to the SOAP server.
294
+
295
+ sub SOAP::Serializer::as_ArrayOfstring{
296
+ my ($self, $value, $name, $type, $attr) = @_;
297
+ return [$name, {'xsi:type' => 'array', %$attr}, $value];
298
+ }
299
+
300
+ sub SOAP::Serializer::as_ArrayOfint{
301
+ my ($self, $value, $name, $type, $attr) = @_;
302
+ return [$name, {'xsi:type' => 'array', %$attr}, $value];
303
+ }
304
+
305
+ By adding the above, you can write
306
+
307
+ $genes = ["eco:b1002", "eco:b2388"];
308
+
309
+ instead of the following (writing as follows is also permitted).
310
+
311
+ $genes = SOAP::Data->type(array => ["eco:b1002", "eco:b2388"]);
312
+
313
+ ==== Sample program
314
+
315
+ You can test with the following script for the SOAP::Lite v0.69.
316
+ If it works, a URL of the generated image will be returned.
317
+
318
+ #!/usr/bin/env perl
319
+
320
+ use SOAP::Lite +trace => [qw(debug)];
321
+
322
+ print "SOAP::Lite = ", $SOAP::Lite::VERSION, "\n";
323
+
324
+ my $serv = SOAP::Lite -> service("http://soap.genome.jp/KEGG.wsdl");
325
+
326
+ my $genes = ["eco:b1002", "eco:b2388"];
327
+
328
+ my $result = $serv->mark_pathway_by_objects("path:eco00010", $genes);
329
+ print $result, "\n";
330
+
331
+ # sub routines implicitly used in the above code
332
+
333
+ sub SOAP::Serializer::as_ArrayOfstring{
334
+ my ($self, $value, $name, $type, $attr) = @_;
335
+ return [$name, {'xsi:type' => 'array', %$attr}, $value];
336
+ }
337
+
338
+ sub SOAP::Serializer::as_ArrayOfint{
339
+ my ($self, $value, $name, $type, $attr) = @_;
340
+ return [$name, {'xsi:type' => 'array', %$attr}, $value];
341
+ }
342
+
343
+ === Quick Start with Ruby
344
+
345
+ If you are using Ruby 1.8.1 or later, you are ready to use KEGG API
346
+ as Ruby already supports SOAP in its standard library.
347
+
348
+ If your Ruby is 1.6.8 or older, you need to install followings:
349
+
350
+ * ((<SOAP4R|URL:http://raa.ruby-lang.org/list.rhtml?name=soap4r>)) 1.5.1 or later
351
+ * One of the following XML processing library
352
+ * ((<rexml|URL:http://raa.ruby-lang.org/list.rhtml?name=rexml>))
353
+ * ((<xmlparser|URL:http://raa.ruby-lang.org/list.rhtml?name=xmlparser>))
354
+ * ((<xmlscan|URL:http://raa.ruby-lang.org/list.rhtml?name=xmlscan>))
355
+ * ((<date2|URL:http://raa.ruby-lang.org/list.rhtml?name=date2>))
356
+ * ((<devel-logger|URL:http://raa.ruby-lang.org/list.rhtml?name=devel-logger>))
357
+ * ((<uconv|URL:http://raa.ruby-lang.org/list.rhtml?name=uconv>))
358
+ * ((<http-access2|URL:http://raa.ruby-lang.org/list.rhtml?name=http-access2>))
359
+
360
+ Here's a sample code for Ruby having the same functionality with Perl's
361
+ first example shown above.
362
+
363
+ #!/usr/bin/env ruby
364
+
365
+ require 'soap/wsdlDriver'
366
+
367
+ wsdl = "http://soap.genome.jp/KEGG.wsdl"
368
+ serv = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
369
+ serv.generate_explicit_type = true
370
+ # if uncommented, you can see transactions for debug
371
+ #serv.wiredump_dev = STDERR
372
+
373
+ offset = 1
374
+ limit = 5
375
+
376
+ top5 = serv.get_best_neighbors_by_gene('eco:b0002', offset, limit)
377
+ top5.each do |hit|
378
+ print hit.genes_id1, "\t", hit.genes_id2, "\t", hit.sw_score, "\n"
379
+ end
380
+
381
+ You may need to iterate to obtain all the results by increasing offset
382
+ and/or limit.
383
+
384
+ #!/usr/bin/env ruby
385
+
386
+ require 'soap/wsdlDriver'
387
+
388
+ wsdl = "http://soap.genome.jp/KEGG.wsdl"
389
+ serv = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
390
+ serv.generate_explicit_type = true
391
+
392
+ offset = 1
393
+ limit = 100
394
+
395
+ loop do
396
+ results = serv.get_best_neighbors_by_gene('eco:b0002', offset, limit)
397
+ break unless results
398
+ results.each do |hit|
399
+ print hit.genes_id1, "\t", hit.genes_id2, "\t", hit.sw_score, "\n"
400
+ end
401
+ offset += limit
402
+ end
403
+
404
+ It is automatically done by using ((<BioRuby|URL:http://bioruby.org/>))
405
+ library, which implements get_all_* methods for this. BioRuby also
406
+ provides filtering functionality for selecting needed fields from the
407
+ complex data type.
408
+
409
+ #!/usr/bin/env ruby
410
+
411
+ require 'bio'
412
+
413
+ serv = Bio::KEGG::API.new
414
+
415
+ results = serv.get_all_best_neighbors_by_gene('eco:b0002')
416
+
417
+ results.each do |hit|
418
+ print hit.genes_id1, "\t", hit.genes_id2, "\t", hit.sw_score, "\n"
419
+ end
420
+
421
+ # Same as above but using filter to select fields
422
+ fields = [:genes_id1, :genes_id2, :sw_score]
423
+ results.each do |hit|
424
+ puts hit.filter(fields).join("\t")
425
+ end
426
+
427
+ # Different filters to pick additional fields for each amino acid sequence
428
+ fields1 = [:genes_id1, :start_position1, :end_position1, :best_flag_1to2]
429
+ fields2 = [:genes_id2, :start_position2, :end_position2, :best_flag_2to1]
430
+ results.each do |hit|
431
+ print "> score: ", hit.sw_score, ", identity: ", hit.identity, "\n"
432
+ print "1:\t", hit.filter(fields1).join("\t"), "\n"
433
+ print "2:\t", hit.filter(fields2).join("\t"), "\n"
434
+ end
435
+
436
+ The equivalent for the Perl's second example described above will be
437
+
438
+ #!/usr/bin/env ruby
439
+
440
+ require 'bio'
441
+
442
+ serv = Bio::KEGG::API.new
443
+
444
+ list = serv.list_pathways("eco")
445
+ list.each do |path|
446
+ print path.entry_id, "\t", path.definition, "\n"
447
+ end
448
+
449
+ and equivalent for the last example is as follows.
450
+
451
+ #!/usr/bin/env ruby
452
+
453
+ require 'bio'
454
+
455
+ serv = Bio::KEGG::API.new
456
+
457
+ genes = ["eco:b1002", "eco:b2388"]
458
+
459
+ result = serv.mark_pathway_by_objects("path:eco00010", genes)
460
+
461
+ print result # URL of the generated image
462
+
463
+ === Quick Start with Python
464
+
465
+ In the case of Python, you have to install
466
+
467
+ * ((<SOAPpy|URL:http://pywebsvcs.sourceforge.net/>))
468
+
469
+ plus some extra packages required for SOAPpy (
470
+ ((<fpconst|URL:http://www.analytics.washington.edu/Zope/projects/fpconst>)),
471
+ ((<PyXML|URL:http://pyxml.sourceforge.net/>)) etc.).
472
+
473
+ Here's a sample code using KEGG API with Python.
474
+
475
+ #!/usr/bin/env python
476
+
477
+ from SOAPpy import WSDL
478
+
479
+ wsdl = 'http://soap.genome.jp/KEGG.wsdl'
480
+ serv = WSDL.Proxy(wsdl)
481
+
482
+ results = serv.get_genes_by_pathway('path:eco00020')
483
+ print results
484
+
485
+ === Quick Start with Java
486
+
487
+ In the case of Java, you need to obtain Apache Axis library version
488
+ axis-1_2alpha or newer (axis-1_1 doesn't work properly for KEGG API)
489
+
490
+ * ((<Apache Axis|URL:http://ws.apache.org/axis/>))
491
+
492
+ and put required jar files in an appropriate directory.
493
+
494
+ For the binary distribution of the Apache axis-1_2alpha release, copy
495
+ the jar files stored under the axis-1_2alpha/lib/ to the directory of
496
+ your choice.
497
+
498
+ % cp axis-1_2alpha/lib/*.jar /path/to/lib/
499
+
500
+ You can use WSDL2Java coming with Apache Axis to generate classes
501
+ needed for the KEGG API automatically.
502
+
503
+ To generate classes and documents for the KEGG API, download the script
504
+ ((<axisfix.pl|URL:http://www.genome.jp/kegg/soap/support/axisfix.pl>))
505
+ and follow the steps below:
506
+
507
+ % java -classpath /path/to/lib/axis.jar:/path/to/lib/jaxrpc.jar:/path/to/lib/commons-logging.jar:/path/to/lib/commons-discovery.jar:/path/to/lib/saaj.jar:/path/to/lib/wsdl4j.jar:. org.apache.axis.wsdl.WSDL2Java -p keggapi http://soap.genome.jp/KEGG.wsdl
508
+ % perl -i axisfix.pl keggapi/KEGGBindingStub.java
509
+ % javac -classpath /path/to/lib/axis.jar:/path/to/lib/jaxrpc.jar:/path/to/lib/wsdl4j.jar:. keggapi/KEGGLocator.java
510
+ % jar cvf keggapi.jar keggapi/*
511
+ % javadoc -classpath /path/to/lib/axis.jar:/path/to/lib/jaxrpc.jar -d keggapi_javadoc keggapi/*.java
512
+
513
+ This program will do the same job as the Python's example (extended to
514
+ accept a pathway_id as the argument).
515
+
516
+ import keggapi.*;
517
+
518
+ class GetGenesByPathway {
519
+ public static void main(String[] args) throws Exception {
520
+ KEGGLocator locator = new KEGGLocator();
521
+ KEGGPortType serv = locator.getKEGGPort();
522
+
523
+ String query = args[0];
524
+ String[] results = serv.get_genes_by_pathway(query);
525
+
526
+ for (int i = 0; i < results.length; i++) {
527
+ System.out.println(results[i]);
528
+ }
529
+ }
530
+ }
531
+
532
+ This is another example which uses ArrayOfSSDBRelation data type.
533
+
534
+ import keggapi.*;
535
+
536
+ class GetBestNeighborsByGene {
537
+ public static void main(String[] args) throws Exception {
538
+ KEGGLocator locator = new KEGGLocator();
539
+ KEGGPortType serv = locator.getKEGGPort();
540
+
541
+ String query = args[0];
542
+ SSDBRelation[] results = null;
543
+
544
+ results = serv.get_best_neighbors_by_gene(query, 1, 50);
545
+
546
+ for (int i = 0; i < results.length; i++) {
547
+ String gene1 = results[i].getGenes_id1();
548
+ String gene2 = results[i].getGenes_id2();
549
+ int score = results[i].getSw_score();
550
+ System.out.println(gene1 + "\t" + gene2 + "\t" + score);
551
+ }
552
+ }
553
+ }
554
+
555
+ Compile and execute this program (don't forget to include keggapi.jar file
556
+ in your classpath) as follows:
557
+
558
+ % javac -classpath /path/to/lib/axis.jar:/path/to/lib/jaxrpc.jar:/path/to/lib/wsdl4j.jar:/path/to/keggapi.jar GetBestNeighborsByGene.java
559
+
560
+ % java -classpath /path/to/lib/axis.jar:/path/to/lib/jaxrpc.jar:/path/to/lib/commons-logging.jar:/path/to/lib/commons-discovery.jar:/path/to/lib/saaj.jar:/path/to/lib/wsdl4j.jar:/path/to/keggapi.jar:. GetBestNeighborsByGene eco:b0002
561
+
562
+ You may wish to set the CLASSPATH environmental variable.
563
+
564
+ bash/zsh:
565
+
566
+ % for i in /path/to/lib/*.jar
567
+ do
568
+ CLASSPATH="${CLASSPATH}:${i}"
569
+ done
570
+ % export CLASSPATH
571
+
572
+ tcsh:
573
+
574
+ % foreach i ( /path/to/lib/*.jar )
575
+ setenv CLASSPATH ${CLASSPATH}:${i}
576
+ end
577
+
578
+ For the other cases, consult the javadoc pages generated by WSDL2Java.
579
+
580
+ * ((<URL:http://www.genome.jp/kegg/soap/doc/keggapi_javadoc/>))
581
+
582
+ == KEGG API Reference
583
+
584
+ === WSDL file
585
+
586
+ Users can use a WSDL file to create a SOAP client driver. The WSDL file for
587
+ the KEGG API can be found at:
588
+
589
+ * ((<URL:http://soap.genome.jp/KEGG.wsdl>))
590
+
591
+ === Terminology
592
+
593
+ * 'org' is a three-letter (or four-letter) organism code used in KEGG.
594
+ The list can be found at (see the description of the list_organisms
595
+ method below):
596
+
597
+ * ((<URL:http://www.genome.jp/kegg/catalog/org_list.html>))
598
+
599
+ * 'db' is a database name used in GenomeNet service. See the
600
+ description of the list_databases method below.
601
+
602
+ * 'entry_id' is a unique identifier of which format is the combination of
603
+ the database name and the identifier of an entry joined by a colon sign
604
+ as 'database:entry' (e.g. 'embl:J00231' means an EMBL entry 'J00231').
605
+ 'entry_id' includes 'genes_id', 'enzyme_id', 'compound_id', 'drug_id',
606
+ 'glycan_id', 'reaction_id', 'pathway_id' and 'motif_id' described in below.
607
+
608
+ * 'genes_id' is a gene identifier used in KEGG/GENES which consists of
609
+ 'keggorg' and a gene name (e.g. 'eco:b0001' means an E. coli gene 'b0001').
610
+
611
+ * 'enzyme_id' is an enzyme identifier consisting of database name 'ec'
612
+ and an enzyme code used in KEGG/LIGAND ENZYME database.
613
+ (e.g. 'ec:1.1.1.1' means an alcohol dehydrogenase enzyme)
614
+
615
+ * 'compound_id' is a compound identifier consisting of database name
616
+ 'cpd' and a compound number used in KEGG COMPOUND / LIGAND database
617
+ (e.g. 'cpd:C00158' means a citric acid). Note that some compounds
618
+ also have 'glycan_id' and both IDs are accepted and converted internally
619
+ by the corresponding methods.
620
+
621
+ * 'drug_id' is a drug identifier consisting of database name 'dr'
622
+ and a compound number used in KEGG DRUG / LIGAND database
623
+ (e.g. 'dr:D00201' means a tetracycline).
624
+
625
+ * 'glycan_id' is a glycan identifier consisting of database name 'gl'
626
+ and a glycan number used in KEGG GLYCAN database (e.g. 'gl:G00050'
627
+ means a Paragloboside). Note that some glycans also have 'compound_id'
628
+ and both IDs are accepted and converted internally by the corresponding
629
+ methods.
630
+
631
+ * 'reaction_id' is a reaction identifier consisting of database name 'rn'
632
+ and a reaction number used in KEGG/REACTION (e.g. 'rn:R00959' is a
633
+ reaction which catalyze cpd:C00103 into cpd:C00668)
634
+
635
+ * 'pathway_id' is a pathway identifier consisting of 'path' and a pathway
636
+ number used in KEGG/PATHWAY. Pathway numbers prefixed by 'map' specify
637
+ the reference pathway and pathways prefixed by the 'keggorg' specify
638
+ pathways specific to the organism (e.g. 'path:map00020' means a reference
639
+ pathway for the cytrate cycle and 'path:eco00020' means a same pathway of
640
+ which E. coli genes are marked).
641
+
642
+ * 'motif_id' is a motif identifier consisting of motif database names
643
+ ('ps' for prosite, 'bl' for blocks, 'pr' for prints, 'pd' for prodom,
644
+ and 'pf' for pfam) and a motif entry name. (e.g. 'pf:DnaJ' means a Pfam
645
+ database entry 'DnaJ').
646
+
647
+ * 'ko_id' is a KO identifier consisting of 'ko' and a ko number used in
648
+ KEGG/KO. KO (KEGG Orthology) is an classification of orthologous genes
649
+ defined by KEGG (e.g. 'ko:K02598' means a KO group for nitrite transporter
650
+ NirC genes).
651
+
652
+ * 'ko_class_id' is a KO class identifier which is used to classify
653
+ 'ko_id' hierarchically (e.g. '01110' means a 'Carbohydrate Metabolism'
654
+ class).
655
+
656
+ * ((<URL:http://www.genome.jp/dbget-bin/get_htext?KO>))
657
+
658
+ * 'offset' and 'limit' are both an integer and used to control the
659
+ number of the results returned at once. Methods having these arguments
660
+ will return first 'limit' results starting from 'offset'th.
661
+
662
+ * 'fg_color_list' is a list of colors for the foreground (corresponding
663
+ to the texts and borders of the objects on the KEGG pathway map).
664
+
665
+ * 'bg_color_list' is a list of colors for the background (corresponding
666
+ to the inside of the objects on the KEGG pathway map).
667
+
668
+ Related site:
669
+ * ((<URL:http://www.genome.jp/kegg/kegg3.html>))
670
+
671
+ === Returned values
672
+
673
+ Many of the KEGG API methods will return a set of values in a complex data
674
+ structure as described below. This section summarizes all kind of these
675
+ data types. Note that, the retuened values for the empty result will be
676
+ * an empty array -- for the methods which return ArrayOf'OBJ'
677
+ * an empty string -- for the methods which return String
678
+ * -1 -- for the methods which return int
679
+ * NULL -- for the methods which return any other 'OBJ'
680
+
681
+ + SSDBRelation
682
+
683
+ SSDBRelation data type contains the following fields:
684
+
685
+ genes_id1 genes_id of the query (string)
686
+ genes_id2 genes_id of the target (string)
687
+ sw_score Smith-Waterman score between genes_id1 and genes_id2 (int)
688
+ bit_score bit score between genes_id1 and genes_id2 (float)
689
+ identity identity between genes_id1 and genes_id2 (float)
690
+ overlap overlap length between genes_id1 and genes_id2 (int)
691
+ start_position1 start position of the alignment in genes_id1 (int)
692
+ end_position1 end position of the alignment in genes_id1 (int)
693
+ start_position2 start position of the alignment in genes_id2 (int)
694
+ end_position2 end position of the alignment in genes_id2 (int)
695
+ best_flag_1to2 best flag from genes_id1 to genes_id2 (boolean)
696
+ best_flag_2to1 best flag from genes_id2 to genes_id1 (boolean)
697
+ definition1 definition string of the genes_id1 (string)
698
+ definition2 definition string of the genes_id2 (string)
699
+ length1 amino acid length of the genes_id1 (int)
700
+ length2 amino acid length of the genes_id2 (int)
701
+
702
+
703
+ + ArrayOfSSDBRelation
704
+
705
+ ArrayOfSSDBRelation data type is a list of the SSDBRelation data type.
706
+
707
+ + MotifResult
708
+
709
+ MotifResult data type contains the following fields:
710
+
711
+ motif_id motif_id of the motif (string)
712
+ definition definition of the motif (string)
713
+ genes_id genes_id of the gene containing the motif (string)
714
+ start_position start position of the motif match (int)
715
+ end_position end position of the motif match (int)
716
+ score score of the motif match for TIGRFAM and PROSITE (float)
717
+ evalue E-value of the motif match for Pfam (double)
718
+
719
+ Note: 'score' and/or 'evalue' is set to -1 if the corresponding value is
720
+ not applicable.
721
+
722
+ + ArrayOfMotifResult
723
+
724
+ ArrayOfMotifResult data type is a list of the MotifResult data type.
725
+
726
+ + Definition
727
+
728
+ Definition data type contains the following fields:
729
+
730
+ entry_id database entry_id (string)
731
+ definition definition of the entry (string)
732
+
733
+ + ArrayOfDefinition
734
+
735
+ ArrayOfDefinition data type is a list of the Definition data type.
736
+
737
+ + LinkDBRelation
738
+
739
+ LinkDBRelation data type contains the following fields:
740
+
741
+ entry_id1 entry_id of the starting entry (string)
742
+ entry_id2 entry_id of the terminal entry (string)
743
+ type type of the link as "direct" or "indirect" (string)
744
+ path link path information across the databases (string)
745
+
746
+ + ArrayOfLinkDBRelation
747
+
748
+ ArrayOfLinkDBRelation data type is a list of the LinkDBRelation data type.
749
+
750
+ + PathwayElement
751
+
752
+ PathwayElement represents the object on the KEGG PATHWAY map.
753
+ PathwayElement data type contains the following fields:
754
+
755
+ element_id unique identifier of the object on the pathway (int)
756
+ type type of the object ("gene", "enzyme" etc.) (string)
757
+ names array of names of the object (ArrayOfstring)
758
+ components array of element_ids of the group components (ArrayOfint)
759
+
760
+ + ArrayOfPathwayElement
761
+
762
+ ArrayOfPathwayElement data type is a list of the PathwayElement data type.
763
+
764
+ + PathwayElementRelation
765
+
766
+ PathwayElementRelation represents the relationship between PathwayElements.
767
+ PathwayElementRelation data type contains the following fields:
768
+
769
+ element_id1 unique identifier of the object on the pathway (int)
770
+ element_id2 unique identifier of the object on the pathway (int)
771
+ type type of relation ("ECrel", "maplink" etc.) (string)
772
+ subtypes array of objects involved in the relation (ArrayOfSubtype)
773
+
774
+ + ArrayOfPathwayElementRelation
775
+
776
+ ArrayOfPathwayElementRelation data type is a list of
777
+ the PathwayElementRelation data type.
778
+
779
+ ++ Subtype
780
+
781
+ Subtype is used in the PathwayElementRelation data type to represent
782
+ the object involved in the relation.
783
+ Subtype data type contains the following fields:
784
+
785
+ element_id unique identifier of the object on the pathway (int)
786
+ relation kind of relation ("compound", "inhibition" etc.) (string)
787
+ type type of relation ("+p", "--|" etc.) (string)
788
+
789
+ ++ ArrayOfSubtype
790
+
791
+ ArrayOfSubtype data type is a list of the Subtype data type.
792
+
793
+ + StructureAlignment
794
+
795
+ StructureAlignment represents structural alignment of nodes between
796
+ two molecules with score.
797
+ StructureAlignment data type contains the following fields:
798
+
799
+ target_id entry_id of the target (string)
800
+ score alignment score (float)
801
+ query_nodes indices of aligned nodes in the query molecule (ArrayOfint)
802
+ target_nodes indices of aligned nodes in the target molecule (ArrayOfint)
803
+
804
+ + ArrayOfStructureAlignment
805
+
806
+ ArrayOfStructureAlignment data type is a list of the StructureAlignment
807
+ data type.
808
+
809
+ === Methods
810
+
811
+ ==== Meta information
812
+
813
+ This section describes the APIs for retrieving the general information
814
+ concerning latest version of the KEGG database.
815
+
816
+ --- list_databases
817
+
818
+ List of database names and its definitions available on the GenomeNet
819
+ is returned.
820
+
821
+ Return value:
822
+ ArrayOfDefinition (db, definition)
823
+
824
+ Related site:
825
+ * ((<URL:http://www.genome.jp/dbget/>))
826
+ * ((<URL:http://www.genome.jp/about_genomenet/service.html>)) (section 2.2)
827
+
828
+ --- list_organisms
829
+
830
+ List up the organisms in the KEGG/GENES database. 'org' code and the
831
+ organism's full name is returned in the Definition data type.
832
+
833
+ Return value:
834
+ ArrayOfDefinition (org, definition)
835
+
836
+ Related site:
837
+ * ((<URL:http://www.genome.jp/kegg/catalog/org_list.html>))
838
+ * ((<URL:http://www.genome.jp/dbget-bin/get_htext?Organisms+-n>))
839
+
840
+ --- list_pathways(string:org)
841
+
842
+ List up the pathway maps of the given organism in the KEGG/PATHWAY database.
843
+ Passing the string "map" as its argument, this method returns a list of the
844
+ reference pathways.
845
+
846
+ Return value:
847
+ ArrayOfDefinition (pathway_id, definition)
848
+
849
+ Related site:
850
+ * ((<URL:http://www.genome.jp/kegg/pathway.html>))
851
+
852
+ ==== DBGET
853
+
854
+ This section describes the wrapper methods for DBGET system developed
855
+ at the GenomeNet. For more details on DBGET system, see:
856
+
857
+ Related site:
858
+ * ((<URL:http://www.genome.jp/dbget/dbget_manual.html>))
859
+ * ((<URL:http://www.genome.jp/dbget-bin/binfo>))
860
+
861
+ --- binfo(string:db)
862
+
863
+ Show the version information of the specified database.
864
+ Passing the string "all" as its argument, this method returns the version
865
+ information of all databases available on the GenomeNet.
866
+
867
+ Return value:
868
+ string
869
+
870
+ Example:
871
+ # Show the information of the latest GenBank database.
872
+ binfo("gb")
873
+
874
+ --- bfind(string:str)
875
+
876
+ Wrapper method for bfind command. bfind is used for searching entries by
877
+ keywords. User need to specify a database from those which are supported
878
+ by DBGET system before keywords. Number of keywords given at a time is
879
+ restricted up to 100.
880
+
881
+ Return value:
882
+ string
883
+
884
+ Example:
885
+ # Returns the IDs and definitions of entries which have definition
886
+ # including the word 'E-cadherin' and 'human' from GenBank.
887
+ bfind("gb E-cadherin human")
888
+
889
+ --- bget(string:str)
890
+
891
+ The bget command is used for retrieving database entries specified by a list
892
+ of 'entry_id'. This method accepts all the bget command line options as
893
+ a string. Number of entries retrieved at a time is restricted up to 100.
894
+
895
+ Return value:
896
+ string
897
+
898
+ Example:
899
+ # retrieve two KEGG/GENES entries
900
+ bget("eco:b0002 hin:tRNA-Cys-1")
901
+ # retrieve nucleic acid sequences in a FASTA format
902
+ bget("-f -n n eco:b0002 hin:tRNA-Cys-1")
903
+ # retrieve amino acid sequence in a FASTA format
904
+ bget("-f -n a eco:b0002")
905
+
906
+ --- btit(string:str)
907
+
908
+ Wrapper method for btit command. btit is used for retrieving the definitions
909
+ by given database entries. Number of entries given at a time is restricted
910
+ up to 100.
911
+
912
+ Return value:
913
+ string
914
+
915
+ Example:
916
+ # Returns the ids and definitions of four GENES entries "hsa:1798",
917
+ # "mmu:13478", "dme:CG5287-PA" and cel:Y60A3A.14".
918
+ btit("hsa:1798 mmu:13478 dme:CG5287-PA cel:Y60A3A.14")
919
+
920
+ --- bconv(string:str)
921
+
922
+ The bconv command converts external IDs to KEGG IDs.
923
+ Currently, following external databases are available.
924
+
925
+ External database Database prefix
926
+ ----------------- ---------------
927
+ NCBI GI ncbi-gi:
928
+ NCBI GeneID ncbi-geneid:
929
+ GenBank genbank:
930
+ UniGene unigene:
931
+ UniProt uniprot:
932
+ OMIM omim:
933
+
934
+ The result is a tab separated pair of the given ID and the converted ID
935
+ in each line.
936
+
937
+ Return value:
938
+ string
939
+
940
+ Example:
941
+ # Convert NCBI GI and NCBI GeneID to KEGG genes_id
942
+ serv.bconv("ncbi-gi:10047086 ncbi-gi:10047090 ncbi-geneid:14751")
943
+
944
+ Related site:
945
+ * ((<URL:http://www.genome.jp/kegg/genes.html>)) (Gene name conversion section)
946
+
947
+ ==== LinkDB
948
+
949
+ + Database cross references
950
+
951
+ --- get_linkdb_by_entry(string:entry_id, string:db, int:offset, int:limit)
952
+
953
+ Retrieve the database entries linked from the user specified database entry.
954
+ It can also be specified the targeted database.
955
+
956
+ Return value:
957
+ ArrayOfLinkDBRelation
958
+
959
+ Example:
960
+ # Get the entries of KEGG/PATHWAY database linked from the entry 'eco:b0002'.
961
+ get_linkdb_by_entry('eco:b0002', 'pathway', 1, 10)
962
+ get_linkdb_by_entry('eco:b0002', 'pathway', 11, 10)
963
+
964
+ Related site:
965
+ * ((<URL:http://www.genome.jp/dbget-bin/www_linkdb>)) (Single entry to database)
966
+
967
+ --- get_linkdb_between_databases(string:from_db, string:to_db, int:offset, int:limit)
968
+
969
+ Retrieve all links between entries among the given two databases.
970
+
971
+ Return value:
972
+ ArrayOfLinkDBRelation
973
+
974
+ Example:
975
+ # Get all links from "eco" (KEGG GENES) to "pathway" (KEGG PATHWAY)
976
+ # databases.
977
+ get_linkdb_between_databases("eco", "pathway", 1, 100)
978
+
979
+ # Print the contents of obtained links in Ruby language
980
+ links = get_linkdb_between_databases("eco", "pathway", 1, 100)
981
+ links.each do |link|
982
+ puts link.entry_id1 # => "eco:b0084"
983
+ puts link.entry_id2 # => "path:map00550"
984
+ puts link.type # => "indirect"
985
+ puts link.path # => "eco->ec->path"
986
+ end
987
+
988
+ Related site:
989
+ * ((<URL:http://www.genome.jp/dbget-bin/www_linkdb>)) (Database to database)
990
+
991
+ + Relation among genes and enzymes
992
+
993
+ --- get_genes_by_enzyme(string:enzyme_id, string:org)
994
+
995
+ Retrieve all genes of the given organism.
996
+
997
+ Return value:
998
+ ArrayOfstring (genes_id)
999
+
1000
+ Example:
1001
+ # Returns all the GENES entry IDs in E.coli genome which are assigned
1002
+ # EC number ec:1.2.1.1
1003
+ get_genes_by_enzyme('ec:1.2.1.1', 'eco')
1004
+
1005
+ --- get_enzymes_by_gene(string:genes_id)
1006
+
1007
+ Retrieve all the EC numbers which are assigned to the given gene.
1008
+
1009
+ Return value:
1010
+ ArrayOfstring (enzyme_id)
1011
+
1012
+ Example:
1013
+ # Returns the EC numbers which are assigned to E.coli genes b0002
1014
+ get_enzymes_by_gene('eco:b0002')
1015
+
1016
+
1017
+ + Relation among enzymes, compounds and reactions
1018
+
1019
+ --- get_enzymes_by_compound(string:compound_id)
1020
+
1021
+ Retrieve all enzymes which have a link to the given compound_id.
1022
+
1023
+ Return value:
1024
+ ArrayOfstring (enzyme_id)
1025
+
1026
+ Example:
1027
+ # Returns the ENZYME entry IDs which have a link to the COMPOUND entry,
1028
+ # 'cpd:C00345'
1029
+ get_enzymes_by_compound('cpd:C00345')
1030
+
1031
+ --- get_enzymes_by_glycan(string:glycan_id)
1032
+
1033
+ Retrieve all enzymes which have a link to the given glycan_id.
1034
+
1035
+ Return value:
1036
+ ArrayOfstring (enzyme_id)
1037
+
1038
+ Example
1039
+ # Returns the ENZYME entry IDs which have a link to the GLYCAN entry,
1040
+ # 'gl:G00001'
1041
+ get_enzymes_by_glycan('gl:G00001')
1042
+
1043
+ --- get_enzymes_by_reaction(string:reaction_id)
1044
+
1045
+ Retrieve all enzymes which have a link to the given reaction_id.
1046
+
1047
+ Return value:
1048
+ ArrayOfstring (enzyme_id)
1049
+
1050
+ Example:
1051
+ # Returns the ENZYME entry IDs which have a link to the REACTION entry,
1052
+ # 'rn:R00100'.
1053
+ get_enzymes_by_reaction('rn:R00100')
1054
+
1055
+ --- get_compounds_by_enzyme(string:enzyme_id)
1056
+
1057
+ Retrieve all compounds which have a link to the given enzyme_id.
1058
+
1059
+ Return value:
1060
+ ArrayOfstring (compound_id)
1061
+
1062
+ Example:
1063
+ # Returns the COMPOUND entry IDs which have a link to the ENZYME entry,
1064
+ # 'ec:2.7.1.12'.
1065
+ get_compounds_by_enzyme('ec:2.7.1.12')
1066
+
1067
+ --- get_compounds_by_reaction(reaction_id)
1068
+
1069
+ Retrieve all compounds which have a link to the given reaction_id.
1070
+
1071
+ Return value:
1072
+ ArrayOfstring (compound_id)
1073
+
1074
+ Example:
1075
+ # Returns the COMPOUND entry IDs which have a link to the REACTION entry,
1076
+ # 'rn:R00100'
1077
+ get_compounds_by_reaction('rn:R00100')
1078
+
1079
+ --- get_glycans_by_enzyme(string:enzyme_id)
1080
+
1081
+ Retrieve all glycans which have a link to the given enzyme_id.
1082
+
1083
+ Return value:
1084
+ ArrayOfstring (glycan_id)
1085
+
1086
+ Example
1087
+ # Returns the GLYCAN entry IDs which have a link to the ENZYME entry,
1088
+ # 'ec:2.4.1.141'
1089
+ get_glycans_by_enzyme('ec:2.4.1.141')
1090
+
1091
+ --- get_glycans_by_reaction(string:reaction_id)
1092
+
1093
+ Retrieve all glycans which have a link to the given reaction_id.
1094
+
1095
+ Return value:
1096
+ ArrayOfstring (glycan_id)
1097
+
1098
+ Example
1099
+ # Returns the GLYCAN entry IDs which have a link to the REACTION entry,
1100
+ # 'rn:R06164'
1101
+ get_glycans_by_reaction('rn:R06164')
1102
+
1103
+ --- get_reactions_by_enzyme(string:enzyme_id)
1104
+
1105
+ Retrieve all reactions which have a link to the given enzyme_id.
1106
+
1107
+ Return value:
1108
+ ArrayOfstring (reaction_id)
1109
+
1110
+ Example:
1111
+ # Returns the REACTION entry IDs which have a link to the ENZYME entry,
1112
+ # 'ec:2.7.1.12'
1113
+ get_reactions_by_enzyme('ec:2.7.1.12')
1114
+
1115
+ --- get_reactions_by_compound(string:compound_id)
1116
+
1117
+ Retrieve all reactions which have a link to the given compound_id.
1118
+
1119
+ Return value:
1120
+ ArrayOfstring (reaction_id)
1121
+
1122
+ Example:
1123
+ # Returns the REACTION entry IDs which have a link to the COMPOUND entry,
1124
+ # 'cpd:C00199'
1125
+ get_reactions_by_compound('cpd:C00199')
1126
+
1127
+ --- get_reactions_by_glycan(string:glycan_id)
1128
+
1129
+ Retrieve all reactions which have a link to the given glycan_id.
1130
+
1131
+ Return value:
1132
+ ArrayOfstring (reaction_id)
1133
+
1134
+ Example
1135
+ # Returns the REACTION entry IDs which have a link to the GLYCAN entry,
1136
+ # 'gl:G00001'
1137
+ get_reactions_by_glycan('gl:G00001')
1138
+
1139
+ ==== SSDB
1140
+
1141
+ This section describes the APIs for SSDB database. For more details
1142
+ on SSDB, see:
1143
+
1144
+ * ((<URL:http://www.genome.jp/kegg/ssdb/>))
1145
+
1146
+
1147
+ --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit)
1148
+
1149
+ Search best-best neighbor of the gene in all organisms.
1150
+
1151
+ Return value:
1152
+ ArrayOfSSDBRelation
1153
+
1154
+ Example:
1155
+ # List up best-best neighbors of 'eco:b0002'.
1156
+ get_best_best_neighbors_by_gene('eco:b0002', 1, 10)
1157
+ get_best_best_neighbors_by_gene('eco:b0002', 11, 10)
1158
+
1159
+ --- get_best_neighbors_by_gene(string:genes_id, int:offset, int:limit)
1160
+
1161
+ Search best neighbors in all organism.
1162
+
1163
+ Return value:
1164
+ ArrayOfSSDBRelation
1165
+
1166
+ Example:
1167
+ # List up best neighbors of 'eco:b0002'.
1168
+ get_best_neighbors_by_gene('eco:b0002', 1, 10)
1169
+ get_best_neighbors_by_gene('eco:b0002', 11, 10)
1170
+
1171
+ --- get_reverse_best_neighbors_by_gene(string:genes_id, int:offset, int:limit)
1172
+
1173
+ Search reverse best neighbors in all organisms.
1174
+
1175
+ Return value:
1176
+ ArrayOfSSDBRelation
1177
+
1178
+ Example:
1179
+ # List up reverse best neighbors of 'eco:b0002'.
1180
+ get_reverse_best_neighbors_by_gene('eco:b0002', 1, 10)
1181
+ get_reverse_best_neighbors_by_gene('eco:b0002', 11, 10)
1182
+
1183
+ --- get_paralogs_by_gene(string:genes_id, int:offset, int:limit)
1184
+
1185
+ Search paralogous genes of the given gene in the same organism.
1186
+
1187
+ Return value:
1188
+ ArrayOfSSDBRelation
1189
+
1190
+ Example:
1191
+ # List up paralogous genes of 'eco:b0002'.
1192
+ get_paralogs_by_gene('eco:b0002', 1, 10)
1193
+ get_paralogs_by_gene('eco:b0002', 11, 10)
1194
+
1195
+
1196
+ ==== Motif
1197
+
1198
+ --- get_motifs_by_gene(string:genes_id, string:db)
1199
+
1200
+ Search motifs in the specified gene. As for 'db',
1201
+ user can specify one of the four database; Pfam, TIGRFAM, PROSITE pattern,
1202
+ PROSITE profile as 'pfam', 'tfam', 'pspt', 'pspf', respectively.
1203
+ You can also use 'all' to specify all of the four databases above.
1204
+
1205
+ Return value:
1206
+ ArrayOfMotifResult
1207
+
1208
+ Example:
1209
+ # Returns the all pfam motifs in the E. coli gene 'b0002'
1210
+ get_motifs_by_gene('eco:b0002', 'pfam')
1211
+
1212
+ --- get_genes_by_motifs([string]:motif_id_list, int:offset, int:limit)
1213
+
1214
+ Search all genes which contains all of the specified motifs.
1215
+
1216
+ Return value:
1217
+ ArrayOfDefinition (genes_id, definition)
1218
+
1219
+ Example:
1220
+ # Returns all genes which have Pfam 'DnaJ' and Prosite 'DNAJ_2' motifs.
1221
+ list = ['pf:DnaJ', 'ps:DNAJ_2']
1222
+ get_genes_by_motifs(list, 1, 10)
1223
+ get_genes_by_motifs(list, 11, 10)
1224
+
1225
+ ==== KO
1226
+
1227
+ --- get_ko_by_gene(string:genes_id)
1228
+
1229
+ Search all KOs to which given genes_id belongs.
1230
+
1231
+ Return value:
1232
+ ArrayOfstring (ko_id)
1233
+
1234
+ Example:
1235
+ # Returns ko_ids to which GENES entry 'eco:b0002' belongs.
1236
+ get_ko_by_gene('eco:b0002')
1237
+
1238
+
1239
+ --- get_ko_by_ko_class(string:ko_class_id)
1240
+
1241
+ Return all KOs which belong to the given ko_class_id.
1242
+
1243
+ Return value:
1244
+ ArrayOfDefinition (ko_id, definition)
1245
+
1246
+ Example:
1247
+ # Returns ko_ids which belong to the KO class '01196'.
1248
+ get_ko_by_ko_class('01196')
1249
+
1250
+ --- get_genes_by_ko_class(string:ko_class_id, string:org, int:offset, int:limit)
1251
+
1252
+ Retrieve all genes of the specified organism which are classified
1253
+ under the given ko_class_id.
1254
+
1255
+ Return value:
1256
+ ArrayOfDefinition (genes_id, definition)
1257
+
1258
+ Example:
1259
+ # Returns first 100 human genes which belong to the KO class '00930'
1260
+ get_genes_by_ko_class('00903', 'hsa' , 1, 100)
1261
+
1262
+ --- get_genes_by_ko(string:ko_id, string:org)
1263
+
1264
+ Retrieve all genes of the specified organism which belong to the
1265
+ given ko_id.
1266
+
1267
+ Return value:
1268
+ ArrayOfDefinition (genes_id, definition)
1269
+
1270
+ Example
1271
+ # Returns E.coli genes which belong to the KO 'K00001'
1272
+ get_genes_by_ko('ko:K00001', 'eco')
1273
+
1274
+ # Returns genes of all organisms which are assigned to the KO 'K00010'
1275
+ get_genes_by_ko('ko:K00010', 'all')
1276
+
1277
+
1278
+
1279
+ ==== PATHWAY
1280
+
1281
+ This section describes the APIs for PATHWAY database. For more details
1282
+ on PATHWAY database, see:
1283
+
1284
+ * ((<URL:http://www.genome.jp/kegg/kegg2.html#pathway>))
1285
+
1286
+ + Coloring pathways
1287
+
1288
+ Related site:
1289
+ * ((<URL:http://www.genome.jp/kegg/tool/color_pathway.html>))
1290
+
1291
+ --- mark_pathway_by_objects(string:pathway_id, [string]:object_id_list)
1292
+
1293
+ Mark the given objects on the given pathway map and return the URL of the
1294
+ generated image.
1295
+
1296
+ Return value:
1297
+ string (URL)
1298
+
1299
+ Example:
1300
+ # Returns the URL of the generated image for the given map 'path:eco00260'
1301
+ # with objects corresponding to 'eco:b0002' and 'cpd:C00263' colored in red.
1302
+ obj_list = ['eco:b0002', 'cpd:C00263']
1303
+ mark_pathway_by_objects('path:eco00260', obj_list)
1304
+
1305
+ --- color_pathway_by_objects(string:pathway_id, [string]:object_id_list, [string]:fg_color_list, [string]:bg_color_list)
1306
+
1307
+ Color the given objects on the pathway map with the specified colors
1308
+ and return the URL of the colored image. In the KEGG pathway maps,
1309
+ a gene or enzyme is represented by a rectangle and a compound is
1310
+ shown as a small circle. 'fg_color_list' is used for specifying the
1311
+ color of text and border of the given objects and 'bg_color_list' is
1312
+ used for its background area. The order of colors in these lists
1313
+ correspond with the order of objects in the 'object_id_list' list.
1314
+
1315
+ Return value:
1316
+ string (URL)
1317
+
1318
+ Example:
1319
+ # Returns the URL for the given pathway 'path:eco00260' with genes
1320
+ # 'eco:b0514' colored in red with yellow background and
1321
+ # 'eco:b2913' colored in green with yellow background.
1322
+ obj_list = ['eco:b0514', 'eco:b2913']
1323
+ fg_list = ['#ff0000', '#00ff00']
1324
+ bg_list = ['#ffff00', 'yellow']
1325
+ color_pathway_by_objects('path:eco00260', obj_list, fg_list, bg_list)
1326
+
1327
+ --- color_pathway_by_elements(string:pathway_id, [int]:element_id_list, [string]:fg_color_list, [string]:bg_color_list)
1328
+
1329
+ Color the objects (rectangles and circles on a pathway map) corresponding
1330
+ to the given 'element_id_list' with the specified colors and return the
1331
+ URL of the colored image. 'fg_color_list' is used for specifying the
1332
+ color of text and border of the objects with given 'element_id_list' and
1333
+ 'bg_color_list' is used for its background area. The order of colors in
1334
+ these lists correspond with the order of objects in the 'element_id_list'
1335
+ list.
1336
+
1337
+ This method is useful to specify which graphical object on the pathway
1338
+ to be colored as there are some cases that multiple genes are assigned to
1339
+ one rectangle or a gene is assigned to more than one rectangle on the
1340
+ pathway map. The 'element_id' is an unique numerical identifier on the
1341
+ pathway defined by the KGML (XML represeentation of the KEGG PATHWAY)
1342
+ in the <entry> tag. List of the 'element_id's can be obtained by the
1343
+ 'get_elements_by_pathway' method.
1344
+
1345
+ For more details on KGML, see:
1346
+
1347
+ * ((<URL:http://www.genome.jp/kegg/xml/>))
1348
+
1349
+ Return value:
1350
+ string (URL)
1351
+
1352
+ Example:
1353
+ # Returns the URL of the colored image of given pathway 'path:bsu00010' with
1354
+ # * gene bsu:BG11350 (element_id 78, ec:3.2.1.86) colored in red on yellow
1355
+ # * gene bsu:BG11203 (element_id 79, ec:3.2.1.86) colored in blue on yellow
1356
+ # * gene bsu:BG11685 (element_id 51, ec:2.7.1.2) colored in red on orange
1357
+ # * gene bsu:BG11685 (element_id 47, ec:2.7.1.2) colored in blue on orange
1358
+ element_id_list = [ 78, 79, 51, 47 ]
1359
+ fg_list = [ '#ff0000', '#0000ff', '#ff0000', '#0000ff' ]
1360
+ bg_list = [ '#ffff00', '#ffff00', '#ffcc00', '#ffcc00' ]
1361
+ color_pathway_by_elements('path:bsu00010', element_id_list, fg_list, bg_list)
1362
+
1363
+ --- get_html_of_marked_pathway_by_objects(string:pathway_id, [string]:object_id_list)
1364
+
1365
+ HTML version of the 'mark_pathway_by_objects' method.
1366
+ Mark the given objects on the given pathway map and return the URL of the
1367
+ HTML with the generated image as a clickable map.
1368
+
1369
+ Return value:
1370
+ string (URL)
1371
+
1372
+ Example:
1373
+ # Returns the URL of the HTML which can be passed to the web browser
1374
+ # as a clickable map of the generated image of the given pathway
1375
+ # 'path:eco00970' with three objects corresponding to 'eco:b4258',
1376
+ # 'cpd:C00135' and 'ko:K01881' colored in red.
1377
+ obj_list = ['eco:b4258', 'cpd:C00135', 'ko:K01881']
1378
+ get_html_of_marked_pathway_by_objects('path:eco00970', obj_list)
1379
+
1380
+ --- get_html_of_colored_pathway_by_objects(string:pathway_id, [string]:object_id_list, [string]:fg_color_list, [string]:bg_color_list)
1381
+
1382
+ HTML version of the 'color_pathway_by_object' method.
1383
+ Color the given objects on the pathway map with the specified colors
1384
+ and return the URL of the HTML containing the colored image as a
1385
+ clickable map.
1386
+
1387
+ Return value:
1388
+ string (URL)
1389
+
1390
+ Example:
1391
+ # Returns the URL of the HTML which can be passed to the web browser
1392
+ # as a clickable map of colored image of the given pathway 'path:eco00970'
1393
+ # with a gene 'eco:b4258' colored in gray/red, a compound 'cpd:C00135'
1394
+ # colored in green/yellow and a KO 'ko:K01881' colored in blue/orange.
1395
+ obj_list = ['eco:b4258', 'cpd:C00135', 'ko:K01881']
1396
+ fg_list = ['gray', '#00ff00', 'blue']
1397
+ bg_list = ['#ff0000', 'yellow', 'orange']
1398
+ get_html_of_colored_pathway_by_objects('path:eco00970', obj_list, fg_list, bg_list)
1399
+
1400
+ --- get_html_of_colored_pathway_by_elements(string:pathway_id, [int]:element_id_list, [string]:fg_color_list, [string]:bg_color_list)
1401
+
1402
+ HTML version of the 'color_pathway_by_elements' method.
1403
+ Color the objects corresponding to the given 'element_id_list' on the pathway
1404
+ map with the specified colors and return the URL of the HTML containing the
1405
+ colored image as a clickable map.
1406
+
1407
+ Return value:
1408
+ string (URL)
1409
+
1410
+ Example:
1411
+ # Returns the URL of the HTML which can be passed to the web browser as a
1412
+ # clickable map of colored image of the given pathway 'path:bsu00010' with
1413
+ # * gene bsu:BG11350 (element_id 78, ec:3.2.1.86) colored in red on yellow
1414
+ # * gene bsu:BG11203 (element_id 79, ec:3.2.1.86) colored in blue on yellow
1415
+ # * gene bsu:BG11685 (element_id 51, ec:2.7.1.2) colored in red on orange
1416
+ # * gene bsu:BG11685 (element_id 47, ec:2.7.1.2) colored in blue on orange
1417
+ element_id_list = [ 78, 79, 51, 47 ]
1418
+ fg_list = [ '#ff0000', '#0000ff', '#ff0000', '#0000ff' ]
1419
+ bg_list = [ '#ffff00', '#ffff00', '#ffcc00', '#ffcc00' ]
1420
+ get_html_of_colored_pathway_by_elements('path:bsu00010', element_id_list, fg_list, bg_list)
1421
+
1422
+ + Relations of objects on the pathway
1423
+
1424
+ --- get_element_relations_by_pathway(string:pathway_id)
1425
+
1426
+ Search all relations of the objects on the specified pathway.
1427
+
1428
+ Return value:
1429
+ ArrayOfPathwayElementRelation
1430
+
1431
+ Example:
1432
+ # Returns list of PathwayElementRelation on the pathway map 'path:bsu00010'
1433
+ relations = get_element_relations_by_pathway('path:bsu00010')
1434
+
1435
+ # Print the contents of obtained relations in Ruby language
1436
+ relations.each do |rel|
1437
+ puts rel.element_id1
1438
+ puts rel.element_id2
1439
+ puts rel.type
1440
+ rel.subtypes.each do |sub|
1441
+ puts sub.element_id
1442
+ puts sub.relation
1443
+ puts sub.type
1444
+ end
1445
+ end
1446
+
1447
+ + Objects on the pathway
1448
+
1449
+ --- get_elements_by_pathway(string:pathway_id)
1450
+
1451
+ Search all objects on the specified pathway. This method will be used in
1452
+ combination with the color_pathway_by_elements method to distingish graphical
1453
+ objects on the pathway sharing the same name.
1454
+
1455
+ Return value:
1456
+ ArrayOfPathwayElement
1457
+
1458
+ Example:
1459
+ # Returns list of PathwayElement on the pathway map 'path:bsu00010'
1460
+ get_elements_by_pathway('path:bsu00010')
1461
+
1462
+ # Find entry_ids for genes 'bsu:BG11350', 'bsu:BG11203' and 'bsu:BG11685'
1463
+ # in Ruby language
1464
+ elems = serv.get_elements_by_pathway('path:bsu00010')
1465
+ genes = [ 'bsu:BG11350', 'bsu:BG11203', 'bsu:BG11685' ]
1466
+ elems.each do |elem|
1467
+ genes.each do |gene|
1468
+ if elem.names.include?(gene)
1469
+ puts gene, elem.element_id
1470
+ end
1471
+ end
1472
+ end
1473
+
1474
+ --- get_genes_by_pathway(string:pathway_id)
1475
+
1476
+ Search all genes on the specified pathway. Organism name is given by
1477
+ the name of the pathway map.
1478
+
1479
+ Return value:
1480
+ ArrayOfstring (genes_id)
1481
+
1482
+ Example:
1483
+ # Returns all E. coli genes on the pathway map '00020'.
1484
+ get_genes_by_pathway('path:eco00020')
1485
+
1486
+ --- get_enzymes_by_pathway(string:pathway_id)
1487
+
1488
+ Search all enzymes on the specified pathway.
1489
+
1490
+ Return value:
1491
+ ArrayOfstring (enzyme_id)
1492
+
1493
+ Example:
1494
+ # Returns all E. coli enzymes on the pathway map '00020'.
1495
+ get_enzymes_by_pathway('path:eco00020')
1496
+
1497
+ --- get_compounds_by_pathway(string:pathway_id)
1498
+
1499
+ Search all compounds on the specified pathway.
1500
+
1501
+ Return value:
1502
+ ArrayOfstring (compound_id)
1503
+
1504
+ Example:
1505
+ # Returns all E. coli compounds on the pathway map '00020'.
1506
+ get_compounds_by_pathway('path:eco00020')
1507
+
1508
+ --- get_glycans_by_pathway(string:pathway_id)
1509
+
1510
+ Search all glycans on the specified pathway.
1511
+
1512
+ Return value:
1513
+ ArrayOfstring (glycan_id)
1514
+
1515
+ Example
1516
+ # Returns all E. coli glycans on the pathway map '00510'
1517
+ get_glycans_by_pathway('path:eco00510')
1518
+
1519
+ --- get_reactions_by_pathway(string:pathway_id)
1520
+
1521
+ Retrieve all reactions on the specified pathway.
1522
+
1523
+ Return value:
1524
+ ArrayOfstring (reaction_id)
1525
+
1526
+ Example:
1527
+ # Returns all E. coli reactions on the pathway map '00260'
1528
+ get_reactions_by_pathway('path:eco00260')
1529
+
1530
+ --- get_kos_by_pathway(string:pathway_id)
1531
+
1532
+ Retrieve all KOs on the specified pathway.
1533
+
1534
+ Return value:
1535
+ ArrayOfstring (ko_id)
1536
+
1537
+ Example:
1538
+ # Returns all ko_ids on the pathway map 'path:hsa00010'
1539
+ get_kos_by_pathway('path:hsa00010')
1540
+
1541
+ + Pathways by objects
1542
+
1543
+ Related site:
1544
+ * ((<URL:http://www.genome.jp/kegg/tool/search_pathway.html>))
1545
+
1546
+ --- get_pathways_by_genes([string]:genes_id_list)
1547
+
1548
+ Search all pathways which include all the given genes. How to pass the
1549
+ list of genes_id will depend on the language specific implementations.
1550
+
1551
+ Return value:
1552
+ ArrayOfstring (pathway_id)
1553
+
1554
+ Example:
1555
+ # Returns all pathways including E. coli genes 'b0077' and 'b0078'
1556
+ get_pathways_by_genes(['eco:b0077' , 'eco:b0078'])
1557
+
1558
+ --- get_pathways_by_enzymes([string]:enzyme_id_list)
1559
+
1560
+ Search all pathways which include all the given enzymes.
1561
+
1562
+ Return value:
1563
+ ArrayOfstring (pathway_id)
1564
+
1565
+ Example:
1566
+ # Returns all pathways including an enzyme '1.3.99.1'
1567
+ get_pathways_by_enzymes(['ec:1.3.99.1'])
1568
+
1569
+ --- get_pathways_by_compounds([string]:compound_id_list)
1570
+
1571
+ Search all pathways which include all the given compounds.
1572
+
1573
+ Return value:
1574
+ ArrayOfstring (pathway_id)
1575
+
1576
+ Example:
1577
+ # Returns all pathways including compounds 'C00033' and 'C00158'
1578
+ get_pathways_by_compounds(['cpd:C00033', 'cpd:C00158'])
1579
+
1580
+ --- get_pathways_by_glycans([string]:glycan_id_list)
1581
+
1582
+ Search all pathways which include all the given glycans.
1583
+
1584
+ Return value:
1585
+ ArrayOfstring (pathway_id)
1586
+
1587
+ Example
1588
+ # Returns all pathways including glycans 'G00009' and 'G00011'
1589
+ get_pathways_by_glycans(['gl:G00009', 'gl:G00011'])
1590
+
1591
+ --- get_pathways_by_reactions([string]:reaction_id_list)
1592
+
1593
+ Retrieve all pathways which include all the given reaction_ids.
1594
+
1595
+ Return value:
1596
+ ArrayOfstring (pathway_id)
1597
+
1598
+ Example:
1599
+ # Returns all pathways including reactions 'rn:R00959', 'rn:R02740',
1600
+ # 'rn:R00960' and 'rn:R01786'
1601
+ get_pathways_by_reactions(['rn:R00959', 'rn:R02740', 'rn:R00960', 'rn:R01786'])
1602
+
1603
+ --- get_pathways_by_kos([string]:ko_id_list, string:org)
1604
+
1605
+ Retrieve all pathways of the organisms which include all the given KO IDs.
1606
+
1607
+ Return value:
1608
+ ArrayOfstring (pathway_id)
1609
+
1610
+ Example:
1611
+ # Returns all human pathways including 'ko:K00016' and 'ko:K00382'
1612
+ get_pathways_by_kos(['ko:K00016', 'ko:K00382'], 'hsa')
1613
+
1614
+ # Returns pathways of all organisms including 'ko:K00016' and 'ko:K00382'
1615
+ get_pathways_by_kos(['ko:K00016', 'ko:K00382'], 'all')
1616
+
1617
+ + Relation among pathways
1618
+
1619
+ --- get_linked_pathways(string:pathway_id)
1620
+
1621
+ Retrieve all pathways which are linked from a given pathway_id.
1622
+
1623
+ Return value:
1624
+ ArrayOfstring (pathway_id)
1625
+
1626
+ Example:
1627
+ # Returns IDs of PATHWAY entries linked from 'path:eco00620'.
1628
+ get_linked_pathways('path:eco00620')
1629
+
1630
+ ==== GENES
1631
+
1632
+ This section describes the APIs for GENES database. For more details
1633
+ on GENES database, see:
1634
+
1635
+ * ((<URL:http://www.genome.jp/kegg/kegg2.html#genes>))
1636
+
1637
+ --- get_genes_by_organism(string:org, int:offset, int:limit)
1638
+
1639
+ Retrieve all genes of the specified organism.
1640
+
1641
+ Return value:
1642
+ ArrayOfstring (genes_id)
1643
+
1644
+ Example:
1645
+ # Retrive hundred H. influenzae genes at once.
1646
+ get_genes_by_organism('hin', 1, 100)
1647
+ get_genes_by_organism('hin', 101, 100)
1648
+
1649
+ ==== GENOME
1650
+
1651
+ This section describes the APIs for GENOME database. For more details
1652
+ on GENOME database, see:
1653
+
1654
+ * ((<URL:http://www.genome.jp/kegg/kegg2.html#genome>))
1655
+
1656
+ --- get_number_of_genes_by_organism(string:org)
1657
+
1658
+ Get the number of genes coded in the specified organism's genome.
1659
+
1660
+ Return value:
1661
+ int
1662
+
1663
+ Example:
1664
+ # Get the number of the genes on the E.coli genome.
1665
+ get_number_of_genes_by_organism('eco')
1666
+
1667
+ ==== LIGAND
1668
+
1669
+ This section describes the APIs for LIGAND database.
1670
+
1671
+ Related site:
1672
+ * ((<URL:http://www.genome.jp/kegg/ligand.html>))
1673
+
1674
+ --- convert_mol_to_kcf(string:mol)
1675
+
1676
+ Convert a MOL format into the KCF format.
1677
+
1678
+ Return value:
1679
+ string
1680
+
1681
+ Example:
1682
+ convert_mol_to_kcf(mol_str)
1683
+
1684
+ --- search_compounds_by_name(string:name)
1685
+
1686
+ Returns a list of compounds having the specified name.
1687
+
1688
+ Return value:
1689
+ ArrayOfstring (compound_id)
1690
+
1691
+ Example:
1692
+ search_compounds_by_name("shikimic acid")
1693
+
1694
+ --- search_drugs_by_name(string:name)
1695
+
1696
+ Returns a list of drugs having the specified name.
1697
+
1698
+ Return value:
1699
+ ArrayOfstring (drug_id)
1700
+
1701
+ Example:
1702
+ search_drugs_by_name("tetracyclin")
1703
+
1704
+ --- search_glycans_by_name(string:name)
1705
+
1706
+ Returns a list of glycans having the specified name.
1707
+
1708
+ Return value:
1709
+ ArrayOfstring (glycan_id)
1710
+
1711
+ Example:
1712
+ search_glycans_by_name("Paragloboside")
1713
+
1714
+ --- search_compounds_by_composition(string:composition)
1715
+
1716
+ Returns a list of compounds containing elements indicated by the composition.
1717
+ Order of the elements is insensitive.
1718
+
1719
+ Return value:
1720
+ ArrayOfstring (compound_id)
1721
+
1722
+ Example:
1723
+ search_compounds_by_composition("C7H10O5")
1724
+
1725
+ --- search_drugs_by_composition(string:composition)
1726
+
1727
+ Returns a list of drugs containing elements indicated by the composition.
1728
+ Order of the elements is insensitive.
1729
+
1730
+ Return value:
1731
+ ArrayOfstring (drug_id)
1732
+
1733
+ Example:
1734
+ search_drugs_by_composition("HCl")
1735
+
1736
+ --- search_glycans_by_composition(string:composition)
1737
+
1738
+ Returns a list of glycans containing sugars indicated by the composition.
1739
+ Order of the sugars (in parenthesis with number) is insensitive.
1740
+
1741
+ Return value:
1742
+ ArrayOfstring (glycan_id)
1743
+
1744
+ Example:
1745
+ search_glycans_by_composition("(Man)4 (GalNAc)1")
1746
+
1747
+ --- search_compounds_by_mass(float:mass, float:range)
1748
+
1749
+ Returns a list of compounds having the molecular weight around 'mass'
1750
+ with some ambiguity (range).
1751
+
1752
+ Return value:
1753
+ ArrayOfstring (compound_id)
1754
+
1755
+ Example:
1756
+ search_compounds_by_mass(174.05, 0.1)
1757
+
1758
+ --- search_drugs_by_mass(float:mass, float:range)
1759
+
1760
+ Returns a list of drugs having the molecular weight around 'mass'
1761
+ with some ambiguity (range).
1762
+
1763
+ Return value:
1764
+ ArrayOfstring (drug_id)
1765
+
1766
+ Example:
1767
+ search_drugs_by_mass(150, 1.0)
1768
+
1769
+ --- search_glycans_by_mass(float:mass, float:range)
1770
+
1771
+ Returns a list of glycans having a molecular weight around 'mass'
1772
+ with some ambiguity (range).
1773
+
1774
+ Return value:
1775
+ ArrayOfstring (glycan_id)
1776
+
1777
+ Example:
1778
+ search_glycans_by_mass(174.05, 0.1)
1779
+
1780
+ --- search_compounds_by_subcomp(string:mol, int:offset, int:limit)
1781
+
1782
+ Returns a list of compounds with the alignment having common sub-structure
1783
+ calculated by the subcomp program.
1784
+
1785
+ You can obtain a MOL formatted structural data of matched compounds
1786
+ using bget method with the "-f m" option to confirm the alignment.
1787
+
1788
+ Return value:
1789
+ ArrayOfStructureAlignment
1790
+
1791
+ Example:
1792
+ mol = bget("-f m cpd:C00111")
1793
+ search_compounds_by_subcomp(mol, 1, 5)
1794
+
1795
+ Related site:
1796
+ * ((<URL:http://www.genome.jp/ligand-bin/search_compound>))
1797
+
1798
+ --- search_drugs_by_subcomp(string:mol, int:offset, int:limit)
1799
+
1800
+ Returns a list of drugs with the alignment having common sub-structure
1801
+ calculated by the subcomp program.
1802
+
1803
+ You can obtain a MOL formatted structural data of matched drugs
1804
+ using bget method with the "-f m" option to confirm the alignment.
1805
+
1806
+ Return value:
1807
+ ArrayOfStructureAlignment
1808
+
1809
+ Example:
1810
+ mol = bget("-f m dr:D00201")
1811
+ search_drugs_by_subcomp(mol, 1, 5)
1812
+
1813
+ Related site:
1814
+ * ((<URL:http://www.genome.jp/ligand-bin/search_compound>))
1815
+
1816
+ --- search_glycans_by_kcam(string:kcf, string:program, string:option, int:offset, int:limit)
1817
+
1818
+ Returns a list of glycans with the alignment having common sub-structure
1819
+ calculated by the KCaM program.
1820
+
1821
+ The argument 'program' can be 'gapped' or 'ungaped'.
1822
+ The next argument 'option' can be 'global' or 'local'.
1823
+
1824
+ You can obtain a KCF formatted structural data of matched glycans
1825
+ using bget method with the "-f k" option to confirm the alignment.
1826
+
1827
+ Return value:
1828
+ ArrayOfStructureAlignment
1829
+
1830
+ Example:
1831
+ kcf = bget("-f k gl:G12922")
1832
+ search_glycans_by_kcam(kcf, "gapped", "local", 1, 5)
1833
+
1834
+ Related site:
1835
+ * ((<URL:http://www.genome.jp/ligand-bin/search_glycan.cgi>))
1836
+ * ((<URL:http://www.genome.jp/ligand/kcam/>))
1837
+
1838
+ == Notes
1839
+
1840
+ Last updated: December 27, 2006
1841
+
1842
+ =end
1843
+