class Seq
#include Patscan
include PatternMatcher
- include BackTrack
include Digest
include Trim
self
end
+ # Method that determines if a quality score string can be
+ # absolutely identified as base 33.
+ def qual_base33?
+ self.qual.match(/[!-:]/)
+ end
+
+ # Method that determines if a quality score string can be
+ # absolutely identified as base 64.
+ def qual_base64?
+ self.qual.match(/[K-h]/)
+ end
+
# Method to convert quality scores inbetween formats.
# Sanger base 33, range 0-40
+ # 454 base 64, range 0-40
# Solexa base 64, range -5-40
# Illumina13 base 64, range 0-40
# Illumina15 base 64, range 3-40
case from.downcase
when "sanger" then na_qual -= 33
+ when "454" then na_qual -= 64
when "solexa" then na_qual -= 64
when "illumina13" then na_qual -= 64
when "illumina15" then na_qual -= 64
case to.downcase
when "sanger" then na_qual += 33
+ when "454" then na_qual += 64
when "solexa" then na_qual += 64
when "illumina13" then na_qual += 64
when "illumina15" then na_qual += 64