A centralized, multi-organism database for standardized scRNA-seq cell type markers.
WTCell allows research groups to collaboratively submit, standardize, and query marker genes across species β enforcing consistent gene nomenclature to eliminate discrepancies between labs.
- Who is this for?
- Quick Start
- What Can I Do?
- Submitting Marker Data
- Querying the Database
- Database Summary
- Gene Nomenclature Rules
- Supported Organisms
- Architecture
- Deploying to Streamlit Community Cloud
- For Developers / Local Setup
- Running Tests
- API Validation
- Extending the Database
- Further Reading
WTCell is built for bench scientists performing single-cell RNA sequencing (scRNA-seq) experiments who want to:
- Record and share the marker genes they use to annotate cell types
- Ensure their gene names match the official standard (HGNC for human, MGI for mouse, etc.)
- Look up what markers other labs in the department are using for a given cell type or tissue
- Resolve disagreements between labs about gene symbol formatting
No programming experience is required to use the submission form or search dashboard.
Prerequisites: Docker Desktop must be installed on your computer. Ask your IT/bioinformatics support contact if you need help installing it.
- Clone or download this repository.
- Copy
.env.exampleto.envand fill in a database password of your choice. - From a terminal in the project folder, run:
docker-compose up --build
- Open your browser and go to http://localhost:8501
- You will see the WTCell dashboard. Use the sidebar to switch between π Query Dashboard, π Submit Marker, and π Database Summary views.
First run only:
--buildcompiles the app container image. Subsequent starts can usedocker-compose upwithout--build.
| Task | Where to go |
|---|---|
| Search for markers by cell type, tissue, or organism | π Query Dashboard tab |
| Submit new marker genes from your experiment | π Submit Marker tab |
| Add a new cell type (not in the dropdown) | π Submit Marker β β Add a new cell type expander |
| View charts showing database composition | π Database Summary tab |
| Download a template CSV to prepare entries offline | examples/marker_submission_template.csv |
| Look up what a term means (e.g. "Cell Ontology ID") | GLOSSARY.md |
| Troubleshoot a submission error or gene naming issue | TROUBLESHOOTING.md |
| Understand the full submission process step by step | SUBMISSION_GUIDE.md |
The Submission Form is divided into five sections:
- Organism & Cell Type β select from standardized dropdowns
- Gene Information β enter the gene symbol and a stable gene ID; the symbol is auto-corrected to the right capitalization for your organism
- Experimental Context β tissue and sequencing platform
- Provenance β source reference (PubMed ID, DOI, or internal dataset ID), your email, and your lab affiliation
- Validate & Submit β click π Validate first, then πΎ Submit to database once validation passes
The two-step flow is intentional: validation checks your gene symbol and ID against official databases before writing anything to the database. This catches typos and mismatched organisms early.
For a detailed walkthrough of every field, see SUBMISSION_GUIDE.md.
From the π Query Dashboard:
- Use the Organism dropdown to filter by any supported species.
- Use the Cell Type dropdown to narrow results to a specific cell type. Only cell types that have at least one existing marker entry appear here β if your cell type is missing, use the Submit Marker page to contribute the first entry.
- Use the Tissue free-text box to search by tissue name or UBERON term.
- Results appear as a sortable table. Leave all filters blank to show all records.
The π Database Summary page shows three interactive pie charts:
- Entries by Organism β how many markers are recorded for each species
- Entries by Cell Type β breakdown across cell type categories
- Entries by Tissue β distribution of tissue contexts
Charts update automatically every 5 minutes.
Getting gene names right is the most common source of errors. WTCell enforces the following rules automatically:
| Organism | Authority | Symbol rule | Example |
|---|---|---|---|
| Human (Homo sapiens) | HGNC | ALL UPPERCASE | CD3E, TP53 |
| Mouse (Mus musculus) | MGI | First letter uppercase only | Cd3e, Trp53 |
| Zebrafish (Danio rerio) | ZFIN | Stored as entered | tp53 |
| Rat (Rattus norvegicus) | RGD | Stored as entered | Tp53 |
| Fruit Fly (Drosophila melanogaster) | FlyBase | Stored as entered | p53 |
| Nematode (C. elegans) | WormBase | Stored as entered | cep-1 |
The form auto-corrects Human and Mouse capitalization. For all other organisms, symbols are stored exactly as you type them. See GLOSSARY.md for links to each nomenclature authority.
| Format | Pattern | Example |
|---|---|---|
| NCBI Gene ID | Digits only | 916 |
| Ensembl Gene ID | ENS[species]G + 11 digits |
ENSG00000198851 |
WTCell ships with six organisms pre-loaded. Additional organisms can be added by the database administrator using a single SQL statement β contact them or see the schema comments in schema.sql.
WTCell/
βββ schema.sql # PostgreSQL schema + seed data
βββ db.py # Database connection & query helpers
βββ validation.py # Gene symbol normalisation & ID validation
βββ app.py # Streamlit UI (Query Dashboard + Submission Form + Summary)
βββ requirements.txt # Python dependencies
βββ Dockerfile # Container image for the Streamlit app
βββ docker-compose.yml # Full stack: PostgreSQL 16 + Streamlit
βββ .env.example # Environment variable template (local / Docker)
βββ .streamlit/
β βββ secrets.toml.example # Secrets template for Streamlit Community Cloud
βββ tests/
β βββ test_validation.py # Unit tests (no DB or network required)
βββ SUBMISSION_GUIDE.md # Step-by-step guide for bench scientists
βββ GLOSSARY.md # Plain-language definitions of all terms
βββ TROUBLESHOOTING.md # FAQ and discrepancy resolution guide
βββ examples/
βββ marker_submission_template.csv # Bulk upload template
Database schema (simplified):
organisms cell_types
βββββββββ ββββββββββ
organism_id PK cell_type_id PK
common_name standardized_name
scientific_name cell_ontology_id
ncbi_taxon_id aliases
nomenclature_authority
β β
ββββββββββββββ¬βββββββββββ
β
markers
βββββββ
marker_id PK
organism_id FK β organisms
cell_type_id FK β cell_types
gene_symbol
gene_id (NCBI or Ensembl)
tissue
platform
submission_source
submitter_email
lab_affiliation β submitter's lab or institution
date_submitted
WTCell can be deployed as a public or private app on Streamlit Community Cloud using a remote PostgreSQL database (e.g., Supabase, Railway, or your institution's server).
-
Push this repository to GitHub (or fork it).
-
Create a remote PostgreSQL database and run
schema.sqlagainst it:psql -h <host> -U <user> -d <dbname> -f schema.sql
-
Deploy the app on Streamlit Community Cloud by connecting your GitHub repository. Set the main file to
app.py. -
Add secrets in the Streamlit Cloud dashboard under App settings β Secrets. Paste the following, replacing the placeholder value:
NEON_DATABASE_URL="postgresql://user:password@host/dbname?sslmode=require"
A template is provided in
.streamlit/secrets.toml.example. -
Redeploy (or Streamlit Cloud will pick up the secrets on the next run). The app reads secrets automatically β no code changes required.
Security note: Never commit
.streamlit/secrets.tomlto version control. It is listed in.gitignorefor this reason. Only commit the.exampletemplate.
- Python 3.10+
- PostgreSQL 14+
# 1. Create the database
psql -U postgres -c "CREATE USER wtcell_user WITH PASSWORD 'your_password';"
psql -U postgres -c "CREATE DATABASE wtcell OWNER wtcell_user;"
psql -U wtcell_user -d wtcell -f schema.sql
# 2. Install Python dependencies
pip install -r requirements.txt
# 3. Configure environment
cp .env.example .env
# Edit .env β at minimum set DB_PASSWORD
# 4. Run the app
streamlit run app.pyAll database configuration is driven by environment variables (DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD). There is no hard-coded password. If DB_PASSWORD is unset the application will warn and fail to connect.
If you already have a WTCell database from a previous version, add the lab_affiliation column with:
ALTER TABLE markers ADD COLUMN IF NOT EXISTS lab_affiliation VARCHAR(200);pytest tests/ -vTests cover all gene symbol normalization rules and gene ID format validation. No database connection or network access is required.
When the offline mode checkbox is unchecked, the submission form performs live lookups:
- HGNC symbols β HGNC REST API (
rest.genenames.org) - MGI symbols β MyGene.info (mouse taxon 10090)
The API calls time out gracefully after 8 seconds β if the external service is unreachable the submission proceeds with a warning.
INSERT INTO organisms (common_name, scientific_name, ncbi_taxon_id, nomenclature_authority)
VALUES ('Chicken', 'Gallus gallus', 9031, 'ENTREZ');Use the "Add a new cell type" expander in the Submission Form, or insert directly:
INSERT INTO cell_types (standardized_name, cell_ontology_id, aliases)
VALUES ('Cardiomyocyte', 'CL:0000746', 'heart muscle cell');- SUBMISSION_GUIDE.md β Step-by-step guide for bench scientists submitting marker data
- GLOSSARY.md β Plain-language definitions of all technical terms
- TROUBLESHOOTING.md β Common errors, discrepancy resolution, and FAQ
- HGNC Gene Nomenclature β Official human gene symbol lookup
- MGI Gene Nomenclature β Official mouse gene symbol lookup
- Cell Ontology (CL) β Standardized cell type terms
- Uberon Anatomy Ontology β Standardized tissue/organ terms
MIT