def test_filter(self):
        transcript_a = Transcript('transcriptA')
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(0)

        self.assertEqual(transcript_a.bases, 30)
        self.assertEqual(transcript_a.coverage_base, 3)
        self.assertEqual(transcript_a.length, 4)
        self.assertFalse(transcript_a.filter(1, 10))
        self.assertFalse(transcript_a.filter(0.5, 100))
        self.assertTrue(transcript_a.filter(0.5, 5))
Ejemplo n.º 2
0
    def test_add_covereage(self):
        transcript_a = Transcript('transcriptA')
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(0)

        self.assertEqual(transcript_a.bases, 30)
        self.assertEqual(transcript_a.coverage_base, 3)
        self.assertEqual(transcript_a.length, 4)
    def test_add_covereage(self):
        transcript_a = Transcript('transcriptA')
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(0)

        self.assertEqual(transcript_a.bases, 30)
        self.assertEqual(transcript_a.coverage_base, 3)
        self.assertEqual(transcript_a.length, 4)
Ejemplo n.º 4
0
 def test_create_transcript(self):
     transcript_a = Transcript('transcriptA')
     self.assertEqual(transcript_a.id, 'transcriptA')
     self.assertEqual(transcript_a.coverage_base, 0)
     self.assertEqual(transcript_a.length, 0)
Ejemplo n.º 5
0
    def test_filter(self):
        transcript_a = Transcript('transcriptA')
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(10)
        transcript_a.add_coverage(0)

        self.assertEqual(transcript_a.bases, 30)
        self.assertEqual(transcript_a.coverage_base, 3)
        self.assertEqual(transcript_a.length, 4)
        self.assertFalse(transcript_a.filter(1, 10))
        self.assertFalse(transcript_a.filter(0.5, 100))
        self.assertTrue(transcript_a.filter(0.5, 5))