Functions in execution order#
Find a specific function in the Python index, Python API or Rust index. The list below follows the default runner's execution order.
Start at workflow.main. Read its execute
calls from top to bottom; they connect the stages below. Python checks inputs,
organizes processes and records results; Rust performs sequence matching and
razor selection. The method diagram gives the scientific view.
The main call path#
flowchart TD
A["workflow.main"] --> B["load_manifest"]
B --> C["extract pooled evidence"]
C --> D["extract acquisition candidates"]
D --> E["parsimony_engine: run_razor"]
E --> F["Optional build_selection"]
E --> S["sage_config and Sage"]
F -.-> S
S --> N{"More acquisitions?"}
N -->|Yes| D
N -->|No| G["group_searches → study_dictionary"]
G --> Q["quantify_study"]
Q --> V["analyze_study"]
Before the run: prepare inputs#
These are separate commands, used when needed. The study runner does not download databases or run a de novo prediction model automatically.
| Task | Find this function | Result |
|---|---|---|
| Plan, download and unpack a reference | plan_download, download_resource, unpack_resource |
Checked local files and a download record |
| Curate downloaded protein FASTAs | lake_builder.main |
Prepared reference and retained source headers; see the download-to-study tutorial |
| Check existing DIANovo predictions | parse_dianovo_prediction, shared Rust parser |
Complete peptides with zero-aware confidence; input contract |
| Prepare specimen-matched DNA/RNA inputs | prepare_source |
source.json, verified tables and sequence-coverage ledger |
During the run: actual call order#
This is the default augment route. Each acquisition completes steps 4–7 before the next starts. Search parameters and optional annotation settings are validated before output is created.
| Order | Function or executable | What to follow |
|---|---|---|
| 1. Plan resources | plan_laptop → detect_capacity, when --laptop is set |
Visible RAM/CPU limits → thread and reference-piece plan |
| 2. Validate acquisitions | load_manifest, then load_reference for molecular rows |
Resolve paths; check unique acquisition IDs, specimen identity and input hashes |
| 3. Pool de novo evidence | Runner's extract("evidence", ...) → extract_chunked when chunking is selected |
Match pooled predictions against the lake; merge pieces into evidence.fasta |
| 4. Draw an acquisition's candidates | Runner's extract(sample + "_extract", ...) |
Match that acquisition's predictions against pooled evidence → sample_lake.fasta |
| 5. Select the compact database | parsimony_engine.main |
Complete candidate set → razor FASTA with the recorded hash/accession tie rule |
| 6. Add matched molecular evidence | build_selection, through molecular add |
Preserve de novo targets; add exact DNA/RNA/compound-supported sequences → molecular/search.fasta |
| 7. Search the spectra | sage_config, then Sage |
Final FASTA + mzML → search/<sample>/config.json, PSM and LFQ tables |
| 8. Write compatibility summaries | aggregation_engine.main |
Only with --member-set-aggregate: member-set summaries under aggregate/; distinct from the fixed study matrix |
| 9. Fix study reporting groups | study_cli.main → group_searches → study_dictionary |
Accepted study peptides → deterministic dictionary, sum matrix, representatives and peptide evidence |
| 10. Quantify those groups | quantify_study |
Grouped ions → sum or directLFQ quantities; preserve missing cells and sample identity |
| 11. Make basic QC/PCA | analyze_study |
Selected matrix → coverage/missingness, AnnData and plots; record PCA eligibility |
| 12. Annotate, if requested | annotate_study → annotate_fasta |
Selected representatives → annotation and unresolved-sequence ledgers |
Both extraction routes call fasta_extractor.main.
Chunking preserves the global prediction ranking and merges evidence before
razor inference. In --molecular-reference shared mode, step 3 is omitted and
write_reference supplies the matched
specimen reference at step 4. Molecular additions still follow de novo selection.
The nested execute helper calls run_recorded
and appends commands.json. A failed command stops the run; the final
COMPLETE.json is written only after the requested stages finish.
After the run: explicit extensions#
| Question | Function | Output and scope |
|---|---|---|
| What did molecular additions gain or lose? | increment_report, reference_map, evidence_tables |
Matched-search comparison with reference-wide peptide specificity |
| Which selected unknowns can be embedded? | embed_unknown, sequence_windows |
Optional local ESM-C vectors covering all residues; embeddings do not assign function |
| What community does the peptide evidence support? | prepare_unipept_queries → taxonomy_report | Native Unipept assignments → sunburst/treemap/tree and holobiont balance; tutorial |
| How are peptides, proteins and function connected? | export_evidence_network → render_ckg_network, annotate_evidence_network | Complete memberships, exact eggNOG join and optional CKG view; tutorial |
| How does measured functional signal vary? | explore_study, numeric transforms |
Experimental functional accounting and ordination with explicit missingness/design |
Read a stage with its tests#
Search by function name, or start with these pairs:
- Input integrity: downloads, molecular tests under tests/.
- Capacity and exact piece-boundary behavior: capacity, chunking.
- Search settings: search options.
- Quantification and QC: quantification, downstream.
- Added support and function: increments, annotation, experimental numeric transforms.
The measured CAMPI example connects the main stages. The multi-omics example adds explicitly synthetic molecular values to real sequences and spectra. See contributing for development/test commands and contributor guide for setup and contribution guidance.