Example #1
0
    def testTwoPathsTwoRoots(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.c1, self.d1, self.f1]
        exons2 = [self.b2, self.c2, self.e2, self.g2]

        comp.addExon(db, clusters, exons1)
        comp.addExon(db, clusters, exons2)

        allPath = comp.getPath(self.a1.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)

        allPath = comp.getPath(self.b2.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)

        allPath = comp.getPath(self.c1.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)

        allPath = comp.getPath(self.d1.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)
    def testTwoPathsTwoRoots(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.c1, self.d1, self.f1]
        exons2 = [self.b2, self.c2, self.e2, self.g2]

        comp.addExon(db, clusters, exons1)
        comp.addExon(db, clusters, exons2)

        allPath = comp.getPath(self.a1.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)

        allPath = comp.getPath(self.b2.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)

        allPath = comp.getPath(self.c1.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)

        allPath = comp.getPath(self.d1.cluster)

        self.assertEqual(len(allPath), 4)
        self.assertEqual(len(allPath[0]), 4)
        self.assertEqual(len(allPath[1]), 4)
    def testSinglePath(self):
        db = {}
        clusters = []
        exons1 = [self.a1, self.b1, self.c1, self.d1, self.e1, self.f1, self.g1]
        comp.addExon(db, clusters, exons1)

        allPath = comp.getPath(self.e1.cluster)
        self.assertEqual(len(allPath), 1)
        self.assertEqual(len(allPath[0]), 7)
Example #4
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)

        allPath = comp.getPath(self.d1.cluster)
        self.assertEqual(len(allPath), 4)
    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)

        allPath = comp.getPath(self.d1.cluster) 
        self.assertEqual(len(allPath), 4)
Example #6
0
    def testSinglePath(self):
        db = {}
        clusters = []
        exons1 = [
            self.a1, self.b1, self.c1, self.d1, self.e1, self.f1, self.g1
        ]
        comp.addExon(db, clusters, exons1)

        allPath = comp.getPath(self.e1.cluster)
        self.assertEqual(len(allPath), 1)
        self.assertEqual(len(allPath[0]), 7)
Example #7
0
    def testSingleNodePath(self):
        db = {}
        clusters = []
        exons1 = [self.a1]
        comp.addExon(db, clusters, exons1)

        self.assertEqual(len(self.a1.cluster.nodes()), 1)

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

        self.assertEqual(len(self.a1.cluster.nodes()), 1)

        allPath = comp.getPath(self.a1.cluster)
        self.assertEqual(len(allPath), 1)
        self.assertEqual(len(allPath[0]), 1)
        self.assertEqual(allPath[0][0], self.a1.coord)