DCP_Rhythmicity: Rhythmicity Analysis with Cosinor Model

View source: R/DCP_Rhythmicity.R

DCP_RhythmicityR Documentation

Rhythmicity Analysis with Cosinor Model

Description

This function either takes single-group data and performs only rhythmicity analysis, or takes two-group data and also categorize the genes into types of joint rhythmicity (TOJR).

Usage

DCP_Rhythmicity(
  x1,
  x2 = NULL,
  method = "Sidak_FS",
  period = 24,
  amp.cutoff = 0,
  alpha = 0.05,
  alpha.FDR = 0.05,
  CI = FALSE,
  p.adjust.method = "BH",
  parallel.ncores = 1
)

Arguments

x1

group I data. A list with the following components:

  • data: data.frame genes in rows and samples in columns.

  • time: time of expression. Should be in the same order as samples in the data.

  • gname: labels for gene. Should be in the same order as rows in the data.

x2

group II data. Components are same as x1.

method

character string specifying the algorithm used for joint rhythmicity categorization. Should be one of "Sidak_FS", "Sidak_BS", "VDA", "AWFisher". Default "Sidak_FS" and is recommended.

period

numeric. The length of the oscillation cycle. Default is 24 for circadian rhythm.

amp.cutoff

Only genes with amplitude greater than amp.cutoff are consirdered rhythmic

alpha

numeric. Threshold for rhythmicity p-value in joint rhythmicity categorization. If CI = TRUE, (1-alpha) confidence interval for parameters will be returned.

alpha.FDR

numeric. Threshold for rhythmicity p-value in joint rhythmicity categorization adjusted for global FDR control.

CI

logical. Should confidence interval for A, phase and M be returned?

p.adjust.method

input for p.adjust() in R package stat.

parallel.ncores

integer. Number of cores used if using parallel computing with mclapply(). Not functional for windows system.

Details

The methods "Sidak_FS" and "Sidak_BS" implement selective sequential model selection with Sidak adjusted p-value. "FS" represents forward stop, and "BS" basic stop, respectively (Fithian, W., et. al., 2015). The method "Sidak_FS" has better type I error control compared to venn diagram analysis (VDA) and adaptively weighted fisher's method (AWFisher).

Value

A list of original x input with rhythmicity analysis estimates. If given two data sets, types of joint rhythmicity will also be available as the list component rhythm.joint.

References

Fithian, W., Taylor, J., Tibshirani, R., & Tibshirani, R. (2015). Selective sequential model selection. arXiv preprint arXiv:1512.02565.

Examples

x = DCP_sim_data(ngene=1000, nsample=30, A1=c(1, 3), A2=c(1, 3),
phase1=c(0, pi/4), phase2=c(pi/4, pi/2),
M1=c(4, 6), M2=c(4, 6), sigma1=1, sigma2=1)

rhythm.res = DCP_Rhythmicity(x1 = x[[1]], x2 = x[[2]])

DiffCircaPipeline/Rpackage documentation built on March 17, 2023, 7:32 a.m.