Ejemplo n.º 1
0
 def testVariantsFromAlignment4(self):
     a = PairwiseAlignment("GA-TACA", "GATTACA")
     qvs = [0, 0, 1, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     EQ([
         Variant(1,
                 1002,
                 1002,
                 "",
                 "T",
                 confidence=1,
                 refPrev="A",
                 readPrev="A")
     ], vs)
Ejemplo n.º 2
0
 def testVariantsFromAlignment5(self):
     a = PairwiseAlignment("-ATTACA", "GATTACA")
     qvs = [1, 0, 0, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     EQ([
         Variant(1,
                 1000,
                 1000,
                 "",
                 "G",
                 confidence=1,
                 refPrev="N",
                 readPrev="N")
     ], vs)
Ejemplo n.º 3
0
 def testDeletionConfidence1(self):
     a = PairwiseAlignment("GATTACA", "GATTAC-")
     qvs = [0, 0, 0, 0, 0, 1]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     EQ([
         Variant(1,
                 1006,
                 1007,
                 "A",
                 "",
                 confidence=1,
                 refPrev="C",
                 readPrev="C")
     ], vs)
Ejemplo n.º 4
0
 def testLongDeletion(self):
     a = PairwiseAlignment("GACCCCCTTACA", "GA-----TTACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     assert_equal([Variant(1, 1002, 1007, "CCCCC", "")], vs)
Ejemplo n.º 5
0
 def testVariantsFromAlignment4(self):
     a = PairwiseAlignment("GA-TACA", "GATTACA")
     qvs = [0, 0, 1, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     assert_equal([Variant(1, 1002, 1002, "", "T", confidence=1)], vs)
 def testVariantsFromAlignment3(self):
     a = PairwiseAlignment("GATTACA", "GAGGACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([ Variant(1, 1002, 1004, "TT", "GG", refPrev="A", readPrev="A") ], vs)
Ejemplo n.º 7
0
 def testDeletionConfidence3(self):
     a = PairwiseAlignment("AT", "--")
     qvs = []
     vs =  utils.variantsFromAlignment(a, (1, 1000, 1002), qvs)
     assert_equal([ Variant(1, 1000, 1002, "AT", "") ], vs)
 def testNoCallBasesInReference1(self):
     a = PairwiseAlignment("GATTNGATT", "GAGGATATT")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([ Variant(1, 1002, 1004, "TT", "GG", refPrev="A", readPrev="A"),
          Variant(1, 1005, 1006, "G",  "T", refPrev="N", readPrev="A")   ], vs)
Ejemplo n.º 9
0
 def testVariantsFromAlignment4(self):
     a = PairwiseAlignment("GA-TACA", "GATTACA")
     qvs = [0, 0, 1, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     assert_equal([ Variant(1, 1002, 1002, "", "T", confidence=1) ], vs)
Ejemplo n.º 10
0
 def testVariantsFromAlignment1(self):
     a = PairwiseAlignment("GATTACA", "GAT-ACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     assert_equal([Variant(1, 1003, 1004, "T", "")], vs)
Ejemplo n.º 11
0
 def testDeletionConfidence3(self):
     a = PairwiseAlignment("AT", "--")
     qvs = []
     vs = utils.variantsFromAlignment(a, (1, 1000, 1002), qvs)
     EQ([Variant(1, 1000, 1002, "AT", "", refPrev="N", readPrev="N")], vs)
 def testDeletionConfidence2(self):
     a = PairwiseAlignment("GATTACA", "-ATTACA")
     qvs = [1, 0, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     EQ([ Variant(1, 1000, 1001, "G", "", confidence=1, refPrev="N", readPrev="N") ], vs)
 def testDeletionConfidence3(self):
     a = PairwiseAlignment("AT", "--")
     qvs = []
     vs =  utils.variantsFromAlignment(a, (1, 1000, 1002), qvs)
     EQ([ Variant(1, 1000, 1002, "AT", "", refPrev="N", readPrev="N") ], vs)
 def testDeletionConfidence1(self):
     a = PairwiseAlignment("GATTACA", "GATTAC-")
     qvs = [0, 0, 0, 0, 0, 1]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     EQ([ Variant(1, 1006, 1007, "A", "", confidence=1, refPrev="C", readPrev="C") ], vs)
 def testTwoSubstitutions(self):
     a = PairwiseAlignment("GATTACA", "GAGTAGA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([ Variant(1, 1002, 1003, "T", "G", refPrev="A", readPrev="A"),
          Variant(1, 1005, 1006, "C", "G", refPrev="A", readPrev="A") ], vs)
 def testLongDeletion(self):
     a = PairwiseAlignment("GACCCCCTTACA", "GA-----TTACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([ Variant(1, 1002, 1007, "CCCCC", "", refPrev="A", readPrev="A") ], vs)
Ejemplo n.º 17
0
 def testDeletionConfidence1(self):
     a = PairwiseAlignment("GATTACA", "GATTAC-")
     qvs = [0, 0, 0, 0, 0, 1]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     assert_equal([Variant(1, 1006, 1007, "A", "", confidence=1)], vs)
Ejemplo n.º 18
0
 def testVariantsFromAlignment3(self):
     a = PairwiseAlignment("GATTACA", "GAGGACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([Variant(1, 1002, 1004, "TT", "GG", refPrev="A", readPrev="A")], vs)
Ejemplo n.º 19
0
 def testDeletionConfidence2(self):
     a = PairwiseAlignment("GATTACA", "-ATTACA")
     qvs = [1, 0, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     assert_equal([Variant(1, 1000, 1001, "G", "", confidence=1)], vs)
Ejemplo n.º 20
0
 def testLongDeletion(self):
     a = PairwiseAlignment("GACCCCCTTACA", "GA-----TTACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     assert_equal([ Variant(1, 1002, 1007, "CCCCC", "") ], vs)
Ejemplo n.º 21
0
 def testDeletionConfidence3(self):
     a = PairwiseAlignment("AT", "--")
     qvs = []
     vs = utils.variantsFromAlignment(a, (1, 1000, 1002), qvs)
     assert_equal([Variant(1, 1000, 1002, "AT", "")], vs)
Ejemplo n.º 22
0
 def testDeletionConfidence1(self):
     a = PairwiseAlignment("GATTACA", "GATTAC-")
     qvs = [0, 0, 0, 0, 0, 1]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     assert_equal([ Variant(1, 1006, 1007, "A", "", confidence=1) ], vs)
Ejemplo n.º 23
0
 def testNoCallBasesInReference1(self):
     a = PairwiseAlignment("GATTNGATT", "GAGGATATT")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     assert_equal([ Variant(1, 1002, 1004, "TT", "GG"),
                    Variant(1, 1005, 1006, "G",  "T")   ], vs)
 def testVariantsFromAlignment4(self):
     a = PairwiseAlignment("GA-TACA", "GATTACA")
     qvs = [0, 0, 1, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     EQ([ Variant(1, 1002, 1002, "", "T", confidence=1, refPrev="A", readPrev="A") ], vs)
Ejemplo n.º 25
0
 def testTwoSubstitutions(self):
     a = PairwiseAlignment("GATTACA", "GAGTAGA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     assert_equal([ Variant(1, 1002, 1003, "T", "G"),
                    Variant(1, 1005, 1006, "C", "G") ], vs)
Ejemplo n.º 26
0
 def testLongDeletion(self):
     a = PairwiseAlignment("GACCCCCTTACA", "GA-----TTACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([Variant(1, 1002, 1007, "CCCCC", "", refPrev="A", readPrev="A")],
        vs)
Ejemplo n.º 27
0
 def testDeletionConfidence2(self):
     a = PairwiseAlignment("GATTACA", "-ATTACA")
     qvs = [1, 0, 0, 0, 0, 0]
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000), qvs)
     assert_equal([ Variant(1, 1000, 1001, "G", "", confidence=1) ], vs)
Ejemplo n.º 28
0
 def testVariantsFromAlignment1(self):
     a = PairwiseAlignment("GATTACA", "GAT-ACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([Variant(1, 1003, 1004, "T", "", refPrev="T", readPrev="T")], vs)
Ejemplo n.º 29
0
 def testVariantsFromAlignment1(self):
     a = PairwiseAlignment("GATTACA", "GAT-ACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     assert_equal([ Variant(1, 1003, 1004, "T", "") ], vs)
 def testVariantsFromAlignment1(self):
     a = PairwiseAlignment("GATTACA", "GAT-ACA")
     vs = utils.variantsFromAlignment(a, (1, 1000, 2000))
     EQ([ Variant(1, 1003, 1004, "T", "", refPrev="T", readPrev="T") ], vs)