ngoto-bio 1.2.9.9001
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +2046 -0
- data/README.rdoc +223 -0
- data/README_DEV.rdoc +285 -0
- data/Rakefile +70 -0
- data/bin/bioruby +44 -0
- data/bin/br_biofetch.rb +47 -0
- data/bin/br_bioflat.rb +293 -0
- data/bin/br_biogetseq.rb +45 -0
- data/bin/br_pmfetch.rb +421 -0
- data/bioruby.gemspec +463 -0
- data/bioruby.gemspec.erb +79 -0
- data/doc/Changes-0.7.rd +369 -0
- data/doc/Changes-1.3.rdoc +195 -0
- data/doc/KEGG_API.rd +1843 -0
- data/doc/KEGG_API.rd.ja +1834 -0
- data/doc/Tutorial.rd +1296 -0
- data/doc/Tutorial.rd.ja +2640 -0
- data/etc/bioinformatics/seqdatabase.ini +210 -0
- data/extconf.rb +2 -0
- data/lib/bio/alignment.rb +2518 -0
- data/lib/bio/appl/bl2seq/report.rb +334 -0
- data/lib/bio/appl/blast/ddbj.rb +142 -0
- data/lib/bio/appl/blast/format0.rb +1438 -0
- data/lib/bio/appl/blast/format8.rb +83 -0
- data/lib/bio/appl/blast/genomenet.rb +263 -0
- data/lib/bio/appl/blast/ncbioptions.rb +220 -0
- data/lib/bio/appl/blast/remote.rb +105 -0
- data/lib/bio/appl/blast/report.rb +767 -0
- data/lib/bio/appl/blast/rexml.rb +144 -0
- data/lib/bio/appl/blast/rpsblast.rb +277 -0
- data/lib/bio/appl/blast/wublast.rb +671 -0
- data/lib/bio/appl/blast/xmlparser.rb +236 -0
- data/lib/bio/appl/blast.rb +505 -0
- data/lib/bio/appl/blat/report.rb +530 -0
- data/lib/bio/appl/clustalw/report.rb +152 -0
- data/lib/bio/appl/clustalw.rb +219 -0
- data/lib/bio/appl/emboss.rb +203 -0
- data/lib/bio/appl/fasta/format10.rb +325 -0
- data/lib/bio/appl/fasta.rb +235 -0
- 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 +552 -0
- data/lib/bio/appl/hmmer/report.rb +683 -0
- data/lib/bio/appl/hmmer.rb +126 -0
- data/lib/bio/appl/iprscan/report.rb +374 -0
- data/lib/bio/appl/mafft/report.rb +226 -0
- data/lib/bio/appl/mafft.rb +259 -0
- data/lib/bio/appl/muscle.rb +52 -0
- data/lib/bio/appl/paml/baseml/report.rb +32 -0
- data/lib/bio/appl/paml/baseml.rb +95 -0
- data/lib/bio/appl/paml/codeml/rates.rb +67 -0
- data/lib/bio/appl/paml/codeml/report.rb +67 -0
- data/lib/bio/appl/paml/codeml.rb +242 -0
- data/lib/bio/appl/paml/common.rb +348 -0
- data/lib/bio/appl/paml/common_report.rb +38 -0
- data/lib/bio/appl/paml/yn00/report.rb +32 -0
- data/lib/bio/appl/paml/yn00.rb +103 -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/report.rb +457 -0
- data/lib/bio/appl/psort.rb +548 -0
- data/lib/bio/appl/pts1.rb +263 -0
- data/lib/bio/appl/sim4/report.rb +485 -0
- data/lib/bio/appl/sim4.rb +124 -0
- data/lib/bio/appl/sosui/report.rb +151 -0
- data/lib/bio/appl/spidey/report.rb +593 -0
- data/lib/bio/appl/targetp/report.rb +267 -0
- data/lib/bio/appl/tcoffee.rb +55 -0
- data/lib/bio/appl/tmhmm/report.rb +231 -0
- data/lib/bio/command.rb +593 -0
- data/lib/bio/compat/features.rb +157 -0
- data/lib/bio/compat/references.rb +128 -0
- data/lib/bio/data/aa.rb +349 -0
- data/lib/bio/data/codontable.rb +722 -0
- data/lib/bio/data/na.rb +223 -0
- data/lib/bio/db/aaindex.rb +357 -0
- data/lib/bio/db/biosql/biosql_to_biosequence.rb +67 -0
- data/lib/bio/db/biosql/sequence.rb +508 -0
- data/lib/bio/db/embl/common.rb +352 -0
- data/lib/bio/db/embl/embl.rb +500 -0
- data/lib/bio/db/embl/embl_to_biosequence.rb +85 -0
- data/lib/bio/db/embl/format_embl.rb +190 -0
- data/lib/bio/db/embl/sptr.rb +1283 -0
- data/lib/bio/db/embl/swissprot.rb +42 -0
- data/lib/bio/db/embl/trembl.rb +41 -0
- data/lib/bio/db/embl/uniprot.rb +42 -0
- data/lib/bio/db/fantom.rb +597 -0
- data/lib/bio/db/fasta/defline.rb +532 -0
- data/lib/bio/db/fasta/fasta_to_biosequence.rb +63 -0
- data/lib/bio/db/fasta/format_fasta.rb +97 -0
- data/lib/bio/db/fasta.rb +410 -0
- data/lib/bio/db/genbank/common.rb +307 -0
- data/lib/bio/db/genbank/ddbj.rb +22 -0
- data/lib/bio/db/genbank/format_genbank.rb +187 -0
- data/lib/bio/db/genbank/genbank.rb +250 -0
- data/lib/bio/db/genbank/genbank_to_biosequence.rb +86 -0
- data/lib/bio/db/genbank/genpept.rb +60 -0
- data/lib/bio/db/genbank/refseq.rb +18 -0
- data/lib/bio/db/gff.rb +1846 -0
- data/lib/bio/db/go.rb +481 -0
- data/lib/bio/db/kegg/brite.rb +41 -0
- data/lib/bio/db/kegg/compound.rb +131 -0
- data/lib/bio/db/kegg/drug.rb +98 -0
- data/lib/bio/db/kegg/enzyme.rb +148 -0
- data/lib/bio/db/kegg/expression.rb +155 -0
- data/lib/bio/db/kegg/genes.rb +263 -0
- data/lib/bio/db/kegg/genome.rb +241 -0
- data/lib/bio/db/kegg/glycan.rb +166 -0
- data/lib/bio/db/kegg/keggtab.rb +357 -0
- data/lib/bio/db/kegg/kgml.rb +256 -0
- data/lib/bio/db/kegg/orthology.rb +136 -0
- data/lib/bio/db/kegg/reaction.rb +82 -0
- data/lib/bio/db/kegg/taxonomy.rb +331 -0
- data/lib/bio/db/lasergene.rb +209 -0
- data/lib/bio/db/litdb.rb +107 -0
- data/lib/bio/db/medline.rb +326 -0
- data/lib/bio/db/nbrf.rb +191 -0
- data/lib/bio/db/newick.rb +658 -0
- data/lib/bio/db/nexus.rb +1854 -0
- data/lib/bio/db/pdb/atom.rb +77 -0
- data/lib/bio/db/pdb/chain.rb +210 -0
- data/lib/bio/db/pdb/chemicalcomponent.rb +224 -0
- data/lib/bio/db/pdb/model.rb +148 -0
- data/lib/bio/db/pdb/pdb.rb +1911 -0
- data/lib/bio/db/pdb/residue.rb +176 -0
- data/lib/bio/db/pdb/utils.rb +399 -0
- data/lib/bio/db/pdb.rb +29 -0
- data/lib/bio/db/prosite.rb +597 -0
- data/lib/bio/db/rebase.rb +456 -0
- data/lib/bio/db/soft.rb +404 -0
- data/lib/bio/db/transfac.rb +375 -0
- data/lib/bio/db.rb +329 -0
- data/lib/bio/feature.rb +139 -0
- data/lib/bio/io/biosql/biodatabase.rb +64 -0
- data/lib/bio/io/biosql/bioentry.rb +29 -0
- data/lib/bio/io/biosql/bioentry_dbxref.rb +11 -0
- data/lib/bio/io/biosql/bioentry_path.rb +12 -0
- data/lib/bio/io/biosql/bioentry_qualifier_value.rb +10 -0
- data/lib/bio/io/biosql/bioentry_reference.rb +10 -0
- data/lib/bio/io/biosql/bioentry_relationship.rb +10 -0
- data/lib/bio/io/biosql/biosequence.rb +11 -0
- data/lib/bio/io/biosql/comment.rb +7 -0
- data/lib/bio/io/biosql/config/database.yml +20 -0
- data/lib/bio/io/biosql/dbxref.rb +13 -0
- data/lib/bio/io/biosql/dbxref_qualifier_value.rb +12 -0
- data/lib/bio/io/biosql/location.rb +32 -0
- data/lib/bio/io/biosql/location_qualifier_value.rb +11 -0
- data/lib/bio/io/biosql/ontology.rb +10 -0
- data/lib/bio/io/biosql/reference.rb +9 -0
- data/lib/bio/io/biosql/seqfeature.rb +32 -0
- data/lib/bio/io/biosql/seqfeature_dbxref.rb +11 -0
- data/lib/bio/io/biosql/seqfeature_path.rb +11 -0
- data/lib/bio/io/biosql/seqfeature_qualifier_value.rb +20 -0
- data/lib/bio/io/biosql/seqfeature_relationship.rb +11 -0
- data/lib/bio/io/biosql/taxon.rb +12 -0
- data/lib/bio/io/biosql/taxon_name.rb +9 -0
- data/lib/bio/io/biosql/term.rb +27 -0
- data/lib/bio/io/biosql/term_dbxref.rb +11 -0
- data/lib/bio/io/biosql/term_path.rb +12 -0
- data/lib/bio/io/biosql/term_relationship.rb +13 -0
- data/lib/bio/io/biosql/term_relationship_term.rb +11 -0
- data/lib/bio/io/biosql/term_synonym.rb +10 -0
- data/lib/bio/io/das.rb +461 -0
- data/lib/bio/io/dbget.rb +194 -0
- data/lib/bio/io/ddbjxml.rb +638 -0
- data/lib/bio/io/ebisoap.rb +158 -0
- data/lib/bio/io/ensembl.rb +229 -0
- data/lib/bio/io/fastacmd.rb +163 -0
- data/lib/bio/io/fetch.rb +195 -0
- data/lib/bio/io/flatfile/autodetection.rb +545 -0
- data/lib/bio/io/flatfile/bdb.rb +253 -0
- data/lib/bio/io/flatfile/buffer.rb +237 -0
- data/lib/bio/io/flatfile/index.rb +1381 -0
- data/lib/bio/io/flatfile/indexer.rb +805 -0
- data/lib/bio/io/flatfile/splitter.rb +297 -0
- data/lib/bio/io/flatfile.rb +473 -0
- data/lib/bio/io/higet.rb +73 -0
- data/lib/bio/io/hinv.rb +442 -0
- data/lib/bio/io/keggapi.rb +805 -0
- data/lib/bio/io/ncbirest.rb +733 -0
- data/lib/bio/io/ncbisoap.rb +155 -0
- data/lib/bio/io/pubmed.rb +307 -0
- data/lib/bio/io/registry.rb +292 -0
- data/lib/bio/io/soapwsdl.rb +119 -0
- data/lib/bio/io/sql.rb +186 -0
- data/lib/bio/location.rb +867 -0
- data/lib/bio/map.rb +410 -0
- data/lib/bio/pathway.rb +960 -0
- data/lib/bio/reference.rb +602 -0
- data/lib/bio/sequence/aa.rb +125 -0
- data/lib/bio/sequence/adapter.rb +108 -0
- data/lib/bio/sequence/common.rb +310 -0
- data/lib/bio/sequence/compat.rb +123 -0
- data/lib/bio/sequence/dblink.rb +54 -0
- data/lib/bio/sequence/format.rb +358 -0
- data/lib/bio/sequence/format_raw.rb +23 -0
- data/lib/bio/sequence/generic.rb +24 -0
- data/lib/bio/sequence/na.rb +491 -0
- data/lib/bio/sequence.rb +456 -0
- data/lib/bio/shell/core.rb +578 -0
- data/lib/bio/shell/demo.rb +146 -0
- data/lib/bio/shell/interface.rb +218 -0
- data/lib/bio/shell/irb.rb +95 -0
- data/lib/bio/shell/object.rb +71 -0
- data/lib/bio/shell/plugin/blast.rb +42 -0
- data/lib/bio/shell/plugin/codon.rb +218 -0
- data/lib/bio/shell/plugin/das.rb +58 -0
- data/lib/bio/shell/plugin/emboss.rb +23 -0
- data/lib/bio/shell/plugin/entry.rb +105 -0
- data/lib/bio/shell/plugin/flatfile.rb +101 -0
- data/lib/bio/shell/plugin/keggapi.rb +181 -0
- data/lib/bio/shell/plugin/midi.rb +430 -0
- data/lib/bio/shell/plugin/obda.rb +45 -0
- data/lib/bio/shell/plugin/psort.rb +56 -0
- data/lib/bio/shell/plugin/seq.rb +247 -0
- data/lib/bio/shell/plugin/soap.rb +87 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/bioruby_generator.rb +29 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_classes.rhtml +4 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_log.rhtml +27 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_methods.rhtml +11 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_modules.rhtml +4 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_variables.rhtml +7 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-bg.gif +0 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-gem.png +0 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-link.gif +0 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby.css +368 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby.rhtml +47 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_controller.rb +144 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb +47 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/commands.rhtml +8 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/history.rhtml +10 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/index.rhtml +26 -0
- data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/spinner.gif +0 -0
- data/lib/bio/shell/script.rb +25 -0
- data/lib/bio/shell/setup.rb +109 -0
- data/lib/bio/shell/web.rb +102 -0
- data/lib/bio/shell.rb +44 -0
- data/lib/bio/tree.rb +852 -0
- data/lib/bio/util/color_scheme/buried.rb +59 -0
- data/lib/bio/util/color_scheme/helix.rb +59 -0
- data/lib/bio/util/color_scheme/hydropathy.rb +64 -0
- data/lib/bio/util/color_scheme/nucleotide.rb +31 -0
- data/lib/bio/util/color_scheme/strand.rb +59 -0
- data/lib/bio/util/color_scheme/taylor.rb +50 -0
- data/lib/bio/util/color_scheme/turn.rb +59 -0
- data/lib/bio/util/color_scheme/zappo.rb +50 -0
- data/lib/bio/util/color_scheme.rb +191 -0
- data/lib/bio/util/contingency_table.rb +370 -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/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/double_stranded.rb +321 -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/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/sequence_range.rb +257 -0
- data/lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb +77 -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.rb +200 -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/restriction_enzyme.rb +228 -0
- data/lib/bio/util/sirna.rb +288 -0
- data/lib/bio.rb +300 -0
- data/rdoc.zsh +8 -0
- data/sample/any2fasta.rb +59 -0
- data/sample/biofetch.rb +475 -0
- data/sample/color_scheme_na.rb +91 -0
- data/sample/dbget +37 -0
- data/sample/demo_sequence.rb +158 -0
- data/sample/enzymes.rb +78 -0
- data/sample/fasta2tab.rb +99 -0
- data/sample/fastagrep.rb +72 -0
- data/sample/fastasort.rb +54 -0
- data/sample/fsplit.rb +51 -0
- data/sample/gb2fasta.rb +30 -0
- data/sample/gb2tab.rb +325 -0
- data/sample/gbtab2mysql.rb +161 -0
- data/sample/genes2nuc.rb +33 -0
- data/sample/genes2pep.rb +33 -0
- data/sample/genes2tab.rb +81 -0
- data/sample/genome2rb.rb +29 -0
- data/sample/genome2tab.rb +76 -0
- data/sample/goslim.rb +303 -0
- data/sample/gt2fasta.rb +47 -0
- data/sample/na2aa.rb +34 -0
- data/sample/pmfetch.rb +42 -0
- data/sample/pmsearch.rb +42 -0
- data/sample/psortplot_html.rb +214 -0
- data/sample/ssearch2tab.rb +96 -0
- data/sample/tdiary.rb +158 -0
- data/sample/tfastx2tab.rb +100 -0
- data/sample/vs-genes.rb +212 -0
- data/setup.rb +1596 -0
- data/test/data/HMMER/hmmpfam.out +64 -0
- data/test/data/HMMER/hmmsearch.out +88 -0
- data/test/data/SOSUI/sample.report +11 -0
- data/test/data/TMHMM/sample.report +21 -0
- data/test/data/aaindex/DAYM780301 +30 -0
- data/test/data/aaindex/PRAM900102 +20 -0
- data/test/data/bl2seq/cd8a_cd8b_blastp.bl2seq +53 -0
- data/test/data/bl2seq/cd8a_p53_e-5blastp.bl2seq +37 -0
- data/test/data/blast/2.2.15.blastp.m7 +876 -0
- data/test/data/blast/b0002.faa +15 -0
- data/test/data/blast/b0002.faa.m0 +128 -0
- data/test/data/blast/b0002.faa.m7 +65 -0
- data/test/data/blast/b0002.faa.m8 +1 -0
- data/test/data/blast/blastp-multi.m7 +188 -0
- data/test/data/command/echoarg2.bat +1 -0
- data/test/data/embl/AB090716.embl +65 -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/genscan/sample.report +63 -0
- data/test/data/iprscan/merged.raw +32 -0
- data/test/data/iprscan/merged.txt +74 -0
- data/test/data/paml/codeml/control_file.txt +30 -0
- data/test/data/paml/codeml/output.txt +78 -0
- data/test/data/paml/codeml/rates +217 -0
- data/test/data/prosite/prosite.dat +2233 -0
- data/test/data/refseq/nm_126355.entret +64 -0
- data/test/data/rpsblast/misc.rpsblast +193 -0
- data/test/data/soft/GDS100_partial.soft +92 -0
- data/test/data/soft/GSE3457_family_partial.soft +874 -0
- data/test/data/uniprot/p53_human.uniprot +1456 -0
- data/test/functional/bio/appl/test_pts1.rb +115 -0
- data/test/functional/bio/io/test_ensembl.rb +229 -0
- data/test/functional/bio/io/test_soapwsdl.rb +52 -0
- data/test/functional/bio/sequence/test_output_embl.rb +51 -0
- data/test/functional/bio/test_command.rb +301 -0
- data/test/runner.rb +23 -0
- data/test/unit/bio/appl/bl2seq/test_report.rb +134 -0
- data/test/unit/bio/appl/blast/test_ncbioptions.rb +112 -0
- data/test/unit/bio/appl/blast/test_report.rb +1135 -0
- data/test/unit/bio/appl/blast/test_rpsblast.rb +398 -0
- data/test/unit/bio/appl/genscan/test_report.rb +182 -0
- data/test/unit/bio/appl/hmmer/test_report.rb +342 -0
- 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/paml/codeml/test_rates.rb +45 -0
- data/test/unit/bio/appl/paml/codeml/test_report.rb +45 -0
- data/test/unit/bio/appl/paml/test_codeml.rb +174 -0
- data/test/unit/bio/appl/sosui/test_report.rb +81 -0
- data/test/unit/bio/appl/targetp/test_report.rb +146 -0
- data/test/unit/bio/appl/test_blast.rb +277 -0
- data/test/unit/bio/appl/test_fasta.rb +130 -0
- data/test/unit/bio/appl/test_pts1.rb +77 -0
- data/test/unit/bio/appl/tmhmm/test_report.rb +126 -0
- data/test/unit/bio/data/test_aa.rb +90 -0
- data/test/unit/bio/data/test_codontable.rb +107 -0
- data/test/unit/bio/data/test_na.rb +80 -0
- data/test/unit/bio/db/embl/test_common.rb +117 -0
- data/test/unit/bio/db/embl/test_embl.rb +214 -0
- data/test/unit/bio/db/embl/test_embl_rel89.rb +219 -0
- data/test/unit/bio/db/embl/test_embl_to_bioseq.rb +203 -0
- data/test/unit/bio/db/embl/test_sptr.rb +1812 -0
- data/test/unit/bio/db/embl/test_uniprot.rb +31 -0
- data/test/unit/bio/db/kegg/test_genes.rb +45 -0
- data/test/unit/bio/db/pdb/test_pdb.rb +152 -0
- data/test/unit/bio/db/test_aaindex.rb +197 -0
- data/test/unit/bio/db/test_fasta.rb +250 -0
- data/test/unit/bio/db/test_gff.rb +1190 -0
- data/test/unit/bio/db/test_lasergene.rb +95 -0
- data/test/unit/bio/db/test_medline.rb +127 -0
- data/test/unit/bio/db/test_newick.rb +293 -0
- data/test/unit/bio/db/test_nexus.rb +364 -0
- data/test/unit/bio/db/test_prosite.rb +1437 -0
- data/test/unit/bio/db/test_rebase.rb +101 -0
- data/test/unit/bio/db/test_soft.rb +138 -0
- data/test/unit/bio/io/flatfile/test_autodetection.rb +375 -0
- data/test/unit/bio/io/flatfile/test_buffer.rb +251 -0
- data/test/unit/bio/io/flatfile/test_splitter.rb +369 -0
- data/test/unit/bio/io/test_ddbjxml.rb +80 -0
- data/test/unit/bio/io/test_ensembl.rb +109 -0
- data/test/unit/bio/io/test_fastacmd.rb +42 -0
- data/test/unit/bio/io/test_flatfile.rb +488 -0
- data/test/unit/bio/io/test_soapwsdl.rb +32 -0
- data/test/unit/bio/sequence/test_aa.rb +103 -0
- data/test/unit/bio/sequence/test_common.rb +373 -0
- data/test/unit/bio/sequence/test_compat.rb +69 -0
- data/test/unit/bio/sequence/test_dblink.rb +58 -0
- data/test/unit/bio/sequence/test_na.rb +330 -0
- data/test/unit/bio/shell/plugin/test_seq.rb +185 -0
- data/test/unit/bio/test_alignment.rb +1025 -0
- data/test/unit/bio/test_command.rb +349 -0
- data/test/unit/bio/test_db.rb +96 -0
- data/test/unit/bio/test_feature.rb +144 -0
- data/test/unit/bio/test_location.rb +599 -0
- data/test/unit/bio/test_map.rb +230 -0
- data/test/unit/bio/test_pathway.rb +499 -0
- data/test/unit/bio/test_reference.rb +252 -0
- data/test/unit/bio/test_sequence.rb +329 -0
- data/test/unit/bio/test_shell.rb +18 -0
- 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 +101 -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 +33 -0
- data/test/unit/bio/util/test_contingency_table.rb +94 -0
- data/test/unit/bio/util/test_restriction_enzyme.rb +42 -0
- data/test/unit/bio/util/test_sirna.rb +245 -0
- metadata +484 -0
@@ -0,0 +1,334 @@
|
|
1
|
+
#
|
2
|
+
# = bio/appl/bl2seq/report.rb - bl2seq (BLAST 2 sequences) parser
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2005 GOTO Naohisa <ng@bioruby.org>
|
5
|
+
# License:: The Ruby License
|
6
|
+
#
|
7
|
+
# $Id: report.rb,v 1.8 2007/04/05 23:35:39 trevor Exp $
|
8
|
+
#
|
9
|
+
# Bio::Bl2seq::Report is a NCBI bl2seq (BLAST 2 sequences) output parser.
|
10
|
+
#
|
11
|
+
# = Acknowledgements
|
12
|
+
#
|
13
|
+
# Thanks to Tomoaki NISHIYAMA <tomoakin __at__ kenroku.kanazawa-u.ac.jp>
|
14
|
+
# for providing bl2seq parser patches based on
|
15
|
+
# lib/bio/appl/blast/format0.rb.
|
16
|
+
#
|
17
|
+
|
18
|
+
require 'bio/appl/blast/format0'
|
19
|
+
|
20
|
+
module Bio
|
21
|
+
class Blast
|
22
|
+
|
23
|
+
class Bl2seq
|
24
|
+
|
25
|
+
# Bio::Bl2seq::Report is a NCBI bl2seq (BLAST 2 sequences) output parser.
|
26
|
+
# It inherits Bio::Blast::Default::Report.
|
27
|
+
# Most of its methods are the same as Bio::Blast::Default::Report,
|
28
|
+
# but it lacks many methods.
|
29
|
+
class Report < Bio::Blast::Default::Report
|
30
|
+
|
31
|
+
# Delimiter of each entry. Bio::FlatFile uses it.
|
32
|
+
# In Bio::Bl2seq::Report, it it nil (1 entry 1 file).
|
33
|
+
DELIMITER = RS = nil
|
34
|
+
|
35
|
+
undef format0_parse_header
|
36
|
+
undef program, version, version_number, version_date,
|
37
|
+
message, converged?, reference, db
|
38
|
+
|
39
|
+
# Splits headers.
|
40
|
+
def format0_split_headers(data)
|
41
|
+
@f0query = data.shift
|
42
|
+
end
|
43
|
+
private :format0_split_headers
|
44
|
+
|
45
|
+
# Splits the search results.
|
46
|
+
def format0_split_search(data)
|
47
|
+
iterations = []
|
48
|
+
while r = data[0] and /^\>/ =~ r
|
49
|
+
iterations << Iteration.new(data)
|
50
|
+
end
|
51
|
+
if iterations.size <= 0 then
|
52
|
+
iterations << Iteration.new(data)
|
53
|
+
end
|
54
|
+
iterations
|
55
|
+
end
|
56
|
+
private :format0_split_search
|
57
|
+
|
58
|
+
# Stores format0 database statistics.
|
59
|
+
# Internal use only. Users must not use the class.
|
60
|
+
class F0dbstat < Bio::Blast::Default::Report::F0dbstat #:nodoc:
|
61
|
+
# Returns number of sequences in database.
|
62
|
+
def db_num
|
63
|
+
unless defined?(@db_num)
|
64
|
+
parse_params
|
65
|
+
@db_num = @hash['Number of Sequences'].to_i
|
66
|
+
end
|
67
|
+
@db_num
|
68
|
+
end
|
69
|
+
|
70
|
+
# Returns number of letters in database.
|
71
|
+
def db_len
|
72
|
+
unless defined?(@db_len)
|
73
|
+
parse_params
|
74
|
+
@db_len = @hash['length of database'].to_i
|
75
|
+
end
|
76
|
+
@db_len
|
77
|
+
end
|
78
|
+
end #class F0dbstat
|
79
|
+
|
80
|
+
# Bio::Bl2seq::Report::Iteration stores information about
|
81
|
+
# a iteration.
|
82
|
+
# Normally, it may contain some Bio::Bl2seq::Report::Hit objects.
|
83
|
+
#
|
84
|
+
# Note that its main existance reason is to keep complatibility
|
85
|
+
# between Bio::Blast::Default::Report::* classes.
|
86
|
+
class Iteration < Bio::Blast::Default::Report::Iteration
|
87
|
+
# Creates a new Iteration object.
|
88
|
+
# It is designed to be called only internally from
|
89
|
+
# the Bio::Blast::Default::Report class.
|
90
|
+
# Users shall not use the method directly.
|
91
|
+
def initialize(data)
|
92
|
+
@f0stat = []
|
93
|
+
@f0dbstat = Bio::Blast::Default::Report::AlwaysNil.instance
|
94
|
+
@hits = []
|
95
|
+
@num = 1
|
96
|
+
while r = data[0] and /^\>/ =~ r
|
97
|
+
@hits << Hit.new(data)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Returns the hits of the iteration.
|
102
|
+
# It returns an array of Bio::Bl2seq::Report::Hit objects.
|
103
|
+
def hits; @hits; end
|
104
|
+
|
105
|
+
undef message, pattern_in_database,
|
106
|
+
pattern, pattern_positions, hits_found_again,
|
107
|
+
hits_newly_found, hits_for_pattern, parse_hitlist,
|
108
|
+
converged?
|
109
|
+
end #class Iteration
|
110
|
+
|
111
|
+
# Bio::Bl2seq::Report::Hit contains information about a hit.
|
112
|
+
# It may contain some Bio::Blast::Default::Report::HSP objects.
|
113
|
+
# All methods are the same as Bio::Blast::Default::Report::Hit class.
|
114
|
+
# Please refer to Bio::Blast::Default::Report::Hit.
|
115
|
+
class Hit < Bio::Blast::Default::Report::Hit
|
116
|
+
end #class Hit
|
117
|
+
|
118
|
+
# Bio::Bl2seq::Report::HSP holds information about the hsp
|
119
|
+
# (high-scoring segment pair).
|
120
|
+
# NOTE that the HSP class below is NOT used because
|
121
|
+
# Ruby's constants namespace are normally statically determined
|
122
|
+
# and HSP object is created in Bio::Blast::Default::Report::Hit class.
|
123
|
+
# Please refer to Bio::Blast::Default::Report::HSP.
|
124
|
+
class HSP < Bio::Blast::Default::Report::HSP
|
125
|
+
end #class HSP
|
126
|
+
|
127
|
+
end #class Report
|
128
|
+
end #class Bl2seq
|
129
|
+
|
130
|
+
end #class Blast
|
131
|
+
end #module Bio
|
132
|
+
|
133
|
+
######################################################################
|
134
|
+
|
135
|
+
if __FILE__ == $0
|
136
|
+
|
137
|
+
Bio::FlatFile.open(Bio::Blast::Bl2seq::Report, ARGF) do |ff|
|
138
|
+
ff.each do |rep|
|
139
|
+
|
140
|
+
print "# === Bio::Blast::Bl2seq::Report\n"
|
141
|
+
puts
|
142
|
+
#@#print " rep.program #=> "; p rep.program
|
143
|
+
#@#print " rep.version #=> "; p rep.version
|
144
|
+
#@#print " rep.reference #=> "; p rep.reference
|
145
|
+
#@#print " rep.db #=> "; p rep.db
|
146
|
+
#print " rep.query_id #=> "; p rep.query_id
|
147
|
+
print " rep.query_def #=> "; p rep.query_def
|
148
|
+
print " rep.query_len #=> "; p rep.query_len
|
149
|
+
#puts
|
150
|
+
#@#print " rep.version_number #=> "; p rep.version_number
|
151
|
+
#@#print " rep.version_date #=> "; p rep.version_date
|
152
|
+
puts
|
153
|
+
|
154
|
+
print "# === Parameters\n"
|
155
|
+
#puts
|
156
|
+
#print " rep.parameters #=> "; p rep.parameters
|
157
|
+
puts
|
158
|
+
print " rep.matrix #=> "; p rep.matrix
|
159
|
+
print " rep.expect #=> "; p rep.expect
|
160
|
+
#print " rep.inclusion #=> "; p rep.inclusion
|
161
|
+
print " rep.sc_match #=> "; p rep.sc_match
|
162
|
+
print " rep.sc_mismatch #=> "; p rep.sc_mismatch
|
163
|
+
print " rep.gap_open #=> "; p rep.gap_open
|
164
|
+
print " rep.gap_extend #=> "; p rep.gap_extend
|
165
|
+
#print " rep.filter #=> "; p rep.filter
|
166
|
+
#@#print " rep.pattern #=> "; p rep.pattern
|
167
|
+
#print " rep.entrez_query #=> "; p rep.entrez_query
|
168
|
+
#puts
|
169
|
+
#@#print " rep.pattern_positions #=> "; p rep.pattern_positions
|
170
|
+
puts
|
171
|
+
|
172
|
+
print "# === Statistics (last iteration's)\n"
|
173
|
+
#puts
|
174
|
+
#print " rep.statistics #=> "; p rep.statistics
|
175
|
+
puts
|
176
|
+
print " rep.db_num #=> "; p rep.db_num
|
177
|
+
print " rep.db_len #=> "; p rep.db_len
|
178
|
+
#print " rep.hsp_len #=> "; p rep.hsp_len
|
179
|
+
print " rep.eff_space #=> "; p rep.eff_space
|
180
|
+
print " rep.kappa #=> "; p rep.kappa
|
181
|
+
print " rep.lambda #=> "; p rep.lambda
|
182
|
+
print " rep.entropy #=> "; p rep.entropy
|
183
|
+
puts
|
184
|
+
print " rep.num_hits #=> "; p rep.num_hits
|
185
|
+
print " rep.gapped_kappa #=> "; p rep.gapped_kappa
|
186
|
+
print " rep.gapped_lambda #=> "; p rep.gapped_lambda
|
187
|
+
print " rep.gapped_entropy #=> "; p rep.gapped_entropy
|
188
|
+
print " rep.posted_date #=> "; p rep.posted_date
|
189
|
+
puts
|
190
|
+
|
191
|
+
#@#print "# === Message (last iteration's)\n"
|
192
|
+
#@#puts
|
193
|
+
#@#print " rep.message #=> "; p rep.message
|
194
|
+
#puts
|
195
|
+
#@#print " rep.converged? #=> "; p rep.converged?
|
196
|
+
#@#puts
|
197
|
+
|
198
|
+
print "# === Iterations\n"
|
199
|
+
puts
|
200
|
+
print " rep.itrerations.each do |itr|\n"
|
201
|
+
puts
|
202
|
+
|
203
|
+
rep.iterations.each do |itr|
|
204
|
+
|
205
|
+
print "# --- Bio::Blast::Bl2seq::Report::Iteration\n"
|
206
|
+
puts
|
207
|
+
|
208
|
+
print " itr.num #=> "; p itr.num
|
209
|
+
#print " itr.statistics #=> "; p itr.statistics
|
210
|
+
#@#print " itr.message #=> "; p itr.message
|
211
|
+
print " itr.hits.size #=> "; p itr.hits.size
|
212
|
+
#puts
|
213
|
+
#@#print " itr.hits_newly_found.size #=> "; p itr.hits_newly_found.size;
|
214
|
+
#@#print " itr.hits_found_again.size #=> "; p itr.hits_found_again.size;
|
215
|
+
#@#if itr.hits_for_pattern then
|
216
|
+
#@#itr.hits_for_pattern.each_with_index do |hp, hpi|
|
217
|
+
#@#print " itr.hits_for_pattern[#{hpi}].size #=> "; p hp.size;
|
218
|
+
#@#end
|
219
|
+
#@#end
|
220
|
+
#@#print " itr.converged? #=> "; p itr.converged?
|
221
|
+
puts
|
222
|
+
|
223
|
+
print " itr.hits.each do |hit|\n"
|
224
|
+
puts
|
225
|
+
|
226
|
+
itr.hits.each_with_index do |hit, i|
|
227
|
+
|
228
|
+
print "# --- Bio::Blast::Bl2seq::Default::Report::Hit"
|
229
|
+
print " ([#{i}])\n"
|
230
|
+
puts
|
231
|
+
|
232
|
+
#print " hit.num #=> "; p hit.num
|
233
|
+
#print " hit.hit_id #=> "; p hit.hit_id
|
234
|
+
print " hit.len #=> "; p hit.len
|
235
|
+
print " hit.definition #=> "; p hit.definition
|
236
|
+
#print " hit.accession #=> "; p hit.accession
|
237
|
+
#puts
|
238
|
+
print " hit.found_again? #=> "; p hit.found_again?
|
239
|
+
|
240
|
+
print " --- compatible/shortcut ---\n"
|
241
|
+
#print " hit.query_id #=> "; p hit.query_id
|
242
|
+
#print " hit.query_def #=> "; p hit.query_def
|
243
|
+
#print " hit.query_len #=> "; p hit.query_len
|
244
|
+
#print " hit.target_id #=> "; p hit.target_id
|
245
|
+
print " hit.target_def #=> "; p hit.target_def
|
246
|
+
print " hit.target_len #=> "; p hit.target_len
|
247
|
+
|
248
|
+
print " --- first HSP's values (shortcut) ---\n"
|
249
|
+
print " hit.evalue #=> "; p hit.evalue
|
250
|
+
print " hit.bit_score #=> "; p hit.bit_score
|
251
|
+
print " hit.identity #=> "; p hit.identity
|
252
|
+
#print " hit.overlap #=> "; p hit.overlap
|
253
|
+
|
254
|
+
print " hit.query_seq #=> "; p hit.query_seq
|
255
|
+
print " hit.midline #=> "; p hit.midline
|
256
|
+
print " hit.target_seq #=> "; p hit.target_seq
|
257
|
+
|
258
|
+
print " hit.query_start #=> "; p hit.query_start
|
259
|
+
print " hit.query_end #=> "; p hit.query_end
|
260
|
+
print " hit.target_start #=> "; p hit.target_start
|
261
|
+
print " hit.target_end #=> "; p hit.target_end
|
262
|
+
print " hit.lap_at #=> "; p hit.lap_at
|
263
|
+
print " --- first HSP's vaules (shortcut) ---\n"
|
264
|
+
print " --- compatible/shortcut ---\n"
|
265
|
+
|
266
|
+
puts
|
267
|
+
print " hit.hsps.size #=> "; p hit.hsps.size
|
268
|
+
if hit.hsps.size == 0 then
|
269
|
+
puts " (HSP not found: please see blastall's -b and -v options)"
|
270
|
+
puts
|
271
|
+
else
|
272
|
+
|
273
|
+
puts
|
274
|
+
print " hit.hsps.each do |hsp|\n"
|
275
|
+
puts
|
276
|
+
|
277
|
+
hit.hsps.each_with_index do |hsp, j|
|
278
|
+
|
279
|
+
print "# --- Bio::Blast::Default::Report::HSP (Bio::Blast::Bl2seq::Report::HSP)"
|
280
|
+
print " ([#{j}])\n"
|
281
|
+
puts
|
282
|
+
#print " hsp.num #=> "; p hsp.num
|
283
|
+
print " hsp.bit_score #=> "; p hsp.bit_score
|
284
|
+
print " hsp.score #=> "; p hsp.score
|
285
|
+
print " hsp.evalue #=> "; p hsp.evalue
|
286
|
+
print " hsp.identity #=> "; p hsp.identity
|
287
|
+
print " hsp.gaps #=> "; p hsp.gaps
|
288
|
+
print " hsp.positive #=> "; p hsp.positive
|
289
|
+
print " hsp.align_len #=> "; p hsp.align_len
|
290
|
+
#print " hsp.density #=> "; p hsp.density
|
291
|
+
|
292
|
+
print " hsp.query_frame #=> "; p hsp.query_frame
|
293
|
+
print " hsp.query_from #=> "; p hsp.query_from
|
294
|
+
print " hsp.query_to #=> "; p hsp.query_to
|
295
|
+
|
296
|
+
print " hsp.hit_frame #=> "; p hsp.hit_frame
|
297
|
+
print " hsp.hit_from #=> "; p hsp.hit_from
|
298
|
+
print " hsp.hit_to #=> "; p hsp.hit_to
|
299
|
+
|
300
|
+
#print " hsp.pattern_from#=> "; p hsp.pattern_from
|
301
|
+
#print " hsp.pattern_to #=> "; p hsp.pattern_to
|
302
|
+
|
303
|
+
print " hsp.qseq #=> "; p hsp.qseq
|
304
|
+
print " hsp.midline #=> "; p hsp.midline
|
305
|
+
print " hsp.hseq #=> "; p hsp.hseq
|
306
|
+
puts
|
307
|
+
print " hsp.percent_identity #=> "; p hsp.percent_identity
|
308
|
+
#print " hsp.mismatch_count #=> "; p hsp.mismatch_count
|
309
|
+
#
|
310
|
+
print " hsp.query_strand #=> "; p hsp.query_strand
|
311
|
+
print " hsp.hit_strand #=> "; p hsp.hit_strand
|
312
|
+
print " hsp.percent_positive #=> "; p hsp.percent_positive
|
313
|
+
print " hsp.percent_gaps #=> "; p hsp.percent_gaps
|
314
|
+
puts
|
315
|
+
|
316
|
+
end #each
|
317
|
+
end #if hit.hsps.size == 0
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end #ff.each
|
321
|
+
end #FlatFile.open
|
322
|
+
|
323
|
+
end #if __FILE__ == $0
|
324
|
+
|
325
|
+
######################################################################
|
326
|
+
|
327
|
+
=begin
|
328
|
+
|
329
|
+
= Bio::Blast::Bl2seq::Report
|
330
|
+
|
331
|
+
NCBI bl2seq (BLAST 2 sequences) output parser
|
332
|
+
|
333
|
+
=end
|
334
|
+
|
@@ -0,0 +1,142 @@
|
|
1
|
+
#
|
2
|
+
# = bio/appl/blast/ddbj.rb - Remote BLAST wrapper using DDBJ web service
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2008 Naohisa Goto <ng@bioruby.org>
|
5
|
+
# License:: The Ruby License
|
6
|
+
#
|
7
|
+
# $Id:$
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'bio/appl/blast/remote'
|
11
|
+
require 'bio/io/ddbjxml'
|
12
|
+
|
13
|
+
module Bio::Blast::Remote
|
14
|
+
|
15
|
+
# Remote BLAST factory using DDBJ Web API for Biology
|
16
|
+
# (http://xml.nig.ac.jp/).
|
17
|
+
#
|
18
|
+
module DDBJ
|
19
|
+
|
20
|
+
# Creates a remote BLAST factory using DDBJ.
|
21
|
+
# Returns Bio::Blast object.
|
22
|
+
#
|
23
|
+
# Note for future improvement: In the future, it might return
|
24
|
+
# Bio::Blast::Remote::DDBJ or other object.
|
25
|
+
#
|
26
|
+
def self.new(program, db, options = [])
|
27
|
+
Bio::Blast.new(program, db, options, 'ddbj')
|
28
|
+
end
|
29
|
+
|
30
|
+
# Information about DDBJ BLAST.
|
31
|
+
module Information
|
32
|
+
|
33
|
+
include Bio::Blast::Remote::Information
|
34
|
+
|
35
|
+
# (private) parse database information
|
36
|
+
def _parse_databases
|
37
|
+
if defined? @parse_databases
|
38
|
+
return nil if @parse_databases
|
39
|
+
end
|
40
|
+
drv = Bio::DDBJ::XML::Blast.new
|
41
|
+
str = drv.getSupportDatabaseList
|
42
|
+
|
43
|
+
databases = {}
|
44
|
+
dbdescs = {}
|
45
|
+
key = 'blastn'
|
46
|
+
prefix = ''
|
47
|
+
databases[key] ||= []
|
48
|
+
dbdescs[key] ||= {}
|
49
|
+
str.each_line do |line|
|
50
|
+
a = line.strip.split(/\s*\-\s*/, 2)
|
51
|
+
case a.size
|
52
|
+
when 1
|
53
|
+
prefix = a[0].to_s.strip
|
54
|
+
prefix += ': ' unless prefix.empty?
|
55
|
+
key = 'blastn'
|
56
|
+
next #each_line
|
57
|
+
when 0
|
58
|
+
prefix = ''
|
59
|
+
key = 'blastp'
|
60
|
+
databases[key] ||= []
|
61
|
+
dbdescs[key] ||= {}
|
62
|
+
next #each_line
|
63
|
+
end
|
64
|
+
name = a[0].to_s.strip.freeze
|
65
|
+
desc = (prefix + a[1].to_s.strip).freeze
|
66
|
+
databases[key].push name
|
67
|
+
dbdescs[key][name] = desc
|
68
|
+
end
|
69
|
+
|
70
|
+
databases['blastp'] ||= []
|
71
|
+
dbdescs['blastp'] ||= []
|
72
|
+
|
73
|
+
databases['blastn'].freeze
|
74
|
+
databases['blastp'].freeze
|
75
|
+
|
76
|
+
databases['blastx'] = databases['blastp']
|
77
|
+
dbdescs['blastx'] = dbdescs['blastp']
|
78
|
+
databases['tblastn'] = databases['blastn']
|
79
|
+
dbdescs['tblastn'] = dbdescs['blastn']
|
80
|
+
databases['tblastx'] = databases['blastn']
|
81
|
+
dbdescs['tblastx'] = dbdescs['blastn']
|
82
|
+
|
83
|
+
@databases = databases
|
84
|
+
@database_descriptions = dbdescs
|
85
|
+
@parse_databases = true
|
86
|
+
true
|
87
|
+
end
|
88
|
+
private :_parse_databases
|
89
|
+
|
90
|
+
end #module Information
|
91
|
+
|
92
|
+
extend Information
|
93
|
+
|
94
|
+
# executes BLAST and returns result as a string
|
95
|
+
def exec_ddbj(query)
|
96
|
+
options = make_command_line_options
|
97
|
+
opt = Bio::Blast::NCBIOptions.new(options)
|
98
|
+
|
99
|
+
# SOAP objects are cached
|
100
|
+
@ddbj_remote_blast ||= Bio::DDBJ::XML::Blast.new
|
101
|
+
#@ddbj_request_manager ||= Bio::DDBJ::XML::RequestManager.new
|
102
|
+
# always use REST version to prevent warning messages
|
103
|
+
@ddbj_request_manager ||= Bio::DDBJ::XML::RequestManager::REST.new
|
104
|
+
|
105
|
+
program = opt.delete('-p')
|
106
|
+
db = opt.delete('-d')
|
107
|
+
optstr = Bio::Command.make_command_line_unix(opt.options)
|
108
|
+
|
109
|
+
# using searchParamAsync
|
110
|
+
qid = @ddbj_remote_blast.searchParamAsync(program, db, query, optstr)
|
111
|
+
@output = qid
|
112
|
+
|
113
|
+
sleeptime = 2
|
114
|
+
flag = true
|
115
|
+
while flag
|
116
|
+
if $VERBOSE then
|
117
|
+
$stderr.puts "DDBJ BLAST: ID: #{qid} -- waitng #{sleeptime} sec."
|
118
|
+
end
|
119
|
+
sleep(sleeptime)
|
120
|
+
|
121
|
+
result = @ddbj_request_manager.getAsyncResult(qid)
|
122
|
+
case result.to_s
|
123
|
+
when /The search and analysis service by WWW is very busy now/
|
124
|
+
raise result.to_s.strip + '(Alternatively, wrong options may be given.)'
|
125
|
+
when /Your job has not completed yet/
|
126
|
+
sleeptime = 5
|
127
|
+
else
|
128
|
+
flag = false
|
129
|
+
end
|
130
|
+
end while flag
|
131
|
+
|
132
|
+
@output = result
|
133
|
+
return @output
|
134
|
+
end
|
135
|
+
|
136
|
+
end #module DDBJ
|
137
|
+
|
138
|
+
# for lazy load DDBJ module
|
139
|
+
Ddbj = DDBJ
|
140
|
+
|
141
|
+
end #module Bio::Blast::Remote
|
142
|
+
|