bio 0.7.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. data/bin/bioruby +71 -27
  2. data/bin/br_biofetch.rb +5 -17
  3. data/bin/br_bioflat.rb +14 -26
  4. data/bin/br_biogetseq.rb +6 -18
  5. data/bin/br_pmfetch.rb +6 -16
  6. data/doc/Changes-0.7.rd +35 -0
  7. data/doc/KEGG_API.rd +287 -172
  8. data/doc/KEGG_API.rd.ja +273 -160
  9. data/doc/Tutorial.rd +18 -9
  10. data/doc/Tutorial.rd.ja +656 -138
  11. data/lib/bio.rb +6 -24
  12. data/lib/bio/alignment.rb +5 -5
  13. data/lib/bio/appl/blast.rb +132 -98
  14. data/lib/bio/appl/blast/format0.rb +9 -19
  15. data/lib/bio/appl/blast/wublast.rb +5 -18
  16. data/lib/bio/appl/emboss.rb +40 -47
  17. data/lib/bio/appl/hmmer.rb +116 -82
  18. data/lib/bio/appl/hmmer/report.rb +509 -364
  19. data/lib/bio/appl/spidey/report.rb +7 -18
  20. data/lib/bio/data/na.rb +3 -21
  21. data/lib/bio/db.rb +3 -21
  22. data/lib/bio/db/aaindex.rb +147 -52
  23. data/lib/bio/db/embl/common.rb +27 -6
  24. data/lib/bio/db/embl/embl.rb +18 -10
  25. data/lib/bio/db/embl/sptr.rb +87 -67
  26. data/lib/bio/db/embl/swissprot.rb +32 -3
  27. data/lib/bio/db/embl/trembl.rb +32 -3
  28. data/lib/bio/db/embl/uniprot.rb +32 -3
  29. data/lib/bio/db/fasta.rb +327 -289
  30. data/lib/bio/db/medline.rb +25 -4
  31. data/lib/bio/db/nbrf.rb +12 -20
  32. data/lib/bio/db/pdb.rb +4 -1
  33. data/lib/bio/db/pdb/chemicalcomponent.rb +240 -0
  34. data/lib/bio/db/pdb/pdb.rb +13 -8
  35. data/lib/bio/db/rebase.rb +93 -97
  36. data/lib/bio/feature.rb +2 -31
  37. data/lib/bio/io/ddbjxml.rb +167 -139
  38. data/lib/bio/io/fastacmd.rb +89 -56
  39. data/lib/bio/io/flatfile.rb +994 -278
  40. data/lib/bio/io/flatfile/index.rb +257 -194
  41. data/lib/bio/io/flatfile/indexer.rb +37 -29
  42. data/lib/bio/reference.rb +147 -64
  43. data/lib/bio/sequence.rb +57 -417
  44. data/lib/bio/sequence/aa.rb +64 -0
  45. data/lib/bio/sequence/common.rb +175 -0
  46. data/lib/bio/sequence/compat.rb +68 -0
  47. data/lib/bio/sequence/format.rb +134 -0
  48. data/lib/bio/sequence/generic.rb +24 -0
  49. data/lib/bio/sequence/na.rb +189 -0
  50. data/lib/bio/shell.rb +9 -23
  51. data/lib/bio/shell/core.rb +130 -125
  52. data/lib/bio/shell/demo.rb +143 -0
  53. data/lib/bio/shell/{session.rb → interface.rb} +42 -40
  54. data/lib/bio/shell/object.rb +52 -0
  55. data/lib/bio/shell/plugin/codon.rb +4 -22
  56. data/lib/bio/shell/plugin/emboss.rb +23 -0
  57. data/lib/bio/shell/plugin/entry.rb +34 -25
  58. data/lib/bio/shell/plugin/flatfile.rb +5 -23
  59. data/lib/bio/shell/plugin/keggapi.rb +11 -24
  60. data/lib/bio/shell/plugin/midi.rb +5 -23
  61. data/lib/bio/shell/plugin/obda.rb +4 -22
  62. data/lib/bio/shell/plugin/seq.rb +6 -24
  63. data/lib/bio/shell/rails/Rakefile +10 -0
  64. data/lib/bio/shell/rails/app/controllers/application.rb +4 -0
  65. data/lib/bio/shell/rails/app/controllers/shell_controller.rb +94 -0
  66. data/lib/bio/shell/rails/app/helpers/application_helper.rb +3 -0
  67. data/lib/bio/shell/rails/app/models/shell_connection.rb +30 -0
  68. data/lib/bio/shell/rails/app/views/layouts/shell.rhtml +37 -0
  69. data/lib/bio/shell/rails/app/views/shell/history.rhtml +5 -0
  70. data/lib/bio/shell/rails/app/views/shell/index.rhtml +2 -0
  71. data/lib/bio/shell/rails/app/views/shell/show.rhtml +13 -0
  72. data/lib/bio/shell/rails/config/boot.rb +19 -0
  73. data/lib/bio/shell/rails/config/database.yml +85 -0
  74. data/lib/bio/shell/rails/config/environment.rb +53 -0
  75. data/lib/bio/shell/rails/config/environments/development.rb +19 -0
  76. data/lib/bio/shell/rails/config/environments/production.rb +19 -0
  77. data/lib/bio/shell/rails/config/environments/test.rb +19 -0
  78. data/lib/bio/shell/rails/config/routes.rb +19 -0
  79. data/lib/bio/shell/rails/doc/README_FOR_APP +2 -0
  80. data/lib/bio/shell/rails/public/404.html +8 -0
  81. data/lib/bio/shell/rails/public/500.html +8 -0
  82. data/lib/bio/shell/rails/public/dispatch.cgi +10 -0
  83. data/lib/bio/shell/rails/public/dispatch.fcgi +24 -0
  84. data/lib/bio/shell/rails/public/dispatch.rb +10 -0
  85. data/lib/bio/shell/rails/public/favicon.ico +0 -0
  86. data/lib/bio/shell/rails/public/images/icon.png +0 -0
  87. data/lib/bio/shell/rails/public/images/rails.png +0 -0
  88. data/lib/bio/shell/rails/public/index.html +277 -0
  89. data/lib/bio/shell/rails/public/javascripts/controls.js +750 -0
  90. data/lib/bio/shell/rails/public/javascripts/dragdrop.js +584 -0
  91. data/lib/bio/shell/rails/public/javascripts/effects.js +854 -0
  92. data/lib/bio/shell/rails/public/javascripts/prototype.js +1785 -0
  93. data/lib/bio/shell/rails/public/robots.txt +1 -0
  94. data/lib/bio/shell/rails/public/stylesheets/main.css +187 -0
  95. data/lib/bio/shell/rails/script/about +3 -0
  96. data/lib/bio/shell/rails/script/breakpointer +3 -0
  97. data/lib/bio/shell/rails/script/console +3 -0
  98. data/lib/bio/shell/rails/script/destroy +3 -0
  99. data/lib/bio/shell/rails/script/generate +3 -0
  100. data/lib/bio/shell/rails/script/performance/benchmarker +3 -0
  101. data/lib/bio/shell/rails/script/performance/profiler +3 -0
  102. data/lib/bio/shell/rails/script/plugin +3 -0
  103. data/lib/bio/shell/rails/script/process/reaper +3 -0
  104. data/lib/bio/shell/rails/script/process/spawner +3 -0
  105. data/lib/bio/shell/rails/script/process/spinner +3 -0
  106. data/lib/bio/shell/rails/script/runner +3 -0
  107. data/lib/bio/shell/rails/script/server +42 -0
  108. data/lib/bio/shell/rails/test/test_helper.rb +28 -0
  109. data/lib/bio/shell/web.rb +90 -0
  110. data/lib/bio/util/contingency_table.rb +231 -225
  111. data/sample/any2fasta.rb +59 -0
  112. data/test/data/HMMER/hmmpfam.out +64 -0
  113. data/test/data/HMMER/hmmsearch.out +88 -0
  114. data/test/data/aaindex/DAYM780301 +30 -0
  115. data/test/data/aaindex/PRAM900102 +20 -0
  116. data/test/data/bl2seq/cd8a_cd8b_blastp.bl2seq +53 -0
  117. data/test/data/bl2seq/cd8a_p53_e-5blastp.bl2seq +37 -0
  118. data/test/data/blast/{eco:b0002.faa → b0002.faa} +0 -0
  119. data/test/data/blast/{eco:b0002.faa.m0 → b0002.faa.m0} +2 -2
  120. data/test/data/blast/{eco:b0002.faa.m7 → b0002.faa.m7} +1 -1
  121. data/test/data/blast/{eco:b0002.faa.m8 → b0002.faa.m8} +0 -0
  122. data/test/unit/bio/appl/bl2seq/test_report.rb +134 -0
  123. data/test/unit/bio/appl/blast/test_report.rb +15 -12
  124. data/test/unit/bio/appl/blast/test_xmlparser.rb +4 -4
  125. data/test/unit/bio/appl/hmmer/test_report.rb +355 -0
  126. data/test/unit/bio/appl/test_blast.rb +5 -5
  127. data/test/unit/bio/data/test_na.rb +9 -18
  128. data/test/unit/bio/db/pdb/test_pdb.rb +169 -0
  129. data/test/unit/bio/db/test_aaindex.rb +197 -0
  130. data/test/unit/bio/io/test_fastacmd.rb +55 -0
  131. data/test/unit/bio/sequence/test_aa.rb +102 -0
  132. data/test/unit/bio/sequence/test_common.rb +178 -0
  133. data/test/unit/bio/sequence/test_compat.rb +82 -0
  134. data/test/unit/bio/sequence/test_na.rb +242 -0
  135. data/test/unit/bio/shell/plugin/test_seq.rb +29 -19
  136. data/test/unit/bio/test_alignment.rb +15 -7
  137. data/test/unit/bio/test_reference.rb +198 -0
  138. data/test/unit/bio/test_sequence.rb +4 -49
  139. data/test/unit/bio/test_shell.rb +2 -2
  140. metadata +118 -15
  141. data/lib/bio/io/brdb.rb +0 -103
  142. data/lib/bioruby.rb +0 -34
