add_sequence: Add nucleic acid sequence of regions to metadata column

View source: R/utils.R

add_sequenceR Documentation

Add nucleic acid sequence of regions to metadata column

Description

Add nucleic acid sequence of regions to metadata column

Usage

add_sequence(ranges, genome, name = "sequence")

Arguments

ranges

GRanges object

genome

BSgenome object or any other valid input to 'Biostrings::getSeq()' (Do 'showMethods(Biostrings::getSeq)' to show valid types)

name

name of metadata column to hold sequence information (default: "sequence"). Note, this will overwrite existing columns without warning if the name already exists.

Value

'ranges' with new metadata column named "sequence" (or another value passed to 'name') holding the DNA or RNA sequence from 'genome'

Examples

data(example_peaks, package = "memes")
dm.genome <- BSgenome.Dmelanogaster.UCSC.dm3::BSgenome.Dmelanogaster.UCSC.dm3
add_sequence(example_peaks, dm.genome)

snystrom/dremeR documentation built on Oct. 13, 2024, 10:48 p.m.