From d2b82162a41eef2b8ffe0347bb310ca325707e2e Mon Sep 17 00:00:00 2001 From: Susanna Kiwala Date: Mon, 28 Aug 2017 12:33:16 -0500 Subject: [PATCH] Die if the wildtype amino acid in the wildtype sequence is different from the one in the amino acid change --- pvacseq/lib/generate_fasta.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pvacseq/lib/generate_fasta.py b/pvacseq/lib/generate_fasta.py index 2801e58..194a66c 100644 --- a/pvacseq/lib/generate_fasta.py +++ b/pvacseq/lib/generate_fasta.py @@ -129,6 +129,8 @@ def main(args_input = sys.argv[1:]): else: mutation_start_position, wildtype_subsequence = get_wildtype_subsequence(position, full_wildtype_sequence, wildtype_amino_acid_length, peptide_sequence_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]: + sys.exit("ERROR: There was a mismatch between the actual wildtype amino acid and the expected amino acid. Did you use the same reference build version for VEP that you used for creating the VCF?\n%s" % line) mutant_subsequence = wildtype_subsequence[:mutation_start_position] + mutant_amino_acid + wildtype_subsequence[mutation_end_position:] if '*' in wildtype_subsequence or '*' in mutant_subsequence: