Esempio n. 1
0
 def test_drop_similar_different_lengths(self):
     c1 = Contig(
         'atcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatcgatcgatatgggcatcagc',
         2)
     c2 = Contig(
         'atcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatcgatcgatagggcatcagc',
         1)
     result = filter_contigs([c2, c1], 0.10)
     self.assertEqual(1, len(result))
     self.assertEqual(c1.seq, result[0].seq)
Esempio n. 2
0
 def test_drop_similar_different_lengths(self):
     c1 = Contig(
         'atcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatcgatcgatatgggcatcagc',
         2,
     )
     c2 = Contig(
         'atcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatatcgatcgatcgatcgatcgatcgatagggcatcagc',
         1,
     )
     result = filter_contigs([c2, c1], 0.10)
     assert len(result) == 1
     assert result[0].seq == c1.seq
Esempio n. 3
0
 def test_retain_disimilar_different_lengths(self):
     c1 = Contig('atcgatcgatcgatcgatcgatcgatatagggcatcagc', 2)
     c2 = Contig('atcgatcgatcgatcgatcgatcccgtgatatagggcatcagc', 1)
     result = filter_contigs([c2, c1], 0.10)
     self.assertEqual(2, len(result))
Esempio n. 4
0
 def test_retain_disimilar(self):
     c1 = Contig('atcgatcgatcgatcgatcgatcgatatagggcatcagc', 2)
     c2 = Contig('atcgadatcgatcgatcgatctgtdstcgatatagggca', 1)
     result = filter_contigs([c2, c1], 0.10)
     self.assertEqual(2, len(result))
Esempio n. 5
0
 def test_drop_alt_allele_by_score(self):
     c1 = Contig('atcgatcgatcgatcgatcgatcgatatagggcatcagc', 2)
     c2 = Contig('atcgatcgatcgatcgatctatcgatatagggcatcagc', 1)
     result = filter_contigs([c2, c1], 0.10)
     self.assertEqual(1, len(result))
     self.assertEqual(c1.seq, result[0].seq)
Esempio n. 6
0
 def test_drop_reverse_complement(self):
     c1 = Contig('atcgatcgatcgatcgatcgatcgatatagggcatcagc', 1)
     c2 = Contig('gctgatgccctatatcgatcgatcgatcgatcgatcgat', 1)
     result = filter_contigs([c2, c1], 0.10)
     self.assertEqual(1, len(result))
     self.assertEqual(c1.seq, result[0].seq)
Esempio n. 7
0
 def test_drop_alt_allele_by_score(self):
     c1 = Contig('atcgatcgatcgatcgatcgatcgatatagggcatcagc', 2)
     c2 = Contig('atcgatcgatcgatcgatctatcgatatagggcatcagc', 1)
     result = filter_contigs([c2, c1], 0.10)
     assert len(result) == 1
     assert result[0].seq == c1.seq
Esempio n. 8
0
 def test_drop_reverse_complement(self):
     c1 = Contig('atcgatcgatcgatcgatcgatcgatatagggcatcagc', 1)
     c2 = Contig('gctgatgccctatatcgatcgatcgatcgatcgatcgat', 1)
     result = filter_contigs([c2, c1], 0.10)
     assert len(result) == 1
     assert result[0].seq == c1.seq