jandot-bio 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bioruby +44 -0
- data/bin/br_biofetch.rb +47 -0
- data/bin/br_bioflat.rb +282 -0
- data/bin/br_biogetseq.rb +45 -0
- data/bin/br_pmfetch.rb +421 -0
- data/doc/Changes-0.7.rd +369 -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/lib/bio.rb +279 -0
- data/lib/bio/alignment.rb +2518 -0
- data/lib/bio/appl/bl2seq/report.rb +334 -0
- data/lib/bio/appl/blast.rb +351 -0
- data/lib/bio/appl/blast/format0.rb +1438 -0
- data/lib/bio/appl/blast/format8.rb +83 -0
- data/lib/bio/appl/blast/report.rb +516 -0
- data/lib/bio/appl/blast/rexml.rb +135 -0
- data/lib/bio/appl/blast/rpsblast.rb +176 -0
- data/lib/bio/appl/blast/wublast.rb +550 -0
- data/lib/bio/appl/blast/xmlparser.rb +228 -0
- data/lib/bio/appl/blat/report.rb +489 -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 +237 -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/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 +548 -0
- data/lib/bio/appl/psort/report.rb +457 -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 +222 -0
- data/lib/bio/command.rb +337 -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.rb +329 -0
- data/lib/bio/db/aaindex.rb +357 -0
- data/lib/bio/db/embl/common.rb +336 -0
- data/lib/bio/db/embl/embl.rb +402 -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 +599 -0
- data/lib/bio/db/fasta.rb +907 -0
- data/lib/bio/db/genbank/common.rb +290 -0
- data/lib/bio/db/genbank/ddbj.rb +22 -0
- data/lib/bio/db/genbank/genbank.rb +215 -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 +174 -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 +170 -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 +323 -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 +457 -0
- data/lib/bio/db/soft.rb +404 -0
- data/lib/bio/db/transfac.rb +375 -0
- data/lib/bio/feature.rb +226 -0
- data/lib/bio/io/das.rb +461 -0
- data/lib/bio/io/dbget.rb +194 -0
- data/lib/bio/io/ddbjxml.rb +581 -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 +181 -0
- data/lib/bio/io/flatfile.rb +1309 -0
- data/lib/bio/io/flatfile/bdb.rb +253 -0
- data/lib/bio/io/flatfile/index.rb +1371 -0
- data/lib/bio/io/flatfile/indexer.rb +787 -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 +256 -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 +365 -0
- data/lib/bio/location.rb +772 -0
- data/lib/bio/map.rb +410 -0
- data/lib/bio/pathway.rb +854 -0
- data/lib/bio/reference.rb +623 -0
- data/lib/bio/sequence.rb +475 -0
- data/lib/bio/sequence/aa.rb +125 -0
- data/lib/bio/sequence/common.rb +333 -0
- data/lib/bio/sequence/compat.rb +123 -0
- data/lib/bio/sequence/format.rb +181 -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 +850 -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 +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 +288 -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/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/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/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/prosite/prosite.dat +2233 -0
- data/test/data/refseq/nm_126355.entret +64 -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/io/test_ensembl.rb +186 -0
- data/test/functional/bio/io/test_soapwsdl.rb +52 -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_report.rb +417 -0
- data/test/unit/bio/appl/blast/test_xmlparser.rb +388 -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/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 +163 -0
- data/test/unit/bio/appl/test_fasta.rb +130 -0
- data/test/unit/bio/appl/test_pts1.rb +140 -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_sptr.rb +1775 -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 +127 -0
- data/test/unit/bio/db/test_lasergene.rb +95 -0
- data/test/unit/bio/db/test_newick.rb +293 -0
- data/test/unit/bio/db/test_nexus.rb +360 -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/test_ddbjxml.rb +75 -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 +237 -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 +174 -0
- data/test/unit/bio/sequence/test_compat.rb +69 -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 +288 -0
- data/test/unit/bio/test_db.rb +96 -0
- data/test/unit/bio/test_feature.rb +116 -0
- data/test/unit/bio/test_location.rb +39 -0
- data/test/unit/bio/test_map.rb +230 -0
- data/test/unit/bio/test_pathway.rb +473 -0
- data/test/unit/bio/test_reference.rb +224 -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 +479 -0
@@ -0,0 +1,388 @@
|
|
1
|
+
#
|
2
|
+
# test/unit/bio/appl/blast/test_xmlparser.rb - Unit test for Bio::Blast::Report
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2005 Mitsuteru Nakao <n@bioruby.org>
|
5
|
+
# License:: The Ruby License
|
6
|
+
#
|
7
|
+
# $Id: test_xmlparser.rb,v 1.8 2008/05/12 12:01:20 ngoto Exp $
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'pathname'
|
11
|
+
libpath = Pathname.new(File.join(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib'))).cleanpath.to_s
|
12
|
+
$:.unshift(libpath) unless $:.include?(libpath)
|
13
|
+
|
14
|
+
require 'test/unit'
|
15
|
+
require 'bio/appl/blast'
|
16
|
+
|
17
|
+
|
18
|
+
module Bio::TestBlastXMLParser
|
19
|
+
class TestBlastFormat7XMLParserData
|
20
|
+
bioruby_root = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5)).cleanpath.to_s
|
21
|
+
TestDataBlast = Pathname.new(File.join(bioruby_root, 'test', 'data', 'blast')).cleanpath.to_s
|
22
|
+
|
23
|
+
def self.input
|
24
|
+
File.open(File.join(TestDataBlast, 'b0002.faa')).read
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.output
|
28
|
+
File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read
|
29
|
+
# File.open(File.join(TestDataBlast, '2.2.15.blastp.m7')).read
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
class TestBlastReport < Test::Unit::TestCase
|
35
|
+
require 'bio/appl/blast/report'
|
36
|
+
|
37
|
+
def setup
|
38
|
+
@report = Bio::Blast::Report.new(TestBlastFormat7XMLParserData.output)
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_iterations
|
42
|
+
@report.iterations
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_parameters
|
46
|
+
@report.parameters
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_program
|
50
|
+
@report.program
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_version
|
54
|
+
@report.version
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_reference
|
58
|
+
@report.reference
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_db
|
62
|
+
assert_equal("b0002.faa", @report.db)
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_query_id
|
66
|
+
@report.query_id
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_query_def
|
70
|
+
@report.query_def
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_query_len
|
74
|
+
@report.query_len
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_matrix
|
78
|
+
@report.matrix
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_expect
|
82
|
+
@report.expect
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_inclusion
|
86
|
+
@report.inclusion
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_sc_match
|
90
|
+
@report.sc_match
|
91
|
+
end
|
92
|
+
|
93
|
+
def test_sc_mismatch
|
94
|
+
@report.sc_mismatch
|
95
|
+
end
|
96
|
+
|
97
|
+
def test_gap_open
|
98
|
+
@report.gap_open
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_gap_extend
|
102
|
+
@report.gap_extend
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_filter
|
106
|
+
@report.filter
|
107
|
+
end
|
108
|
+
|
109
|
+
def test_pattern
|
110
|
+
@report.pattern
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_extrez_query
|
114
|
+
@report.entrez_query
|
115
|
+
end
|
116
|
+
|
117
|
+
def test_each_iteration
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_each_hit
|
121
|
+
end
|
122
|
+
|
123
|
+
def test_hits
|
124
|
+
end
|
125
|
+
|
126
|
+
def test_statistics
|
127
|
+
end
|
128
|
+
|
129
|
+
def test_db_num
|
130
|
+
@report.db_num
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_db_len
|
134
|
+
@report.db_len
|
135
|
+
end
|
136
|
+
|
137
|
+
def test_hsp_len
|
138
|
+
@report.hsp_len
|
139
|
+
end
|
140
|
+
|
141
|
+
def test_eff_space
|
142
|
+
@report.eff_space
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_kappa
|
146
|
+
@report.kappa
|
147
|
+
end
|
148
|
+
|
149
|
+
def test_lambda
|
150
|
+
@report.lambda
|
151
|
+
end
|
152
|
+
|
153
|
+
def test_entropy
|
154
|
+
@report.entropy
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_message
|
158
|
+
@report.message
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
|
163
|
+
class TestBlastReportIteration < Test::Unit::TestCase
|
164
|
+
def setup
|
165
|
+
data = TestBlastFormat7XMLParserData.output
|
166
|
+
report = Bio::Blast::Report.new(data)
|
167
|
+
@itr = report.iterations.first
|
168
|
+
end
|
169
|
+
|
170
|
+
def test_hits
|
171
|
+
@itr.hits
|
172
|
+
end
|
173
|
+
|
174
|
+
def test_statistics
|
175
|
+
@itr.statistics
|
176
|
+
end
|
177
|
+
|
178
|
+
def test_num
|
179
|
+
@itr.num
|
180
|
+
end
|
181
|
+
|
182
|
+
def test_message
|
183
|
+
@itr.message
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
|
188
|
+
class TestBlastReportHit < Test::Unit::TestCase
|
189
|
+
def setup
|
190
|
+
data = TestBlastFormat7XMLParserData.output
|
191
|
+
report = Bio::Blast::Report.new(data)
|
192
|
+
@hit = report.hits.first
|
193
|
+
end
|
194
|
+
|
195
|
+
def test_hsps
|
196
|
+
@hit.hsps
|
197
|
+
end
|
198
|
+
|
199
|
+
def test_query_id
|
200
|
+
@hit.query_id
|
201
|
+
end
|
202
|
+
|
203
|
+
def test_query_def
|
204
|
+
@hit.query_def
|
205
|
+
end
|
206
|
+
|
207
|
+
def test_query_len
|
208
|
+
@hit.query_len
|
209
|
+
end
|
210
|
+
|
211
|
+
def test_num
|
212
|
+
@hit.num
|
213
|
+
end
|
214
|
+
|
215
|
+
def test_hit_id
|
216
|
+
@hit.hit_id
|
217
|
+
end
|
218
|
+
|
219
|
+
def test_len
|
220
|
+
@hit.len
|
221
|
+
end
|
222
|
+
|
223
|
+
def test_target_len
|
224
|
+
@hit.target_len
|
225
|
+
end
|
226
|
+
|
227
|
+
def test_definition
|
228
|
+
@hit.definition
|
229
|
+
end
|
230
|
+
|
231
|
+
def test_taeget_def
|
232
|
+
@hit.target_def
|
233
|
+
end
|
234
|
+
|
235
|
+
def test_accession
|
236
|
+
@hit.accession
|
237
|
+
end
|
238
|
+
|
239
|
+
def test_target_id
|
240
|
+
@hit.target_id
|
241
|
+
end
|
242
|
+
|
243
|
+
def test_evalue
|
244
|
+
@hit.evalue
|
245
|
+
end
|
246
|
+
|
247
|
+
def test_bit_score
|
248
|
+
@hit.bit_score
|
249
|
+
end
|
250
|
+
|
251
|
+
def test_identity
|
252
|
+
@hit.identity
|
253
|
+
end
|
254
|
+
|
255
|
+
def test_overlap
|
256
|
+
@hit.overlap
|
257
|
+
end
|
258
|
+
|
259
|
+
def test_query_seq
|
260
|
+
@hit.query_seq
|
261
|
+
end
|
262
|
+
|
263
|
+
def test_target_seq
|
264
|
+
@hit.target_seq
|
265
|
+
end
|
266
|
+
|
267
|
+
def test_midline
|
268
|
+
@hit.midline
|
269
|
+
end
|
270
|
+
|
271
|
+
def test_query_start
|
272
|
+
@hit.query_start
|
273
|
+
end
|
274
|
+
|
275
|
+
def test_query_end
|
276
|
+
@hit.query_end
|
277
|
+
end
|
278
|
+
|
279
|
+
def test_target_start
|
280
|
+
@hit.target_start
|
281
|
+
end
|
282
|
+
|
283
|
+
def test_target_end
|
284
|
+
@hit.target_end
|
285
|
+
end
|
286
|
+
|
287
|
+
def test_lap_at
|
288
|
+
@hit.lap_at
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
|
293
|
+
class TestBlastReportHsp < Test::Unit::TestCase
|
294
|
+
def setup
|
295
|
+
data = TestBlastFormat7XMLParserData.output
|
296
|
+
report = Bio::Blast::Report.new(data)
|
297
|
+
@hsp = report.hits.first.hsps.first
|
298
|
+
end
|
299
|
+
|
300
|
+
def test_num
|
301
|
+
assert_equal(1, @hsp.num)
|
302
|
+
end
|
303
|
+
|
304
|
+
def test_hit_score
|
305
|
+
@hsp.bit_score
|
306
|
+
end
|
307
|
+
|
308
|
+
def test_score
|
309
|
+
@hsp.score
|
310
|
+
end
|
311
|
+
|
312
|
+
def test_evalue
|
313
|
+
@hsp.evalue
|
314
|
+
end
|
315
|
+
|
316
|
+
def test_identity
|
317
|
+
@hsp.identity
|
318
|
+
end
|
319
|
+
|
320
|
+
def test_gaps
|
321
|
+
@hsp.gaps
|
322
|
+
end
|
323
|
+
|
324
|
+
def test_positive
|
325
|
+
@hsp.positive
|
326
|
+
end
|
327
|
+
|
328
|
+
def test_align_len
|
329
|
+
@hsp.align_len
|
330
|
+
end
|
331
|
+
|
332
|
+
def test_density
|
333
|
+
@hsp.density
|
334
|
+
end
|
335
|
+
|
336
|
+
def test_query_frame
|
337
|
+
@hsp.query_frame
|
338
|
+
end
|
339
|
+
|
340
|
+
def test_query_from
|
341
|
+
@hsp.query_from
|
342
|
+
end
|
343
|
+
|
344
|
+
def test_query_to
|
345
|
+
@hsp.query_to
|
346
|
+
end
|
347
|
+
|
348
|
+
def test_hit_frame
|
349
|
+
@hsp.hit_frame
|
350
|
+
end
|
351
|
+
|
352
|
+
def test_hit_from
|
353
|
+
@hsp.hit_from
|
354
|
+
end
|
355
|
+
|
356
|
+
def test_hit_to
|
357
|
+
@hsp.hit_to
|
358
|
+
end
|
359
|
+
|
360
|
+
def test_pattern_from
|
361
|
+
@hsp.pattern_from
|
362
|
+
end
|
363
|
+
|
364
|
+
def test_pattern_to
|
365
|
+
@hsp.pattern_to
|
366
|
+
end
|
367
|
+
|
368
|
+
def test_qseq
|
369
|
+
@hsp.qseq
|
370
|
+
end
|
371
|
+
|
372
|
+
def test_midline
|
373
|
+
@hsp.midline
|
374
|
+
end
|
375
|
+
|
376
|
+
def test_hseq
|
377
|
+
@hsp.hseq
|
378
|
+
end
|
379
|
+
|
380
|
+
def test_percent_identity
|
381
|
+
@hsp.percent_identity
|
382
|
+
end
|
383
|
+
|
384
|
+
def test_mismatch_count
|
385
|
+
@hsp.mismatch_count
|
386
|
+
end
|
387
|
+
end
|
388
|
+
end
|
@@ -0,0 +1,182 @@
|
|
1
|
+
#
|
2
|
+
# test/unit/bio/appl/genscan/test_report.rb - Unit test for Bio::Genscan::Report
|
3
|
+
#
|
4
|
+
# Copyright:: Copyright (C) 2005 Mitsuteru Nakao <n@bioruby.org>
|
5
|
+
# License:: The Ruby License
|
6
|
+
#
|
7
|
+
# $Id: test_report.rb,v 1.4 2007/04/05 23:35:43 trevor Exp $
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'pathname'
|
11
|
+
libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s
|
12
|
+
$:.unshift(libpath) unless $:.include?(libpath)
|
13
|
+
|
14
|
+
require 'test/unit'
|
15
|
+
require 'bio/appl/genscan/report'
|
16
|
+
|
17
|
+
|
18
|
+
module Bio
|
19
|
+
|
20
|
+
class TestGenscanReport < Test::Unit::TestCase
|
21
|
+
|
22
|
+
def setup
|
23
|
+
bioruby_root = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5)).cleanpath.to_s
|
24
|
+
test_data = Pathname.new(File.join(bioruby_root, 'test', 'data', 'genscan')).cleanpath.to_s
|
25
|
+
report = File.open(File.join(test_data, 'sample.report')).read
|
26
|
+
|
27
|
+
@obj = Bio::Genscan::Report.new(report)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_genscan_version
|
31
|
+
assert_equal('1.0', @obj.genscan_version)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_date_run
|
35
|
+
assert_equal('30-May-103', @obj.date_run)
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_time
|
39
|
+
assert_equal("14:06:28", @obj.time)
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_query_name
|
43
|
+
assert_equal('HUMRASH', @obj.query_name)
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_length
|
47
|
+
assert_equal(12942, @obj.length)
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_gccontent
|
51
|
+
assert_equal(68.17, @obj.gccontent)
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_isochore
|
55
|
+
assert_equal('4 (57 - 100 C+G%)', @obj.isochore)
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_matrix
|
59
|
+
assert_equal('HumanIso.smat', @obj.matrix)
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_predictions_size
|
63
|
+
assert_equal(2, @obj.predictions.size)
|
64
|
+
end
|
65
|
+
|
66
|
+
end # TestGenscanReport
|
67
|
+
|
68
|
+
|
69
|
+
class TestGenscanReportGene < Test::Unit::TestCase
|
70
|
+
|
71
|
+
def setup
|
72
|
+
bioruby_root = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5)).cleanpath.to_s
|
73
|
+
test_data = Pathname.new(File.join(bioruby_root, 'test', 'data', 'genscan')).cleanpath.to_s
|
74
|
+
report = File.open(File.join(test_data, 'sample.report')).read
|
75
|
+
@obj = Bio::Genscan::Report.new(report).predictions
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_number
|
79
|
+
assert_equal(1, @obj.first.number)
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_aaseq
|
83
|
+
assert_equal(Bio::FastaFormat, @obj.first.aaseq.class)
|
84
|
+
seq = "MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGETCLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQIKRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQGVEDAFYTLVREIRQHKLRKLNPPDESGPGCMSCKCVLS"
|
85
|
+
assert_equal(seq, @obj.first.aaseq.seq)
|
86
|
+
definition = "HUMRASH|GENSCAN_predicted_peptide_1|189_aa"
|
87
|
+
assert_equal(definition, @obj.first.aaseq.definition)
|
88
|
+
end
|
89
|
+
|
90
|
+
def test_naseq
|
91
|
+
assert_equal(Bio::FastaFormat, @obj.first.naseq.class)
|
92
|
+
seq = "atgacggaatataagctggtggtggtgggcgccggcggtgtgggcaagagtgcgctgaccatccagctgatccagaaccattttgtggacgaatacgaccccactatagaggattcctaccggaagcaggtggtcattgatggggagacgtgcctgttggacatcctggataccgccggccaggaggagtacagcgccatgcgggaccagtacatgcgcaccggggagggcttcctgtgtgtgtttgccatcaacaacaccaagtcttttgaggacatccaccagtacagggagcagatcaaacgggtgaaggactcggatgacgtgcccatggtgctggtggggaacaagtgtgacctggctgcacgcactgtggaatctcggcaggctcaggacctcgcccgaagctacggcatcccctacatcgagacctcggccaagacccggcagggagtggaggatgccttctacacgttggtgcgtgagatccggcagcacaagctgcggaagctgaaccctcctgatgagagtggccccggctgcatgagctgcaagtgtgtgctctcctga"
|
93
|
+
assert_equal(seq, @obj.first.naseq.seq)
|
94
|
+
definition = "HUMRASH|GENSCAN_predicted_CDS_1|570_bp"
|
95
|
+
assert_equal(definition, @obj.first.naseq.definition)
|
96
|
+
end
|
97
|
+
|
98
|
+
def test_promoter
|
99
|
+
assert_equal(Bio::Genscan::Report::Exon, @obj.last.promoter.class)
|
100
|
+
assert_equal("Prom", @obj.last.promoter.exon_type)
|
101
|
+
end
|
102
|
+
|
103
|
+
def test_polyA
|
104
|
+
assert_equal(Bio::Genscan::Report::Exon, @obj.first.polyA.class)
|
105
|
+
assert_equal('PlyA', @obj.first.polyA.exon_type)
|
106
|
+
end
|
107
|
+
|
108
|
+
end # TestGenscanReportGene
|
109
|
+
|
110
|
+
|
111
|
+
class TestGenscanReportExon < Test::Unit::TestCase
|
112
|
+
|
113
|
+
def setup
|
114
|
+
bioruby_root = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5)).cleanpath.to_s
|
115
|
+
test_data = Pathname.new(File.join(bioruby_root, 'test', 'data', 'genscan')).cleanpath.to_s
|
116
|
+
report = File.open(File.join(test_data, 'sample.report')).read
|
117
|
+
@obj = Bio::Genscan::Report.new(report).predictions.first.exons.first
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_number
|
121
|
+
assert_equal(1, @obj.number)
|
122
|
+
end
|
123
|
+
|
124
|
+
def test_exon_type
|
125
|
+
assert_equal('Init', @obj.exon_type)
|
126
|
+
end
|
127
|
+
|
128
|
+
def test_exon_type_long
|
129
|
+
assert_equal('Initial exon', @obj.exon_type_long)
|
130
|
+
end
|
131
|
+
|
132
|
+
def test_strand
|
133
|
+
assert_equal('+', @obj.strand)
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_first
|
137
|
+
assert_equal(1664, @obj.first)
|
138
|
+
end
|
139
|
+
|
140
|
+
def test_last
|
141
|
+
assert_equal(1774, @obj.last)
|
142
|
+
end
|
143
|
+
|
144
|
+
def test_range
|
145
|
+
assert_equal(1664..1774, @obj.range)
|
146
|
+
end
|
147
|
+
|
148
|
+
def test_phase
|
149
|
+
assert_equal('0', @obj.phase)
|
150
|
+
end
|
151
|
+
|
152
|
+
def test_acceptor_score
|
153
|
+
assert_equal(94, @obj.acceptor_score)
|
154
|
+
end
|
155
|
+
|
156
|
+
def test_donor_score
|
157
|
+
assert_equal(83, @obj.donor_score)
|
158
|
+
end
|
159
|
+
|
160
|
+
def test_initiation_score
|
161
|
+
assert_equal(94, @obj.initiation_score)
|
162
|
+
end
|
163
|
+
|
164
|
+
def test_termination_score
|
165
|
+
assert_equal(83, @obj.termination_score)
|
166
|
+
end
|
167
|
+
|
168
|
+
def test_score
|
169
|
+
assert_equal(212, @obj.score)
|
170
|
+
end
|
171
|
+
|
172
|
+
def test_p_value
|
173
|
+
assert_equal(0.997, @obj.p_value)
|
174
|
+
end
|
175
|
+
|
176
|
+
def test_t_score
|
177
|
+
assert_equal(21.33, @obj.t_score)
|
178
|
+
end
|
179
|
+
|
180
|
+
end # TestGenscanReportExon
|
181
|
+
|
182
|
+
end
|