-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
102 lines (72 loc) · 4.04 KB
/
README.Rmd
File metadata and controls
102 lines (72 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
output: github_document
---
# TimeCycle: Topology Inspired MEthod for the Detection of Cycling Transcripts in Circadian Time-Series Data
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
out.width = "100%"
)
library(TimeCycle)
suppressMessages(library(tidyverse))
library(badger)
```
<!-- badges: start -->
`r badge_doi("10.1093/bioinformatics/btab476", "yellow")`
[](https://github.com/nesscoder/TimeCycle/actions)
[](https://www.tidyverse.org/lifecycle/#maturing)
`r badge_devel("nesscoder/TimeCycle", "blue")`
`r badge_code_size("nesscoder/TimeCycle")`
<!-- badges: end -->
<!--
[](https://bioconductor.org/checkResults/release/bioc-LATEST/TimeCycle)
Add Doi when published
https://doi.org/10.1101/2020.11.19.389981
-->
<img src="man/figures/logo.png" width="200" align="right"/>
> TimeCycle is designed to detect rhythmic genes in circadian transcriptomic time-series data. Based on [topological data analysis](https://nesscoder.github.io/TimeCycle/articles/TimeCycle.html#takens-theorem-1), TimeCycle provides a reliable and efficent reference-free framework for cycle detection --- handling custom sampling schemes, replicates, and missing data.
- To learn more about the [theory](https://nesscoder.github.io/TimeCycle/articles/TimeCycle.html#theory-1) and [usage](https://nesscoder.github.io/TimeCycle/articles/TimeCycle.html#usage-1) of TimeCycle, see our [video overview](https://nesscoder.github.io/TimeCycle/articles/TimeCycle.html#video-overview-1) and following `vignette("TimeCycle")`.
- For a comprehensive analysis and discussion of TimeCycle's performance in detecting rhythmic genes, see the accompanying [paper](https://doi.org/10.1093/bioinformatics/btab476).
- For details pertaining to the data and source code used in the analysis, see the [`nesscoder/TimeCycle-data`](https://github.com/nesscoder/TimeCycle-data) git repository.
***
## Installation
TimeCycle has not yet been published on Bioconductor. In the interim download the development version from GitHub.
<!--
```r
# Install release version from CRAN
install.packages("TimeCycle")
# Install development version from GitHub
devtools::install_github("nesscoder/TimeCycle")
```
-->
```r
# Install development version from GitHub
devtools::install_github("nesscoder/TimeCycle")
```
***
## Usage
Circadian cycling detection can easily be achieved using TimeCycle's main function. Get started with `TimeCycle()` by defining the data and replicate labels.
In this example, we will use the `zhang2014()` gene expression set consists of mouse livers sampled every 2-h for 48-h with a single replicate (i.e. 24 time points). TimeCycle assumes a default circadian period of 24-h.
- See `zhang2014()` for additional information about the example data set.
- See [replicate labels](https://nesscoder.github.io/TimeCycle/articles/TimeCycle.html#replicate-labels) for additional information regarding `repLabel`.
```{r, echo=F, include = FALSE}
suppressMessages(TimeCycle(data = zhang2014[1:3,], repLabel = rep(1,24), period = 24, resamplings = 10))
```
```{r}
library(TimeCycle)
#set seed for reproducibility with random variables in example usage
set.seed(1234)
TimeCycleResults <- TimeCycle(data = zhang2014, repLabel = rep(1,24))
```
Once TimeCycle has finished processing, simply check the output and filter for the genes of interest. In this example, we filter for genes with a **period of oscillation between 22 and 26** hours and an **FDR \< 0.05**.
```{r}
library(tidyverse)
TimeCycleResults %>%
filter(22 < Period.in.Hours & Period.in.Hours < 26) %>%
filter(pVals.adj < 0.05) %>%
glimpse()
```
See `vignette("TimeCycle")` for a detailed description of algorithm design and suggestions for custom parameter selection.