Main function of the TimeCycle package used for detecting rhythmic signals in time-series gene expression sets. For additional help with parameter selection, see TimeCycle's vignette: vignette("TimeCycle").

TimeCycle(
  data,
  repLabel,
  resamplings = 10000,
  minLag = 2,
  maxLag = 5,
  period = 24,
  cores = parallel::detectCores() - 2,
  laplacian = T,
  linearTrend = F
)

Arguments

data

a data.frame of numeric gene expression over time (row = genes x col = ZT times).

repLabel

a vector defining the number of replicates at each time points.

resamplings

a numeric specifying the number of resamplings to use in the null-distribution. Default is 10000.

minLag

a numeric specifying the min lag to check in the 3-D embedding. Default is 2.

maxLag

a numeric specifying the max lag to check in the 3-D embedding. Default is 5.

period

a numeric specifying the period of interest in hours for rhythm detection. Default is 24.

cores

a numeric specifying the number of parallel cores to use. Default number of cores is parallel::detectedCores() - 2.

laplacian

a logical scalar. Should the Laplacian Eigenmaps be used for dimensionality reduction? Default TRUE

linearTrend

a logical scalar. Should TimeCycle Prioritize detecting linear trending signals? Default FALSE. Not recommended to change from default FALSE - will increases false positives rate. See vignette("TimeCycle") for more details.

Value

a tidy data.frame of processed results for each gene:

sampleNameperScorepValspVals.adjPeriod.in.HoursAmpPhase.In.Hours
the gene namethe median persistence score across all lags (min to max)raw empirical p-valueFDR adjusted p-valueperiod (h)amplitudephase (h)

References

TDA Package References

  • Wadhwa RR, Williamson DFK, Dhawan A, Scott JG. (2018). "TDAstats: R pipeline for computing persistent homology in topological data analysis." Journal of Open Source Software. 2018; 3(28): 860. doi:[10.21105/joss.00860]

  • Bauer U. (2019). "Ripser: Efficient computation of Vietoris-Rips persistence barcodes." arXiv: 1908.02518.

Examples

# use built in zhang2014 data set sampled every # 2 hours for 48 hours (i.e. 24 time points with 1 replicate each). # Search for genes with period of 24 hours. #set seed for reproducibility with random variables in example usage #> set.seed(1234) #> TimeCycleResults <- TimeCycle(data = zhang2014, #> repLabel = rep(1,24), #> period = 24) # Check number of genes with FDR < 0.05 and period between 22 to 26 hours. #> library(tidyverse) #> TimeCycleResults %>% #> filter(22 < Period.in.Hours & Period.in.Hours < 26) %>% #> filter(pVals.adj < 0.05) %>% #> glimpse()