Sha256: 85b0cbe643d47b42143347a2a046b0eefb2758a8929b0cda14d0a4c55ee6fd92
Contents?: true
Size: 1.9 KB
Versions: 4
Compression:
Stored size: 1.9 KB
Contents
require 'spec_helper' lederhosen = Lederhosen::CLI.new describe 'no_tasks' do let(:greengenes_taxonomy) { '124 U55236.1 Methanobrevibacter thaueri str. CW k__Archaea; p__Euryarchaeota; c__Methanobacteria; o__Methanobacteriales; f__Methanobacteriaceae; g__Methanobrevibacter; Unclassified; otu_127' } let(:taxcollector_taxonomy) { '[0]Bacteria;[1]Actinobacteria;[2]Actinobacteria;[3]null;[4]null;[5]null;[6]bacterium_TH3;[7]bacterium_TH3;[8]bacterium_TH3|M79434|8 ' } it '#detect_taxonomy_format should recognize GreenGenes' do lederhosen.detect_taxonomy_format(greengenes_taxonomy).should == :greengenes end it '#detect_taxonomy_format should recognize TaxCollector' do lederhosen.detect_taxonomy_format(taxcollector_taxonomy).should == :taxcollector end it '#detect_taxonomy_format should fail on unknown formats' do lederhosen.detect_taxonomy_format('this is not a taxonomic description').should raise_error end it '#parse_taxonomy_taxcollector should parse taxcollector taxonomy' do taxonomy = lederhosen.parse_taxonomy_taxcollector(taxcollector_taxonomy) taxonomy['original'].should == taxcollector_taxonomy levels = %w{domain phylum class order family genus species kingdom original} taxonomy.keys.each do |v| levels.should include v end end it '#parse_taxonomy_greengenes should parse greengenes taxonomy' do taxonomy = lederhosen.parse_taxonomy_greengenes(greengenes_taxonomy) levels = %w{domain phylum class order family genus species kingdom original} taxonomy.keys.each do |v| levels.should include v end end it '#parse_taxonomy should automatically detect and parse greengenes taxonomy' do lederhosen.parse_taxonomy(greengenes_taxonomy).should_not be_nil end it '#parse_taxonomy should automatically detect and parse taxcollector taxonomy' do lederhosen.parse_taxonomy(taxcollector_taxonomy).should_not be_nil end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lederhosen-1.3.3 | spec/no_tasks_spec.rb |
lederhosen-1.3.2 | spec/no_tasks_spec.rb |
lederhosen-1.3.1 | spec/no_tasks_spec.rb |
lederhosen-1.3.0 | spec/no_tasks_spec.rb |