- case options[:method].to_s
- when "uclust" then uclust.cluster
- when "usearch" then uclust.usearch
- when "usearch_uclust" then uclust.usearch_uclust
- end
+hash = {}
+
+uc.each do |record|
+ hash[record[:Q_ID].to_sym] = record.dup
+end
+
+Biopieces.open(file_records, options[:stream_out]) do |input, output|
+ input.each_record do |record|
+ if record.has_key? :SEQ_NAME and record.has_key? :SEQ
+ if hash.has_key? record[:SEQ_NAME].to_sym
+ uc = hash[record[:SEQ_NAME].to_sym]
+ record[:CLUSTER] = uc[:CLUSTER].to_i
+ record[:IDENT] = uc[:IDENT].to_i
+ record[:IDENT] = '*' if uc[:TYPE] == 'S'
+ end
+ end