Skip to content

Commit

Permalink
fixes issue #72
Browse files Browse the repository at this point in the history
  • Loading branch information
Husen M. Umer committed Nov 15, 2022
1 parent 913b1e7 commit 36f8b58
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 36f8b58

Please sign in to comment.