Learn R Programming

vivaldi (version 1.0.1)

prepare_annotations: prepare_annotations

Description

Separates the SNPeff annotations found in an annotated and rearranged VCF dataframe (arranged using arrange_data)

Usage

prepare_annotations(df)

Value

A dataframe containing each annotation on a separate column

Arguments

df

A rearranged and annotated VCF dataframe

Examples

Run this code
# Example: Shows the separation of the ANN column based on | delimiter.
test <- data.frame( ANN = c("A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P"))

# The ANN column will be split based on the strings in `snpeff_info()` and
# an additional "error" column.
snpeff_info()

# Split the SNPeff annotations in "ANN" column and save to dataframe `df`
df <- prepare_annotations(df)

# The one "ANN" column is split into 16 columns
dim(test)
dim(df)

Run the code above in your browser using DataLab