- def test_Seq_quality_trim_right_with_missing_seq_raises
- @entry.qual = "hhhh"
- assert_raise(SeqError) { @entry.quality_trim_right(20) }
- end
-
- def test_Seq_quality_trim_right_with_missing_qual_raises
- @entry.seq = "ATCG"
- assert_raise(SeqError) { @entry.quality_trim_right(20) }
- end
-
- def test_Seq_quality_trim_right_with_bad_min_raises
- @entry.seq = "ATCG"
- @entry.qual = "hhhh"
-
- [-1, 41].each do |min|
- assert_raise(SeqError) { @entry.quality_trim_right(min) }
- end
- end
-
- def test_Seq_quality_trim_right_with_ok_min_dont_raise
- @entry.seq = "ATCG"
- @entry.qual = "hhhh"
-
- [0, 40].each do |min|
- assert_nothing_raised { @entry.quality_trim_right(min) }
- end
- end
-
- def test_Seq_quality_trim_right_returns_correctly
- @entry.seq = "AAAAATCG"
- @entry.qual = "hhhhhgfe"
- @entry.quality_trim_right(38)
- assert_equal("AAAAAT", @entry.seq)
- assert_equal("hhhhhg", @entry.qual)
- end
-
- def test_Seq_quality_trim_left_with_missing_seq_raises
- @entry.qual = "hhhh"
- assert_raise(SeqError) { @entry.quality_trim_left(20) }
- end
-
- def test_Seq_quality_trim_left_with_missing_qual_raises
- @entry.seq = "ATCG"
- assert_raise(SeqError) { @entry.quality_trim_left(20) }
- end
-
- def test_Seq_quality_trim_left_with_bad_min_raises
- @entry.seq = "ATCG"
- @entry.qual = "hhhh"
-
- [-1, 41].each do |min|
- assert_raise(SeqError) { @entry.quality_trim_left(min) }
- end
- end
-
- def test_Seq_quality_trim_left_with_ok_min_dont_raise
- @entry.seq = "ATCG"
- @entry.qual = "hhhh"
-
- [0, 40].each do |min|
- assert_nothing_raised { @entry.quality_trim_left(min) }
- end
- end
-
- def test_Seq_quality_trim_left_returns_correctly
- @entry.seq = "GCTAAAAA"
- @entry.qual = "efghhhhh"
- @entry.quality_trim_left(38)
- assert_equal("TAAAAA", @entry.seq)
- assert_equal("ghhhhh", @entry.qual)
- end
-
- def test_Seq_quality_trim_returns_correctly
- @entry.seq = "GCTAAAAAGTG"
- @entry.qual = "efghhhhhgfe"
- @entry.quality_trim(38)
- assert_equal("TAAAAAG", @entry.seq)
- assert_equal("ghhhhhg", @entry.qual)
- end
-
- def test_Seq_indels_remove_without_qual_returns_correctly