select_most_severe_consequence_pave {mutationtypes}R Documentation

Select the most severe consequence (PAVE)

Description

Take a character vector which may contain multiple PAVE mutation types separated by '&' And choose only the most severe consequence

Usage

select_most_severe_consequence_pave(
  pave_mutation_types,
  missing_is_valid = FALSE
)

Arguments

pave_mutation_types

a character vector of PAVE terms, where multiple pave_mutation_types per field are & delimited, and you want to choose the most severe consequence .

missing_is_valid

should NA values be considered valid mutation classes or should they throw an error? (flag)

Value

the most severe consequence for each element in pave_mutation_types

Examples

select_most_severe_consequence_pave(
 c(
   "upstream_gene_variant&phased_synonymous&5_prime_UTR_variant",
   "missense_variant&frameshift_variant"
 )
)
#> Result:
#> c("phased_synonymous", "frameshift_variant")

[Package mutationtypes version 0.0.1 Index]