#!/usr/bin/env ruby
-# Copyright (C) 2007-2011 Martin A. Hansen.
+# Copyright (C) 2007-2013 Martin A. Hansen.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
options = Biopieces.options_parse(ARGV, casts)
-num = 0
-last = false
+num = 0
+first = true
+last = false
Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
unless options[:data_in] and options[:data_in].first == '-'
end
entry.convert_scores!(encoding, 'illumina13')
+
+ if first
+ raise SeqError, "Quality score outside valid range" unless entry.qual_valid?('illumina13')
+ first = false
+ end
+
output.puts entry.to_bp
num += 1