toTOJR: Title Types of Joint Rhythmicity (TOJR)

View source: R/DCP_Rhythmicity.R

toTOJRR Documentation

Title Types of Joint Rhythmicity (TOJR)

Description

Categorize genes to four types of joint rhythmicity (TOJR).

Usage

toTOJR(
  x,
  method = "Sidak_FS",
  amp.cutoff = 0,
  alpha = 0.05,
  adjustP = TRUE,
  p.adjust.method = "BH",
  parallel.ncores = 1
)

Arguments

x

one of the following two:

  • output of DCP_rhythmicity(x1, x2), both x1 and x2 are not NULL. (A list with the rhythm.joint component).

  • A list of with two outputs from DCP_rhythmicity(x1, x2 = NULL), each using data from a different group.

method

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

amp.cutoff

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

alpha

integer. Threshold for rhythmicity p-value in joint rhythmicity categorization.

adjustP

logic. Should joint rhythmicity categorization be based on adjusted p-value?

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.

Value

Joint rhythmicity categories of genes

Examples

#Re-calculate TOJR for DCP_rhythmicity(x1, x2) output with q-value cutoff 0.1
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]])
TOJR.new = toTOJR(rhythm.res, alpha = 0.1, adjustP = TRUE)

#Calculate TOJR for two DCP_rhythmicity(x1, x2 = NULL) outputs with p-value cutoff 0.05
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.res1 = DCP_Rhythmicity(x1 = x[[1]])
rhythm.res2 = DCP_Rhythmicity(x1 = x[[2]])
TOJR = toTOJR(x = list(x1 = rhythm.res1, x2 = rhythm.res2),
alpha = 0.05, adjustP = FALSE)

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