select_most_severe_consequence_so {mutationtypes}R Documentation

Select the most severe consequence (SO)

Description

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

Usage

select_most_severe_consequence_so(so_mutation_types, missing_is_valid = FALSE)

Arguments

so_mutation_types

a character vector of SO terms, where multiple so_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 so_mutation_types

Examples

select_most_severe_consequence_so(
 c(
   "intergenic_variant&feature_truncation&splice_acceptor_variant",
   "initiator_codon_variant&inframe_insertion"
 )
)
#> Result:
#> c("splice_acceptor_variant", "initiator_codon_variant")

[Package mutationtypes version 0.0.1 Index]