View source: R/scAPAtrap_funlib.R
findPeaksByStrand | R Documentation |
findPeaksByStrand calls peaks on a BAM file with single strand. This function combines two functions in previous scAPAtrap, loadBpCoverages and findPeaks.
findPeaksByStrand(
bamFile,
chrs = NULL,
strand,
L,
maxwidth,
cutoff = 10,
ofile = NULL,
...
)
bamFile |
a BAM file with index (.bai) |
chrs |
Chromosome information. If not provided, then will try get chrs from the bamFile. |
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. |
ofile |
output file with each line is one peak |
... |
Arguments passed to other methods and/or advanced arguments. Advanced arguments:
|
If ofile=NULL, return a data frame with many columns but four fixed columns chr/strand/start/end/value, with each row being a peak. Otherwise, output to file and return ofile name.
## Not run:
forwardPeaks <-findPeaksByStrand(bamFile, chrs=NULL, strand='+', L=98, maxwidth=1000, cutoff=10)
reversePeaks <-findPeaksByStrand(bamFile, chrs=NULL, strand='-', L=98, maxwidth=1000, cutoff=10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.