Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent.aa_pos wrong for synonymous SNPs #208

Open
joaoe opened this issue Jan 8, 2017 · 1 comment
Open

Silent.aa_pos wrong for synonymous SNPs #208

joaoe opened this issue Jan 8, 2017 · 1 comment

Comments

@joaoe
Copy link

joaoe commented Jan 8, 2017

Hi.
Testcase over transcript ENSMUST00000086738

##fileformat=VCFv4.1
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT

# The coding sequence around the variants
# ATG GAT TCT GTA CCA AGA CTG ACC AGC ATT TTG
#                       ^ 99772782
#  M   D   S   V   P   R   L   T   S   I   L

# Synonymous substition, 3rd nucleotide in codon
# AGA -> AGG (R/R)
chr1	99772782	.	A	G	5000	.	.	.

# Synonymous substition, 1st nucleotide in codon
# CTG -> TTG (L/L)
chr1	99772783	.	C	T	5000
	.	.	.
# CTG -> CXG [There are no synonymous nucleotide substitutions in the middle of the codon]
# chr1	99772784	.	T	X	5000	.	.	.

# All mixed
# AGA CTG -> AGG TTG (RL/rl)
chr1	99772782	.	AC	GT	5000	.	.	.

The three annotations for these cases should be

Silent(aa_pos=5, aa_ref=R)
Silent(aa_pos=6, aa_ref=L)
Silent(aa_pos=5, aa_ref=RL)

instead all the aa_pos properties are incremented by one.

The culprit is this line. aa_mutation_start_offset has been increased to skip the common prefix on aa_ref and aa_altafter the call to trim_shared_flanking_strings.
So, the argument being passed should be aa_mutation_start_offset - n_aa_shared.

@joaoe
Copy link
Author

joaoe commented Jan 8, 2017

Btw, I think it makes sense to break apart the previous if because if aa_mutation_start_offset > reference_protein_length is True and n_aa_alt is not zero, then the mutation type should be ThreePrimeUTR right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant