R/Functions.R
annotatePeaksWithPatterns.Rd
Search for small RNA targets, or any pattern, in peaks
annotatePeaksWithPatterns(
peaks,
fasta,
patterns,
resize = 64,
add5 = 0,
add3 = 0,
verbose = FALSE,
exact = TRUE,
bedHeader = TRUE,
bedSep = "\t"
)
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.
path to genome file (fasta).
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.
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).
bp to add to 5' of resized peak, default is 0 (set by specifying integer).
bp to add to 3' of resized peak, default is 0 (set by specifying integer).
print messages, TRUE or FALSE (default).
whether to search for exact matches or allow ambiguous matching, TRUE (default) or FALSE
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).
separator in BED file.
Path
testFasta <- system.file("extdata/hg19Small.fa",package="CLIPflexR")