Beispiel #1
0
    def test_duplication_in_repeat(self):
        ref = 'ASFHGHGSFSFSLLLLLL' 'FLLLLSFSLMVPWSFKW'
        mut = 'ASFHGHGSFSFSLLLLLLL' 'FLLLLSFSLMVPWSFKW'

        call = IndelCall(ref, mut)
        print(call)

        self.assertEqual(18, call.nterm_aligned)
        self.assertEqual(len(ref) - 13 + 1, call.cterm_aligned)
        self.assertTrue(call.is_dup)

        self.assertEqual('p.L18dupL', call.hgvs_protein_notation())
Beispiel #2
0
    def test_duplication_in_repeat(self):
        ref = 'ASFHGHGSFSFSLLLLLL' 'FLLLLSFSLMVPWSFKW'
        mut = 'ASFHGHGSFSFSLLLLLLL' 'FLLLLSFSLMVPWSFKW'

        call = IndelCall(ref, mut)
        print(call)

        assert call.nterm_aligned == 18
        assert call.cterm_aligned == len(ref) - 13 + 1
        assert call.is_dup

        assert call.hgvs_protein_notation() == 'p.L18dupL'
Beispiel #3
0
    def test_insertion_in_repeat(self):
        ref = 'MABCDEEEEFGH'
        mut = 'MABCDEEEEEEFGH'

        call = IndelCall(ref, mut)
        print(call)
        assert call.nterm_aligned == 9
        assert call.cterm_aligned == len(call.ref_seq) - 6 + 1
        assert call.is_dup
        assert call.ins_seq == 'EE'
        assert call.del_seq == ''

        assert call.hgvs_protein_notation() == 'p.E8_E9dupEE'
Beispiel #4
0
    def test_deletion(self):
        ref = 'MABCDEFGH'
        mut = 'MABCFGH'

        call = IndelCall(ref, mut)
        print(call)
        assert call.nterm_aligned == 4
        assert call.cterm_aligned == len(call.ref_seq) - 7 + 1
        assert not call.is_dup
        assert call.ins_seq == ''
        assert call.del_seq == 'DE'

        assert call.hgvs_protein_notation() == 'p.D5_E6delDE'
Beispiel #5
0
    def test_insertion(self):
        ref = 'MABCDEFGH'
        mut = 'MABCKADEFGH'

        call = IndelCall(ref, mut)
        print(call)
        assert call.nterm_aligned == 4
        assert call.cterm_aligned == len(call.ref_seq) - 5 + 1
        assert not call.is_dup
        assert call.ins_seq == 'KA'
        assert call.del_seq == ''

        assert call.hgvs_protein_notation() == 'p.C4_D5insKA'
Beispiel #6
0
    def test_cterminal_no_orf_ext(self):
        ref = 'MABCDEFGH'
        mut = 'MABCDEFGHIJK*'

        call = IndelCall(ref, mut)
        print(call)
        assert call.nterm_aligned == 9
        assert not call.cterm_aligned
        assert not call.is_dup
        assert call.ins_seq == 'IJK*'
        assert call.del_seq == ''

        assert call.hgvs_protein_notation() == 'p.H9ext*4'
Beispiel #7
0
    def test_cterminal_stop_extension(self):
        ref = 'MABCDEFGH*'
        mut = 'MABCDEFGHIJK*'

        call = IndelCall(ref, mut)
        print(call)
        assert call.nterm_aligned == 9
        assert not call.cterm_aligned
        assert not call.is_dup
        assert call.ins_seq == 'IJK'
        assert call.del_seq == ''

        assert call.hgvs_protein_notation() == 'p.*10ext*3'
Beispiel #8
0
    def test_cterminal_deletion(self):
        ref = 'MABCDEFGH'
        mut = 'MABCDE'

        call = IndelCall(ref, mut)
        print(call)
        assert call.nterm_aligned == 6
        assert not call.cterm_aligned
        assert not call.is_dup
        assert call.ins_seq == ''
        assert call.del_seq == 'FGH'

        assert call.hgvs_protein_notation() == 'p.F7_H9delFGH'
