X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fblast_seq_pair;h=d0488c2571a492fcf4f6e3729c3a465f069e9fcb;hb=c401b3387e7713ee622638150609f11ee9305928;hp=0bf097a32f93855864b483d36d30a69b68a111ee;hpb=d601abd09e300fec46b76b9a905afa115ad6429f;p=biopieces.git diff --git a/bp_bin/blast_seq_pair b/bp_bin/blast_seq_pair index 0bf097a..d0488c2 100755 --- a/bp_bin/blast_seq_pair +++ b/bp_bin/blast_seq_pair @@ -143,7 +143,7 @@ ok_programs = "blastn,blastp,tblastn,blastx,tblastx" casts = [] casts << {:long=>'program', :short=>'p', :type=>'string', :mandatory=>false, :default=>nil, :allowed=>ok_programs, :disallowed=>nil} -casts << {:long=>'e_val', :short=>'e', :type=>'float', :mandatory=>false, :default=>10, :allowed=>nil, :disallowed=>nil} +casts << {:long=>'e_val', :short=>'e', :type=>'float', :mandatory=>false, :default=>10.0, :allowed=>nil, :disallowed=>nil} casts << {:long=>'filter', :short=>'f', :type=>'string', :mandatory=>false, :default=>'no', :allowed=>'yes,no', :disallowed=>nil} casts << {:long=>'megablast', :short=>'m', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil} casts << {:long=>'no_gaps', :short=>'G', :type=>'flag', :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil} @@ -165,18 +165,21 @@ 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 type1 = Seq.new(nil, record[:SEQ][0 ... 100]).type_guess + next end unless got2 Fasta.open(infile2, mode="w") do |fasta_io| - fasta_io.puts record + fasta_io.puts seq.to_fasta end got2 = true