normalize_bin_transform_counts: Normalizes, bins and transforms counts

View source: R/process_dnase_atac_data.R

normalize_bin_transform_countsR Documentation

Normalizes, bins and transforms counts

Description

Normalizes counts by library size, bin using MILLIPEDE binning method and then take ‘asinh’ or ‘log2’ transform.

Usage

normalize_bin_transform_counts(
  count_matrix,
  idxstats_file,
  ref_size = 1e+08,
  bin_method = c("M5", "M24", "M12", "M3", "M2", "M1"),
  transform = c("asinh", "log2", "sqrt", "none")
)

Arguments

count_matrix

DNase or ATAC-seq read counts matrix.

idxstats_file

The idxstats file (generated by samtools).

ref_size

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

bin_method

MILLIPEDE binning scheme (Default: ‘M5’).

transform

Type of transformation for DNase or ATAC counts. Options: ‘asinh’, ‘log2’, ‘sqrt’, ‘none’.

Value

A data frame of normalized, binned and transformed counts.

Examples

## Not run: 
# Normalizes counts by scaling to a library size of 100 million reads,
# and bin counts using MILLIPEDE M5 binning method, and then takes
# asinh transformation on the binned counts.
bins <- normalize_bin_transform_counts(count_matrix,
                                       idxstats_file,
                                       ref_size = 1e8,
                                       bin_method = 'M5',
                                       transform = 'asinh')

## End(Not run)

HarteminkLab/TOP documentation built on July 27, 2023, 6:14 p.m.