cycle_npreg_mstep: Estimate Parameters of the Cyclic Trends

Description Usage Arguments Value

View source: R/cycle_npreg.R

Description

This is used by cycle_npreg_insample (model fitting from training data) and cycle_npreg_outsample (prediction in test data estimate cyclic trends of gene expression values. The function outputs, for each gene, a standard error of the cyclic trend, a cyclic function, and the estimated expression levels from the cyclic function.

Usage

1
2
3
4
5
6
7
cycle_npreg_mstep(
  Y,
  theta,
  method.trend = c("trendfilter", "loess", "bspline"),
  polyorder = 2,
  ncores = 2
)

Arguments

Y

Gene by sample expression matrix (log2CPM).

theta

Observed cell times.

method.trend

How to estimate cyclic trend of gene expression values. We offer three options: method.trend = "trendfilter", uses fit_trendfilter, method.trend = "loess" uses fit_loess), and method.trend = "bsplines" uses fit_bspline. We found that "trendfilter" provided the best fits in our experiments. However, trend-filtering may require more computational effort since it uses cross-validation, so for fast results we recommend using "bspline".

polyorder

We estimate cyclic trends of gene expression levels using nonparamtric trend filtering.

ncores

How many computing cores to use? We use the doParallel package for parallel computing.

Value

A list with the following elements:

Y

Input gene expression data.

theta

Input angles.

mu_est

Estimated expression levels given the cyclic function for each gene.

sigma_est

Estimated standard error of the cyclic trends for each gene.

funs

Estimated cyclic functions.


jhsiao999/peco documentation built on Nov. 21, 2020, 5:34 p.m.