End-to-End Process Flows
This chapter maps complete request-to-persistence flows for major Coyote3 workflows.
1. Login and route guard flow
- User authenticates through login routes.
- Request lifecycle loads user context.
- Route decorators validate permission and sample scope.
- Unauthorized requests terminate before business logic.
2. Samples worklist flow (/samples)
Handler: home_bp.samples_home
- Parse search and status state.
- Resolve user assay/environment scope.
- Optionally narrow assays by path parameters.
- Query done and/or live samples through
SampleHandler.get_samples.
- Apply recent-window constraint for done list when no active search.
- Render worklist template.
3. Sample settings flow (/samples/<sample_id>/edit)
- Load sample and assay configuration.
- Initialize missing sample filters from assay defaults.
- Compute effective gene set from ASP + ISGL + ad-hoc genes.
- Compute raw and filtered variant statistics.
- Render settings page.
Supporting sample-settings routes modify sample.filters directly.
4. DNA list flow (/dna/sample/<sample_id>)
- Load sample/config/schema.
- Resolve assay group and subpanel.
- Merge sample filter state with assay defaults.
- Compute effective gene filter set.
- Build and execute variant query.
- Add blacklist metadata.
- Add global annotation and classification context.
- Build section-specific display data (SNV/CNV/translocation/biomarker).
- Render DNA list template.
5. Auto-tier resolution flow
Handler: AnnotationsHandler.get_global_annotations
- Build variant identity set in priority order (
p, c, g).
- Query annotation records by gene + identity.
- Resolve latest scoped class for current assay context.
- For
solid, include subpanel matching.
- Fallback to class
999 when scoped classification is absent.
- Optionally attach transcript-aware alternative class.
6. Manual classification flow
Routes:
/dna/<sample_id>/var/<var_id>/classify
/dna/<sample_id>/multi_class
/dna/<sample_id>/var/<var_id>/rmclassify
Behavior:
- create class records in
annotation
- create text records in bulk classification path
- remove scoped class records through unclassify action
Mutations include:
- false-positive flags
- interesting/irrelevant/noteworthy flags
- comment hide/unhide operations
These actions update event or sample comment state, then redirect back to case workspace.
8. DNA report preview flow
Route:
/dna/sample/<sample_id>/preview_report
Behavior:
- builds report payload using shared report builder
- renders HTML preview
- performs no file or database writes
9. DNA report save flow
Route:
/dna/sample/<sample_id>/report/save
Persistence sequence:
- Generate report identifier and output path.
- Build report payload with snapshot rows.
- Write report HTML artifact.
- Append report metadata and increment
report_num in sample.
- Upsert immutable snapshot rows in
reported_variants.
- Redirect to worklist with reload.
10. Historical interpretation flow
Routes:
/reported_variants/variant/<variant_id>/<tier>
/search/tiered_variants
Behavior:
- resolve current annotation and historical report linkage
- enrich results with sample/report references
- provide report-time interpretation traceability
11. RNA workflow summary
Route:
Flow:
- Load sample and fusion filter state.
- Build fusion query by thresholds/effects/callers.
- Load fusion rows.
- Attach global annotation/classification context.
- Render list and detail pages.
- Render preview/PDF report outputs.
12. Admin versioned-configuration flow
For users/roles/permissions/ASP/ASPC/ISGL:
- Parse and validate form payload.
- Increment version metadata.
- Store version-history hash/delta.
- Persist updated document.
- Support rewind through delta application when requested.