Beispiel #9
0
    def test_nterminal_deletion(self):
        ref = 'MABCDEFGH'
        mut = 'CDEFGH'

        call = IndelCall(ref, mut)
        print(call)
        assert not call.nterm_aligned
        assert call.cterm_aligned == len(call.ref_seq) - 4 + 1
        assert not call.is_dup
        assert call.ins_seq == ''
        assert call.del_seq == 'MAB'

        assert call.hgvs_protein_notation() == 'p.M1_B3delMAB'
Beispiel #10
0
    def test_insertion_in_repeat(self):
        ref = 'MABCDEEEEFGH'
        mut = 'MABCDEEEEEEFGH'

        call = IndelCall(ref, mut)
        print(call)
        self.assertEqual(9, call.nterm_aligned)
        self.assertEqual(len(call.ref_seq) - 6 + 1, call.cterm_aligned)
        self.assertTrue(call.is_dup)
        self.assertEqual('EE', call.ins_seq)
        self.assertEqual('', call.del_seq)

        self.assertEqual('p.E8_E9dupEE', call.hgvs_protein_notation())
Beispiel #11
0
    def test_deletion(self):
        ref = 'MABCDEFGH'
        mut = 'MABCFGH'

        call = IndelCall(ref, mut)
        print(call)
        self.assertEqual(4, call.nterm_aligned)
        self.assertEqual(len(call.ref_seq) - 7 + 1, call.cterm_aligned)
        self.assertFalse(call.is_dup)
        self.assertEqual('', call.ins_seq)
        self.assertEqual('DE', call.del_seq)

        self.assertEqual('p.D5_E6delDE', call.hgvs_protein_notation())
Beispiel #12
0
    def test_insertion(self):
        ref = 'MABCDEFGH'
        mut = 'MABCKADEFGH'

        call = IndelCall(ref, mut)
        print(call)
        self.assertEqual(4, call.nterm_aligned)
        self.assertEqual(len(call.ref_seq) - 5 + 1, call.cterm_aligned)
        self.assertFalse(call.is_dup)
        self.assertEqual('KA', call.ins_seq)
        self.assertEqual('', call.del_seq)

        self.assertEqual('p.C4_D5insKA', call.hgvs_protein_notation())
Beispiel #13
0
    def test_cterminal_no_orf_ext(self):
        ref = 'MABCDEFGH'
        mut = 'MABCDEFGHIJK*'

        call = IndelCall(ref, mut)
        print(call)
        self.assertEqual(9, call.nterm_aligned)
        self.assertFalse(call.cterm_aligned)
        self.assertFalse(call.is_dup)
        self.assertEqual('IJK*', call.ins_seq)
        self.assertEqual('', call.del_seq)

        self.assertEqual('p.H9ext*4', call.hgvs_protein_notation())
Beispiel #14
0
    def test_cterminal_stop_extension(self):
        ref = 'MABCDEFGH*'
        mut = 'MABCDEFGHIJK*'

        call = IndelCall(ref, mut)
        print(call)
        self.assertEqual(9, call.nterm_aligned)
        self.assertFalse(call.cterm_aligned)
        self.assertFalse(call.is_dup)
        self.assertEqual('IJK', call.ins_seq)
        self.assertEqual('', call.del_seq)

        self.assertEqual('p.*10ext*3', call.hgvs_protein_notation())
Beispiel #15
0
    def test_cterminal_deletion(self):
        ref = 'MABCDEFGH'
        mut = 'MABCDE'

        call = IndelCall(ref, mut)
        print(call)
        self.assertEqual(6, call.nterm_aligned)
        self.assertFalse(call.cterm_aligned)
        self.assertFalse(call.is_dup)
        self.assertEqual('', call.ins_seq)
        self.assertEqual('FGH', call.del_seq)

        self.assertEqual('p.F7_H9delFGH', call.hgvs_protein_notation())
Beispiel #16
0
    def test_nterminal_deletion(self):
        ref = 'MABCDEFGH'
        mut = 'CDEFGH'

        call = IndelCall(ref, mut)
        print(call)
        self.assertFalse(call.nterm_aligned)
        self.assertEqual(len(call.ref_seq) - 4 + 1, call.cterm_aligned)
        self.assertFalse(call.is_dup)
        self.assertEqual('', call.ins_seq)
        self.assertEqual('MAB', call.del_seq)

        self.assertEqual('p.M1_B3delMAB', call.hgvs_protein_notation())