How ssenci97/scambrian works
SCambrian analyzes target proteomes alongside optional probe proteins, producing sequence- and embedding-based cluster assignments, summary tables, species/probe reports, an interactive viewer, and provenance metadata. The main workflow begins with configured UniProt or local FASTA inputs, then validates and deduplicates sequences before branching into MMseqs2 clustering and ESMC embedding/projection. The README documents the broad pipeline; sampled source excerpts confirm key data dependencies. Some implementation details and the report-to-viewer enrichment handoff are documented but not fully sampled.
Main entry points: h5ad_interactive.py Interactive viewer · h5ad_scanpy.py Species analysis · compile_summary.py Cluster summary · ro_crate.py RO-Crate metadata
Components 18
Inputs and preprocessing
- Sample configuration
configs/query_configs.tsv - Sequence acquisition
src/dw_uniprot_seqs.py - Feature acquisition
src/dw_uniprot_features.py - Sequence preprocessing
src/preprocess_sequences.py - Deduplicated FASTA
Clustering and projection
- MMseqs2 clustering
src/run_mmseqs2.py - ESMC embeddings
src/extract_reps_biohub.py - Projection and clustering
src/npz_scanpy.py - Projection data
Analysis results
- Cluster summary
src/compile_summary.py - Summary tables
- Species analysis
src/h5ad_scanpy.py - Interactive viewer
src/h5ad_interactive.py - Viewer template
src/templates/h5ad_interactive.html
Provenance
- RO-Crate metadata
src/ro_crate.py - Analysis artifacts
Other components
- Researcher
- UniProtKB
Connections 25
- Researcher → Sample configuration: configures samples
README.md - Sample configuration → Sequence acquisition: defines queries
README.md - Sample configuration → Feature acquisition: defines queries
README.md - UniProtKB → Sequence acquisition: provides sequences
src/dw_uniprot_seqs.py - UniProtKB → Feature acquisition: provides annotations
src/dw_uniprot_features.py - Sequence acquisition → Sequence preprocessing: supplies FASTA
README.md - Sequence preprocessing → Deduplicated FASTA: writes cleaned inputs
src/preprocess_sequences.py - Deduplicated FASTA → MMseqs2 clustering: clusters sequences
src/run_mmseqs2.py - Deduplicated FASTA → ESMC embeddings: embeds sequences
README.md - ESMC embeddings → Projection and clustering: supplies embeddings
src/npz_scanpy.py - Projection and clustering → Projection data: writes layouts
src/npz_scanpy.py - MMseqs2 clustering → Cluster summary: supplies cluster assignments
src/compile_summary.py - Projection data → Cluster summary: supplies layout clusters
src/compile_summary.py - Sequence preprocessing → Cluster summary: supplies metadata
src/compile_summary.py - Cluster summary → Summary tables: writes tables
src/compile_summary.py - Projection data → Species analysis: reads projections
src/h5ad_scanpy.py - Summary tables → Species analysis: reads cluster names
src/h5ad_scanpy.py - Projection data → Interactive viewer: renders layouts
src/h5ad_interactive.py - Summary tables → Interactive viewer: provides cluster labels
src/h5ad_interactive.py - Species analysis → Interactive viewer: provides enrichment
- Viewer template → Interactive viewer: renders viewer
- Summary tables → RO-Crate metadata: describes outputs
- Species analysis → RO-Crate metadata: describes outputs
- Interactive viewer → RO-Crate metadata: describes outputs
- RO-Crate metadata → Analysis artifacts: writes provenance
src/ro_crate.py