Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAAPedia

SAAPedia is an interactive local database for substituted amino acid peptide (SAAP) sequences derived from mass spectrometry proteomics data.

After importing a .csv, .tsv, or .xlsx file containing SAAP-base peptide (BP) pairs and related information, SAAPedia de-duplicates and allows you to browse, filter, and sort the results, and export any selection as UniProt-style FASTA files.

Each copy is run locally on the terminal after downloading this repository. The repo ships with a poopulated saap.db.

  • Backend: FastAPI + SQLite
  • Frontend: React
  • Requirement: Python 3.9+

Starting the app

Download the repo (green Code ▸ Download ZIP on GitHub, or git clone), then:

macOS / Linux

cd SAAPedia
./run.sh

The first run creates a Python environment and installs dependencies (~15 s); later runs start in a second or two. When you see running at: http://127.0.0.1:8000, open that URL. Stop with Ctrl+C on Windows or Option+C on Mac.

Windows (or if run.sh won't run)

cd SAAPedia\backend
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app

Then open http://127.0.0.1:8000.


Using the app

  • Browse — one row per unique SAAP with rollups (observations, datasets, species, best PEP, max positional probability, and more). Search, filter (dataset, digest, species, acquisition, AAS, flags, thresholds), and sort any column. Click a peptide to see every underlying observation. Select rows to export to FASTA or delete or export everything matching the current filter.
  • Import — drop a CSV, TSV, or Excel file.
  • Datasets — a summary view of the whole database: trends across substitutions, species, digest and acquisition type, plus a per-dataset breakdown (SAAP, observations, annotation coverage), or clear all data.

What counts as one SAAP?

A SAAP is uniquely identified by (SAAP, BP, AAS) — the substituted peptide, its base peptide, and the amino-acid substitution. Every imported row becomes one observation linked to its SAAP. # datasets is the number of distinct (Dataset, Species) pairs the SAAP is actually observed in (any N Datasets column in the file is ignored). Re-importing the same file is safe — exact duplicate rows are detected and not double-counted.

Import rules

  • A peptide with no UniProt accession is kept, not dropped — run Annotate afterward to resolve it from its gene symbol (or, failing that, its base peptide sequence).
  • Columns are matched tolerantly (case / spacing / punctuation-insensitive). The import summary reports any unmapped columns, so nothing is silently mis-read.

Recognized columns: SAAP, BP, AAS, Dataset, TMT/Tissue, Digest, Species, Data acquisition, PEP, Positional probability, N evidence fragments, UniProt, RefProteins, Genes, missed_cleavage, AAS_at_peptide_terminus, greater_than_shared, Immunoglobulin, Trypsin. Add new header spellings in backend/app/column_map.py.

Exports

FASTA

A major utility of SAAPedia is the ability to export all or a select number of SAAP sequences into a MaxQuant, FragPipe, or other quantitative proteomics engine-compatible UniProt-style FASTA.

Options:

  1. Export SAAP sequences (peptide or substitution in whole protein) alone as their own FASTA
  2. Export SAAP sequences appended to a reference proteome (uploaded from local desktop)
  3. Export SAAP sequences only with reverse decoys
  4. Export an entire FASTA containing reference proteome and SAAP sequences with all reverse decoys appended

.CSV

There is also the option to export the SAAP database as a .csv file for downstream analysis.


Where is my data?

All data lives in a single SQLite file at backend/saap.db. It stays on your machine and is per-copy — importing on your machine doesn't affect anyone else's. Delete the file (or use Datasets ▸ Clear all data) to start over.

Project layout

SAAPedia/
├── run.sh                 # one-command launcher (macOS/Linux)
└── backend/
    ├── requirements.txt
    └── app/
        ├── main.py        # FastAPI app + routes + serves the UI
        ├── database.py    # SQLite engine/session
        ├── models.py      # SAAP, Observation, DatasetInfo
        ├── column_map.py  # tolerant header → field mapping
        ├── ingest.py      # parse, de-dup, clean
        ├── crud.py        # queries + rollups
        ├── fasta.py       # variant-peptide FASTA
        └── static/        # build-free React app (index.html, app.js, styles.css, vendor/)

Interactive API docs live at http://127.0.0.1:8000/docs while the app is running.

About

An interactive, local, single-user database for sequences of peptides with amino acid substitutions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages