count_coverage {ChromSCape}R Documentation

Create a smoothed and normalized coverage track from a BAM file and given a bin GenomicRanges object (same as deepTools bamCoverage)

Description

Normalization is CPM, smoothing is done by averaging on n_smoothBin regions left and right of any given region.

Usage

count_coverage(
  filename,
  format = "BAM",
  bins,
  canonical_chr,
  n_smoothBin = 5,
  ref = "hg38",
  read_size = 101
)

Arguments

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

Value

A binned GenomicRanges that can be readily exported into bigwig file.


[Package ChromSCape version 1.4.0 Index]