R/coverage.R
count_coverage.RdNormalization is CPM, smoothing is done by averaging on n_smoothBin regions left and right of any given region.
count_coverage( filename, format = "BAM", bins, canonical_chr, n_smoothBin = 5, ref = "hg38", read_size = 101 )
| filename | Path towards the BAM to create coverage from |
|---|---|
| format | File format, either "BAM" or "BED" |
| bins | A GenomicRanges object of binned genome |
| canonical_chr | GenomicRanges of the chromosomes to read the BAM file. |
| n_smoothBin | Number of bins left and right to smooth the signal. |
| ref | Genomic reference |
| read_size | Length of the reads |
A binned GenomicRanges that can be readily exported into bigwig file.