]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_ruby/lib/maasha/seq.rb
fixed score base bug in sff.rb
[biopieces.git] / code_ruby / lib / maasha / seq.rb
index 91e79295039e7f8e572efa0ceaf231e8e91c1bd4..d8a73d31ba8d660fa08bb6aac9c0c24f91137151 100644 (file)
@@ -416,6 +416,15 @@ class Seq
     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