PerturBase is a web-based portal for exploring metadata from Perturb-seq experiments. Built for usability, it enables researchers to browse, filter, and visualize large-scale screening datasets through an interactive interface β no coding required.
High-level visualizations summarizing the dataset:-
- Cell counts by experiment
- Feature distributions
- Mitochondrial/ribosomal content
- Experiment type breakdown
- Interactive metadata visualizations
- Much more is coming soon!!!!
- Browse all available Perturb-seq experiments.
- Filter by Keyword search, min cell count, treatment, publication, source, type, date range, and more.
- Sortable tables with experiment-level summaries.
Each experiment includes:
- Metadata Tab: Overview of experiment + channel summaries.
- Visualization Tab: Metrics, UMAP, top genes, and heatmaps displayed via a carousel with download options.
- Download Tab: Download raw .rds files and metadata CSVs. Also, you can download the metadata.
Check PerturBase here
- Framework: Built with Flask using an application factory pattern for modular development and cleaner deployment.
- Routing: RESTful API endpoints structured using Flask Blueprints (e.g., /api/experiments, /api/dashboard).
- Database: Uses MariaDB for relational storage. SQL is used to perform fast queries on experiment metadata and more.
- Deployment: Runs behind an Apache web server, hosted under a specific path (/students_25/Team10/PerturBase/main).
- Static Assets: Serves visualization images and downloadable files via Flask routes for experiment-specific content.
- Routing: Built with react-router-dom to enable smooth client-side navigation between pages like Home, Dashboard, Experiments, and Help.
- Component Design: Modular and reusable components structure the UI, including Navbar, Footer, ExperimentList, ImageCarousel, and ExperimentFilter for metadata querying.
- AJAX Requests: Uses Axios to perform asynchronous HTTP requests to the Flask backend, enabling real-time data loading for metadata, filters, and visualizations without full page reloads.
- Visualization: Incorporates Recharts for interactive Dashboard charts (bar, line, pie) and a custom image carousel for displaying experiment visualizations, complete with download functionality.
- Styling: Responsive and modern layout achieved through custom CSS and media queries, ensuring compatibility across different screen sizes.
- On startup, the app loads metadata pre-extracted from .rds files into MariaDB.
- React pages make Axios requests to Flask endpoints to dynamically fetch experiment metadata and visualization assets.
- All filtering, sorting, and pagination logic is handled server-side for efficiency, with client-side rendering of tables and charts.
PERTURBASE/
β
βββ backend/ # Backend root (Flask app)
β βββ app.py # Entry point for the Flask app (factory function)
β βββ config.py # Configuration handler (loads environment variables)
β βββ requirements.txt # Backend Python dependencies
β βββ .env # Local environment variables (not committed)
β βββ database/ # Database logic and schema
β β βββ create_database.sh # Shell script to initialize schema
β β βββ db_utils.py # Database connection function (MariaDB, plain SQL)
β β βββ schema.sql # SQL schema (tables: Experiment, ChannelMetaData, etc.)
β β βββ countmatrix/ # Placeholder or logic for raw matrix data
β β βββ plots/ # Static plot directory or plot handling logic
β βββ routes/ # All Flask API routes (organized as blueprints)
β β βββ __init__.py # Registers all route blueprints
β β βββ experiments.py # Endpoints for experiments (summary, single, etc.)
β β βββ channels.py # Endpoints for metadata on channels (e.g., QC metrics)
β β βββ raw_counts.py # Endpoints for low-level counts
β β βββ download.py # Endpoints for downloading .rds files and CSV exports
β β βββ dashboard.py # Endpoints for aggregated stats and dashboard visualizations
β β βββ plots.py # Endpoints for plot preview/download
β βββ scripts/ # Utility scripts to extract, load, or transform data
β β βββ Load_Data_SQLs/ # Folder to hold logically split SQLs
β β βββ Meta_to_SQL.py # Python version of metadata loader
β β βββ MetaData_to_SQL.R # R-based version for metadata loading
β β βββ Seurat_to_SQL.py # Python-based count matrix loader
β β βββ Seurat_to_SQL.R # R-based count matrix loader
β β βββ mdb_helper_functions.py # Helper functions to format or clean data
β βββ tests/ # Unit + integration tests for backend
β βββ test_db_connection.py # Test database connectivity
β βββ test_routes.py # Test API endpoint responses
β
βββ frontend/ # React frontend
β βββ public/ # Static files + HTML entry point
β β βββ index.html # Root HTML for React DOM mount
β β βββ favicon.ico / logos # Application favicons
β β βββ api/ # Static API references (if used)
β βββ src/ # All source code
β β βββ components/ # Reusable UI components
β β β βββ common/ # Navbar, Footer, layout elements
β β β βββ forms/ # Form controls (e.g., filters)
β β β βββ visualizations/ # Plot rendering components
β β β βββ ExperimentList.js # Table component for experiment listings
β β βββ pages/ # Page-level views
β β β βββ Home.js # Welcome / about page
β β β βββ Dashboard.js # Summary statistics & visualizations
β β β βββ Experiments.js # Query and browse experiments
β β β βββ Experiment.js # Single experiment detail page
β β β βββ Help.js # Documentation / user guide page
β β βββ services/ # API layer (Axios wrapper)
β β β βββ api.js # Base Axios instance and helpers
β β βββ App.js # Core router and layout
β β βββ index.js # React entry point
β β βββ App.css / index.css # Global and page styles
β β βββ reportWebVitals.js # (Optional) React perf tool
β β βββ setupTests.js # Jest test setup (optional)
β βββ package.json # React dependencies and scripts
β βββ package-lock.json # Exact versions installed
β βββ README.md # Frontend-specific notes
β
βββ app_mode.sh # Simple mode switcher script (development vs production)
βββ main.py # Unified Flask app launcher with dual-mode support
βββ .gitignore # Ignored files and folders
βββ README.md # Project-wide documentation
git clone https://github.com/MYousry2002/PerturBase.gitOn Windows:
cd PerturBase/backend
python3 -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python app.pyOn macOS:
cd PerturBase/backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt- Ensure your .env file is correctly configured with your MariaDB credentials and the database name (e.g., Team10).
- If starting with a fresh database, use the provided SQL script to create the necessary tables and initialize the schema.
cd ../frontend
npm install
npm run buildThe React build will be served via Flask automatically when deployed.
- For development mode:
cd ../backend
./run-app.sh development
cd ..
python main.pyThen open your browser to:
http://localhost:5000/students_25/Team10/PerturBase/main
- For production mode:
cd ../backend
./run-app.sh production
cd ..Then open your browser to (edit URL based on where the app is hosted): http://bioed-new.bu.edu/students_25/Team10/PerturBase/main
Contributions are welcome. Please fork the repository and submit a pull request with your proposed changes. Bug reports and feature ideas welcome!
This project is licensed under the MIT License.
See the LICENSE file for full details.