galaxyproject / galaxyproject/brc-analytics

Catalog: ingest assembly_name as identity fallback, and normalize "None" strings to null

Open
#1,336 0 comments 0 reactions 1 assignee Claimed by @NoopDog View on GitHub
Dominant language
TypeScript
Stars
7
Forks
11
Avg merge
2d 12h
Merged PRs (30d)
16

Description

Two related data-quality gaps in assembly identity, both visible on `GCA_040114635.1` (*P. vivax*):

**1. Missing assembly name → blank identity.** This assembly has no strain/serotype/isolate in the catalog (`strainName: null`, all `taxonomicLevel{Strain,Isolate,Serotype}: "None"`), so it renders with a blank identity in the assembly table. But a perfectly good human name exists upstream — UCSC GenArk / NCBI `assembly_name` = **`PvMHC087`** — we just don't capture it. It currently only survives *inside the gene-model URL filename* (`…/GCA_040114635.1_PvMHC087.augustus.gtf.gz`), which is why the assistant can only surface "MHC087" by scraping it out of that URL rather than reading a field.
- **Fix:** ingest NCBI/UCSC **`assembly_name`** into the catalog and use it as the identity fallback when strain/serotype/isolate are absent (`strain → serotype → isolate → assembly_name → "—"`).

**2. Literal `"None"` strings instead of null.** The `taxonomicLevel{Strain,Isolate,Serotype}` fields hold the literal string `"None"` rather than a real null. This leaks into the assistant tool output — `_summarize_assembly` (`backend/api/app/services/tools/catalog_data.py:158`) computes `strain = strainName or taxonomicLevelStrain`, which returns the string `"None"`, so the model is handed `strain: "None"`.
- **Fix:** normalize these to real `null` at build time (and/or guard in `_summarize_assembly`).

## Acceptance criteria

- Assemblies without a strain/serotype/isolate carry an `assembly_name` and show a real label instead of a blank.
- `taxonomicLevel*` identity fields are `null` (not `"None"`) when absent; the assistant no longer receives `strain: "None"`.

## Notes

Applies to the current build and should carry into the catalog DB rebuild (#1192) ingest.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.