inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 18 Jan 2013 23:27:45 +0000 (23:27 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Fri, 18 Jan 2013 23:27:45 +0000 (23:27 +0000)
forester/ruby/evoruby/lib/evo/tool/taxonomy_processor.rb

index bd5f6aa..20c5a53 100644 (file)
@@ -222,9 +222,7 @@ module Evoruby
       elsif SIMPLE
         new_desc = counter.to_s( 16 )
       elsif extract_taxonomy
-        if ( desc.count( "[" ) != desc.count( "]" ) )
-          Util.fatal_error( PRG_NAME, "illegal bracket count in: " + desc )
-        end
+
         species = nil
         species_map.each_key do | key |
           if desc =~ /[\b|_]#{key}\b/  # Added boundaries to prevent e.g. RAT matching ARATH.
@@ -234,7 +232,8 @@ module Evoruby
           end
         end
         if species == nil
-          if desc =~/.*\[(\S{3,}?)\]/
+          #if desc =~/.*\[(\S{3,}?)\]/
+          if desc =~/\[([A-Z0-9]{3,6})\]\s*$/ #new
             species = $1
             species.strip!
             species.upcase!