]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed unit tests for reverse and revcomp in seq.rb
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 1 Nov 2011 13:43:51 +0000 (13:43 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 1 Nov 2011 13:43:51 +0000 (13:43 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1607 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/lib/maasha/seq.rb
code_ruby/test/maasha/test_seq.rb

index 037f99dd9317a8c4057aae478cbcaefa2e9c9263..c1ce2daed2ca8f773cb2d985afc4c04238a02939 100644 (file)
@@ -239,6 +239,7 @@ class Seq
   def reverse
     self.seq.reverse!
     self.qual.reverse! if self.qual
+    self
   end
 
   # Method that complements sequence including ambiguity codes.
@@ -327,6 +328,24 @@ class Seq
     self.subseq(start, length)
   end
 
+  def quality_trim(min)
+  end
+
+  def quality_trim_right(min)
+  end
+
+  def quality_trim_left(min)
+  end
+
+  def quality_trim!(min)
+  end
+
+  def quality_trim_right!(min)
+  end
+
+  def quality_trim_left!(min)
+  end
+
   # Method that returns the residue compositions of a sequence in
   # a hash where the key is the residue and the value is the residue
   # count.
index 78a6543792350dd7692c37137b34ea1532c8d86e..29990b7b5fe2d9fcbb78dea19afc8f9c485b70d0 100755 (executable)
@@ -196,7 +196,7 @@ class TestSeq < Test::Unit::TestCase
 
   def test_Seq_reverse_returns_correctly
     @entry.seq = "ATCG"
-    assert_equal("GCTA", @entry.reverse)
+    assert_equal("GCTA", @entry.reverse.seq)
   end
 
   def test_Seq_complement_raises_if_no_sequence
@@ -225,13 +225,13 @@ class TestSeq < Test::Unit::TestCase
   def test_Seq_reverse_complement_for_DNA_is_correct
     @entry.seq  = 'ATCGatcg'
     @entry.type = 'dna'
-    assert_equal("cgatCGAT", @entry.reverse_complement)
+    assert_equal("cgatCGAT", @entry.reverse_complement.seq)
   end
 
   def test_Seq_reverse_complement_for_RNA_is_correct
     @entry.seq  = 'AUCGaucg'
     @entry.type = 'rna'
-    assert_equal("cgauCGAU", @entry.reverse_complement)
+    assert_equal("cgauCGAU", @entry.reverse_complement.seq)
   end
 
   def test_Seq_hamming_distance_returns_correctly