@@ -1,8 +1,8 @@
1
1
  =begin
2
-
3
- $Id: KEGG_API.rd.ja,v 1.7 2005/08/31 13:29:01 k Exp $
4
-
5
- Copyright (C) 2003-2005 Toshiaki Katayama <k@bioruby.org>
2
+
3
+ $Id: KEGG_API.rd.ja,v 1.8 2006/02/23 04:51:23 k Exp $
4
+
5
+ Copyright (C) 2003-2006 Toshiaki Katayama <k@bioruby.org>
6
6
 
7
7
  = KEGG API
8
8
 
@@ -29,6 +29,7 @@ KEGG API
29
29
  * ((<MotifResult ��>)), ((<ArrayOfMotifResult ��>))
30
30
  * ((<Definition ��>)), ((<ArrayOfDefinition ��>))
31
31
  * ((<LinkDBRelation ��>)), ((<ArrayOfLinkDBRelation ��>))
32
+ * ((<PathwayElement ��>)), ((<ArrayOfPathwayElement ��>))
32
33
  * ((<�᥽�åɰ���>))
33
34
  * ((<�᥿����>))
34
35
  * ((<list_databases>)),
@@ -38,9 +39,22 @@ KEGG API
38
39
  * ((<binfo>)),
39
40
  ((<bfind>)),
