Skip to content

Commit 69634a2

Browse files
committed
TransgeneExpressionHere: emit Expressed_in as [label](id) markdown
Reverts the `label----id` cell payload that v1.14.3 / v1.14.4 used and lands on the standard `[label](id)` markdown convention (same shape name / parent / template / dataset already use, e.g. ListAllAvailableImages returning parent: '[medulla](FBbt_00003748)' ). Click-target wiring stays out of VFBquery. The Java VFBqueryJsonProcessor (companion v2.2.4.14 release) extracts the `(id)` half from each clickable column's markdown and builds the row's id column with the same `----` delimiter SOLRQueryProcessor uses (e.g. upstream_class_id + delim + downstream_class_id or cluster.short_form + delim + term.short_form + delim + pubs[0] + delim + dataset.short_form ). Griddle then reads click targets via path.split(entityDelimiter)[entityIndex] where entityIndex per visible column is declared in queryBuilderConfiguration.js (name=0, expressed_in=1, reference=2, dataset=3, ...). VFBquery stays delimiter-agnostic — only lists and `[label](id)` markdown go over the wire, same as every other clickable column already does today. Cypher change: the alphabetically-first leaf anat within the Owlery closure is now emitted as apoc.coll.sort(collect(DISTINCT apoc.text.format("[%s](%s)", [anat.label, anat.short_form])))[0] AS expressed_in and `id` stays as plain `ep.short_form` — the Java processor will pack it together with anat.short_form (and any other per-column ids) when it builds the row. Verified locally against pdb on pacemaker neuron (FBbt_00006048): P{GAL4-per.BS} -> '[pacemaker neuron](FBbt_00006048)' P{GAL4-tim.E} -> '[pacemaker neuron](FBbt_00006048)' P{GSV6}GS10340 -> '[pacemaker neuron](FBbt_00006048)' P{cry-GAL4.E} -> '[pacemaker neuron](FBbt_00006048)' Patch bump 1.14.4 -> 1.14.5. Wire shape change implicitly invalidates stale @with_solr_cache buckets carrying the v1.14.3 / v1.14.4 `label----id` payloads.
1 parent ae006ce commit 69634a2

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
here = path.abspath(path.dirname(__file__))
55

6-
__version__ = "1.14.4"
6+
__version__ = "1.14.5"
77

88
# Get the long description from the README file
99
with open(path.join(here, 'README.md')) as f:

src/vfbquery/vfb_queries.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5424,15 +5424,16 @@ def get_transgene_expression_here(anatomy_short_form: str, return_dataframe=True
54245424
INSTANCEOF leaf subclasses, not the parent. Same closure pattern as
54255425
get_instances (v1.12.8).
54265426
5427-
v1.14.3: adds Expressed_in column matching v2 prod's single-value
5428-
display. Each EP row carries ONE representative leaf anatomy class
5429-
its Individuals are INSTANCEOF (alphabetically first within the
5430-
Owlery closure of the queried class), wire-formatted as
5431-
`label----short_form` so the geppetto-vfb QueryLinkComponent
5432-
(single-link customComponent that's already on this column in
5433-
queryBuilderConfiguration.js) parses the entity id and renders it
5434-
as a clickable navigation link. No new React-side infrastructure
5435-
or wire-format invention needed.
5427+
v1.14.5: adds Expressed_in column matching v2 prod's single-value
5428+
display. Each EP row carries one representative leaf anatomy class
5429+
(alphabetically first within the Owlery closure) as `[label](id)`
5430+
markdown — the same convention name / parent / template / dataset
5431+
already use. Click-target wiring for v2's QueryLinkComponent is
5432+
handled downstream by the Java VFBqueryJsonProcessor (which
5433+
extracts the `(id)` from each clickable column's markdown and
5434+
builds the row's id column to match SOLRQueryProcessor's pattern).
5435+
VFBquery stays delimiter-agnostic — only lists and `[label](id)`
5436+
markdown go over the wire, same as every other clickable column.
54365437
"""
54375438
# Resolve the full subclass closure of the input anatomy class via
54385439
# Owlery. Owlery handles OWL inference (equivalence classes, defined
@@ -5474,7 +5475,12 @@ def get_transgene_expression_here(anatomy_short_form: str, return_dataframe=True
54745475
WHERE anat.short_form IN {anat_short_forms!r}
54755476
WITH ep,
54765477
collect(DISTINCT ar.pub[0]) AS pub_shorts,
5477-
apoc.coll.sort(collect(DISTINCT anat.label + '----' + anat.short_form))[0] AS expressed_in
5478+
// Alphabetically-first representative leaf anat per EP,
5479+
// emitted as `[label](id)` markdown — the same shape
5480+
// name / parent / template / dataset already use. The
5481+
// Java VFBqueryJsonProcessor handles click-target wiring
5482+
// downstream; VFBquery just emits the markdown.
5483+
apoc.coll.sort(collect(DISTINCT apoc.text.format("[%s](%s)", [anat.label, anat.short_form])))[0] AS expressed_in
54785484
ORDER BY ep.label
54795485
{limit_clause}
54805486
CALL {{
@@ -5513,7 +5519,7 @@ def get_transgene_expression_here(anatomy_short_form: str, return_dataframe=True
55135519
results = vc.nc.commit_list([main_query])
55145520
df = pd.DataFrame.from_records(get_dict_cursor()(results))
55155521
if not df.empty:
5516-
df = encode_markdown_links(df, ['name', 'template', 'thumbnail'])
5522+
df = encode_markdown_links(df, ['name', 'expressed_in', 'template', 'thumbnail'])
55175523

55185524
if return_dataframe:
55195525
return df

0 commit comments

Comments
 (0)