Pave phases nearby insertions/deletions so may annotate variants to have an effect like 'phased_inframe_variant'.
df2maf function by default guesses whether an allele is inframe or not by looking at ref and alt. Why? well VEP can annotate variants as protein_altering_variant. We need to know whether these variants are inframe or not to properly map them to valid MAF terms.
mutationtypes::mutation_types_convert_so_to_maf adds some checks to flag if the calculated 'inframe' status aggrees with the mutation types where that information is built into the consequence (e.g. if your consequence is 'inframe_deletion', inframe should be TRUE). Now PAVE 'phased' variants might look out-of-frame by looking at ref & alt but when phased in relation to nearby variants - it actually becomes an inframe variant. This mismatch makes mutationtypes::mutation_types_convert_so_to_maf throw an error.
Whats the fix?
Easiest fix is to just add mutationtypes::mutation_types_convert_pave_to_maf option if 'pave' argument = TRUE. This function wouldn't need the inframe argument
Pave phases nearby insertions/deletions so may annotate variants to have an effect like 'phased_inframe_variant'.
df2maf function by default guesses whether an allele is inframe or not by looking at ref and alt. Why? well VEP can annotate variants as protein_altering_variant. We need to know whether these variants are inframe or not to properly map them to valid MAF terms.
mutationtypes::mutation_types_convert_so_to_maf
adds some checks to flag if the calculated 'inframe' status aggrees with the mutation types where that information is built into the consequence (e.g. if your consequence is 'inframe_deletion', inframe should be TRUE). Now PAVE 'phased' variants might look out-of-frame by looking at ref & alt but when phased in relation to nearby variants - it actually becomes an inframe variant. This mismatch makes mutationtypes::mutation_types_convert_so_to_maf throw an error.Whats the fix?
Easiest fix is to just add mutationtypes::mutation_types_convert_pave_to_maf option if 'pave' argument = TRUE. This function wouldn't need the inframe argument