inprogress
[jalview.git] / forester / ruby / evoruby / lib / evo / tool / phylogenies_decorator.rb
index c9f37ae..b2d5a87 100644 (file)
@@ -166,7 +166,8 @@ module Evoruby
           log << counter.to_s + ': ' + phylogeny_file + ' -> ' +  outfile + NL
 
           phylogeny_id = get_id( phylogeny_file )
-
+          puts "id:" + phylogeny_id
+          
           ids_mapfile_name = nil
           domains_mapfile_name = nil
           seqs_file_name = nil
@@ -242,27 +243,19 @@ module Evoruby
 
     def get_file( files_in_dir, phylogeny_id, suffix_pattern )
       matching_files = Array.new
-      matching_suffix_files = Array.new
+     
       files_in_dir.each { | file |
 
         if ( !File.directory?( file ) &&
              file !~ /^\./ &&
              file !~ /^00/ &&
-             file =~ /^#{phylogeny_id}.*#{suffix_pattern}$/ )
+             file =~ /^#{phylogeny_id}#{suffix_pattern}$/ )
           matching_files << file
         end
-        if ( !File.directory?( file ) &&
-             file !~ /^\./ &&
-             file !~ /^00/ &&
-             file =~ /#{suffix_pattern}$/ )
-          matching_suffix_files << file
-        end
       }
-      if matching_files.length < 1 && matching_suffix_files.length == 1
-        return matching_suffix_files[ 0 ]
-      end
+    
 
-      if matching_files.length < 1 && matching_suffix_files.length < 1
+      if matching_files.length < 1
         Util.fatal_error( PRG_NAME, 'no file matching [' + phylogeny_id +
            '_] [' + suffix_pattern + '] present in current directory' )
       end
@@ -284,7 +277,6 @@ module Evoruby
              file =~ /^#{phylogeny_id}.+\d$/ )
           matching_files << file
         end
-
       }
 
       if matching_files.length < 1