format_mutation: Format mutation

View source: R/format_mutation.R

format_mutationR Documentation

Format mutation

Description

Determine the string format of a position in a genomic sequence

Usage

format_mutation(position, sequence, alternate = "")

Arguments

position

The position of the mutation.

sequence

The genomic sequence of type DNAString.

alternate

The alternate base of type character. If left empty, format_mutation() will output only the nucleotide base with its surrounding bases.

Value

A string of the mutation in a certain format

Examples


library(Biostrings)
library(BSgenome.Hsapiens.UCSC.hg38)
 library(stringr)

# Load in the sequence
seq <- getSeq(Hsapiens, "chr1")
format_mutation(20124, seq, "A")

popopo19/excerno documentation built on Aug. 28, 2022, 1:23 a.m.