smoother: A smoother function for coefficient values

Description Usage Arguments Value

View source: R/DRfinder.R

Description

This is an internal workhorse function that (optionally) smooths the coefficient values for the covariate of interest.

Usage

1
2
3
smoother(y, x = NULL, weights = NULL, chr = chr,
  maxGapSmooth = maxGapSmooth, verbose = TRUE, workers = 1,
  minNum = minNum, minInSpan = minInSpan, bpSpan = bpSpan)

Arguments

x

a vector of condition coefficients (for the covariate of interest) for each nucletide

weights

a numeric vector that contains the smoothing weights.

chr

a character vector of labels for region-level characteristics, with length equal to the number of rows in oligo.mat (and in the same order). This can indicate the chromosome, gene, lncRNA, etc.

maxGapSmooth

positive integer that indicates the maximum number of basepairs that can separate two nucleotides before they will be divided into two separate smoothing regions. Defaults to 50.

verbose

logical value that indicates whether addtional progress messages within each iteration should be printed to stout. Default value is FALSE.

workers

positive integer that represents the number of cores to use if parallelization is desired of the smoothing step.

minNum

positive integer that represents the minimum number of nucleotides overall in a region to be smoothed (if smooth is TRUE). Default value is 10

minInSpan

positive integer that represents the minimum number of nucleotides in a smoothing span window if smooth is TRUE. Default value is 10.

bpSpan

a positive integer that represents the length in basepairs of the smoothing span window if smooth is TRUE. Default value is 100

Value

a list object of length four that contains the following objects in order: 1. fitted = a numeric matrix containing the coefficient estimates after smoothing those that satisify the smoothing conditions for each nucleotide, 2. smoothed = a logical vector that indicates whether each nucleotide was smoothed, 3. smoother = a character that represents the type of smoothing that was performed, and 4. idx a numeric vector that indicates which nucleotides are non-NULL.


cshukla/oligoGames documentation built on May 27, 2019, 8:44 a.m.