inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 27 Nov 2013 23:58:32 +0000 (23:58 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 27 Nov 2013 23:58:32 +0000 (23:58 +0000)
forester/ruby/evoruby/lib/evo/msa/msa.rb

index ca6832d..579941d 100644 (file)
@@ -80,6 +80,12 @@ module Evoruby
       indices = Array.new()
       for i in 0 ... get_number_of_seqs()
         current_name = get_sequence( i ).get_name()
+        if case_sensitive && !partial_match
+          if !@name_to_seq_indices.has_key?( current_name )
+            @name_to_seq_indices[ current_name ] = []
+          end
+          @name_to_seq_indices[ current_name ].push( i )
+        end
         if !case_sensitive
           current_name = current_name.downcase
           name = name.downcase
@@ -89,9 +95,6 @@ module Evoruby
           indices.push( i )
         end
       end
-      if case_sensitive && !partial_match
-        @name_to_seq_indices[ name ] = indices
-      end
       indices
     end
 
@@ -133,6 +136,12 @@ module Evoruby
       for i in 0 ... get_number_of_seqs()
         get_sequence( i ).get_name() =~ /^\s*(\S+)/
         current_name = $1
+        if case_sensitive
+          if !@namestart_to_seq_indices.has_key?( current_name )
+            @namestart_to_seq_indices[ current_name ] = []
+          end
+          @namestart_to_seq_indices[ current_name ].push( i )
+        end
         if !case_sensitive
           current_name = current_name.downcase
           name = name.downcase
@@ -141,9 +150,6 @@ module Evoruby
           indices.push( i )
         end
       end
-      if case_sensitive
-        @namestart_to_seq_indices[ name ] = indices
-      end
       indices
     end