40
41
  ((<bget>)),
41
- ((<btit>))
42
+ ((<btit>)),
43
+ ((<bconv>))
42
44
  * ((<LinkDB>))
43
45
  * ((<get_linkdb_by_entry>))
46
+ * ((<get_genes_by_enzyme>)),
47
+ ((<get_enzymes_by_gene>))
48
+ * ((<get_enzymes_by_compound>)),
49
+ ((<get_enzymes_by_glycan>)),
50
+ ((<get_enzymes_by_reaction>)),
51
+ ((<get_compounds_by_enzyme>)),
52
+ ((<get_compounds_by_reaction>)),
53
+ ((<get_glycans_by_enzyme>)),
54
+ ((<get_glycans_by_reaction>)),
55
+ ((<get_reactions_by_enzyme>)),
56
+ ((<get_reactions_by_compound>)),
57
+ ((<get_reactions_by_glycan>))
44
58
  * ((<SSDB>))
45
59
  * ((<get_best_best_neighbors_by_gene>)),
46
60
  ((<get_best_neighbors_by_gene>)),
@@ -62,9 +76,12 @@ KEGG API
62
76
  * ((<PATHWAY>))
63
77
  * ((<mark_pathway_by_objects>)),
64
78
  ((<color_pathway_by_objects>)),
79
+ ((<color_pathway_by_elements>)),
65
80
  ((<get_html_of_marked_pathway_by_objects>)),
66
- ((<get_html_of_colored_pathway_by_objects>))
67
- * ((<get_genes_by_pathway>)),
81
+ ((<get_html_of_colored_pathway_by_objects>)),
82
+ ((<get_html_of_colored_pathway_by_elements>))
83
+ * ((<get_elements_by_pathway>)),
84
+ ((<get_genes_by_pathway>)),
68
85
  ((<get_enzymes_by_pathway>)),
69
86
  ((<get_compounds_by_pathway>)),
70
87
  ((<get_glycans_by_pathway>)),
@@ -77,18 +94,6 @@ KEGG API
77
94
  ((<get_pathways_by_reactions>)),
78
95
  ((<get_pathways_by_kos>))
79
96
  * ((<get_linked_pathways>))
80
- * ((<get_genes_by_enzyme>)),
81
- ((<get_enzymes_by_gene>))
82
- * ((<get_enzymes_by_compound>)),
83
- ((<get_enzymes_by_glycan>)),
84
- ((<get_enzymes_by_reaction>)),
85
- ((<get_compounds_by_enzyme>)),
86
- ((<get_compounds_by_reaction>)),
87
- ((<get_glycans_by_enzyme>)),
88
- ((<get_glycans_by_reaction>)),
89
- ((<get_reactions_by_enzyme>)),
90
- ((<get_reactions_by_compound>)),
91
- ((<get_reactions_by_glycan>))
92
97
  * ((<GENES>))
