Skip to contents

Adds two new columns to a variant annotation table:

  1. changes: the nucleotide substitution (e.g. "C_T").

  2. types: whether the substitution is a transition or transversion.

Usage

Annotate_base_change(variant_annotation)

Arguments

variant_annotation

A data.frame or tibble containing a column named Variants ("").

Value

The input variant_annotation with added changes and types columns.

Examples

df <- data.frame(Variants = c("100_C_T", "200_A_C"))
Annotate_base_change(df)
#>   Variants changes        types
#> 1  100_C_T     C_T   transition
#> 2  200_A_C     A_C transversion