X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fpatscan_seq;h=1b533a9ebee71f22ed6b769371bcc7b607d4bcfa;hb=6b4c2afa4b4b581a9c36083a1d059e846ee4b560;hp=ef217c559298293d0fdec522e77b9d46c1af535e;hpb=1d849d14e996265619752ead2a5e35356b54cca1;p=biopieces.git diff --git a/bp_bin/patscan_seq b/bp_bin/patscan_seq index ef217c5..1b533a9 100755 --- a/bp_bin/patscan_seq +++ b/bp_bin/patscan_seq @@ -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 @@ -180,6 +182,8 @@ Biopieces.open(tmp_file, options[:stream_out]) do |input, output| output.puts record end + else + output.puts record end else output.puts record