From: martinahansen Date: Tue, 7 Feb 2012 14:34:26 +0000 (+0000) Subject: added raw data reading to read_fasta and read_fastq X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=144447a01acd669161794a3ca0d034bf99323840;p=biopieces.git added raw data reading to read_fasta and read_fastq git-svn-id: http://biopieces.googlecode.com/svn/trunk@1748 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/bp_bin/read_fasta b/bp_bin/read_fasta index b267d30..82a69a2 100755 --- a/bp_bin/read_fasta +++ b/bp_bin/read_fasta @@ -38,8 +38,10 @@ casts << {:long=>'num', :short=>'n', :type=>'uint', :mandatory=>false, :de options = Biopieces.options_parse(ARGV, casts) Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| - input.each_record do |record| - output.puts record + unless options[:data_in].first == '-' + input.each_record do |record| + output.puts record + end end num = 0 diff --git a/bp_bin/read_fastq b/bp_bin/read_fastq index 923a3b0..8fec43b 100755 --- a/bp_bin/read_fastq +++ b/bp_bin/read_fastq @@ -44,8 +44,10 @@ num = 0 last = false Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| - input.each_record do |record| - output.puts record + unless options[:data_in].first == '-' + input.each_record do |record| + output.puts record + end end if options.has_key? :data_in