]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixing broken biopieces
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 13 Oct 2011 11:40:44 +0000 (11:40 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 13 Oct 2011 11:40:44 +0000 (11:40 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1562 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/blast_seq_pair
bp_bin/find_adaptor
bp_bin/patscan_seq

index 18b2b5bd404a6fab75f3cf638463a6e08e32f84d..d0488c2571a492fcf4f6e3729c3a465f069e9fcb 100755 (executable)
@@ -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
index b550e630860ed06f4b29fbb6adfd033dc6130784..290af5a19dfa5da0614f0ea911ec1c6c636bf63c 100755 (executable)
@@ -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
index 194aaae7c812c42f6790d57272cf858bd8918d4f..1b533a9ebee71f22ed6b769371bcc7b607d4bcfa 100755 (executable)
@@ -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