Skip to content

Commit 31423d0

Browse files
authored
Merge pull request #954 from ZiadXI/GH953-synonymous-start-stop
Add SYNONYMOUS_STOP and SYNONYMOUS_START effect classifications (fixes #953)
2 parents 8545ce1 + d897067 commit 31423d0

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

malariagen_data/veff.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,20 @@ def _get_within_cds_effect(ann, base_effect, cds, cdss):
273273
# SNPs
274274

275275
if ref_aa == alt_aa:
276-
# TODO SYNONYMOUS_START and SYNONYMOUS_STOP
276+
if alt_aa == "*":
277+
# variant causes a stop codon to be mutated into another stop codon
278+
# e.g.: Tga/Taa, */*
279+
effect = base_effect._replace(effect="SYNONYMOUS_STOP", impact="LOW")
277280

278-
# variant causes a codon that produces the same amino acid
279-
# e.g.: Ttg/Ctg, L/L
280-
effect = base_effect._replace(effect="SYNONYMOUS_CODING", impact="LOW")
281+
elif ref_cds_start == 0:
282+
# variant at the start codon that produces the same amino acid (M/M)
283+
# e.g.: Atg/atG, M/M
284+
effect = base_effect._replace(effect="SYNONYMOUS_START", impact="LOW")
285+
286+
else:
287+
# variant causes a codon that produces the same amino acid
288+
# e.g.: Ttg/Ctg, L/L
289+
effect = base_effect._replace(effect="SYNONYMOUS_CODING", impact="LOW")
281290

282291
elif ref_aa == "M" and ref_cds_start == 0:
283292
# variant causes start codon to be mutated into a non-start codon.

tests/anoph/test_snp_frq.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ def case_amin1_sim(amin1_sim_fixture, amin1_sim_api):
141141
"FIVE_PRIME_UTR",
142142
"THREE_PRIME_UTR",
143143
"SYNONYMOUS_CODING",
144+
"SYNONYMOUS_STOP",
145+
"SYNONYMOUS_START",
144146
"NON_SYNONYMOUS_CODING",
145147
"START_LOST",
146148
"STOP_LOST",

0 commit comments

Comments
 (0)