Commit a061167
committed
anatScRNAseqQuery: emit Dataset cell as [label](short_form) markdown
Reviewer report on v2-dev: the Dataset column on "Single cell
transcriptomics data for adult antennal lobe projection neuron"
(and every anatScRNAseqQuery result) renders as a raw Python-dict
dump:
{symbol=, iri=http://flybase.org/reports/FBlc0006090,
types=[Entity, Individual, DataSet, hasScRNAseq,
scRNAseq_DataSet],
short_form=FBlc0006090, unique_facets=[DataSet],
label=scRNAseq_2018_Davie}
Root cause: the RETURN clause inside get_anatomy_scrnaseq's
main_query passed the `dataset` map straight through:
RETURN
cluster.short_form AS id,
apoc.text.format("[%s](%s)", [cluster.label, cluster.short_form]) AS name,
apoc.text.join(cluster.unique_facets, '|') AS tags,
dataset, <-- unwrapped Cypher map
pubs
VFBqueryJsonProcessor's generic-cell formatter has no handler for
arbitrary maps -- it has dedicated handlers for `pubs` (nested
core.label) and image markdown, but anything else falls through to
Map.toString(), which Java prints as the brace-equals shape above.
Fix mirrors how every other clickable-label cell in VFBquery is
emitted (`name`, `parent`, `template`, etc.):
apoc.text.format("[%s](%s)", [dataset.label, dataset.short_form])
AS dataset
Plus two coupled touchups:
- columns_to_encode picks up 'dataset' so percent-encoding runs
on the dataset label if it ever contains URL-unsafe chars
(consistent with `name`).
- Schema header `dataset.type` flips metadata -> markdown so the
Java side routes it through stripMarkdownLink for display and
through the existing markdown-id-extraction path for chip
navigation. Matches the v2 prod "Dataset" column behaviour
where the cell is a clickable label routing to the dataset's
individual page.
Verified locally against pdb via the same probe Robbie reported
the bug on (FBbt_00067123, adult antennal lobe projection neuron):
both adPN and lPN cluster rows now show `[scRNAseq_2018_Davie](FBlc0006090)`
in the wire response, which the Java processor renders as the bare
label "scRNAseq_2018_Davie" with a clickable id slot.
Patch bump 1.14.7 -> 1.14.8. No cache bucket renames; the
@with_solr_cache decorator on the wrapper invalidates entries
implicitly via the function source-hash change.
Related but out-of-scope for this commit: clusterExpression /
GenesExpressed has the same dict-dump pattern in its `anatomy`
field plus a wider column-name regression (Name vs Gene, missing
Cell type / Function). Tracking separately -- "more problematic".1 parent 45540bc commit a061167
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4310 | 4310 | | |
4311 | 4311 | | |
4312 | 4312 | | |
4313 | | - | |
| 4313 | + | |
4314 | 4314 | | |
4315 | 4315 | | |
4316 | 4316 | | |
| |||
4324 | 4324 | | |
4325 | 4325 | | |
4326 | 4326 | | |
4327 | | - | |
| 4327 | + | |
4328 | 4328 | | |
4329 | 4329 | | |
4330 | 4330 | | |
| |||
4335 | 4335 | | |
4336 | 4336 | | |
4337 | 4337 | | |
4338 | | - | |
| 4338 | + | |
4339 | 4339 | | |
4340 | 4340 | | |
4341 | 4341 | | |
| |||
0 commit comments