+ def get_seq_file( files_in_dir, phylogeny_id )
+ matching_files = Array.new
+
+ files_in_dir.each { | file |
+
+ if ( !File.directory?( file ) &&
+ file !~ /^\./ &&
+ file !~ /^00/ &&
+ ( file =~ /^#{phylogeny_id}__.+\d$/ || file =~ /^#{phylogeny_id}_.*\.fasta$/ ) )
+ matching_files << file
+ end
+ }
+
+ if matching_files.length < 1
+ Util.fatal_error( PRG_NAME, 'no seq file matching [' +
+ phylogeny_id + '_] present in current directory' )
+ end
+ if matching_files.length > 1
+ Util.fatal_error( PRG_NAME, 'more than one seq file matching [' +
+ phylogeny_id + '_] present in current directory' )
+ end
+ matching_files[ 0 ]
+ end
+
+