Skip to content

JCAP CRISPR Mixscape Pipeline is a user-friendly R Shiny application for interactive single-cell CRISPR screen analysis. It enables rapid quality control, visualization, and differential expression discovery using Mixscape and Seurat, all in a point-and-click environment. Ideal for researchers working with Perturb-seq data.

Notifications You must be signed in to change notification settings

jcaperella29/Perturb_seq_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JCAP CRISPR Mixscape Pipeline

MIT License R shiny issues Last Commit

Welcome to the JCAP CRISPR Mixscape Pipeline, a user-friendly Shiny application for interactive single-cell CRISPR analysis using the Mixscape workflow from Seurat.


📁 Repository Structure

Perturb_seq_app/ │ ├── CRISPR_APP/ # Main Shiny app code │ └── (app.R, custom.css, How_To.txt, etc.) │ ├── sample_data/ # Example input data files │ ├── counts_matrix.csv │ └── metadata.csv │ └── readme.md


🌟 Features

  • Upload your own count matrix and metadata
  • Automated QC, normalization, HVG selection
  • UMAP visualization
  • Mixscape perturbation score calculation
  • KO/NP/NT class assignment
  • Interactive plots (barplots, violin plots, heatmaps, etc)
  • Downloadable differential gene expression (KO vs NT) tables
  • Summary statistics for your dataset
  • Downloadable summary table
  • In-app How To guide and pastel garden CSS theme

📸 Screenshots

Below are example outputs generated by the JCAP CRISPR Mixscape Pipeline app:

UMAP Plots
UMAP Plots

Perturbation Score Plot
Perturbation Score Plot

KO % Barplots
KO % Barplots


🚀 Getting Started

1. Install R and dependencies

# In R/RStudio, run:
install.packages(c("shiny", "Seurat", "dplyr", "ggplot2", "patchwork", "plotly", "DT"))

2. Clone this repository
 in bash
git clone https://github.com/jcaperella29/Perturb_seq_app.git
cd Perturb_seq_app

3. Launch the App
in r/r studio console run

shiny::runApp("CRISPR_APP")

🚀 HPC Deployment: Singularity + Slurm
1. Build the Singularity Container
First, build your container image using the provided singularity.def file:

to do so in bash commmand line while in the CRISPR_APP folder from the repo  run
sudo singularity build mixscape_all_deps.sif singularity.def
This will create mixscape_all_deps.sif in your current directory.


2. Edit the sbatch Script (if needed)
Open sbatch.sh with nano or a text editor line notepad and update the paths to match your environment using the bash lines below as a template
IMAGE=/full/path/to/Perturb_seq_app/CRISPR_APP/mixscape_all_deps.sif

APPDIR=/full/path/to/Perturb_seq_app/CRISPR_APP

Also set the memory/CPU/partition as needed for your cluster.

3. Submit the Job with Slurm
use the following bash command while in the CRISPR_APP folder
sbatch sbatch.sh

This will launch your Shiny app in the background.

4. Access the App

When your job starts, check the log output for the compute node name (e.g., localhost or a node number). Use the following bash commmand.
ssh -N -L 3838:<node_name>:3838 your_user@your_hpc
Then, open http://localhost:3838 in your browser.

5. Troubleshooting
Check logs  usin the following bash commands:

tail -f perturb-shiny_<jobid>.log

tail -f perturb-shiny_<jobid>.err

If you see R errors about missing packages, rebuild your container after fixing the Singularity definition.

For more help, see the issues section or contact the maintainer.





If running remotely, use SSH tunneling to view your app in your web browser:

Happy analyzing! 🧬
Your bioinformatics Shiny app is now portable and HPC-ready.



📂 Input Data Format
Counts matrix: CSV, cells as columns, genes as rows.

Metadata: CSV, one row per cell, with required columns: gene, replicate, guide_ID, etc.

Example data: See sample_data/ for ready-to-use demo files.

🖱️ Using the App
Upload the sample or your own counts and metadata CSVs.

Click Run Normalization & UMAP to process.

Adjust Number of Neighbors if desired.

Click Run Mixscape Analysis.

Explore results in tabs:

UMAP Plots

Summary Table

KO Genes (downloadable)

KO % Barplots

Perturbation Score

Posterior Violin

Heatmap

How To

Download tables as needed!

See the "How To" tab or How_To.txt for step-by-step instructions.


📊 Example Data
sample_data/counts_matrix.csv
sample_data/metadata.csv

These files are small demo sets so you can test the full app without needing a large CRISPR dataset.

🎨 Customization
Theme: Custom CSS (CRISPR_APP/www/custom.css) inspired by Les Carnets de lApothicaire.

Modular: Edit code in CRISPR_APP/app.R for your own needs!

🛟 Support & Issues
If you have problems, please open an issue.

🙏 Credits
Seurat Mixscape: Satija Lab

UI Art Inspiration: Les Carnets de lApothicaire

Author: @jcaperella29

📄 License
MIT License.

Enjoy your CRISPR screens and happy data exploring! 🌸






About

JCAP CRISPR Mixscape Pipeline is a user-friendly R Shiny application for interactive single-cell CRISPR screen analysis. It enables rapid quality control, visualization, and differential expression discovery using Mixscape and Seurat, all in a point-and-click environment. Ideal for researchers working with Perturb-seq data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published