smoothing: Smoothing Operations

smoothingR Documentation

Smoothing Operations

Description

These functions apply a smoothing kernel to all contact matrices in a ContactGroup object.

Usage

boxSmoother(cg, h, mc.cores)
gaussSmoother(cg, radius, sigma, mc.cores)

Arguments

cg

A ContactGroup object.

h

The desired smoother radius. Only applies to box smoother. This is an integer.

radius

The desired smoother width. Only applies to Gaussian smoother. This is an integer.

sigma

The desired smoother standard deviation. Only applies to Gaussian smoother. This is a positive number.

mc.cores

The number of cores to be used.

Details

boxSmoother applies a square smoothing kernel of radius h to all contact matrices in a ContactGroup object. Specifying radius h implies that the width of the kernel is 2*h + 1 matrix cells.

gaussSmoother applies a square Gaussain smoothing kernel of width radius with standard deviation sigma to all contact matrices in a ContactGroup object.

Value

A ContactGroup object is returned that contains the smoothed matrices.

See Also

ContactGroup

Examples

data(cgEx)
cgEx.smooth <- boxSmoother(cgEx, h=5, mc.cores=1)
cgEx.smooth <- gaussSmoother(cgEx, radius=3, sigma=0.5, mc.cores=1)

hansenlab/bnbc documentation built on Feb. 4, 2024, 7:20 a.m.