padEndToRange: Pad end of matrix with missing columns

View source: R/classifyByKnownClasses.R

padEndToRangeR Documentation

Pad end of matrix with missing columns

Description

This function compensates for shrinking of a matrix due to the application of a sliding window to data. It will add the columns that are missing from the edges of the matrix to the full xRange. they will take the values from the first or last columns of the matrix. This might be useful for classMeans derived from multi-gene windowed matrices when they have to be applied to single gene matrices.

Usage

padEndToRange(dataMat, xRange = c(-250, 250))

Arguments

dataMat

A matrix of methylation or bincount values (reads x position)

xRange

A vector of the first and last coordinates of the region to plot (default is c(-250,250))

Value

A matrix with additional columns corresponding to any positions that missing from the matrix relative to the xRange. These columns will take the value of the firts and last columns of the original matrix


jsemple19/EMclassifieR documentation built on Aug. 12, 2022, 2:57 p.m.