Add rolling mean
tx_add_rollingMean.Rd
Add rolling mean
Usage
tx_add_rollingMean(
DT,
colName,
winSize,
newColName = NULL,
fill = NA,
align = "center",
minCov = 20,
nCores = 1
)
Arguments
- DT
data.table. A table as output by the
tx_makeDT_coverage
(),tx_makeDT_nucFreq
() ortx_makeDT_covNucFreq
() functions.- colName
character. Column to which rolling mean will be applied
- winSize
numeric. Size of window
- newColName
character. Name to be given to the output. If left empty, will assign a default name, combination of the
colName
andwinSize
arguments.- fill
Either an empty vector (no fill), or a vector (recycled to) length 3 giving left, middle and right fills. By default NA.
- align
character. Align windows on the "left", "center" or "right".
- minCov
numeric. Minimum coverage required to output ratio. If coverage is less then an NA is output in that position. To output all positions assign 0.
- nCores
integer. Number of cores to run the function with. Multicore capability is not available in Windows OS.