Skip to content

Commit

Permalink
Merge pull request #73 from bigbio/issue72
Browse files Browse the repository at this point in the history
fixes issue #72
  • Loading branch information
ypriverol authored Nov 15, 2022
2 parents 913b1e7 + 36f8b58 commit bbbbb34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pypgatk/cgenomes/cgenomes_proteindb.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def get_mut_pro_seq(snp, seq):

if "Missense" in snp.type:
mut_aa = snp.aa_mut[-1]
if not mut_aa.isalpha():
return ''
index = int(positions[0]) - 1
mut_pro_seq = protein_seq[:index] + mut_aa + protein_seq[index + 1:]
elif "Nonsense" in snp.type:
Expand All @@ -146,6 +148,8 @@ def get_mut_pro_seq(snp, seq):
except ValueError:
return ''
mut_aa = snp.aa_mut[index + 1:]
if not mut_aa.replace('*','').isalpha():
return ''
if "deletion" in snp.type:
del_index1 = int(positions[0]) - 1
del_index2 = int(positions[1])
Expand Down

0 comments on commit bbbbb34

Please sign in to comment.