inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 28 Nov 2013 01:08:39 +0000 (01:08 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 28 Nov 2013 01:08:39 +0000 (01:08 +0000)
forester/ruby/evoruby/lib/evo/tool/multi_sequence_extractor.rb

index b435566..de143bc 100644 (file)
@@ -249,6 +249,7 @@ module Evoruby
       puts basename
 
       File.open( input_file ) do | file |
+        species_counter = 1
         while line = file.gets
           line.strip!
           if !Util.is_string_empty?( line ) && !(line =~ /\s*#/ )
@@ -290,8 +291,9 @@ module Evoruby
                 print_counts( per_species_counter, log, Constants::LINE_DELIMITER )
                 per_species_counter = 0
               end
-              puts " " + current_species + " [" + my_readlink + "]"
-              log << current_species + " [" + my_readlink + "]" + Constants::LINE_DELIMITER
+              puts " " + species_counter.to_str +  ": " + current_species + " [" + my_readlink + "]"
+              log << species_counter.to_str +  ": " + current_species + " [" + my_readlink + "]" + Constants::LINE_DELIMITER
+              species_counter += 1
             end
             puts "   " + seq_name
             log << "   " + seq_name + Constants::LINE_DELIMITER