annotatePeaksWithPatterns: Search for small RNA targets, or any pattern, in peaks

View source: R/Functions.R

annotatePeaksWithPatternsR Documentation

Search for small RNA targets, or any pattern, in peaks

Description

Search for small RNA targets, or any pattern, in peaks

Usage

annotatePeaksWithPatterns(
  peaks,
  fasta,
  patterns,
  resize = 64,
  add5 = 0,
  add3 = 0,
  verbose = FALSE,
  exact = TRUE,
  bedHeader = TRUE,
  bedSep = "\t"
)

Arguments

peaks

CLIP peaks to process; accepts path to peak files (BED file or BED-formatted tab-delimited text files) or R objects (GRanges or BED-formatted data.frame); peak locations must be unique.

fasta

path to genome file (fasta).

patterns

patterns to scan in CLIP peaks (character vector, DNAStringSet, or file path to a fasta sequence). Ambiguous bases can be searched by using IUPAC code in the pattern sequences and setting *exact* as FALSE.

resize

size of window in bp for resizing around peak center, default is 64 (set by specifying integer; can be set to NULL to keep original peak ranges).

add5

bp to add to 5' of resized peak, default is 0 (set by specifying integer).

add3

bp to add to 3' of resized peak, default is 0 (set by specifying integer).

verbose

print messages, TRUE or FALSE (default).

exact

whether to search for exact matches or allow ambiguous matching, TRUE (default) or FALSE

bedHeader

if peak file contains column headers, TRUE (default) or FALSE; if TRUE, column names must be "seqnames" (chromosome), "start" (peak start), "end" (peak end), "strand" (peak strand).

bedSep

separator in BED file.

Value

Path

Author(s)

Kathryn Rozen-Gagnon

Examples

testFasta <- system.file("extdata/hg19Small.fa",package="CLIPflexR")

kathrynrozengagnon/CLIPflexR documentation built on Dec. 8, 2022, 7:31 p.m.