Normalizes DNase or ATAC-seq read counts by library sizes. It first obtains the total mapped reads from the current sample, and then scales the read counts for the current data to a reference library size.

normalize_counts(counts, idxstats_file, ref_size = 1e+08)

Arguments

counts

DNase or ATAC-seq read counts matrix

idxstats_file

The idxstats file generated by samtools.

ref_size

Normalize to reference library size. (Default: 1e8 for DNase-seq and 5e7 for ATAC-seq).

Value

A matrix of normalize read counts.