]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/patscan_seq
added coverage to find_SNPs
[biopieces.git] / bp_bin / patscan_seq
index e09efde94bda61796dd7bf44fd63c2622312e612..1b533a9ebee71f22ed6b769371bcc7b607d4bcfa 100755 (executable)
@@ -46,7 +46,7 @@ class Patscan
   end
 
   # Method to run Patscan
-  def run(comp = nil, type = nil, max_mis = nil, max_hit = nil, verbose = nil)
+  def run(comp = nil, type = nil, max_hit = nil, max_mis = nil, verbose = nil)
     args = []
     args << "scan_for_matches"
     args << "-c"            if comp
@@ -146,14 +146,16 @@ Biopieces.open(options[:stream_in], tmp_file) do |input, output|
         record[:SEQ_NAME] = seq_name_count
         seq_name_count += 1
 
+        seq = Seq.new_bp(record)
+
         if seq_type.nil?
-          seq      = Seq.new("", record[:SEQ])
           seq_type = seq.type_guess
         end
+
+        fasta_io.puts seq.to_fasta
       end
 
       output.puts record
-      fasta_io.puts record
     end
   end
 end