From 4a28a6795c9170f35eb1bf698055d5a730d7839a Mon Sep 17 00:00:00 2001 From: "cmzmasek@gmail.com" Date: Wed, 16 Jan 2013 22:27:30 +0000 Subject: [PATCH] inprogress --- forester/ruby/evoruby/exe/select_same_gn.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/forester/ruby/evoruby/exe/select_same_gn.rb b/forester/ruby/evoruby/exe/select_same_gn.rb index e3d5132..97887a9 100755 --- a/forester/ruby/evoruby/exe/select_same_gn.rb +++ b/forester/ruby/evoruby/exe/select_same_gn.rb @@ -25,6 +25,7 @@ module Evoruby end all_names = Set.new + all_seqs = Set.new gn_to_seqs = Hash.new unique_genes_msa = Msa.new longest_non_unique_genes_msa = Msa.new @@ -38,11 +39,18 @@ module Evoruby seq = msa.get_sequence( i ) name = seq.get_name if all_names.include?( name ) - puts "error: " + name + " is not unique" + puts "error: " + name + " is not unique (#" + i + ")" + exit else all_names << name end - + mol_seq = seq.get_sequence_as_string.upcase + if all_seqs.include?( mol_seq ) + puts "error: sequence of " + name + " is not unique (#" + i + ")" + exit + else + all_seqs << mol_seq + end if fragment_re.match( name ) puts "ignored because fragment: " + name -- 1.7.10.2