93
98
  * ((<get_genes_by_organism>))
94
99
  * ((<GENOME>))
@@ -633,6 +638,18 @@ SSDB
633
638
 
634
639
  ʣ���� LinkDBRelation ���ǡ�����ޤ�����Ǥ���
635
640
 
641
+ + PathwayElement ��
642
+
643
+ element_id �ѥ���������Υ��֥������Ȥ�ؤ���ˡ����� ID (int)
644
+ type ���֥������Ȥμ��� ("gene", "enzyme" �ʤ�) (string)
645
+ names ���֥������ȤˤĤ���줿̾���Υꥹ�� (ArrayOfstring)
646
+ components ���롼�פξ��ʤɴޤޤ�륪�֥������ȤΥꥹ�� (ArrayOfint)
647
+
648
+ + ArrayOfPathwayElement ��
649
+
650
+ ʣ���� PathwayElement ���ǡ�����ޤ�����Ǥ���
651
+
652
+
636
653
  === �᥽�åɰ���
637
654
 
638
655
  �ʲ���KEGG API �����᥽�åɤΥꥹ�ȤǤ����᥽�åɤˤϥ᥿������֤���Τ�
@@ -739,6 +756,18 @@ DBGET
739
756
  # ����飴�Ĥΰ����ҤΥǥե��˥����򸡺�
740
757
  btit("hsa:1798 mmu:13478 dme:CG5287-PA cel:Y60A3A.14")
741
758
 
759
+ --- bconv(string)
760
+
761
+ �����ǡ����١����� ID �� KEGG �� ID ���Ѵ����ޤ����б����Ƥ��볰���ǡ���
762
+ �١����� NCBI Gene ID, NCBI GI, GenBank ID, UniProt ID �Ǥ���
763
+ ��̤ϡ���������䤤��碌 ID ���Ѵ� ID �Υ����ڤ�ʸ����Ȥ����֤���ޤ���
764
+
765
+ ���͡�
766
+ string
767
+
768
+ �㡧
769
+ # NCBI GI �� Gene ID �� KEGG genes_id ���Ѵ�
770
+ serv.bconv("ncbi-gi:10047086 ncbi-gi:10047090 ncbi-geneid:14751")
742
771
 
743
772
  ==== LinkDB
744
773
 
@@ -755,6 +784,143 @@ db
755
784
  get_linkdb_by_entry('eco:b0002', 'pathway', 1, 10)
756
785
  get_linkdb_by_entry('eco:b0002', 'pathway', 11, 10)
757
786
 
