From 769e942ad9e37461498afd0c91175e95d9ed0f08 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Thu, 13 Oct 2011 11:40:44 +0000 Subject: [PATCH] fixing broken biopieces git-svn-id: http://biopieces.googlecode.com/svn/trunk@1562 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/blast_seq_pair | 6 ++++-- bp_bin/find_adaptor | 5 ++++- bp_bin/patscan_seq | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/bp_bin/blast_seq_pair b/bp_bin/blast_seq_pair index 18b2b5b..d0488c2 100755 --- a/bp_bin/blast_seq_pair +++ b/bp_bin/blast_seq_pair @@ -165,9 +165,11 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| output.puts record if record.has_key? :SEQ_NAME and record.has_key? :SEQ + seq = Seq.new_bp(record) + unless got1 Fasta.open(infile1, mode="w") do |fasta_io| - fasta_io.puts record + fasta_io.puts seq.to_fasta end got1 = true @@ -177,7 +179,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| unless got2 Fasta.open(infile2, mode="w") do |fasta_io| - fasta_io.puts record + fasta_io.puts seq.to_fasta end got2 = true diff --git a/bp_bin/find_adaptor b/bp_bin/find_adaptor index b550e63..290af5a 100755 --- a/bp_bin/find_adaptor +++ b/bp_bin/find_adaptor @@ -203,7 +203,10 @@ Biopieces.open(options[:stream_in], file_records) do |input, output| if record.has_key? :SEQ record[:SEQ_NAME] = number_seq - out_fa.puts record + + seq = Seq.new_bp(record) + + out_fa.puts seq.to_fasta number_seq += 1; bases += record[:SEQ].length diff --git a/bp_bin/patscan_seq b/bp_bin/patscan_seq index 194aaae..1b533a9 100755 --- a/bp_bin/patscan_seq +++ b/bp_bin/patscan_seq @@ -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 -- 2.39.5