TCourseInspector (Time Course Inspector) is an R package that provides an interactive Shiny web application for visualization, analysis, and clustering of time-series data. It has a user-friendly GUI that requires no programming knowledge, making time-series analysis accessible to all researchers.
-
Data Preprocessing
- Normalization (fold-change or z-score)
- Outlier removal with configurable thresholds
- Linear interpolation of missing values
- Time axis trimming
- Mathematical operations on measurements
-
Visualization
- Trajectory plots; individual and population averages with confidence intervals
- Power spectral density (PSD) analysis
-
Statistical Analysis
- Area under curve (AUC) calculation
- Distribution plots (box, violin, dot plots) at specific time points
- Population statistics and variability measures
- Correlation analysis
-
Clustering
- Hierarchical clustering with multiple distance metrics (Manhattan, Euclidean, DTW)
- Sparse-hierarchical clustering for high-dimensional data
- Interactive dendrogram cutting
- Cluster validation (silhouette analysis, within-cluster sum of squares)
- PCA visualization of clusters
The screencast with an overview of the app's functionality and processing of the test-case-1 dataset can be found here.
If you just wish to give the app a quick try without installing it, you can access a running instance at shinyapps.io. Bear in mind that your experience using this instance might be sluggish and that the number of uses per month is limited. For a quick trial, we rather recommend to run the app locally as described in sections below.
Download the source from this GitHub repository and install from a local directory:
install.packages("path/to/TCourseInspector", repos = NULL, type = "source")
# Or using devtools
devtools::install_local("path/to/TCourseInspector")# Install from GitHub
devtools::install_github("dmattek/TCourseInspector-rpkg")library(TCourseInspector)
# Launch the main application
runTCourseInspector()
# Launch with example data
runTCourseInspectorExample()
# Get path to example datasets
example_path <- getTCIExampleData("test-case-1")
list.files(example_path)# Run on a specific port
runTCourseInspector(port = 8080)
# Run without launching browser (useful for servers)
runTCourseInspector(launch.browser = FALSE, host = "0.0.0.0", port = 3838)Long format provides maximum flexibility with support for multiple groupings and multivariate measurements:
| Group | ID | Time | Measurement |
|---|---|---|---|
| gr1 | 1 | 1 | 3.3 |
| gr1 | 1 | 2 | 2.1 |
| gr1 | 1 | 4 | 4.3 |
| gr1 | 2 | 1 | 2.8 |
| gr2 | 1 | 1 | 5.1 |
Required columns:
- Track ID (unique identifier for each time series)
- Time points
- At least one measurement column
Optional columns:
- Grouping variables (experimental conditions, treatments, etc.)
- Additional measurement columns for multivariate analysis
Wide format stores each time series as a single row:
| Group | ID | 0 | 1 | 2 | ... |
|---|---|---|---|---|---|
| gr1 | 1 | 3.0 | 3.3 | 3.1 | ... |
| gr1 | 2 | 2.0 | 2.1 | 1.9 | ... |
Requirements:
- First two columns: Group, Track ID
- Remaining columns: Time points (must have numeric headers)
- Load Data: Upload CSV file (compressed formats supported: .gz, .bz2)
- Configure Columns: Select track ID, time, measurement, and grouping columns
- Preprocess:
- Create unique track IDs if needed
- Trim time axis
- Interpolate missing values
- Normalize data
- Filter: Remove duplicate tracks, short tracks, or outliers
- Visualize: Plot trajectories, heatmaps, or PSD
- Analyze: Calculate AUC, examine distributions, identify correlations
- Cluster: Perform hierarchical clustering and validate results
- Export: Download processed data, plots, and cluster assignments
TCourseInspector performs pooled clustering, meaning all groups (experimental conditions) are analyzed together. This approach helps identify:
- Shared dynamics across groups
- Over/under-represented patterns in specific conditions
- Subtle differences that distinguish experimental outcomes
Distance Metrics:
- Manhattan distance (recommended for time series)
- Euclidean distance
- Dynamic Time Warping (DTW) - accounts for time shifts
Linkage Methods:
- Complete linkage (default, robust)
- Ward's method
- Average linkage
- Single linkage
Validation:
- Silhouette analysis (optimal cluster separation)
- Within-cluster sum of squares (compactness)
- Visual inspection with PCA
TCourseInspector/
├── DESCRIPTION # Package metadata and dependencies
├── NAMESPACE # Exported functions
├── R/ # R functions
│ ├── runTCourseInspector.R # Main launch functions
│ └── TCourseInspector-package.R # Package documentation
├── inst/
│ ├── shiny-app/ # Shiny application files
│ │ ├── global.R # Global setup and module loading
│ │ ├── server.R # Server logic
│ │ ├── ui.R # User interface
│ │ └── modules/ # Shiny modules
│ └── example-data/ # Example datasets
├── man/ # Documentation (generated by roxygen2)
└── vignettes/ # Usage tutorials
# Generate documentation
devtools::document()
# Check package
devtools::check()
# Build package
devtools::build()
# Install locally
devtools::install()devtools::test()If you use TCourseInspector in your research, please cite:
Dobrzyński, M., Jacques, M. A., & Pertz, O. (2019). Mining single-cell time-series datasets with Time Course Inspector. Bioinformatics, 36(6), 1968-1969. https://doi.org/10.1093/bioinformatics/btz846
Dobrzyński, M., Jacques, M. A., & Pertz, O. (2022). Mining of Single-Cell Signaling Time-Series for Dynamic Phenotypes with Clustering, in TGF-beta Signaling: Methods and Protocols, Springer, pp 183–206. https://doi.org/10.1007/978-1-0716-2277-3_13
- Issues: Report bugs or request features at GitHub Issues
- Documentation: See function help (
?runTCourseInspector) or vignettes - Examples: Try
runTCourseInspectorExample()to explore functionality
This package is licensed under GPL-3. See LICENSE file for details.
- Maciej Dobrzyński (Author, Maintainer)
- Marc-Antoine Jacques (Contributor)
Original web app and methodology developed at the Institute of Cell Biology, University of Bern.
