wwood-bioruby 1.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +205 -0
- data/README_DEV.rdoc +285 -0
- data/VERSION.yml +4 -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/lib/bio.rb +306 -0
- data/lib/bio/alignment.rb +2518 -0
- data/lib/bio/appl/bl2seq/report.rb +334 -0
- data/lib/bio/appl/blast.rb +505 -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 +635 -0
- data/lib/bio/appl/blast/xmlparser.rb +236 -0
- data/lib/bio/appl/blat/report.rb +530 -0
- data/lib/bio/appl/clustalw.rb +219 -0
- data/lib/bio/appl/clustalw/report.rb +152 -0
- data/lib/bio/appl/emboss.rb +203 -0
- data/lib/bio/appl/fasta.rb +235 -0
- data/lib/bio/appl/fasta/format10.rb +325 -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.rb +126 -0
- data/lib/bio/appl/hmmer/report.rb +683 -0
- data/lib/bio/appl/iprscan/report.rb +374 -0
- data/lib/bio/appl/mafft.rb +259 -0
- data/lib/bio/appl/mafft/report.rb +226 -0
- data/lib/bio/appl/muscle.rb +52 -0
- data/lib/bio/appl/paml/baseml.rb +95 -0
- data/lib/bio/appl/paml/baseml/report.rb +32 -0
- data/lib/bio/appl/paml/codeml.rb +242 -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/common.rb +348 -0
- data/lib/bio/appl/paml/common_report.rb +38 -0
- data/lib/bio/appl/paml/yn00.rb +103 -0
- data/lib/bio/appl/paml/yn00/report.rb +32 -0
- data/lib/bio/appl/phylip/alignment.rb +133 -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 +548 -0
- data/lib/bio/appl/psort/report.rb +542 -0
- data/lib/bio/appl/pts1.rb +263 -0
- data/lib/bio/appl/sim4.rb +124 -0
- data/lib/bio/appl/sim4/report.rb +485 -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 +353 -0
- data/lib/bio/data/codontable.rb +722 -0
- data/lib/bio/data/na.rb +223 -0
- data/lib/bio/db.rb +329 -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.rb +410 -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/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.rb +29 -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/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/url.rb +42 -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.rb +482 -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/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.rb +456 -0
- data/lib/bio/sequence/aa.rb +152 -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/shell.rb +44 -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/tree.rb +852 -0
- data/lib/bio/util/color_scheme.rb +191 -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/contingency_table.rb +370 -0
- 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 +200 -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 +288 -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 +14 -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_psort.rb +57 -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/db/test_url.rb +36 -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 +505 -0
- data/test/unit/bio/io/test_soapwsdl.rb +32 -0
- data/test/unit/bio/sequence/test_aa.rb +115 -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 +543 -0
data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_controller.rb
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
class BiorubyController < ApplicationController
|
2
|
+
|
3
|
+
HIDE_METHODS = Object.methods + [ "singleton_method_added" ]
|
4
|
+
|
5
|
+
HIDE_MODULES = [
|
6
|
+
Base64::Deprecated, Base64, PP::ObjectMixin, Bio::Shell,
|
7
|
+
]
|
8
|
+
HIDE_MODULES << WEBrick if defined?(WEBrick)
|
9
|
+
|
10
|
+
HIDE_VARIABLES = [
|
11
|
+
"_", "irb", "_erbout",
|
12
|
+
]
|
13
|
+
|
14
|
+
SECURITY_NOTICE = "For security purposes, this functionality is only available to local requests."
|
15
|
+
|
16
|
+
def index
|
17
|
+
unless local_request?
|
18
|
+
flash[:notice] = SECURITY_NOTICE
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def evaluate
|
23
|
+
if local_request?
|
24
|
+
begin
|
25
|
+
@script = params[:script].strip
|
26
|
+
|
27
|
+
# write out to history
|
28
|
+
Bio::Shell.store_history(@script)
|
29
|
+
|
30
|
+
# evaluate ruby script
|
31
|
+
@result = eval(@script, Bio::Shell.cache[:binding])
|
32
|
+
|
33
|
+
# *TODO* need to handle with output of print/puts/p/pp etc. here
|
34
|
+
@output = nil
|
35
|
+
rescue
|
36
|
+
@result = $!
|
37
|
+
@output = nil
|
38
|
+
end
|
39
|
+
else
|
40
|
+
@result = SECURITY_NOTICE
|
41
|
+
@output = nil
|
42
|
+
end
|
43
|
+
|
44
|
+
@number = Bio::Shell.cache[:results].store(@script, @result, @output)
|
45
|
+
|
46
|
+
render :update do |page|
|
47
|
+
render_log(page)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def list_methods
|
52
|
+
number = params[:number].to_i
|
53
|
+
|
54
|
+
script, result, output = Bio::Shell.cache[:results].restore(number)
|
55
|
+
@class = result.class
|
56
|
+
@methods = (result.methods - HIDE_METHODS).sort
|
57
|
+
|
58
|
+
render :update do |page|
|
59
|
+
page.replace_html "methods_#{number}", :partial => "methods"
|
60
|
+
page.visual_effect :toggle_blind, "methods_#{number}", :duration => 0.5
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def list_classes
|
65
|
+
number = params[:number].to_i
|
66
|
+
|
67
|
+
script, result, output = Bio::Shell.cache[:results].restore(number)
|
68
|
+
class_name = result.class
|
69
|
+
@class = class_name
|
70
|
+
@classes = []
|
71
|
+
loop do
|
72
|
+
@classes.unshift(class_name)
|
73
|
+
if class_name == Object
|
74
|
+
break
|
75
|
+
else
|
76
|
+
class_name = class_name.superclass
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
render :update do |page|
|
81
|
+
page.replace_html "classes_#{number}", :partial => "classes"
|
82
|
+
page.visual_effect :toggle_blind, "classes_#{number}", :duration => 0.5
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def list_modules
|
87
|
+
number = params[:number].to_i
|
88
|
+
|
89
|
+
script, result, output = Bio::Shell.cache[:results].restore(number)
|
90
|
+
@class = result.class
|
91
|
+
@modules = result.class.included_modules - HIDE_MODULES
|
92
|
+
|
93
|
+
render :update do |page|
|
94
|
+
page.replace_html "modules_#{number}", :partial => "modules"
|
95
|
+
page.visual_effect :toggle_blind, "modules_#{number}", :duration => 0.5
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def reload_script
|
100
|
+
number = params[:number].to_i
|
101
|
+
|
102
|
+
script, result, output = Bio::Shell.cache[:results].restore(number)
|
103
|
+
|
104
|
+
render :update do |page|
|
105
|
+
page.replace_html :script, script
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def results
|
110
|
+
if Bio::Shell.cache[:results].number > 0
|
111
|
+
limit = params[:limit].to_i
|
112
|
+
max_num = Bio::Shell.cache[:results].number
|
113
|
+
min_num = [ max_num - limit + 1, 1 ].max
|
114
|
+
min_num = 1 if limit == 0
|
115
|
+
|
116
|
+
render :update do |page|
|
117
|
+
# delete all existing results in the current DOM for clean up
|
118
|
+
page.select(".log").each do |element|
|
119
|
+
#page.hide element
|
120
|
+
page.remove element
|
121
|
+
end
|
122
|
+
|
123
|
+
# add selected results to the current DOM
|
124
|
+
min_num.upto(max_num) do |@number|
|
125
|
+
#page.show "log_#{@number}"
|
126
|
+
@script, @result, @output = Bio::Shell.cache[:results].restore(@number)
|
127
|
+
if @script
|
128
|
+
render_log(page)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
def commands
|
136
|
+
@bioruby_commands = Bio::Shell.private_instance_methods.sort
|
137
|
+
end
|
138
|
+
|
139
|
+
def history
|
140
|
+
@history = File.readlines(Bio::Shell.history_file)
|
141
|
+
end
|
142
|
+
|
143
|
+
end
|
144
|
+
|
data/lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
module BiorubyHelper
|
2
|
+
|
3
|
+
include Bio::Shell
|
4
|
+
|
5
|
+
def project_workdir
|
6
|
+
if Bio::Shell.cache[:savedir].match(/\.bioruby$/)
|
7
|
+
Bio::Shell.cache[:workdir]
|
8
|
+
else
|
9
|
+
Bio::Shell.cache[:savedir]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def have_results
|
14
|
+
Bio::Shell.cache[:results].number > 0
|
15
|
+
end
|
16
|
+
|
17
|
+
def local_variables
|
18
|
+
eval("local_variables", Bio::Shell.cache[:binding]) -
|
19
|
+
BiorubyController::HIDE_VARIABLES
|
20
|
+
end
|
21
|
+
|
22
|
+
def render_log(page)
|
23
|
+
page.insert_html :top, :logs, :partial => "log"
|
24
|
+
page.replace_html "variables", :partial => "variables"
|
25
|
+
page.hide "methods_#{@number}"
|
26
|
+
page.hide "classes_#{@number}"
|
27
|
+
page.hide "modules_#{@number}"
|
28
|
+
end
|
29
|
+
|
30
|
+
def reference_link(class_or_module)
|
31
|
+
name = class_or_module.to_s
|
32
|
+
case name
|
33
|
+
when /Bio::(.+)/
|
34
|
+
path = $1.split('::').join('/')
|
35
|
+
url = "http://bioruby.org/rdoc/classes/Bio/#{path}.html"
|
36
|
+
when /Chem::(.+)/
|
37
|
+
path = $1.split('::').join('/')
|
38
|
+
url = "http://chemruby.org/rdoc/classes/Chem/#{path}.html"
|
39
|
+
else
|
40
|
+
path = name.split('::').join('/')
|
41
|
+
url = "http://www.ruby-doc.org/core/classes/#{path}.html"
|
42
|
+
end
|
43
|
+
return "<a href='#{url}'>#{name}</a>"
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<div id="console">
|
2
|
+
<%- if flash[:notice] -%>
|
3
|
+
<div id="notice"><p><%= flash[:notice] %></p></div><br>
|
4
|
+
<%- end -%>
|
5
|
+
<% form_remote_tag(:url => {:action => "evaluate"}, :position => "top",
|
6
|
+
:before => %(Element.show('spinner')),
|
7
|
+
:complete => %(Element.hide('spinner'))) do %>
|
8
|
+
<img id="spinner" src="/images/bioruby/spinner.gif" style="display:none">
|
9
|
+
<b>BioRuby script:</b>
|
10
|
+
<br/>
|
11
|
+
<textarea id="script" name="script" rows=10 cols=80></textarea>
|
12
|
+
<br/>
|
13
|
+
<input type="submit" value="Evaluate">
|
14
|
+
<input type="reset" value="Clear">
|
15
|
+
|
16
|
+
Show [
|
17
|
+
<%= link_to_remote "All", :url => {:action => "results", :limit => 0} %> |
|
18
|
+
<%= link_to_remote "Last 5", :url => {:action => "results", :limit => 5} %> |
|
19
|
+
<%= link_to_remote "Previous", :url => {:action => "results", :limit => 1} %>
|
20
|
+
] or <%= link_to "Hide", :action => "index" %> results<br/>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div id="logs">
|
25
|
+
</div>
|
26
|
+
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# = bio/shell/script.rb - script mode for the BioRuby shell
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2006
|
5
|
+
# Toshiaki Katayama <k@bioruby.org>
|
6
|
+
# License:: The Ruby License
|
7
|
+
#
|
8
|
+
# $Id: script.rb,v 1.3 2007/04/05 23:35:41 trevor Exp $
|
9
|
+
#
|
10
|
+
|
11
|
+
module Bio::Shell
|
12
|
+
|
13
|
+
class Script
|
14
|
+
|
15
|
+
def initialize(script)
|
16
|
+
Bio::Shell.cache[:binding] = TOPLEVEL_BINDING
|
17
|
+
Bio::Shell.load_session
|
18
|
+
eval(File.read(script), TOPLEVEL_BINDING)
|
19
|
+
exit
|
20
|
+
end
|
21
|
+
|
22
|
+
end # Script
|
23
|
+
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,109 @@
|
|
1
|
+
#
|
2
|
+
# = bio/shell/setup.rb - setup initial environment for the BioRuby shell
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2006
|
5
|
+
# Toshiaki Katayama <k@bioruby.org>
|
6
|
+
# License:: The Ruby License
|
7
|
+
#
|
8
|
+
# $Id: setup.rb,v 1.8 2007/06/28 11:21:40 k Exp $
|
9
|
+
#
|
10
|
+
|
11
|
+
require 'getoptlong'
|
12
|
+
|
13
|
+
class Bio::Shell::Setup
|
14
|
+
|
15
|
+
def initialize
|
16
|
+
check_ruby_version
|
17
|
+
|
18
|
+
# command line options
|
19
|
+
getoptlong
|
20
|
+
|
21
|
+
# setup working directory
|
22
|
+
savedir = setup_savedir
|
23
|
+
|
24
|
+
# load configuration and plugins
|
25
|
+
Bio::Shell.configure(savedir)
|
26
|
+
|
27
|
+
# set default to irb mode
|
28
|
+
Bio::Shell.cache[:mode] = @mode || :irb
|
29
|
+
|
30
|
+
case Bio::Shell.cache[:mode]
|
31
|
+
when :web
|
32
|
+
# setup rails server
|
33
|
+
Bio::Shell::Web.new
|
34
|
+
when :irb
|
35
|
+
# setup irb server
|
36
|
+
Bio::Shell::Irb.new
|
37
|
+
when :script
|
38
|
+
# run bioruby shell script
|
39
|
+
Bio::Shell::Script.new(@script)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def check_ruby_version
|
44
|
+
if RUBY_VERSION < "1.8.2"
|
45
|
+
raise "BioRuby shell runs on Ruby version >= 1.8.2"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# command line argument (working directory or bioruby shell script file)
|
50
|
+
def getoptlong
|
51
|
+
opts = GetoptLong.new
|
52
|
+
opts.set_options(
|
53
|
+
[ '--rails', '-r', GetoptLong::NO_ARGUMENT ],
|
54
|
+
[ '--web', '-w', GetoptLong::NO_ARGUMENT ],
|
55
|
+
[ '--console', '-c', GetoptLong::NO_ARGUMENT ],
|
56
|
+
[ '--irb', '-i', GetoptLong::NO_ARGUMENT ]
|
57
|
+
)
|
58
|
+
opts.each_option do |opt, arg|
|
59
|
+
case opt
|
60
|
+
when /--rails/, /--web/
|
61
|
+
@mode = :web
|
62
|
+
when /--console/, /--irb/
|
63
|
+
@mode = :irb
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def setup_savedir
|
69
|
+
arg = ARGV.shift
|
70
|
+
|
71
|
+
# Options after the '--' argument are not parsed by GetoptLong and
|
72
|
+
# are passed to irb or rails. This hack preserve the first option
|
73
|
+
# when working directory of the project is not given.
|
74
|
+
if arg and arg[/^-/]
|
75
|
+
ARGV.unshift arg
|
76
|
+
arg = nil
|
77
|
+
end
|
78
|
+
|
79
|
+
if arg.nil?
|
80
|
+
# run in the current directory
|
81
|
+
if File.exist?(Bio::Shell::Core::HISTORY)
|
82
|
+
savedir = Dir.pwd
|
83
|
+
else
|
84
|
+
savedir = File.join(ENV['HOME'].to_s, ".bioruby")
|
85
|
+
install_savedir(savedir)
|
86
|
+
end
|
87
|
+
elsif File.file?(arg)
|
88
|
+
# run file as a bioruby shell script
|
89
|
+
savedir = File.join(File.dirname(arg), "..")
|
90
|
+
@script = arg
|
91
|
+
@mode = :script
|
92
|
+
else
|
93
|
+
# run in new or existing directory
|
94
|
+
if arg[/^#{File::SEPARATOR}/]
|
95
|
+
savedir = arg
|
96
|
+
else
|
97
|
+
savedir = File.join(Dir.pwd, arg)
|
98
|
+
end
|
99
|
+
install_savedir(savedir)
|
100
|
+
end
|
101
|
+
|
102
|
+
return savedir
|
103
|
+
end
|
104
|
+
|
105
|
+
def install_savedir(savedir)
|
106
|
+
FileUtils.makedirs(savedir)
|
107
|
+
end
|
108
|
+
|
109
|
+
end # Setup
|
@@ -0,0 +1,102 @@
|
|
1
|
+
#
|
2
|
+
# = bio/shell/web.rb - GUI for the BioRuby shell
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2006
|
5
|
+
# Nobuya Tanaka <t@chemruby.org>,
|
6
|
+
# Toshiaki Katayama <k@bioruby.org>
|
7
|
+
# License:: The Ruby License
|
8
|
+
#
|
9
|
+
# $Id: web.rb,v 1.5 2007/06/26 08:38:38 k Exp $
|
10
|
+
#
|
11
|
+
|
12
|
+
|
13
|
+
module Bio::Shell
|
14
|
+
|
15
|
+
class Web
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
Bio::Shell.cache[:binding] = binding
|
19
|
+
Bio::Shell.cache[:results] ||= Results.new
|
20
|
+
install_rails
|
21
|
+
setup_rails
|
22
|
+
start_rails
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def setup_rails
|
28
|
+
puts
|
29
|
+
puts ">>>"
|
30
|
+
puts ">>> open http://localhost:3000/bioruby"
|
31
|
+
puts ">>>"
|
32
|
+
puts
|
33
|
+
puts '(You can change the port number by adding "-- -p 4000" option)'
|
34
|
+
puts
|
35
|
+
end
|
36
|
+
|
37
|
+
def install_rails
|
38
|
+
savedir = Bio::Shell.cache[:savedir]
|
39
|
+
path = File.join(savedir, "script", "generate")
|
40
|
+
unless File.exist?(path)
|
41
|
+
puts "Installing Rails application for BioRuby shell ... "
|
42
|
+
system("rails #{savedir}")
|
43
|
+
puts "done"
|
44
|
+
end
|
45
|
+
path = File.join(savedir, "app", "controllers", "bioruby_controller.rb")
|
46
|
+
unless File.exist?(path)
|
47
|
+
basedir = File.dirname(__FILE__)
|
48
|
+
puts "Installing Rails plugin for BioRuby shell ... "
|
49
|
+
FileUtils.cp_r("#{basedir}/rails/.", savedir)
|
50
|
+
Dir.chdir(savedir) do
|
51
|
+
system("./script/generate bioruby shell")
|
52
|
+
end
|
53
|
+
puts "done"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def start_rails
|
58
|
+
begin
|
59
|
+
Bio::Shell.cache[:rails] = Thread.new do
|
60
|
+
Dir.chdir(Bio::Shell.cache[:savedir]) do
|
61
|
+
require './config/boot'
|
62
|
+
require 'commands/server'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
class Results
|
69
|
+
attr_accessor :number, :script, :result, :output
|
70
|
+
|
71
|
+
def initialize
|
72
|
+
@number = 0
|
73
|
+
@script = []
|
74
|
+
@result = []
|
75
|
+
@output = []
|
76
|
+
end
|
77
|
+
|
78
|
+
def store(script, result, output)
|
79
|
+
@number += 1
|
80
|
+
@script[@number] = script
|
81
|
+
@result[@number] = result
|
82
|
+
@output[@number] = output
|
83
|
+
return @number
|
84
|
+
end
|
85
|
+
|
86
|
+
def restore(number)
|
87
|
+
return @script[number], @result[number], @output[number]
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
private
|
94
|
+
|
95
|
+
# *TODO* stop irb and start rails?
|
96
|
+
#def web
|
97
|
+
#end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
|