787
+ + �����Ҥȹ����ֹ�δط�
788
+
789
+ --- get_genes_by_enzyme(enzyme_id, org)
790
+
791
+ �о���ʪ��ˤ����ơ����ꤷ�������ֹ����İ����ҤΥꥹ�Ȥ��֤��ޤ���
792
+
793
+ ���͡�
794
+ ArrayOfstring (genes_id)
795
+
796
+ �㡧
797
+ # �����ֹ� 1.1.1.1 �������IJ�ݤΰ����ҤΥꥹ��
798
+ get_genes_by_enzyme('ec:1.1.1.1', 'eco')
799
+
800
+ --- get_enzymes_by_gene(genes_id)
801
+
802
+ ���ꤷ�������Ҥ��б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
803
+
804
+ ���͡�
805
+ ArrayOfstring (enzyme_id)
806
+
807
+ �㡧
808
+ # ��IJ�ݰ����� 'eco:b0002' �ι����ֹ�Υꥹ��
809
+ get_enzymes_by_gene(eco:b0002)
810
+
811
+
812
+ + ���ǡ�����ʪ���ꥢ�������δط�
813
+
814
+ --- get_enzymes_by_compound(compound_id)
815
+
816
+ ���ꤷ������ʪ���б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
817
+
818
+ ���͡�
819
+ ArrayOfstring (compound_id)
820
+
821
+ �㡧
822
+ # ����ʪ 'cpd:C00345' ����դ˴ؤ����ǤΥꥹ��
823
+ get_enzymes_by_compound('cpd:C00345')
824
+
825
+ --- get_enzymes_by_glycan(compound_id)
826
+
827
+ ���ꤷ���������б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
828
+
829
+ ���͡�
830
+ ArrayOfstring (glycan_id)
831
+
832
+ �㡧
833
+ # ���� 'gl:G00001' ����դ˴ؤ����ǤΥꥹ��
834
+ get_enzymes_by_glycan('gl:G00001')
835
+
836
+ --- get_enzymes_by_reaction(reaction_id)
837
+
838
+ ���ꤷ���ꥢ��������ֹ���б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
839
+
840
+ ���͡�
841
+ ArrayOfstring (reaction_id)
842
+
843
+ �㡧
844
+ # �ꥢ��������ֹ� R00100 ����Ĺ��ǤΥꥹ��
845
+ get_enzymes_by_reaction('rn:R00100')
846
+
847
+ --- get_compounds_by_enzyme(enzyme_id)
848
+
849
+ ���ꤷ�������ֹ���б����벽��ʪ�Υꥹ�Ȥ��֤��ޤ���
850
+
851
+ ���͡�
852
+ ArrayOfstring (compound_id)
853
+
854
+ �㡧
855
+ # �����ֹ� 'ec:2.7.1.12' ����դ˴ؤ�벽��ʪ�Υꥹ��
856
+ get_compounds_by_enzyme('ec:2.7.1.12')
857
+
858
+ --- get_compounds_by_reaction(reaction_id)
859
+
860
+ ���ꤷ���ꥢ���������б����벽��ʪ�Υꥹ�Ȥ��֤��ޤ���
861
+
862
+ ���͡�
863
+ ArrayOfstring (compound_id)
864
+
865
+ �㡧
866
+ # �ꥢ��������ֹ� 'rn:R00100' ��ȿ���˴ؤ�벽��ʪ�Υꥹ��
867
+ get_compounds_by_reaction('rn:R00100')
868
+
869
+ --- get_glycans_by_enzyme(enzyme_id)
870
+
871
+ ���ꤷ�������ֹ���б����������Υꥹ�Ȥ��֤��ޤ���
872
+
873
+ ���͡�
874
+ ArrayOfstring (glycan_id)
875
+
876
+ �㡧
877
+ # �����ֹ� 'ec:2.4.1.141' ����դ˴ؤ�������Υꥹ��
878
+ get_glycans_by_enzyme('ec:2.4.1.141')
879
+
880
+ --- get_glycans_by_reaction(reaction_id)
881
+
882
+ ���ꤷ���ꥢ���������б����������Υꥹ�Ȥ��֤��ޤ���
883
+
884
+ ���͡�
885
+ ArrayOfstring (glycan_id)
886
+
887
+ �㡧
888
+ # �ꥢ��������ֹ� 'rn:R06164' ��ȿ���˴ؤ�������Υꥹ��
889
+ get_glycans_by_reaction('rn:R06164')
890
+
891
+ --- get_reactions_by_enzyme(enzyme_id)
892
+
893
+ ���ꤷ�������ֹ���б�����ꥢ�������Υꥹ�Ȥ��֤��ޤ���
894
+
895
+ ���͡�
896
+ ArrayOfstring (reaction_id)
897
+
898
+ �㡧
899
+ # �����ֹ� 'ec:2.7.1.12' ��ȿ���˴ؤ��ꥢ��������ֹ�Υꥹ��
900
+ get_reactions_by_enzyme('ec:2.7.1.12')
901
+
902
+ --- get_reactions_by_compound(compound_id)
903
+
904
+ ���ꤷ������ʪ���б�����ꥢ�������Υꥹ�Ȥ��֤��ޤ���
905
+
906
+ ���͡�
907
+ ArrayOfstring (reaction_id)
908
+
909
+ �㡧
910
+ # ����ʪ 'cpd:C00199' �ο���ȿ���˴ؤ��ꥢ��������ֹ�Υꥹ��
911
+ get_reactions_by_compound('cpd:C00199')
912
+
913
+ --- get_reactions_by_glycan(glycan_id)
914
+
915
+ ���ꤷ���������б�����ꥢ�������Υꥹ�Ȥ��֤��ޤ���
916
+
917
+ ���͡�
918
+ ArrayOfstring (reaction_id)
919
+
920
+ �㡧
921
+ # ���� 'gl:G00001' �ο���ȿ���˴ؤ��ꥢ��������ֹ�Υꥹ��
922
+ get_reactions_by_glycan('gl:G00001')
923
+
758
924
 
759
925
  ==== SSDB
760
926
 
@@ -1008,6 +1174,45 @@ bg_color_list
1008
1174
  bg_list = ['#ff0000', 'yellow']
1009
1175
  color_pathway_by_objects('path:eco00053', obj_list, fg_list, bg_list)
1010
1176
 
