Skip to content

feat: update results reporting and assembly manifest generation#21

Merged
emilylm merged 11 commits into
mainfrom
report-results
May 11, 2026
Merged

feat: update results reporting and assembly manifest generation#21
emilylm merged 11 commits into
mainfrom
report-results

Conversation

@emilylm

@emilylm emilylm commented May 11, 2026

Copy link
Copy Markdown
Collaborator

📌 Summary

This PR expands the assembly workflow to support specimen-driven assembly requests and downstream result reporting. It adds pre-intent specimen discovery for a taxon, nested specimen/sample/experiment/read lookup, stored JSON manifests with revised intent/versioning behavior, and stage-run reporting endpoints so assembly pipeline results and output files can be attached back to an assembly.


🔄 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Refactor (code change that neither fixes a bug nor adds a feature)
  • 📚 Documentation update
  • ⚙️ CI / build / tooling change

🧩 Key Changes

  • Added GET /api/v1/assemblies/specimen-samples/{taxon_id} for specimen discovery - used by genome launcher to discover and select specimens for a genome assembly. It returns all specimen samples for a taxon including sample_id, specimen_id, sex, and available_data_types, derived from experiments on the specimen itself plus lineage-linked derived samples. Reported data types now include PACBIO_SMRT, OXFORD_NANOPORE, Hi-C, and RNA-Seq (RNA-Seq is discovery-only for now and is not yet included in manifest generation).

  • Added GET /api/v1/samples/by-specimen/{taxon_id}/{specimen_id}/related to return the full specimen hierarchy for inspection/debugging, including the specimen sample, any linked derived samples, and all nested experiments and reads. The endpoint returns full experiment/read fields and supports encoded specimen_id path values, including spaces and /.

  • Updated POST /api/v1/assemblies/intent/{taxon_id} to require specimen in request. Callers now provide explicit long_read_specimen_sample_id and optional hic_specimen_sample_id; the endpoint, resolves derived samples, gathers the relevant experiments/reads, determines assembly data types, and generates a manifest from eligible reads only.

  • Updated manifest persistence and retrieval so manifests are stored as JSON on the assembly record and can be fetched later via GET /api/v1/assemblies/manifest/{taxon_id} and GET /api/v1/assemblies/{assembly_id}/manifest, making the manifest request flow more consistent and durible for downstream consumers.

  • Updated assembly versioning so version allocation is scoped to the selected long-read specimen sample within a taxon, reflecting repeated assembly requests for the same organism with different specimen/data combinations.

  • Added assembly "stage-run" reporting endpoints: GET /api/v1/assemblies/{assembly_id}/stage-runs, POST /api/v1/assemblies/{assembly_id}/stage-runs, and PATCH /api/v1/assemblies/{assembly_id}/stage-runs/{stage_run_id}. These support reporting results from different pipelines e.g. genomeassembly, ascc, curation-pretext, etc. Callers can provide 1) a flexible metadata object in json and 2) a list of files, for each pipeline step / stage. This has been kept flexible to facilitate the changing pipeline outputs, and allow new pipeline outputs to be reported without code changes.

  • Added the supporting schema, model, migration, and test updates needed for the revised assembly flow, including manifest storage, specimen-oriented assembly fields, and stage-run/stage-run file support.


✅ Checklist

  • Tests are passing locally / in CI
  • New tests have been added for new or changed functionality
  • Self-review completed
  • Documentation updated (if needed)
  • No sensitive data or secrets included

🔍 Review Notes

  • RNA-Seq is surfaced by the specimen discovery endpoint only. It is intentionally not yet included in assembly manifest generation, as we're not using this data yet (and don't know how we will use this data)
  • Please review the assembly intent/versioning changes together with the new manifest columns, stage-run/reporting models, and migrations, since these pieces land together in this branch.

📎 Related Issues / Tickets

  • Closes #
  • Related to #

@emilylm emilylm changed the title Report results feat: update results reporting and assembly manifest generation May 11, 2026
@emilylm
emilylm merged commit 18a4564 into main May 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant