in progress
[jalview.git] / forester / ruby / evoruby / lib / evo / tool / taxonomy_processor.rb
index d316f85..210d9ee 100644 (file)
@@ -48,7 +48,7 @@ module Evoruby
         WWW,
         STDOUT )
 
-      if ( ARGV == nil || (  ARGV.length != 1 && ARGV.length != 3 && ARGV.length != 4 && ARGV.length != 5 && ARGV.length != 6 ) )
+      if ( ARGV == nil || ( ARGV.length != 1 && ARGV.length != 2 && ARGV.length != 3 && ARGV.length != 4 && ARGV.length != 5 && ARGV.length != 6 ) )
         puts( "Usage: #{PRG_NAME}.rb [options] [input map file] <input sequences> [output sequences] [output id list]" )
         puts()
         puts( "  options: -" + EXTRACT_TAXONOMY_OPTION + ": to extract taxonomy information from bracketed expression" )
@@ -215,6 +215,8 @@ module Evoruby
       new_desc = nil
       my_species = nil
       # if desc =~ /^>?\s*\S{1,10}_([0-9A-Z]{3,5})/
+      desc.gsub!( /:\s+/, ":" ) #new
+      desc.gsub!( /\s+/, " " ) #new
       if desc =~ /^>?\s*\S{1,10}_([A-Z]{3,5})/
         new_desc = counter.to_s( 16 ) + "_" + $1
       elsif SIMPLE