From: cmzmasek@gmail.com Date: Fri, 28 Sep 2012 01:01:48 +0000 (+0000) Subject: in progress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a9df91e44cdfaab2baa21f131588f2417eeda71d;p=jalview.git in progress --- diff --git a/forester/ruby/evoruby/lib/evo/apps/taxonomy_processor.rb b/forester/ruby/evoruby/lib/evo/apps/taxonomy_processor.rb index 39a48b7..5b41b2b 100644 --- a/forester/ruby/evoruby/lib/evo/apps/taxonomy_processor.rb +++ b/forester/ruby/evoruby/lib/evo/apps/taxonomy_processor.rb @@ -48,8 +48,8 @@ module Evoruby WWW, STDOUT ) - if ( ARGV == nil || ( ARGV.length != 3 && ARGV.length != 4 && ARGV.length != 5 && ARGV.length != 6 ) ) - puts( "Usage: #{PRG_NAME}.rb [options] [input map file] " ) + if ( ARGV == nil || ( ARGV.length != 1 && ARGV.length != 3 && ARGV.length != 4 && ARGV.length != 5 && ARGV.length != 6 ) ) + puts( "Usage: #{PRG_NAME}.rb [options] [input map file] [output sequences] [output id list]" ) puts() puts( " options: -" + EXTRACT_TAXONOMY_OPTION + ": to extract taxonomy information from bracketed expression" ) puts() @@ -62,11 +62,14 @@ module Evoruby Util.fatal_error( PRG_NAME, "error: " + e.to_s ) end + mapfile = nil input = nil output = nil list_file = nil + + if cla.get_number_of_files == 4 mapfile = cla.get_file_name( 0 ) input = cla.get_file_name( 1 ) @@ -76,6 +79,16 @@ module Evoruby input = cla.get_file_name( 0 ) output = cla.get_file_name( 1 ) list_file = cla.get_file_name( 2 ) + elsif cla.get_number_of_files == 1 + input = cla.get_file_name( 0 ) + i = nil + if input.downcase.end_with?( ".fasta" ) + i = input[ 0 .. input.length - 6 ] + else + i = input + end + output = i + "_ni.fasta" + list_file = i + ".nim" end