A Shiny application for quality control and exploratory analysis of RNA-Seq data. QC-CheckeR provides an interactive interface for metadata editing, sample management, and PCA visualization using DESeq2's variance stabilizing transformation.
- Interactive Metadata Editing: Click any row to edit sample metadata in a modal dialog
- Dynamic Group Management: Add new experimental groups on-the-fly
- Sample Deletion with Undo: Delete samples with full undo capability
- Linked Tables: Metadata and count matrix stay synchronized automatically
- CSV Export: Download edited metadata and count matrices
- Variance Stabilizing Transformation (VST): Industry-standard normalization for RNA-Seq
- Customizable Parameters:
- Blind transformation option
- Dispersion fit type (parametric, local, mean)
- Configurable number of top variable genes
- Interactive Visualization:
- Select any PC for X/Y axes
- Color by any metadata column
- Scree plot with cumulative variance
- Full plot customization (colors, size, opacity, palettes)
- Export Options: Download plots as PNG or interactive HTML
- Persistent Sessions: Work is saved with a unique session ID
- Resume Anytime: Return to your analysis using your session ID
- Manual Save Control: Click "Save Now" to persist all changes including PCA results
- Full State Preservation: Metadata, counts, DESeq2 objects, and PCA results are all saved
- Change Tracking: All edits are tracked and batched
- Email Summaries: Receive periodic summaries of changes made to your data
- Configurable Intervals: Batch notifications every 2 minutes (configurable)
# CRAN packages
install.packages(c(
"shiny",
"bslib",
"jsonlite",
"reactable",
"dplyr",
"shinycssloaders",
"blastula",
"glue",
"shinyjs",
"plotly",
"ggplot2",
"matrixStats",
"shinyjqui",
"viridisLite",
"webshot2"
))
# Bioconductor packages
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("DESeq2")The app requires two external module files:
module_session_storage.R- Handles session persistencemodule_email_notifications.R- Manages email notification system
Upload an .RData file containing two objects:
| Column | Type | Description |
|---|---|---|
label |
character | Required. Unique sample identifier matching count matrix columns |
group |
character | Required. Experimental group/condition |
| ... | any | Additional metadata columns (optional) |
- Rows: Features (genes/transcripts)
- Columns: Sample names matching
metadata$label - Values: Raw read counts (integers)
# Create example data
metadata <- data.frame(
label = c("Sample1", "Sample2", "Sample3", "Sample4"),
group = c("Control", "Control", "Treatment", "Treatment"),
batch = c("A", "B", "A", "B")
)
counts <- data.frame(
Sample1 = c(100, 200, 50),
Sample2 = c(120, 180, 45),
Sample3 = c(80, 250, 100),
Sample4 = c(90, 230, 95),
row.names = c("Gene1", "Gene2", "Gene3")
)
save(metadata, counts, file = "my_data.RData")- Clone the repository:
git clone https://github.com/yourusername/qc-checker.git
cd qc-checker-
Install dependencies (see Requirements above)
-
Run the app:
shiny::runApp()Place the following files in your Shiny Server app directory:
app.Rmodule_session_storage.Rmodule_email_notifications.R
Ensure the server has write permissions for:
saved_sessions/directory (for session persistence).credentials/directory (for email functionality)
- Load Existing Session: Enter a previously saved session ID to resume work
- Start New Session: Begin fresh with a new upload
- Upload your
.RDatafile - View and edit the metadata table by clicking rows
- Changes to the
labelcolumn automatically update count matrix headers - Use "Reset to Original" to revert all changes
- Download edited CSV files
| Parameter | Description | Default |
|---|---|---|
| Blind to design | Ignore sample groups during VST | TRUE |
| Fit type | Dispersion estimation method | parametric |
| Top variable genes | Number of genes for PCA | 500 |
- Title: Custom plot title
- Point Size/Opacity: Adjust marker appearance
- Color Palette: Choose from ColorBrewer and Viridis scales
- Grid/Legend: Toggle display options
- Background: Select plot background color
Click the "Save Now" button in the navbar to persist:
- Current metadata edits
- Count matrix state
- DESeq2 dataset object (DDS)
- VST-transformed counts
- PCA results and plot settings
qc-checker/
βββ app.R # Main application
βββ module_session_storage.R # Session management module
βββ module_email_notifications.R # Email notification module
βββ saved_sessions/ # Session data storage
β βββ *.rds # Individual session files
βββ .credentials/ # Email credentials (not in repo)
β βββ gmail_creds
βββ README.md
storage_config = list(
file_storage_enabled = TRUE,
storage_dir = "saved_sessions",
db_storage_enabled = FALSE,
cleanup_days = 7 # Auto-cleanup old sessions
)email_config = list(
enabled = TRUE,
sender_email = "your-email@gmail.com",
creds_file = "/path/to/.credentials/gmail_creds",
batch_delay_seconds = 120,
min_changes_for_email = 1
)- Email credentials should never be committed to version control
- Add
.credentials/to your.gitignore - Session files may contain sensitive data; secure the
saved_sessions/directory appropriately
- Ensure count matrix contains only non-negative integers
- Check that sample labels match between metadata and counts
- Verify you have at least 2 samples per group for meaningful PCA
- Verify the session ID is correct (case-sensitive)
- Check that
saved_sessions/directory exists and is readable - Session files expire after the configured cleanup period
- Verify credentials file exists and is readable
- Check Gmail app-specific password is configured
- Review server logs for authentication errors
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For questions or support, please open an issue on GitHub.
Made with β€οΈ for the RNA-Seq community