]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/uclust_seq
removed debug message
[biopieces.git] / bp_bin / uclust_seq
index f155bdf53f06328bfe5d0c62232a667d3ee45d2c..5b162c414c2cdb249b4c2a518d1ca61062205e41 100755 (executable)
@@ -33,9 +33,10 @@ require 'maasha/fasta'
 require 'maasha/usearch'
 
 casts = []
-casts << {:long=>'no_sort',  :short=>'n', :type=>'flag',   :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
-casts << {:long=>'comp',     :short=>'c', :type=>'flag',   :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}
-casts << {:long=>'identity', :short=>'i', :type=>'float',  :mandatory=>true,  :default=>0.9, :allowed=>nil, :disallowed=>nil}
+casts << {long: 'no_sort',  short: 'n', type: 'flag',  mandatory: false, default: nil, allowed: nil, disallowed: nil}
+casts << {long: 'comp',     short: 'c', type: 'flag',  mandatory: false, default: nil, allowed: nil, disallowed: nil}
+casts << {long: 'identity', short: 'i', type: 'float', mandatory: true,  default: 0.9, allowed: nil, disallowed: nil}
+casts << {long: 'cpus',     short: 'C', type: 'uint',  mandatory: false, default: 1,   allowed: nil, disallowed: "0"}
 
 options = Biopieces.options_parse(ARGV, casts)
 
@@ -70,8 +71,8 @@ end
 Biopieces.open(file_records, options[:stream_out]) do |input, output|
   input.each_record do |record|
     if record[:SEQ_NAME] and record[:SEQ]
-      if hash[record[:SEQ_NAME].to_sym]
-        us = hash[record[:SEQ_NAME].to_sym]
+      seq_name = record[:SEQ_NAME].split(/\s+/).first.to_sym
+      if us = hash[seq_name]
         record[:CLUSTER] = us[:CLUSTER].to_i
         record[:IDENT]   = us[:IDENT].to_i
         record[:IDENT] = '*' if us[:TYPE] == 'S'