X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fshred_seq;h=322916426e606dd11259eb6f34757486296e039d;hb=25a6b40e414b3a6465f18239f37a980d77d6e062;hp=465f08855bec36eb769bf319e34b5c5ff25d0d61;hpb=b982cc677363d7458963b610ec53bf2c4f7476a9;p=biopieces.git diff --git a/bp_bin/shred_seq b/bp_bin/shred_seq index 465f088..3229164 100755 --- a/bp_bin/shred_seq +++ b/bp_bin/shred_seq @@ -83,9 +83,9 @@ options = Biopieces.options_parse(ARGV, casts) Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| input.each_record do |record| - if record.has_key? :SEQ and record[:SEQ].length >= options[:size] - entry = Seq.new(record[:SEQ_NAME], record[:SEQ], record[:SCORES]) - entry.type = 'dna' + if record[:SEQ] and record[:SEQ].length >= options[:size] + entry = Seq.new_bp(record) + entry.type = :dna entry.shred(options[:size], options[:coverage]) do |subentry| output.puts subentry.to_bp