bio 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bioruby +14 -122
- data/bin/br_biofetch.rb +2 -2
- data/bin/br_bioflat.rb +2 -2
- data/bin/br_biogetseq.rb +2 -2
- data/bin/br_pmfetch.rb +3 -3
- data/doc/Changes-0.7.rd +77 -0
- data/doc/KEGG_API.rd +523 -232
- data/doc/KEGG_API.rd.ja +529 -207
- data/doc/Tutorial.rd +48 -11
- data/lib/bio.rb +59 -6
- data/lib/bio/alignment.rb +713 -103
- data/lib/bio/appl/bl2seq/report.rb +2 -18
- data/lib/bio/appl/blast.rb +108 -91
- data/lib/bio/appl/blast/format0.rb +33 -18
- data/lib/bio/appl/blast/format8.rb +6 -20
- data/lib/bio/appl/blast/report.rb +293 -429
- data/lib/bio/appl/blast/rexml.rb +8 -22
- data/lib/bio/appl/blast/wublast.rb +21 -12
- data/lib/bio/appl/blast/xmlparser.rb +180 -183
- data/lib/bio/appl/blat/report.rb +127 -30
- data/lib/bio/appl/clustalw.rb +87 -59
- data/lib/bio/appl/clustalw/report.rb +20 -22
- data/lib/bio/appl/emboss.rb +113 -20
- data/lib/bio/appl/fasta.rb +173 -198
- data/lib/bio/appl/fasta/format10.rb +244 -347
- data/lib/bio/appl/gcg/msf.rb +212 -0
- data/lib/bio/appl/gcg/seq.rb +195 -0
- data/lib/bio/appl/genscan/report.rb +5 -23
- data/lib/bio/appl/hmmer.rb +8 -45
- data/lib/bio/appl/hmmer/report.rb +2 -20
- data/lib/bio/appl/iprscan/report.rb +374 -0
- data/lib/bio/appl/mafft.rb +87 -50
- data/lib/bio/appl/mafft/report.rb +151 -44
- data/lib/bio/appl/muscle.rb +52 -0
- data/lib/bio/appl/phylip/alignment.rb +129 -0
- data/lib/bio/appl/phylip/distance_matrix.rb +96 -0
- data/lib/bio/appl/probcons.rb +41 -0
- data/lib/bio/appl/psort.rb +89 -96
- data/lib/bio/appl/psort/report.rb +6 -22
- data/lib/bio/appl/pts1.rb +263 -0
- data/lib/bio/appl/sim4.rb +26 -36
- data/lib/bio/appl/sim4/report.rb +2 -18
- data/lib/bio/appl/sosui/report.rb +5 -20
- data/lib/bio/appl/spidey/report.rb +2 -2
- data/lib/bio/appl/targetp/report.rb +4 -20
- data/lib/bio/appl/tcoffee.rb +55 -0
- data/lib/bio/appl/tmhmm/report.rb +4 -20
- data/lib/bio/command.rb +235 -64
- data/lib/bio/data/aa.rb +21 -26
- data/lib/bio/data/codontable.rb +2 -20
- data/lib/bio/data/na.rb +19 -4
- data/lib/bio/db.rb +27 -12
- data/lib/bio/db/aaindex.rb +2 -20
- data/lib/bio/db/embl/common.rb +4 -21
- data/lib/bio/db/embl/embl.rb +33 -85
- data/lib/bio/db/embl/sptr.rb +612 -302
- data/lib/bio/db/embl/swissprot.rb +10 -29
- data/lib/bio/db/embl/trembl.rb +10 -29
- data/lib/bio/db/embl/uniprot.rb +10 -29
- data/lib/bio/db/fantom.rb +15 -20
- data/lib/bio/db/fasta.rb +3 -3
- data/lib/bio/db/genbank/common.rb +37 -46
- data/lib/bio/db/genbank/ddbj.rb +6 -18
- data/lib/bio/db/genbank/genbank.rb +47 -186
- data/lib/bio/db/genbank/genpept.rb +4 -17
- data/lib/bio/db/genbank/refseq.rb +4 -17
- data/lib/bio/db/gff.rb +103 -35
- data/lib/bio/db/go.rb +4 -20
- data/lib/bio/db/kegg/brite.rb +26 -36
- data/lib/bio/db/kegg/compound.rb +81 -85
- data/lib/bio/db/kegg/drug.rb +98 -0
- data/lib/bio/db/kegg/enzyme.rb +133 -110
- data/lib/bio/db/kegg/expression.rb +2 -20
- data/lib/bio/db/kegg/genes.rb +208 -238
- data/lib/bio/db/kegg/genome.rb +164 -285
- data/lib/bio/db/kegg/glycan.rb +114 -157
- data/lib/bio/db/kegg/keggtab.rb +242 -303
- data/lib/bio/db/kegg/kgml.rb +117 -160
- data/lib/bio/db/kegg/orthology.rb +112 -0
- data/lib/bio/db/kegg/reaction.rb +54 -69
- data/lib/bio/db/kegg/taxonomy.rb +331 -0
- data/lib/bio/db/lasergene.rb +209 -0
- data/lib/bio/db/litdb.rb +3 -27
- data/lib/bio/db/medline.rb +228 -249
- data/lib/bio/db/nbrf.rb +3 -3
- data/lib/bio/db/newick.rb +510 -0
- data/lib/bio/db/nexus.rb +1854 -0
- data/lib/bio/db/pdb.rb +5 -17
- data/lib/bio/db/pdb/atom.rb +2 -18
- data/lib/bio/db/pdb/chain.rb +2 -18
- data/lib/bio/db/pdb/chemicalcomponent.rb +2 -18
- data/lib/bio/db/pdb/model.rb +2 -18
- data/lib/bio/db/pdb/pdb.rb +73 -34
- data/lib/bio/db/pdb/residue.rb +4 -20
- data/lib/bio/db/pdb/utils.rb +2 -18
- data/lib/bio/db/prosite.rb +403 -422
- data/lib/bio/db/rebase.rb +84 -40
- data/lib/bio/db/soft.rb +404 -0
- data/lib/bio/db/transfac.rb +5 -17
- data/lib/bio/feature.rb +106 -52
- data/lib/bio/io/das.rb +32 -42
- data/lib/bio/io/dbget.rb +2 -20
- data/lib/bio/io/ddbjxml.rb +77 -138
- data/lib/bio/io/ebisoap.rb +158 -0
- data/lib/bio/io/ensembl.rb +229 -0
- data/lib/bio/io/fastacmd.rb +89 -82
- data/lib/bio/io/fetch.rb +163 -96
- data/lib/bio/io/flatfile.rb +170 -73
- data/lib/bio/io/flatfile/bdb.rb +3 -16
- data/lib/bio/io/flatfile/index.rb +2 -2
- data/lib/bio/io/flatfile/indexer.rb +3 -2
- data/lib/bio/io/higet.rb +12 -31
- data/lib/bio/io/keggapi.rb +210 -269
- data/lib/bio/io/ncbisoap.rb +155 -0
- data/lib/bio/io/pubmed.rb +169 -147
- data/lib/bio/io/registry.rb +4 -20
- data/lib/bio/io/soapwsdl.rb +43 -38
- data/lib/bio/io/sql.rb +242 -305
- data/lib/bio/location.rb +407 -285
- data/lib/bio/map.rb +410 -0
- data/lib/bio/pathway.rb +558 -695
- data/lib/bio/reference.rb +272 -75
- data/lib/bio/sequence.rb +255 -13
- data/lib/bio/sequence/aa.rb +71 -10
- data/lib/bio/sequence/common.rb +187 -33
- data/lib/bio/sequence/compat.rb +59 -4
- data/lib/bio/sequence/format.rb +54 -7
- data/lib/bio/sequence/generic.rb +3 -3
- data/lib/bio/sequence/na.rb +328 -26
- data/lib/bio/shell.rb +11 -4
- data/lib/bio/shell/core.rb +221 -160
- data/lib/bio/shell/demo.rb +18 -15
- data/lib/bio/shell/interface.rb +14 -12
- data/lib/bio/shell/irb.rb +95 -0
- data/lib/bio/shell/object.rb +45 -26
- data/lib/bio/shell/plugin/blast.rb +42 -0
- data/lib/bio/shell/plugin/codon.rb +22 -14
- data/lib/bio/shell/plugin/das.rb +58 -0
- data/lib/bio/shell/plugin/emboss.rb +2 -2
- data/lib/bio/shell/plugin/entry.rb +22 -11
- data/lib/bio/shell/plugin/flatfile.rb +2 -2
- data/lib/bio/shell/plugin/keggapi.rb +13 -6
- data/lib/bio/shell/plugin/midi.rb +4 -4
- data/lib/bio/shell/plugin/obda.rb +2 -2
- data/lib/bio/shell/plugin/psort.rb +56 -0
- data/lib/bio/shell/plugin/seq.rb +35 -8
- data/lib/bio/shell/plugin/soap.rb +87 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/bioruby_generator.rb +29 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_classes.rhtml +4 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_log.rhtml +27 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_methods.rhtml +11 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_modules.rhtml +4 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/_variables.rhtml +7 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-bg.gif +0 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-console.png +0 -0
- data/lib/bio/shell/rails/{public/images/icon.png → vendor/plugins/generators/bioruby/templates/bioruby-gem.png} +0 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby-link.gif +0 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby.css +369 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby.rhtml +47 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby_controller.rb +144 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/bioruby_helper.rb +47 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/commands.rhtml +8 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/history.rhtml +10 -0
- data/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates/index.rhtml +22 -0
- data/lib/bio/shell/script.rb +25 -0
- data/lib/bio/shell/setup.rb +109 -0
- data/lib/bio/shell/web.rb +70 -58
- data/lib/bio/tree.rb +850 -0
- data/lib/bio/util/color_scheme.rb +84 -107
- data/lib/bio/util/color_scheme/buried.rb +5 -24
- data/lib/bio/util/color_scheme/helix.rb +5 -24
- data/lib/bio/util/color_scheme/hydropathy.rb +5 -24
- data/lib/bio/util/color_scheme/nucleotide.rb +5 -24
- data/lib/bio/util/color_scheme/strand.rb +5 -24
- data/lib/bio/util/color_scheme/taylor.rb +5 -24
- data/lib/bio/util/color_scheme/turn.rb +5 -24
- data/lib/bio/util/color_scheme/zappo.rb +5 -24
- data/lib/bio/util/contingency_table.rb +70 -43
- data/lib/bio/util/restriction_enzyme.rb +228 -0
- data/lib/bio/util/restriction_enzyme/analysis.rb +249 -0
- data/lib/bio/util/restriction_enzyme/analysis_basic.rb +217 -0
- data/lib/bio/util/restriction_enzyme/cut_symbol.rb +107 -0
- data/lib/bio/util/restriction_enzyme/double_stranded.rb +321 -0
- data/lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb +130 -0
- data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb +103 -0
- data/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb +38 -0
- data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb +76 -0
- data/lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb +107 -0
- data/lib/bio/util/restriction_enzyme/enzymes.yaml +7061 -0
- data/lib/bio/util/restriction_enzyme/range/cut_range.rb +24 -0
- data/lib/bio/util/restriction_enzyme/range/cut_ranges.rb +47 -0
- data/lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb +67 -0
- data/lib/bio/util/restriction_enzyme/range/sequence_range.rb +257 -0
- data/lib/bio/util/restriction_enzyme/range/sequence_range/calculated_cuts.rb +242 -0
- data/lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb +51 -0
- data/lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb +41 -0
- data/lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb +77 -0
- data/lib/bio/util/restriction_enzyme/single_strand.rb +199 -0
- data/lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb +135 -0
- data/lib/bio/util/restriction_enzyme/single_strand_complement.rb +23 -0
- data/lib/bio/util/restriction_enzyme/string_formatting.rb +111 -0
- data/lib/bio/util/sirna.rb +4 -22
- data/sample/color_scheme_na.rb +4 -12
- data/sample/enzymes.rb +78 -0
- data/sample/goslim.rb +5 -13
- data/sample/psortplot_html.rb +4 -12
- data/test/data/blast/2.2.15.blastp.m7 +876 -0
- data/test/data/embl/AB090716.embl.rel89 +63 -0
- data/test/data/fasta/example1.txt +75 -0
- data/test/data/fasta/example2.txt +21 -0
- data/test/data/iprscan/merged.raw +32 -0
- data/test/data/iprscan/merged.txt +74 -0
- data/test/data/soft/GDS100_partial.soft +92 -0
- data/test/data/soft/GSE3457_family_partial.soft +874 -0
- data/test/functional/bio/io/test_ensembl.rb +103 -0
- data/test/functional/bio/io/test_soapwsdl.rb +5 -17
- data/test/unit/bio/appl/bl2seq/test_report.rb +2 -2
- data/test/unit/bio/appl/blast/test_report.rb +3 -16
- data/test/unit/bio/appl/blast/test_xmlparser.rb +4 -16
- data/test/unit/bio/appl/genscan/test_report.rb +3 -16
- data/test/unit/bio/appl/hmmer/test_report.rb +3 -16
- data/test/unit/bio/appl/iprscan/test_report.rb +338 -0
- data/test/unit/bio/appl/mafft/test_report.rb +63 -0
- data/test/unit/bio/appl/sosui/test_report.rb +3 -16
- data/test/unit/bio/appl/targetp/test_report.rb +3 -16
- data/test/unit/bio/appl/test_blast.rb +3 -16
- data/test/unit/bio/appl/test_fasta.rb +4 -16
- data/test/unit/bio/appl/test_pts1.rb +140 -0
- data/test/unit/bio/appl/tmhmm/test_report.rb +3 -16
- data/test/unit/bio/data/test_aa.rb +4 -17
- data/test/unit/bio/data/test_codontable.rb +3 -16
- data/test/unit/bio/data/test_na.rb +3 -3
- data/test/unit/bio/db/embl/test_common.rb +3 -16
- data/test/unit/bio/db/embl/test_embl.rb +3 -16
- data/test/unit/bio/db/embl/test_embl_rel89.rb +219 -0
- data/test/unit/bio/db/embl/test_sptr.rb +1548 -41
- data/test/unit/bio/db/embl/test_uniprot.rb +3 -16
- data/test/unit/bio/db/kegg/test_genes.rb +3 -16
- data/test/unit/bio/db/pdb/test_pdb.rb +7 -24
- data/test/unit/bio/db/test_aaindex.rb +2 -2
- data/test/unit/bio/db/test_fasta.rb +3 -16
- data/test/unit/bio/db/test_gff.rb +3 -16
- data/test/unit/bio/db/test_lasergene.rb +95 -0
- data/test/unit/bio/db/test_newick.rb +56 -0
- data/test/unit/bio/db/test_nexus.rb +360 -0
- data/test/unit/bio/db/test_prosite.rb +5 -18
- data/test/unit/bio/db/test_rebase.rb +11 -25
- data/test/unit/bio/db/test_soft.rb +138 -0
- data/test/unit/bio/io/test_ddbjxml.rb +5 -17
- data/test/unit/bio/io/test_ensembl.rb +109 -0
- data/test/unit/bio/io/test_fastacmd.rb +3 -16
- data/test/unit/bio/io/test_flatfile.rb +237 -0
- data/test/unit/bio/io/test_soapwsdl.rb +4 -17
- data/test/unit/bio/sequence/test_aa.rb +3 -3
- data/test/unit/bio/sequence/test_common.rb +3 -16
- data/test/unit/bio/sequence/test_compat.rb +3 -16
- data/test/unit/bio/sequence/test_na.rb +29 -3
- data/test/unit/bio/shell/plugin/test_seq.rb +8 -8
- data/test/unit/bio/test_alignment.rb +16 -27
- data/test/unit/bio/test_command.rb +242 -25
- data/test/unit/bio/test_db.rb +3 -16
- data/test/unit/bio/test_feature.rb +4 -16
- data/test/unit/bio/test_location.rb +4 -16
- data/test/unit/bio/test_map.rb +230 -0
- data/test/unit/bio/test_pathway.rb +4 -16
- data/test/unit/bio/test_reference.rb +2 -2
- data/test/unit/bio/test_sequence.rb +7 -19
- data/test/unit/bio/test_shell.rb +3 -16
- data/test/unit/bio/test_tree.rb +593 -0
- data/test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb +299 -0
- data/test/unit/bio/util/restriction_enzyme/analysis/test_cut_ranges.rb +103 -0
- data/test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb +240 -0
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb +100 -0
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb +75 -0
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb +73 -0
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb +53 -0
- data/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb +104 -0
- data/test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb +83 -0
- data/test/unit/bio/util/restriction_enzyme/test_analysis.rb +246 -0
- data/test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb +44 -0
- data/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb +115 -0
- data/test/unit/bio/util/restriction_enzyme/test_single_strand.rb +147 -0
- data/test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb +147 -0
- data/test/unit/bio/util/restriction_enzyme/test_string_formatting.rb +60 -0
- data/test/unit/bio/util/test_color_scheme.rb +6 -18
- data/test/unit/bio/util/test_contingency_table.rb +6 -18
- data/test/unit/bio/util/test_restriction_enzyme.rb +42 -0
- data/test/unit/bio/util/test_sirna.rb +3 -16
- metadata +228 -169
- data/doc/BioRuby.rd.ja +0 -225
- data/doc/Design.rd.ja +0 -341
- data/doc/TODO.rd.ja +0 -138
- data/lib/bio/appl/fasta/format6.rb +0 -37
- data/lib/bio/db/kegg/cell.rb +0 -88
- data/lib/bio/db/kegg/ko.rb +0 -178
- data/lib/bio/shell/rails/Rakefile +0 -10
- data/lib/bio/shell/rails/app/controllers/application.rb +0 -4
- data/lib/bio/shell/rails/app/controllers/shell_controller.rb +0 -94
- data/lib/bio/shell/rails/app/helpers/application_helper.rb +0 -3
- data/lib/bio/shell/rails/app/models/shell_connection.rb +0 -30
- data/lib/bio/shell/rails/app/views/layouts/shell.rhtml +0 -37
- data/lib/bio/shell/rails/app/views/shell/history.rhtml +0 -5
- data/lib/bio/shell/rails/app/views/shell/index.rhtml +0 -2
- data/lib/bio/shell/rails/app/views/shell/show.rhtml +0 -13
- data/lib/bio/shell/rails/config/boot.rb +0 -19
- data/lib/bio/shell/rails/config/database.yml +0 -85
- data/lib/bio/shell/rails/config/environment.rb +0 -53
- data/lib/bio/shell/rails/config/environments/development.rb +0 -19
- data/lib/bio/shell/rails/config/environments/production.rb +0 -19
- data/lib/bio/shell/rails/config/environments/test.rb +0 -19
- data/lib/bio/shell/rails/config/routes.rb +0 -19
- data/lib/bio/shell/rails/doc/README_FOR_APP +0 -2
- data/lib/bio/shell/rails/public/404.html +0 -8
- data/lib/bio/shell/rails/public/500.html +0 -8
- data/lib/bio/shell/rails/public/dispatch.cgi +0 -10
- data/lib/bio/shell/rails/public/dispatch.fcgi +0 -24
- data/lib/bio/shell/rails/public/dispatch.rb +0 -10
- data/lib/bio/shell/rails/public/favicon.ico +0 -0
- data/lib/bio/shell/rails/public/images/rails.png +0 -0
- data/lib/bio/shell/rails/public/index.html +0 -277
- data/lib/bio/shell/rails/public/javascripts/controls.js +0 -750
- data/lib/bio/shell/rails/public/javascripts/dragdrop.js +0 -584
- data/lib/bio/shell/rails/public/javascripts/effects.js +0 -854
- data/lib/bio/shell/rails/public/javascripts/prototype.js +0 -1785
- data/lib/bio/shell/rails/public/robots.txt +0 -1
- data/lib/bio/shell/rails/public/stylesheets/main.css +0 -187
- data/lib/bio/shell/rails/script/about +0 -3
- data/lib/bio/shell/rails/script/breakpointer +0 -3
- data/lib/bio/shell/rails/script/console +0 -3
- data/lib/bio/shell/rails/script/destroy +0 -3
- data/lib/bio/shell/rails/script/generate +0 -3
- data/lib/bio/shell/rails/script/performance/benchmarker +0 -3
- data/lib/bio/shell/rails/script/performance/profiler +0 -3
- data/lib/bio/shell/rails/script/plugin +0 -3
- data/lib/bio/shell/rails/script/process/reaper +0 -3
- data/lib/bio/shell/rails/script/process/spawner +0 -3
- data/lib/bio/shell/rails/script/process/spinner +0 -3
- data/lib/bio/shell/rails/script/runner +0 -3
- data/lib/bio/shell/rails/script/server +0 -42
- data/lib/bio/shell/rails/test/test_helper.rb +0 -28
@@ -2,25 +2,9 @@
|
|
2
2
|
# = bio/appl/clustalw/report.rb - CLUSTAL W format data (*.aln) class
|
3
3
|
#
|
4
4
|
# Copyright:: Copyright (C) 2003 GOTO Naohisa <ngoto@gen-info.osaka-u.ac.jp>
|
5
|
-
# License::
|
5
|
+
# License:: The Ruby License
|
6
6
|
#
|
7
|
-
|
8
|
-
# This library is free software; you can redistribute it and/or
|
9
|
-
# modify it under the terms of the GNU Lesser General Public
|
10
|
-
# License as published by the Free Software Foundation; either
|
11
|
-
# version 2 of the License, or (at your option) any later version.
|
12
|
-
#
|
13
|
-
# This library is distributed in the hope that it will be useful,
|
14
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
16
|
-
# Lesser General Public License for more details.
|
17
|
-
#
|
18
|
-
# You should have received a copy of the GNU Lesser General Public
|
19
|
-
# License along with this library; if not, write to the Free Software
|
20
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
21
|
-
#++
|
22
|
-
#
|
23
|
-
# $Id: report.rb,v 1.9 2005/12/18 15:58:40 k Exp $
|
7
|
+
# $Id: report.rb,v 1.13 2007/07/18 08:47:39 ngoto Exp $
|
24
8
|
#
|
25
9
|
# Bio::ClustalW::Report is a CLUSTAL W report (*.aln file) parser.
|
26
10
|
# CLUSTAL W is a very popular software for multiple sequence alignment.
|
@@ -97,22 +81,36 @@ module Bio
|
|
97
81
|
|
98
82
|
# Gets an multiple alignment.
|
99
83
|
# Returns a Bio::Alignment object.
|
100
|
-
def
|
84
|
+
def alignment
|
101
85
|
do_parse() unless @align
|
102
86
|
@align
|
103
87
|
end
|
104
|
-
alias alignment align
|
105
88
|
|
89
|
+
# This will be deprecated. Instead, please use alignment.
|
90
|
+
#
|
91
|
+
# Gets an multiple alignment.
|
92
|
+
# Returns a Bio::Alignment object.
|
93
|
+
def align
|
94
|
+
warn "Bio::ClustalW#align will be deprecated. Please use \'alignment\'."
|
95
|
+
alignment
|
96
|
+
end
|
97
|
+
|
98
|
+
# This will be deprecated. Instead, please use alignment.output_fasta.
|
99
|
+
#
|
106
100
|
# Gets an fasta-format string of the sequences.
|
107
101
|
# Returns a string.
|
108
102
|
def to_fasta(*arg)
|
109
|
-
|
103
|
+
warn "Bio::ClustalW::report#to_fasta is deprecated. Please use \'alignment.output_fasta\'"
|
104
|
+
alignment.output_fasta(*arg)
|
110
105
|
end
|
111
106
|
|
107
|
+
# Compatibility note: Behavior of the method will be changed
|
108
|
+
# in the future.
|
109
|
+
#
|
112
110
|
# Gets an array of the sequences.
|
113
111
|
# Returns an array of Bio::FastaFormat objects.
|
114
112
|
def to_a
|
115
|
-
|
113
|
+
alignment.to_fastaformat_array
|
116
114
|
end
|
117
115
|
|
118
116
|
private
|
data/lib/bio/appl/emboss.rb
CHANGED
@@ -1,37 +1,131 @@
|
|
1
1
|
#
|
2
2
|
# = bio/appl/emboss.rb - EMBOSS wrapper
|
3
3
|
#
|
4
|
-
# Copyright::
|
5
|
-
#
|
6
|
-
# License::
|
4
|
+
# Copyright:: Copyright (C) 2002, 2005 Toshiaki Katayama<k@bioruby.org>
|
5
|
+
# Copyright:: Copyright (C) 2006 Jan Aerts <jan.aerts@bbsrc.ac.uk>
|
6
|
+
# License:: The Ruby License
|
7
7
|
#
|
8
|
-
# $Id: emboss.rb,v 1.
|
9
|
-
#
|
10
|
-
# == References
|
11
|
-
#
|
12
|
-
# * http://www.emboss.org
|
8
|
+
# $Id: emboss.rb,v 1.8 2007/04/05 23:35:39 trevor Exp $
|
13
9
|
#
|
14
10
|
|
15
11
|
module Bio
|
16
12
|
|
17
|
-
|
18
|
-
|
13
|
+
# == Description
|
14
|
+
#
|
15
|
+
# This file holds classes pertaining to the EMBOSS software suite.
|
16
|
+
#
|
17
|
+
# This class provides a wrapper for the applications of the EMBOSS suite, which
|
18
|
+
# is a mature and stable collection of open-source applications that can handle
|
19
|
+
# a huge range of sequence formats.
|
20
|
+
# Applications include:
|
21
|
+
# * Sequence alignment
|
22
|
+
# * Rapid database searching with sequence patterns
|
23
|
+
# * Protein motif identification, including domain analysis
|
24
|
+
# * Nucleotide sequence pattern analysis---for example to identify CpG islands or repeats
|
25
|
+
# * Codon usage analysis for small genomes
|
26
|
+
# * Rapid identification of sequence patterns in large scale sequence sets
|
27
|
+
# * Presentation tools for publication
|
28
|
+
#
|
29
|
+
# See the emboss website for more information: http://emboss.sourceforge.net.
|
30
|
+
#
|
31
|
+
#
|
32
|
+
# == Usage
|
33
|
+
#
|
34
|
+
# require 'bio'
|
35
|
+
#
|
36
|
+
# # Suppose that you could get the sequence for XLRHODOP by running
|
37
|
+
# # the EMBOSS command +seqret embl:xlrhodop+ on the command line.
|
38
|
+
# # Then you can get the output of that command in a Bio::EMBOSS object
|
39
|
+
# # by creating a new Bio::EMBOSS object and subsequently executing it.
|
40
|
+
# xlrhodop = Bio::EMBOSS.new('seqret embl:xlrhodop')
|
41
|
+
# puts xlrhodop.exec
|
42
|
+
#
|
43
|
+
# # Or all in one go:
|
44
|
+
# puts Bio::EMBOSS.new('seqret embl:xlrhodop').exec
|
45
|
+
#
|
46
|
+
# # Similarly:
|
47
|
+
# puts Bio::EMBOSS.new('transeq -sbegin 110 -send 1171 embl:xlrhodop')
|
48
|
+
# puts Bio::EMBOSS.new('showfeat embl:xlrhodop').exec
|
49
|
+
# puts Bio::EMBOSS.new('seqret embl:xlrhodop -osformat acedb').exec
|
50
|
+
#
|
51
|
+
# # A shortcut exists for this two-step process for +seqret+ and +entret+.
|
52
|
+
# puts Bio::EMBOSS.seqret('embl:xlrhodop')
|
53
|
+
# puts Bio::EMBOSS.entret('embl:xlrhodop')
|
54
|
+
#
|
55
|
+
# == Pre-requisites
|
56
|
+
#
|
57
|
+
# You must have the EMBOSS suite installed locally. You can download from the
|
58
|
+
# project website (see References below).
|
59
|
+
#
|
60
|
+
# = Rereferences
|
61
|
+
#
|
62
|
+
# * http://emboss.sourceforge.net
|
63
|
+
# * Rice P, Longden I and Bleasby A. \
|
64
|
+
# EMBOSS: the European Molecular Biology Open Software Suite. \
|
65
|
+
# Trends Genet. 2000 Jun ; 16(6): 276-7
|
66
|
+
#
|
19
67
|
class EMBOSS
|
20
68
|
|
21
|
-
|
22
|
-
|
69
|
+
# Combines the initialization and execution for the emboss +seqret+ command.
|
70
|
+
#
|
71
|
+
# puts Bio::EMBOSS.seqret('embl:xlrhodop')
|
72
|
+
#
|
73
|
+
# is equivalent to:
|
74
|
+
#
|
75
|
+
# object = Bio::EMBOSS.new('seqret embl:xlrhodop')
|
76
|
+
# puts object.exec
|
77
|
+
# ---
|
78
|
+
# *Arguments*:
|
79
|
+
# * (required) _command_: emboss command
|
80
|
+
# *Returns*:: Bio::EMBOSS object
|
23
81
|
def self.seqret(arg)
|
24
82
|
str = self.retrieve('seqret', arg)
|
25
83
|
end
|
26
84
|
|
85
|
+
# Combines the initialization and execution for the emboss +entret+ command.
|
86
|
+
#
|
87
|
+
# puts Bio::EMBOSS.entret('embl:xlrhodop')
|
88
|
+
#
|
89
|
+
# is equivalent to:
|
90
|
+
#
|
91
|
+
# object = Bio::EMBOSS.new('entret embl:xlrhodop')
|
92
|
+
# puts object.exec
|
93
|
+
# ---
|
94
|
+
# *Arguments*:
|
95
|
+
# * (required) _command_: emboss command
|
96
|
+
# *Returns*:: Bio::EMBOSS object
|
27
97
|
def self.entret(arg)
|
28
98
|
str = self.retrieve('entret', arg)
|
29
99
|
end
|
30
100
|
|
101
|
+
# Initializes a new Bio::EMBOSS object. This provides a holder that can
|
102
|
+
# subsequently be executed (see Bio::EMBOSS.exec). The object does _not_
|
103
|
+
# hold any actual data when initialized.
|
104
|
+
#
|
105
|
+
# e = Bio::EMBOSS.new('seqret embl:xlrhodop')
|
106
|
+
#
|
107
|
+
# For e to actually hold data, it has to be executed:
|
108
|
+
# puts e.exec
|
109
|
+
#
|
110
|
+
# For an overview of commands that can be used with this method, see the
|
111
|
+
# emboss website.
|
112
|
+
# ---
|
113
|
+
# *Arguments*:
|
114
|
+
# * (required) _command_: emboss command
|
115
|
+
# *Returns*:: Bio::EMBOSS object
|
31
116
|
def initialize(cmd_line)
|
32
117
|
@cmd_line = cmd_line + ' -stdout -auto'
|
33
118
|
end
|
34
119
|
|
120
|
+
# A Bio::EMBOSS object has to be executed before it can return any result.
|
121
|
+
# obj_A = Bio::EMBOSS.new('transeq -sbegin 110 -send 1171 embl:xlrhodop')
|
122
|
+
# puts obj_A.result #=> nil
|
123
|
+
# obj_A.exec
|
124
|
+
# puts obj_A.result #=> a FASTA-formatted sequence
|
125
|
+
#
|
126
|
+
# obj_B = Bio::EMBOSS.new('showfeat embl:xlrhodop')
|
127
|
+
# obj_B.exec
|
128
|
+
# puts obj_B.result
|
35
129
|
def exec
|
36
130
|
begin
|
37
131
|
@io = IO.popen(@cmd_line, "w+")
|
@@ -41,21 +135,20 @@ class EMBOSS
|
|
41
135
|
@io.close
|
42
136
|
end
|
43
137
|
end
|
44
|
-
|
138
|
+
|
139
|
+
# Pipe for the command
|
140
|
+
attr_reader :io
|
141
|
+
|
142
|
+
# Result of the executed command
|
143
|
+
attr_reader :result
|
45
144
|
|
46
145
|
private
|
47
146
|
|
48
147
|
def self.retrieve(cmd, arg)
|
49
148
|
cmd = [ cmd, arg, '-auto', '-stdout' ]
|
50
|
-
|
51
|
-
call_command_local(cmd) do |inn, out|
|
52
|
-
inn.close_write
|
53
|
-
str = out.read
|
54
|
-
end
|
55
|
-
return str
|
149
|
+
return Bio::Command.query_command(cmd)
|
56
150
|
end
|
57
151
|
|
58
152
|
end # EMBOSS
|
59
153
|
|
60
154
|
end # Bio
|
61
|
-
|
data/lib/bio/appl/fasta.rb
CHANGED
@@ -1,23 +1,10 @@
|
|
1
1
|
#
|
2
|
-
# bio/appl/fasta.rb - FASTA wrapper
|
2
|
+
# = bio/appl/fasta.rb - FASTA wrapper
|
3
3
|
#
|
4
|
-
#
|
4
|
+
# Copyright:: Copyright (C) 2001, 2002 Toshiaki Katayama <k@bioruby.org>
|
5
|
+
# License:: The Ruby License
|
5
6
|
#
|
6
|
-
#
|
7
|
-
# modify it under the terms of the GNU Lesser General Public
|
8
|
-
# License as published by the Free Software Foundation; either
|
9
|
-
# version 2 of the License, or (at your option) any later version.
|
10
|
-
#
|
11
|
-
# This library is distributed in the hope that it will be useful,
|
12
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
# Lesser General Public License for more details.
|
15
|
-
#
|
16
|
-
# You should have received a copy of the GNU Lesser General Public
|
17
|
-
# License along with this library; if not, write to the Free Software
|
18
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19
|
-
#
|
20
|
-
# $Id: fasta.rb,v 1.20 2005/09/26 13:00:04 k Exp $
|
7
|
+
# $Id: fasta.rb,v 1.25 2007/05/18 15:22:52 k Exp $
|
21
8
|
#
|
22
9
|
|
23
10
|
require 'net/http'
|
@@ -27,154 +14,208 @@ require 'shellwords'
|
|
27
14
|
|
28
15
|
module Bio
|
29
16
|
|
30
|
-
|
31
|
-
|
32
|
-
autoload :Report, 'bio/appl/fasta/format10'
|
33
|
-
#autoload :?????, 'bio/appl/fasta/format6'
|
17
|
+
class Fasta
|
34
18
|
|
35
|
-
|
19
|
+
#autoload :Report, 'bio/appl/fasta/format10'
|
20
|
+
#autoload :?????, 'bio/appl/fasta/format6'
|
36
21
|
|
37
|
-
|
38
|
-
|
22
|
+
# Returns a FASTA factory object (Bio::Fasta).
|
23
|
+
def initialize(program, db, opt = [], server = 'local')
|
24
|
+
@format = 10
|
39
25
|
|
40
|
-
|
41
|
-
|
42
|
-
|
26
|
+
@program = program
|
27
|
+
@db = db
|
28
|
+
@server = server
|
43
29
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
@output = ''
|
48
|
-
|
49
|
-
begin
|
50
|
-
a = opt.to_ary
|
51
|
-
rescue NameError #NoMethodError
|
52
|
-
# backward compatibility
|
53
|
-
a = Shellwords.shellwords(opt)
|
54
|
-
end
|
55
|
-
@options = [ '-Q', '-H', '-m', @format.to_s, *a ] # need -a ?
|
56
|
-
end
|
57
|
-
attr_accessor :program, :db, :options, :server, :ktup, :matrix
|
58
|
-
attr_reader :output
|
30
|
+
@ktup = nil
|
31
|
+
@matrix = nil
|
59
32
|
|
60
|
-
|
61
|
-
# backward compatibility
|
62
|
-
make_command_line(@options)
|
63
|
-
end
|
33
|
+
@output = ''
|
64
34
|
|
65
|
-
|
35
|
+
begin
|
36
|
+
a = opt.to_ary
|
37
|
+
rescue NameError #NoMethodError
|
66
38
|
# backward compatibility
|
67
|
-
|
39
|
+
a = Shellwords.shellwords(opt)
|
68
40
|
end
|
41
|
+
@options = [ '-Q', '-H', '-m', @format.to_s, *a ] # need -a ?
|
42
|
+
end
|
43
|
+
attr_accessor :program, :db, :options, :server, :ktup, :matrix
|
69
44
|
|
70
|
-
|
71
|
-
|
72
|
-
if i = @options.index('-m') then
|
73
|
-
@options[i+1, 1] = @format.to_s
|
74
|
-
else
|
75
|
-
@options << '-m' << @format.to_s
|
76
|
-
end
|
77
|
-
end
|
78
|
-
attr_reader :format
|
45
|
+
# Returns a String containing fasta execution output in as is format.
|
46
|
+
attr_reader :output
|
79
47
|
|
80
|
-
|
81
|
-
|
82
|
-
|
48
|
+
def option
|
49
|
+
# backward compatibility
|
50
|
+
Bio::Command.make_command_line(@options)
|
51
|
+
end
|
83
52
|
|
84
|
-
|
85
|
-
|
86
|
-
|
53
|
+
def option=(str)
|
54
|
+
# backward compatibility
|
55
|
+
@options = Shellwords.shellwords(str)
|
56
|
+
end
|
87
57
|
|
88
|
-
|
89
|
-
|
58
|
+
# Accessors for the -m option.
|
59
|
+
def format=(num)
|
60
|
+
@format = num.to_i
|
61
|
+
if i = @options.index('-m') then
|
62
|
+
@options[i+1, 1] = @format.to_s
|
63
|
+
else
|
64
|
+
@options << '-m' << @format.to_s
|
90
65
|
end
|
66
|
+
end
|
67
|
+
attr_reader :format
|
68
|
+
|
69
|
+
# Select parser to use ('format6' and 'format10' is acceptable for now)
|
70
|
+
#
|
71
|
+
# This method will import Bio::Fasta::Report class by requiring specified
|
72
|
+
# parser and will be useful when you already have fasta output files and
|
73
|
+
# want to use appropriate Report class for parsing.
|
74
|
+
#
|
75
|
+
def self.parser(parser)
|
76
|
+
require "bio/appl/fasta/#{parser}"
|
77
|
+
end
|
91
78
|
|
92
|
-
|
93
|
-
|
94
|
-
|
79
|
+
# Returns a FASTA factory object (Bio::Fasta) to run FASTA search on
|
80
|
+
# local computer.
|
81
|
+
def self.local(program, db, option = '')
|
82
|
+
self.new(program, db, option, 'local')
|
83
|
+
end
|
95
84
|
|
85
|
+
# Returns a FASTA factory object (Bio::Fasta) to execute FASTA search on
|
86
|
+
# remote server.
|
87
|
+
#
|
88
|
+
# For the develpper, you can add server 'hoge' by adding
|
89
|
+
# exec_hoge(query) method.
|
90
|
+
#
|
91
|
+
def self.remote(program, db, option = '', server = 'genomenet')
|
92
|
+
self.new(program, db, option, server)
|
93
|
+
end
|
96
94
|
|
97
|
-
|
95
|
+
# Execute FASTA search and returns Report object (Bio::Fasta::Report).
|
96
|
+
def query(query)
|
97
|
+
return self.send("exec_#{@server}", query.to_s)
|
98
|
+
end
|
98
99
|
|
99
100
|
|
100
|
-
|
101
|
-
case @format
|
102
|
-
when 6
|
103
|
-
require 'bio/appl/fasta/format6'
|
104
|
-
when 10
|
105
|
-
require 'bio/appl/fasta/format10'
|
106
|
-
end
|
107
|
-
Report.new(data)
|
108
|
-
end
|
101
|
+
private
|
109
102
|
|
110
103
|
|
111
|
-
|
112
|
-
|
113
|
-
|
104
|
+
def parse_result(data)
|
105
|
+
case @format
|
106
|
+
when 6
|
107
|
+
require 'bio/appl/fasta/format6'
|
108
|
+
when 10
|
109
|
+
require 'bio/appl/fasta/format10'
|
110
|
+
end
|
111
|
+
Report.new(data)
|
112
|
+
end
|
114
113
|
|
115
|
-
report = nil
|
116
114
|
|
117
|
-
|
118
|
-
|
115
|
+
def exec_local(query)
|
116
|
+
cmd = [ @program, *@options ]
|
117
|
+
cmd.concat([ '@', @db ])
|
118
|
+
cmd.push(@ktup) if @ktup
|
119
119
|
|
120
|
-
|
121
|
-
end
|
120
|
+
report = nil
|
122
121
|
|
122
|
+
@output = Bio::Command.query_command(cmd, query)
|
123
|
+
report = parse_result(@output)
|
123
124
|
|
124
|
-
|
125
|
-
|
126
|
-
#path = "/sit-bin/nph-fasta"
|
127
|
-
path = "/sit-bin/fasta" #2005.08.12
|
125
|
+
return report
|
126
|
+
end
|
128
127
|
|
129
|
-
form = {
|
130
|
-
'style' => 'raw',
|
131
|
-
'prog' => @program,
|
132
|
-
'dbname' => @db,
|
133
|
-
'sequence' => CGI.escape(query),
|
134
|
-
'other_param' => CGI.escape(make_command_line_unix(@options)),
|
135
|
-
'ktup_value' => @ktup,
|
136
|
-
'matrix' => @matrix,
|
137
|
-
}
|
138
128
|
|
139
|
-
|
129
|
+
# == Available databases for Fasta.remote(@program, @db, option, 'genomenet')
|
130
|
+
#
|
131
|
+
# See http://fasta.genome.jp/ideas/ideas.html#fasta for more details.
|
132
|
+
#
|
133
|
+
# ----------+-------+---------------------------------------------------
|
134
|
+
# @program | query | @db (supported in GenomeNet)
|
135
|
+
# ----------+-------+---------------------------------------------------
|
136
|
+
# fasta | AA | nr-aa, genes, vgenes.pep, swissprot, swissprot-upd,
|
137
|
+
# | | pir, prf, pdbstr
|
138
|
+
# +-------+---------------------------------------------------
|
139
|
+
# | NA | nr-nt, genbank-nonst, gbnonst-upd, dbest, dbgss,
|
140
|
+
# | | htgs, dbsts, embl-nonst, embnonst-upd, epd,
|
141
|
+
# | | genes-nt, genome, vgenes.nuc
|
142
|
+
# ----------+-------+---------------------------------------------------
|
143
|
+
# tfasta | AA | nr-nt, genbank-nonst, gbnonst-upd, dbest, dbgss,
|
144
|
+
# | | htgs, dbsts, embl-nonst, embnonst-upd,
|
145
|
+
# | | genes-nt, genome, vgenes.nuc
|
146
|
+
# ----------+-------+---------------------------------------------------
|
147
|
+
#
|
148
|
+
def exec_genomenet(query)
|
149
|
+
host = "fasta.genome.jp"
|
150
|
+
#path = "/sit-bin/nph-fasta"
|
151
|
+
path = "/sit-bin/fasta" # 2005.08.12
|
152
|
+
|
153
|
+
form = {
|
154
|
+
'style' => 'raw',
|
155
|
+
'prog' => @program,
|
156
|
+
'dbname' => @db,
|
157
|
+
'sequence' => CGI.escape(query),
|
158
|
+
'other_param' => CGI.escape(Bio::Command.make_command_line_unix(@options)),
|
159
|
+
'ktup_value' => @ktup,
|
160
|
+
'matrix' => @matrix,
|
161
|
+
}
|
162
|
+
|
163
|
+
data = []
|
164
|
+
|
165
|
+
form.each do |k, v|
|
166
|
+
data.push("#{k}=#{v}") if v
|
167
|
+
end
|
140
168
|
|
141
|
-
|
142
|
-
|
169
|
+
report = nil
|
170
|
+
|
171
|
+
begin
|
172
|
+
http = Bio::Command.new_http(host)
|
173
|
+
http.open_timeout = 3000
|
174
|
+
http.read_timeout = 6000
|
175
|
+
result, = http.post(path, data.join('&'))
|
176
|
+
# workaround 2006.8.1 - fixed for new batch queuing system
|
177
|
+
case result.code
|
178
|
+
when "302"
|
179
|
+
result_location = result.header['location']
|
180
|
+
result_uri = URI.parse(result_location)
|
181
|
+
result_path = result_uri.path
|
182
|
+
done = false
|
183
|
+
until done
|
184
|
+
result = http.get(result_path)
|
185
|
+
if result.body[/Your job ID is/]
|
186
|
+
sleep 15
|
187
|
+
else
|
188
|
+
done = true
|
189
|
+
end
|
190
|
+
end
|
143
191
|
end
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
http.open_timeout = 300
|
150
|
-
http.read_timeout = 600
|
151
|
-
result, = http.post(path, data.join('&'))
|
192
|
+
@output = result.body.to_s
|
193
|
+
# workaround 2005.08.12
|
194
|
+
re = %r{<A HREF="http://#{host}(/tmp/[^"]+)">Show all result</A>} # "
|
195
|
+
if path = @output[re, 1]
|
196
|
+
result, = http.get(path)
|
152
197
|
@output = result.body
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
@output = txt.gsub(/\<\;/, '<')
|
166
|
-
report = parse_result(@output.dup)
|
167
|
-
else
|
168
|
-
raise 'cannot understand response'
|
169
|
-
end
|
198
|
+
txt = @output.to_s.split(/\<pre\>/)[1]
|
199
|
+
raise 'cannot understand response' unless txt
|
200
|
+
txt.sub!(/\<\/pre\>.*\z/m, '')
|
201
|
+
txt.sub!(/.*^((T?FASTA|SSEARCH) (searches|compares))/m, '\1')
|
202
|
+
txt.sub!(/^\<form method\=\"POST\" name\=\"clust_check\"\>.*\n/, '')
|
203
|
+
txt.gsub!(/\<input[^\>]+value\=\"[^\"]*\"[^\>]*\>/i, '')
|
204
|
+
txt.gsub!(/\<(a|form|select|input|option|img)\s+[^\>]+\>/i, '')
|
205
|
+
txt.gsub!(/\<\/(a|form|select|input|option|img)\>/i, '')
|
206
|
+
@output = txt.gsub(/\<\;/, '<')
|
207
|
+
report = parse_result(@output.dup)
|
208
|
+
else
|
209
|
+
raise 'cannot understand response'
|
170
210
|
end
|
171
|
-
|
172
|
-
return report
|
173
211
|
end
|
174
212
|
|
213
|
+
return report
|
175
214
|
end
|
176
215
|
|
177
|
-
end
|
216
|
+
end # Fasta
|
217
|
+
|
218
|
+
end # Bio
|
178
219
|
|
179
220
|
|
180
221
|
if __FILE__ == $0
|
@@ -187,76 +228,10 @@ if __FILE__ == $0
|
|
187
228
|
# serv = Bio::Fasta.local('fasta34', 'hoge.nuc')
|
188
229
|
# serv = Bio::Fasta.local('fasta34', 'hoge.pep')
|
189
230
|
# serv = Bio::Fasta.local('ssearch34', 'hoge.pep')
|
231
|
+
|
232
|
+
# This may take 3 minutes or so.
|
190
233
|
serv = Bio::Fasta.remote('fasta', 'genes')
|
191
234
|
p serv.query(ARGF.read)
|
192
235
|
end
|
193
236
|
|
194
237
|
|
195
|
-
=begin
|
196
|
-
|
197
|
-
= Bio::Fasta
|
198
|
-
|
199
|
-
--- Bio::Fasta.new(program, db, option = '', server = 'local')
|
200
|
-
--- Bio::Fasta.local(program, db, option = '')
|
201
|
-
--- Bio::Fasta.remote(program, db, option = '', server = 'genomenet')
|
202
|
-
|
203
|
-
Returns a fasta factory object (Bio::Fasta).
|
204
|
-
|
205
|
-
For the develpper, you can add server 'hoge' by adding
|
206
|
-
exec_hoge(query) method.
|
207
|
-
|
208
|
-
--- Bio::Fasta#query(query)
|
209
|
-
|
210
|
-
Execute fasta search and returns Report object (Bio::Fasta::Report).
|
211
|
-
|
212
|
-
--- Bio::Fasta#output
|
213
|
-
|
214
|
-
Returns a String containing fasta execution output in as is format.
|
215
|
-
|
216
|
-
--- Bio::Fasta#program
|
217
|
-
--- Bio::Fasta#db
|
218
|
-
--- Bio::Fasta#options
|
219
|
-
--- Bio::Fasta#server
|
220
|
-
--- Bio::Fasta#ktup
|
221
|
-
|
222
|
-
Accessors for the factory parameters.
|
223
|
-
|
224
|
-
--- Bio::Fasta#option
|
225
|
-
--- Bio::Fasta#option=(str)
|
226
|
-
|
227
|
-
Get/set options by string.
|
228
|
-
|
229
|
-
--- Bio::Fasta#format
|
230
|
-
--- Bio::Fasta#format=(number)
|
231
|
-
|
232
|
-
Accessors for the -m option.
|
233
|
-
|
234
|
-
--- Bio::Fasta.parser(parser)
|
235
|
-
|
236
|
-
Import Bio::Fasta::Report class by requiring specified parser.
|
237
|
-
|
238
|
-
This class method will be useful when you already have fasta
|
239
|
-
output files and want to use appropriate Report class for parsing.
|
240
|
-
|
241
|
-
|
242
|
-
== Available databases for Fasta.remote(@program, @db, option, 'genomenet')
|
243
|
-
|
244
|
-
# ----------+-------+---------------------------------------------------
|
245
|
-
# @program | query | @db (supported in GenomeNet)
|
246
|
-
# ----------+-------+---------------------------------------------------
|
247
|
-
# fasta | AA | nr-aa, genes, vgenes.pep, swissprot, swissprot-upd,
|
248
|
-
# | | pir, prf, pdbstr
|
249
|
-
# +-------+---------------------------------------------------
|
250
|
-
# | NA | nr-nt, genbank-nonst, gbnonst-upd, dbest, dbgss,
|
251
|
-
# | | htgs, dbsts, embl-nonst, embnonst-upd, epd,
|
252
|
-
# | | genes-nt, genome, vgenes.nuc
|
253
|
-
# ----------+-------+---------------------------------------------------
|
254
|
-
# tfasta | AA | nr-nt, genbank-nonst, gbnonst-upd, dbest, dbgss,
|
255
|
-
# | | htgs, dbsts, embl-nonst, embnonst-upd,
|
256
|
-
# | | genes-nt, genome, vgenes.nuc
|
257
|
-
# ----------+-------+---------------------------------------------------
|
258
|
-
|
259
|
-
See http://fasta.genome.jp/ideas/ideas.html#fasta for more details.
|
260
|
-
|
261
|
-
=end
|
262
|
-
|