@qual = qual
end
+ # Method that guesses and returns the sequence type
+ # by inspecting the first 100 residues.
+ def type_guess
+ raise SeqError, "Guess failed: sequence is nil" if self.seq.nil?
+
+ case self.seq[0 ... 100].downcase
+ when /[flpqie]/ then return "protein"
+ when /[u]/ then return "rna"
+ else return "dna"
+ end
+ end
+
+ # Method that guesses and sets the sequence type
+ # by inspecting the first 100 residues.
+ def type_guess!
+ self.type = self.type_guess
+ end
+
# Returns the length of a sequence.
def length
self.seq.nil? ? 0 : self.seq.length