findPeaks: Perform peak calling on a BAM file

View source: R/scAPAtrap_funlib.R

findPeaksR Documentation

Perform peak calling on a BAM file

Description

Perform peak calling on a BAM file with single strand (+ or -) using the output of loadBpCoverages. It is recommended to use findPeaksByStrand instead.

Usage

findPeaks(fullCov, strand, L, maxwidth, cutoff = 10, ...)

Arguments

fullCov

The output of loadBpCoverages.

strand

strand.

L

Read length, used to filter peaks wider than L.

maxwidth

Maximum peak width, used to filter peaks narrower than maxwidth. Wider peaks will be splitted to smaller ones.

cutoff

The base level coverage cutoff to filter valid peaks with enough coverages, default is 10.

...

Arguments passed to other methods and/or advanced arguments. Advanced arguments:

verbose

If 'TRUE' basic status updates will be printed along the way.

logf

If not NULL, then it should be a character string denoting a file name. Then message will be written to 'logf'.

Value

A data frame with five columns: chr/start/end/strand/value, with each row being a peak. The value column is the average coverage of peak.

Examples

## Not run: 
forwardPeaks <-findPeaks(fullcovF, '+', 98, 1000)
reversePeaks <-findPeaks(fullcovR, '-', 98, 1000)

## End(Not run)

BMILAB/scAPAtrap documentation built on Oct. 13, 2023, 2:36 a.m.