inprogress
[jalview.git] / forester / ruby / evoruby / lib / evo / io / parser / hmmscan_domain_extractor.rb
index 5d03737..39a0088 100644 (file)
@@ -20,7 +20,7 @@ module Evoruby
 
   class HmmscanDomainExtractor
 
-    ADD_TO_CLOSE_PAIRS = 20
+    ADD_TO_CLOSE_PAIRS = 0
 
     def initialize
     end
@@ -388,8 +388,10 @@ module Evoruby
                   from = 1
                 end
                 to = to + ADD_TO_CLOSE_PAIRS
-                if to > in_msa.get_length
-                  to = in_msa.get_length
+                temp_seqs = in_msa.find_by_name_start( seq_name, true )
+                temp_seq = in_msa.get_sequence( temp_seqs[ 0 ] )
+                if to >  temp_seq.get_length
+                  to =  temp_seq.get_length
                 end
               end
 
@@ -397,7 +399,7 @@ module Evoruby
                 index.to_s  + "+" + ( index + 1 ).to_s,
                 actual_out_of,
                 from,
-                hmmscan_data.env_to,
+                to,
                 in_msa,
                 out_msa_pairs,
                 add_position,