def setup_by_strand(self, strand): self.ex1 = Exon(100, 199, strand=strand) # C self.ex2 = Exon(500, 599, strand=strand) # G self.ex3 = Exon(1200, 1299, strand=strand) # T self.ex4 = Exon(1500, 1599, strand=strand) # C self.ex5 = Exon(1700, 1799, strand=strand) # G self.ex6 = Exon(2000, 2099, strand=strand) # C # introns: 99, 300, 600, 200, 100, ... reference_sequence = 'a' * 99 + 'C' * 100 + 'a' * 300 + 'G' * 100 reference_sequence += 'a' * 600 + 'T' * 100 + 'a' * 200 + 'C' * 100 reference_sequence += 'a' * 100 + 'G' * 100 + 'a' * 200 + 'C' * 100 self.reference_sequence = reference_sequence self.pre_transcript = PreTranscript(exons=[self.ex1, self.ex2, self.ex3, self.ex4, self.ex5, self.ex6], strand=strand)
def pos_splicing_pattern(): n = argparse.Namespace() n.ex1 = Exon(100, 199, strand=STRAND.POS) # C n.ex2 = Exon(500, 599, strand=STRAND.POS) # G n.ex3 = Exon(1200, 1299, strand=STRAND.POS) # T n.ex4 = Exon(1500, 1599, strand=STRAND.POS) # C n.ex5 = Exon(1700, 1799, strand=STRAND.POS) # G n.ex6 = Exon(2000, 2099, strand=STRAND.POS) # C # introns: 99, 300, 600, 200, 100, ... reference_sequence = 'a' * 99 + 'C' * 100 + 'a' * 300 + 'G' * 100 reference_sequence += 'a' * 600 + 'T' * 100 + 'a' * 200 + 'C' * 100 reference_sequence += 'a' * 100 + 'G' * 100 + 'a' * 200 + 'C' * 100 n.reference_sequence = reference_sequence n.pre_transcript = PreTranscript( exons=[n.ex1, n.ex2, n.ex3, n.ex4, n.ex5, n.ex6], strand=STRAND.POS) return n
def test_start_splice_site(self): e = Exon(100, 199, strand=STRAND.POS) assert SPLICE_SITE_RADIUS == 2 print(e.start_splice_site) assert Interval(98, 101) == e.start_splice_site
def test_start_splice_site(self): e = Exon(100, 199, strand=STRAND.POS) self.assertEqual(2, SPLICE_SITE_RADIUS) self.assertEqual(Interval(98, 101), e.start_splice_site)