Spatial and single-cell Major depression disease Omics Online Database
ssMOOD is an open, interactive database of single-cell and spatial transcriptomics data for major depressive disorder (MDD). It brings human MDD data and the chronic social defeat stress (CSDS) mouse model into one place, so researchers can browse datasets, look up genes, and compare cell types across brain regions, conditions and species without downloading or processing raw data first.
👉 Use it online: https://ssmood.genomics.cn
This repository contains the full source code of the website: the Vue front end, the PHP API, and the Python enrichment script.
- What's in the database
- Features
- Architecture
- Repository layout
- Run the front end locally
- Deploy your own instance
- Documentation
- Contributing
- Citation
- License
| Species | Human (MDD and controls) · Mouse (CSDS days 0, 3 and 7, plus susceptible and resilient groups) |
| Modalities | Single-nucleus RNA-seq (10x Genomics, Singleron) · Spatial transcriptomics (Stereo-seq) |
| Scale | 600,000+ single-cell profiles and 5,500,000+ spatial spots, covering 49,000+ genes |
| Organisation | Individual datasets, plus integrated studies that combine related datasets |
Live counts are shown on the home page. Dataset sources, protocols and processing steps are described in Methods.
- Browse single-cell and spatial datasets by species, brain region, condition and platform.
- Dataset pages with:
- an interactive UMAP (single-cell) or spatial map (ST), coloured by cell type;
- gene search, showing expression on the same embedding;
- differentially expressed genes per cell type, with sorting and filtering;
- KEGG and GO (BP / CC / MF) enrichment of the selected DEGs.
- Integrated studies that link several datasets, with synchronised charts.
- Download page with dataset links and the source code.
- Analyze page with an in-browser R environment (WebR) and an AI code assistant.
- English, Simplified Chinese and Traditional Chinese interface, chosen automatically from the browser language.
Single-cell dataset page: UMAP coloured by cell type (left) and expression of a searched gene, Snap25 (right).
| Spatial dataset page | Single-cell dataset browser |
|---|---|
![]() |
![]() |
| Layer | Technology |
|---|---|
| Front end | Vue 3, Vue Router, Element Plus, Plotly.js, vue-i18n, pako, WebR |
| API | PHP (mysqli / PDO), one endpoint per php/*.php file; large payloads are gzip-compressed |
| Database | MariaDB (ssmood for data, ssmood_log for visit statistics) |
| Enrichment | Python 3 with pandas and GSEApy, run by php/enrichment.php against the gene sets in php/offline_enrich_db/ |
.
├── doc/ # Images used in this README
├── php/ # PHP API endpoints, enrichment script and gene-set files
├── public/
│ ├── doc/ # Methods, Usage and News pages shown on the website (Markdown)
│ └── index.html # HTML shell and startup loading screen
└── src/
├── App.vue # Root component
├── main.js # App entry: router, i18n, Element Plus
├── config/index.js # API base URL for development and production
├── router/index.js # Routes
├── locales/ # en / zh-cn / zh-tw translations
├── styles/ # Global Element Plus theme overrides
└── components/
├── HomeView.vue # Home page
├── SingleCellList.vue # Single-cell dataset list
├── SingleCellPage.vue # Single-cell dataset page
├── STList.vue # Spatial dataset list
├── STPage.vue # Spatial dataset page
├── studySingleCellPage.vue # Integrated single-cell study page
├── studySTPage.vue # Integrated spatial study page
├── study/ # Study overview cards
├── AnalyzePage.vue # WebR + AI analysis page
├── DownloadPage.vue, DocPage.vue, ContactUsPage.vue, VisitLogPage.vue
├── general/ # Shared components (navigation bar, loaders, footer, ...)
├── analyze/ # Sub-components of the Analyze page
├── css/ # Page styles
├── color_map.js # Cell-type colour palette
└── backup/ # Deprecated components kept for reference
Requirements: Node.js 18 or newer, and npm.
git clone https://github.com/YuLab-SMU/ssMOOD.git
cd ssMOOD
npm installPoint the development build at a backend by editing devConfig.apiUrl in src/config/index.js. For example, to use the public API:
const devConfig = {
apiUrl: 'https://ssmood.genomics.cn/php/',
};Then start the dev server:
npm run serve # http://localhost:8787To build for production:
npm run build # outputs to dist/The production build calls the API at ./php/, on the same host that serves the site.
Reference environment: Ubuntu 22.04, Apache 2, PHP 8.2, MariaDB 10.6, Python 3.10.
-
PHP extensions:
mysqli(with mysqlnd),pdo_mysql,zlib,curl. -
Python packages for enrichment:
pip install pandas gseapy. -
Database: create the
ssmoodandssmood_logdatabases and load the data. Put the credentials in/etc/ssmood/db.php, outside the web root, and make the file readable only by the web server:<?php return [ 'user' => 'db_user', 'pass' => 'db_password', ];
sudo chown www-data:www-data /etc/ssmood/db.php sudo chmod 600 /etc/ssmood/db.php
-
Files: copy the contents of
dist/to the web root (e.g./var/www/html), and thephp/folder to<web root>/php. -
Apache: enable
AllowOverridefor<web root>/phpso thatphp/.htaccesstakes effect. It blocks direct access to logs, scripts and gene-set files. -
AI assistant (optional): set the LLM endpoint, model and API key in
php/config.phpon the server. Never commit real keys.
- Methods: data sources, preprocessing, DEG and enrichment workflows
- Usage: a walkthrough of every page
- News: release notes and version mapping. The current release is v1.1.1 (codebase 4.8.0).
The same pages are available on the website under About.
Issues and pull requests are welcome.
- Fork the repository and create a branch from
master. - Write code comments, commit messages and pull requests in English.
- Run
npm run lint, and make surenpm run buildsucceeds, before opening a pull request.
The ssMOOD paper is in preparation. Until it is published, please cite the website:
ssMOOD: Spatial and single-cell Major depression disease Omics Online Database. https://ssmood.genomics.cn
ssMOOD is released under the GNU Affero General Public License v3.0.
You may use, modify and redistribute it. Derivative works must be released under the same license. If you run a modified version as a network service, you must make its source code available to its users, for example with a link in the page footer.



