Skip to content

Commit

Permalink
Merge pull request #1155 from griffithlab/insertion_fasta
Browse files Browse the repository at this point in the history
Add additional trailing amino acids for frameshift insertions when creating fasta
  • Loading branch information
susannasiebert authored Dec 12, 2024
2 parents 346b0db + bab7164 commit 370ce3f
Show file tree
Hide file tree
Showing 42 changed files with 162,168 additions and 162,081 deletions.
5 changes: 4 additions & 1 deletion pvactools/lib/fasta_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ def execute(self):
#we would need to recalculate the downstream protein sequence taking all downstream variants into account.
mutant_subsequence = re.sub('^%s' % left_flanking_subsequence, left_flanking_subsequence_with_proximal_variants, mutant_subsequence)
else:
mutation_start_position, wildtype_subsequence = self.get_wildtype_subsequence(position, full_wildtype_sequence, wildtype_amino_acid_length, line)
if variant_type == 'inframe_ins':
mutation_start_position, wildtype_subsequence = self.get_wildtype_subsequence(position, full_wildtype_sequence, len(mutant_amino_acid), line)
else:
mutation_start_position, wildtype_subsequence = self.get_wildtype_subsequence(position, full_wildtype_sequence, wildtype_amino_acid_length, line)
mutation_end_position = mutation_start_position + wildtype_amino_acid_length
if wildtype_amino_acid != '-' and wildtype_amino_acid != wildtype_subsequence[mutation_start_position:mutation_end_position]:
if line['amino_acid_change'].split('/')[0].count('*') > 1:
Expand Down
Loading

0 comments on commit 370ce3f

Please sign in to comment.