示例#1
0
 def test_nonspecific_refseq(self):
     # null matches anything
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'refSeq': 'T'}, {'break1Start': {'pos': 1}}
     )
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}}, {'break1Start': {'pos': 1}, 'refSeq': 'T'}
     )
示例#2
0
 def test_refseq_length_mismatch(self):
     assert not match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'refSeq': '??'},
         {'break1Start': {'pos': 1}, 'refSeq': 'T'},
     )
     assert not match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'refSeq': '?'},
         {'break1Start': {'pos': 1}, 'refSeq': 'TT'},
     )
示例#3
0
 def test_nonspecific_altseq(self):
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}}, {'break1Start': {'pos': 1}}
     )
     # null matches anything
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'untemplatedSeq': 'T'}, {'break1Start': {'pos': 1}}
     )
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}}, {'break1Start': {'pos': 1}, 'untemplatedSeq': 'T'}
     )
示例#4
0
 def test_range_vs_sub(self):
     sub = {
         'break1Repr': 'p.G776',
         'break1Start': {'@Class': 'ProteinPosition', 'pos': 776, 'refAA': 'G'},
         'break2Repr': 'p.V777',
         'break2Start': {'@Class': 'ProteinPosition', 'pos': 777, 'refAA': 'V'},
         'reference1': 'ERBB2',
         'type': 'insertion',
         'untemplatedSeq': 'YVMA',
         'untemplatedSeqSize': 4,
     }
     range_variant = {
         'break1Repr': 'p.G776',
         'break1Start': {'@Class': 'ProteinPosition', 'pos': 776, 'refAA': 'G'},
         'break2Repr': 'p.?776',
         'break2Start': None,
         'refSeq': 'G',
         'untemplatedSeq': 'VV',
     }
     assert not match.compare_positional_variants(sub, range_variant)
     assert not match.compare_positional_variants(range_variant, sub)
示例#5
0
 def test_same_refseq_matches(self):
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'refSeq': 'R'},
         {'break1Start': {'pos': 1}, 'refSeq': 'R'},
     )
示例#6
0
 def test_diff_refseq(self):
     assert not match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'refSeq': 'M'},
         {'break1Start': {'pos': 1}, 'refSeq': 'R'},
     )
示例#7
0
 def test_same_altseq_matches(self):
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'untemplatedSeq': 'R'},
         {'break1Start': {'pos': 1}, 'untemplatedSeq': 'R'},
     )
示例#8
0
 def test_diff_altseq(self):
     assert not match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'untemplatedSeq': 'M'},
         {'break1Start': {'pos': 1}, 'untemplatedSeq': 'R'},
     )
示例#9
0
 def test_ambiguous_refseq(self, seq1, seq2):
     # ambiguous AA matches anything the same length
     assert match.compare_positional_variants(
         {'break1Start': {'pos': 1}, 'refSeq': seq1},
         {'break1Start': {'pos': 1}, 'refSeq': seq2},
     )