Learn R Programming

ctDNAtools (version 0.4.0)

extract_trinucleotide_context: Extracts the trinucleotide context for a set of mutations

Description

Extracts the trinucleotide context for a set of mutations

Usage

extract_trinucleotide_context(mutations, reference, destrand = TRUE)

Arguments

mutations

A data frame having the mutations. Should have the columns CHROM, POS, REF, ALT.

reference

the reference genome in BSgenome format

destrand

logical, whether to destrand mutations

Value

A data frame with two columns having the substitutions and the trinucleotide context

Examples

Run this code
# NOT RUN {
data("mutations", package = "ctDNAtools")
## Use human reference genome from BSgenome.Hsapiens.UCSC.hg19 library
suppressMessages(library(BSgenome.Hsapiens.UCSC.hg19))

## with destranding
extract_trinucleotide_context(mutations, BSgenome.Hsapiens.UCSC.hg19)

## without destranding
extract_trinucleotide_context(mutations, BSgenome.Hsapiens.UCSC.hg19,
  destrand = FALSE
)
# }

Run the code above in your browser using DataLab