1177
+ --- color_pathway_by_elements(pathway_id, element_id_list, fg_color_list, bg_color_list)
1178
+
1179
+ ���ꤷ�� element_id ���б�����ѥ���������Υ��֥������ȡ�Ĺ������ݤʤɡ�
1180
+ ���Ф���ʸ�����Ȥ� fg_color_list �ǻ��ꤷ�������طʤ� bg_color_list ��
1181
+ ���ꤷ������Ĥ��������������������� URL ���֤��ޤ���object_id_list ��
1182
+ fg_color_list, bg_color_list �����Ǥο��Ƚ��֤�·����褦�����դ���
1183
+ ɬ�פ�����ޤ���
1184
+
1185
+ KEGG PATHWAY �Ǥϡ�ʣ���ΰ����Ҥ���ĤΥܥå����˳�����Ƥ��Ƥ����ꡢ
1186
+ �դˣ��Ĥΰ����Ҥ�ʣ���Υܥå����˳�����Ƥ��Ƥ��뤳�Ȥ�����ޤ���
1187
+ ���Τ褦�ʾ�� color_pathway_by_objects �᥽�åɤǤ��ɤ�ʬ���뤳�Ȥ�
1188
+ ����ޤ��󤬡�color_pathway_by_elements ��Ȥ����ȤDz��Ǥ��ޤ���
1189
+
1190
+ element_id �� KEGG PATHWAY �� XML ɽ���Ǥ��� KGML �� <entry> ������
1191
+ ���ꤵ��롢�ѥ���������Υ���ե������������ˤĤ���줿��ˡ�����
1192
+ ���ͤǤ����ѥ���������� element_id �� get_elements_by_pathway �᥽�åɤ�
1193
+ PathwayElement ���֥������ȤΥꥹ�ȤȤ������뤳�Ȥ��Ǥ��ޤ���
1194
+ PathwayElement �� type �� name °���ˤ������ҡ����ǡ�����ʪ�ʤɤ�
1195
+ �б����ꡢelement_id ���ͤ�Ȥäƥ��֥������Ȥ����ꤷ�ޤ���
1196
+
1197
+ KGML �ˤĤ��ƾܤ����ϲ����Υڡ����򻲾Ȥ��Ƥ���������
1198
+
1199
+ * ((<URL:http://www.genome.jp/kegg/xml/>))
1200
+
1201
+ ����͡�
1202
+ string (URL)
1203
+
1204
+ �㡧
1205
+ # ����ݤΥѥ������� path:bsu00010 ��˺ܤäƤ��롢
1206
+ # ������ bsu:BG11350 (element_id 78, ec:3.2.1.86) ������/���طʤ�
1207
+ # ������ bsu:BG11203 (element_id 79, ec:3.2.1.86) ������/���طʤ�
1208
+ # ������ bsu:BG11685 (element_id 51, ec:2.7.1.2) ������/���طʤ�
1209
+ # ������ bsu:BG11685 (element_id 47, ec:2.7.1.2) ������/���طʤ�
1210
+ # ���줾���忧���������� URL ���֤��ޤ���
1211
+ element_id_list = [ 78, 79, 51, 47 ]
1212
+ fg_list = [ '#ff0000', '#0000ff', '#ff0000', '#0000ff' ]
1213
+ bg_list = [ '#ffff00', '#ffff00', '#ffcc00', '#ffcc00' ]
1214
+ color_pathway_by_elements('path:bsu00010', element_id_list, fg_list, bg_list)
1215
+
1011
1216
  --- get_html_of_marked_pathway_by_objects(pathway_id, object_id_list)
1012
1217
 
1013
1218
  ����������˥���å��֥�ޥåפ�ޤ� HTML �ڡ����� URL ���֤�
@@ -1026,7 +1231,7 @@ bg_color_list
1026
1231
  --- get_html_of_colored_pathway_by_objects(pathway_id, object_id_list, fg_color_list, bg_color_list)
1027
1232
 
1028
1233
  ����������˥���å��֥�ޥåפ�ޤ� HTML �ڡ����� URL ���֤�
1029
- �С������� 'color_pathway_by_object' �᥽�åɤǤ���
1234
+ �С������� 'color_pathway_by_objects' �᥽�åɤǤ���
1030
1235
 
1031
1236
  ���͡�
1032
1237
  string (URL)
@@ -1040,8 +1245,53 @@ bg_color_list
1040
1245
  bg_list = ['#ff0000', 'yellow', 'orange']
1041
1246
  get_html_of_colored_pathway_by_objects('path:eco00970', obj_list, fg_list, bg_list)
1042
1247
 
1248
+ --- get_html_of_colored_pathway_by_elements(pathway_id, element_id_list, fg_color_list, bg_color_list)
1249
+
1250
+ ����������˥���å��֥�ޥåפ�ޤ� HTML �ڡ����� URL ���֤�
1251
+ �С������� 'color_pathway_by_elements' �᥽�åɤǤ���
1252
+
1253
+ ���͡�
1254
+ string (URL)
1255
+
1256
+ �㡧
1257
+ # ����ݤΥѥ������� path:bsu00010 ��˺ܤäƤ��롢
1258
+ # ������ bsu:BG11350 (element_id 78, ec:3.2.1.86) ������/���طʤ�
1259
+ # ������ bsu:BG11203 (element_id 79, ec:3.2.1.86) ������/���طʤ�
1260
+ # ������ bsu:BG11685 (element_id 51, ec:2.7.1.2) ������/���طʤ�
1261
+ # ������ bsu:BG11685 (element_id 47, ec:2.7.1.2) ������/���طʤ�
1262
+ # �忧���������Υ���å��֥�ޥåפ�ɽ������ HTML �� URL ���֤��ޤ���
1263
+ element_id_list = [ 78, 79, 51, 47 ]
1264
+ fg_list = [ '#ff0000', '#0000ff', '#ff0000', '#0000ff' ]
1265
+ bg_list = [ '#ffff00', '#ffff00', '#ffcc00', '#ffcc00' ]
1266
+ color_pathway_by_elements('path:bsu00010', element_id_list, fg_list, bg_list)
1267
+
1043
1268
  + �ѥ���������Υ��֥������ȸ���
1044
1269
 
1270
+ --- get_elements_by_pathway(pathway_id)
1271
+
1272
+ ���ꤷ���ѥ���������˺ܤäƤ��륪�֥����������ǤΥꥹ�Ȥ��֤��ޤ���
1273
+ ����ˡ�ˤĤ��Ƥ� color_pathway_by_elements �᥽�åɤ򻲾Ȥ��Ƥ���������
1274
+
1275
+ ���͡�
1276
+ ArrayOfPathwayElement
1277
+
1278
+ �㡧
1279
+ # ����ݤΥѥ������� path:bsu00010 ��˺ܤäƤ��� PathwayElement ��
1280
+ # �ꥹ�Ȥ�������롣
1281
+ get_elements_by_pathway('path:bsu00010')
1282
+
1283
+ # Ruby �ǰ����� bsu:BG11350, bsu:BG11203 �� bsu:BG11685 �� element_id ��
1284
+ # Ĵ�٤��㡣
1285
+ elems = serv.get_elements_by_pathway('path:bsu00010')
1286
+ genes = [ 'bsu:BG11350', 'bsu:BG11203', 'bsu:BG11685' ]
1287
+ elems.each do |elem|
1288
+ genes.each do |gene|
1289
+ if elem.names.include?(gene)
1290
+ puts gene, elem.element_id
1291
+ end
1292
+ end
1293
+ end
1294
+
1045
1295
  --- get_genes_by_pathway(pathway_id)
1046
1296
 
1047
1297
  ���ꤷ���ѥ���������˺ܤäƤ�������ҤΥꥹ�Ȥ��֤��ޤ�����ʪ��̾��
@@ -1096,7 +1346,7 @@ pathway_id
1096
1346
 
1097
1347
  �㡧
1098
1348
  # ��IJ�ݤΥѥ������� 00260 �֤˺ܤäƤ���ꥢ�������Υꥹ��
1099
- get_reactions_by_pathways('path:eco00260')
1349
+ get_reactions_by_pathway('path:eco00260')
1100
1350
 
1101
1351
  --- get_kos_by_pathway(pathway_id)
1102
1352
 
@@ -1199,144 +1449,6 @@ pathway_id
1199
1449
  get_linked_pathways('path:eco00620')
1200
1450
 
1201
1451
 
1202
- + �����Ҥȹ����ֹ�δط�
1203
-
1204
- --- get_genes_by_enzyme(enzyme_id, org)
1205
-
1206
- �о���ʪ��ˤ����ơ����ꤷ�������ֹ����İ����ҤΥꥹ�Ȥ��֤��ޤ���
1207
-
1208
- ���͡�
1209
- ArrayOfstring (genes_id)
1210
-
1211
- �㡧
1212
- # �����ֹ� 1.1.1.1 �������IJ�ݤΰ����ҤΥꥹ��
1213
- get_genes_by_enzyme('ec:1.1.1.1', 'eco')
1214
-
1215
- --- get_enzymes_by_gene(genes_id)
1216
-
1217
- ���ꤷ�������Ҥ��б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
1218
-
1219
- ���͡�
1220
- ArrayOfstring (enzyme_id)
1221
-
1222
- �㡧
1223
- # ��IJ�ݰ����� 'eco:b0002' �ι����ֹ�Υꥹ��
1224
- get_enzymes_by_gene(eco:b0002)
1225
-
1226
-
1227
- + ���ǡ�����ʪ���ꥢ�������δط�
1228
-
1229
- --- get_enzymes_by_compound(compound_id)
1230
-
1231
- ���ꤷ������ʪ���б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
1232
-
1233
- ���͡�
1234
- ArrayOfstring (compound_id)
1235
-
1236
- �㡧
1237
- # ����ʪ 'cpd:C00345' ����դ˴ؤ����ǤΥꥹ��
1238
- get_enzymes_by_compound('cpd:C00345')
1239
-
1240
- --- get_enzymes_by_glycan(compound_id)
1241
-
1242
- ���ꤷ���������б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
1243
-
1244
- ���͡�
1245
- ArrayOfstring (glycan_id)
1246
-
1247
- �㡧
1248
- # ���� 'gl:G00001' ����դ˴ؤ����ǤΥꥹ��
1249
- get_enzymes_by_glycan('gl:G00001')
1250
-
1251
- --- get_enzymes_by_reaction(reaction_id)
1252
-
1253
- ���ꤷ���ꥢ��������ֹ���б���������ֹ�Υꥹ�Ȥ��֤��ޤ���
1254
-
1255
- ���͡�
1256
- ArrayOfstring (reaction_id)
1257
-
1258
- �㡧
1259
- # �ꥢ��������ֹ� R00100 ����Ĺ��ǤΥꥹ��
1260
- get_enzymes_by_reaction('rn:R00100')
1261
-
1262
- --- get_compounds_by_enzyme(enzyme_id)
1263
-
1264
- ���ꤷ�������ֹ���б����벽��ʪ�Υꥹ�Ȥ��֤��ޤ���
1265
-
1266
- ���͡�
1267
- ArrayOfstring (compound_id)
1268
-
1269
- �㡧
1270
- # �����ֹ� 'ec:2.7.1.12' ����դ˴ؤ�벽��ʪ�Υꥹ��
1271
- get_compounds_by_enzyme('ec:2.7.1.12')
1272
-
1273
- --- get_compounds_by_reaction(reaction_id)
1274
-
1275
- ���ꤷ���ꥢ���������б����벽��ʪ�Υꥹ�Ȥ��֤��ޤ���
1276
-
1277
- ���͡�
1278
- ArrayOfstring (compound_id)
1279
-
1280
- �㡧
1281
- # �ꥢ��������ֹ� 'rn:R00100' ��ȿ���˴ؤ�벽��ʪ�Υꥹ��
1282
- get_compounds_by_reaction('rn:R00100')
1283
-
1284
- --- get_glycans_by_enzyme(enzyme_id)
1285
-
1286
- ���ꤷ�������ֹ���б����������Υꥹ�Ȥ��֤��ޤ���
1287
-
1288
- ���͡�
1289
- ArrayOfstring (glycan_id)
1290
-
1291
- �㡧
1292
- # �����ֹ� 'ec:2.4.1.141' ����դ˴ؤ�������Υꥹ��
1293
- get_glycans_by_enzyme('ec:2.4.1.141')
1294
-
1295
- --- get_glycans_by_reaction(reaction_id)
1296
-
1297
- ���ꤷ���ꥢ���������б����������Υꥹ�Ȥ��֤��ޤ���
1298
-
1299
- ���͡�
1300
- ArrayOfstring (glycan_id)
1301
-
1302
- �㡧
1303
- # �ꥢ��������ֹ� 'rn:R06164' ��ȿ���˴ؤ�������Υꥹ��
1304
- get_glycans_by_reaction('rn:R06164')
1305
-
1306
- --- get_reactions_by_enzyme(enzyme_id)
1307
-
1308
- ���ꤷ�������ֹ���б�����ꥢ�������Υꥹ�Ȥ��֤��ޤ���
1309
-
1310
- ���͡�
1311
- ArrayOfstring (reaction_id)
1312
-
1313
- �㡧
1314
- # �����ֹ� 'ec:2.7.1.12' ��ȿ���˴ؤ��ꥢ��������ֹ�Υꥹ��
1315
- get_reactions_by_enzyme('ec:2.7.1.12')
1316
-
1317
- --- get_reactions_by_compound(compound_id)
1318
-
1319
- ���ꤷ������ʪ���б�����ꥢ�������Υꥹ�Ȥ��֤��ޤ���
1320
-
1321
- ���͡�
1322
- ArrayOfstring (reaction_id)
1323
-
1324
- �㡧
1325
- # ����ʪ 'cpd:C00199' �ο���ȿ���˴ؤ��ꥢ��������ֹ�Υꥹ��
1326
- get_reactions_by_compound('cpd:C00199')
1327
-
1328
- --- get_reactions_by_glycan(glycan_id)
1329
-
1330
- ���ꤷ���������б�����ꥢ�������Υꥹ�Ȥ��֤��ޤ���
1331
-
1332
- ���͡�
1333
- ArrayOfstring (reaction_id)
1334
-
1335
- �㡧
1336
- # ���� 'gl:G00001' �ο���ȿ���˴ؤ��ꥢ��������ֹ�Υꥹ��
1337
- get_reactions_by_glycan('gl:G00001')
1338
-
1339
-
1340
1452
  ==== GENES
1341
1453
 
1342
1454
  GENES �ǡ����١������Ф���᥽�åɤΰ����Ǥ���GENES �ǡ����١����ˤĤ���
@@ -1394,6 +1506,7 @@ MOL
1394
1506
 
1395
1507
  == Notes
1396
1508
 
1397
- Last updated: May 31, 2005
1509
+ Last updated: Feb 17, 2006
1398
1510
 
1399
1511
  =end
1512
+