feat: taxonomy info change and assembly manifest update#26
Merged
Conversation
emilylm
marked this pull request as ready for review
May 20, 2026 09:56
…ivalent check on ont or hi-c
emilylm
force-pushed
the
taxon-info-and-manifest-update
branch
from
May 20, 2026 09:57
374e84a to
404503f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Summary
This PR improves the
taxonomy_infoand assembly intent endpoints with several related enhancements. On the taxonomy side, it adds bulk upsert and NCBI refresh endpoints so existing records can be updated without re-importing from scratch. It also removes redundant columns. On the assembly side, the create manifest endpoint now accepts multiple Hi-C specimen sample IDs, allowing assemblies that draw Hi-C reads from more than one specimen to be correctly represented in the generated manifest. Some manifest fields were also updated to match the intended schema.🔄 Type of Change
🧩 Key Changes
POST /taxonomy-info/bulk-upsert— new endpoint that inserts or updates taxonomy info rows and re-fetches NCBI data, mirroring the behaviour of the single-recordcreateendpointPOST /taxonomy-info/bulk-ncbi-refresh— new endpoint that re-syncs only thencbi_*columns for a supplied list of existingtaxon_ids, leaving upstream fields unchangedAssemblyIntent.hic_specimen_sample_id(single UUID) replaced byhic_specimen_sample_ids(list of UUIDs); the manifest helper's routing check is now a set membership test, requiring minimal logic changedefined_class,mito_ref,busco_dataset_name) and backfilledmitohifi_reference_speciesfrommito_refassembly_idto the generated manifest; removed PacBio file extension validation to be consistent with ONT and Hi-C handling0003— adds nullablehic_specimen_sample_ids JSONBcolumn toassembly; the existinghic_specimen_sample_idFK column is retained and set to the first entry for backwards compatibility; removesdefined_class(redundant withncbi_class),mito_ref(redundant withmitohifi_reference_species), andbusco_dataset_name(replaced bybusco_odb10_dataset_nameandbusco_odb12_dataset_name).✅ Checklist
🔍 Review Notes
test_endpoints_assemblies.py(manifest response shape,readsvsread_fileskey) were already failing onmainbefore this branch — they are not regressions introduced herehic_specimen_sample_idshas no DB-level FK constraint (stored as JSONB); referential integrity is enforced at the API layer via_validate_specimen_samplebefore any write. Thelong_read_specimen_sample_idremains the primary identifier for versioning and assembly identitybulk-ncbi-refreshendpoint skips rows that don't yet have ataxonomy_inforecord — callers should usebulk-importorbulk-upsertfirst if creating new rows is also needed📎 Related Issues / Tickets