smooth_movingw: Moving-window smoothing

View source: R/smooth_movingw.R

smooth_movingwR Documentation

Moving-window smoothing

Description

The expression/score of a gene/bin is replaced by a summary of bins around. For example the median across 3 bins.

Usage

smooth_movingw(df, wsize = 3, nb_cores = 1, FUN = stats::median, rcpp = FALSE)

Arguments

df

the input data.frame with coordinate columns (chr, start, end) and then one column per cell

wsize

the window size. Default is 3.

nb_cores

the number of processors to use.

FUN

the function to apply to each window. Default is median.

rcpp

use Rcpp function. Default is FALSE. More memory-efficient and faster when running on one core.

Value

a data.frame with smoothed signal.

Author(s)

Jean Monlong


jmonlong/scCNAutils documentation built on May 3, 2022, 4:34 a.m.