self
end
+ # Method to add two Seq objects.
+ def +(entry)
+ new_entry = Seq.new()
+ new_entry.seq = self.seq + entry.seq
+ new_entry.type = self.type if self.type == entry.type
+ new_entry.qual = self.qual + entry.qual if self.qual and entry.qual
+ new_entry
+ end
+
# Method to concatenate sequence entries.
def <<(entry)
raise SeqError, "sequences of different types" unless self.type == entry.type
hash[:CLIP_QUAL_RIGHT] = self.clip_qual_right - 1
hash[:CLIP_ADAPTOR_LEFT] = self.clip_adapter_left - 1
hash[:CLIP_ADAPTOR_RIGHT] = self.clip_adaptor_right - 1
- hash[:SCORES] = self.quality_scores.map { |i| (i += 64).chr }.join ""
+ hash[:SCORES] = self.quality_scores.map { |i| (i += Seq::SCORE_BASE).chr }.join ""
hash[:X_POS] = self.x_pos
hash[:Y_POS] = self.y_pos
# Method that converts a Read object's data to a Seq object.
def to_seq
- Seq.new(self.name, self.bases, nil, self.quality_scores.map { |i| (i += 64).chr }.join("") )
+ Seq.new(self.name, self.bases, nil, self.quality_scores.map { |i| (i += Seq::SCORE_BASE).chr }.join("") )
end
# Method that soft masks the sequence (i.e. lowercases sequence) according to