def testTwoPathsTwoBubbles(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.b1, self.d1, self.f1, self.g1]
        exons2 = [self.a2, self.c2, self.d2, self.e2, self.g2]
        comp.addExon(db, clusters, exons1)
        comp.addExon(db, clusters, exons2)

        path = []
        allPaths = []

        comp.walkDown(self.a1.coord, path, allPaths, self.a1.cluster)
        self.assertEqual(len(allPaths), 4)

        expectedAllPaths = [[self.b1.coord,
                                self.d1.coord,
                                self.f1.coord,
                                self.g1.coord],
                            [self.b1.coord,
                                self.d1.coord,
                                self.e2.coord,
                                self.g1.coord],
                            [self.c2.coord,
                                self.d1.coord,
                                self.f1.coord,
                                self.g1.coord],
                            [self.c2.coord,
                                self.d1.coord,
                                self.e2.coord,
                                self.g1.coord]]

        self.assertListEqual(expectedAllPaths, allPaths)
Пример #2
0
    def testTwoPaths(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.b1, self.c1, self.d1]
        exons2 = [self.a2, self.b2, self.c2, self.e2]
        comp.addExon(db, clusters, exons1)
        comp.addExon(db, clusters, exons2)

        path = []
        allPath = []

        comp.walkDown(self.c2.coord, path, allPath, self.c2.cluster)
        self.assertEqual(len(allPath), 2)

        path = []
        allPath = []

        comp.walkDown(self.a2.coord, path, allPath, self.a2.cluster)
        self.assertEqual(len(allPath), 2)
        self.assertEqual(
            allPath[0],
            [str(self.b1), str(self.c1),
             str(self.d1)])
        self.assertEqual(
            allPath[1],
            [str(self.b2), str(self.c2),
             str(self.e2)])
Пример #3
0
    def testSingleExonPath(self):
        db = {}
        clusters = []
        exons1 = [self.a1]
        comp.addExon(db, clusters, exons1)

        path = []
        allPath = []

        comp.walkDown(self.a1.coord, path, allPath, self.a1.cluster)
        self.assertEqual(len(allPath), 1)
        self.assertEqual(allPath, [[]])
    def testSingleExonPath(self):
        db = {}
        clusters = []
        exons1 = [self.a1]
        comp.addExon(db, clusters, exons1)

        path = []
        allPath = []

        comp.walkDown(self.a1.coord, path, allPath, self.a1.cluster) 
        self.assertEqual(len(allPath), 1)
        self.assertEqual(allPath, [[]])
    def testSinglePath(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.b1, self.c1, self.d1, self.e1]
        comp.addExon(db, clusters, exons1)

        path = []
        allPath = []

        comp.walkDown(self.a1.coord, path, allPath, self.a1.cluster) 
        self.assertEqual(len(allPath), 1)
        self.assertEqual(allPath, [[str(self.b1), str(self.c1),
                                    str(self.d1), str(self.e1)]])
Пример #6
0
    def testSinglePath(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.b1, self.c1, self.d1, self.e1]
        comp.addExon(db, clusters, exons1)

        path = []
        allPath = []

        comp.walkDown(self.a1.coord, path, allPath, self.a1.cluster)
        self.assertEqual(len(allPath), 1)
        self.assertEqual(
            allPath, [[str(self.b1),
                       str(self.c1),
                       str(self.d1),
                       str(self.e1)]])
    def testTwoPaths(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.b1, self.c1, self.d1]
        exons2 = [self.a2, self.b2, self.c2, self.e2]
        comp.addExon(db, clusters, exons1)
        comp.addExon(db, clusters, exons2)

        path = []
        allPath = []

        comp.walkDown(self.c2.coord, path, allPath, self.c2.cluster)
        self.assertEqual(len(allPath), 2)

        path = []
        allPath = []

        comp.walkDown(self.a2.coord, path, allPath, self.a2.cluster)
        self.assertEqual(len(allPath), 2)
        self.assertEqual(allPath[0], [str(self.b1), str(self.c1), str(self.d1)])
        self.assertEqual(allPath[1], [str(self.b2), str(self.c2), str(self.e2)])
Пример #8
0
    def testTwoPathsTwoBubbles(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.b1, self.d1, self.f1, self.g1]
        exons2 = [self.a2, self.c2, self.d2, self.e2, self.g2]
        comp.addExon(db, clusters, exons1)
        comp.addExon(db, clusters, exons2)

        path = []
        allPaths = []

        comp.walkDown(self.a1.coord, path, allPaths, self.a1.cluster)
        self.assertEqual(len(allPaths), 4)

        expectedAllPaths = [
            [self.b1.coord, self.d1.coord, self.f1.coord, self.g1.coord],
            [self.b1.coord, self.d1.coord, self.e2.coord, self.g1.coord],
            [self.c2.coord, self.d1.coord, self.f1.coord, self.g1.coord],
            [self.c2.coord, self.d1.coord, self.e2.coord, self.g1.coord]
        ]

        self.assertListEqual(expectedAllPaths, allPaths)