From: cmzmasek@gmail.com Date: Thu, 28 Nov 2013 00:05:53 +0000 (+0000) Subject: inprogress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9adbaa1f8ed31fbec2e285b694ac42a437d255a8;p=jalview.git inprogress --- diff --git a/forester/ruby/evoruby/lib/evo/tool/multi_sequence_extractor.rb b/forester/ruby/evoruby/lib/evo/tool/multi_sequence_extractor.rb index ffabc45..e5bb182 100644 --- a/forester/ruby/evoruby/lib/evo/tool/multi_sequence_extractor.rb +++ b/forester/ruby/evoruby/lib/evo/tool/multi_sequence_extractor.rb @@ -41,6 +41,9 @@ module Evoruby NORMALIZED_IDS_MAP_SUFFIX = ".nim" PROTEINS_LIST_FILE_SEPARATOR = "\t" + def initialize() + @file_to_msa = Hash.new + end def run() @@ -464,8 +467,6 @@ module Evoruby Util.fatal_error( PRG_NAME, "error: " + e.to_s ) end end - - end @@ -537,6 +538,10 @@ module Evoruby end def read_fasta_file( input ) + if @file_to_msa.has_key?( input ) + return @file_to_msa[ input ] + end + f = MsaFactory.new() msa = nil begin @@ -544,6 +549,9 @@ module Evoruby rescue Exception => e Util.fatal_error( PRG_NAME, "error: " + e.to_s ) end + if @file_to_msa.size < 500 + @file_to_msa[ input ] = msa + end msa end