Releases: VirtualFlyBrain/VFBquery
v1.9.0
VFBquery v1.9.0
New features
RelatedTools field in get_term_info
get_term_info responses now include a top-level RelatedTools array listing
MCP tools that are useful for the entity but are dispatched outside the
run_query path. Each entry has tool, label, and default_args ready to
copy into the MCP tool call.
Currently surfaced:
get_hierarchywithsubclass_of— for cell-type classes (Class+
Cell).get_hierarchywithpart_of— for nervous-system regions (Class+
Nervous_system, excluding cells), plus the nervous system root
(FBbt_00005093).find_stocks— for FlyBase feature IDs (FBgn,FBal,FBti,FBtp,
FBco,FBst). Use this rather thanrun_query/FindStockswhen you need
the optionalcollection_filterparameter (Bloomington, Kyoto, VDRC, etc.).find_combo_publications— forFBcosplit-GAL4 combinations. Use rather
thanrun_query/FindComboPublicationswhen you need full citation
metadata (DOI, PMID, miniref, year).
Behaviour changes
PartsOf and NeuronsPartHere no longer offered for neuron classes
Both queries are now suppressed when an entity has Neuron in its SuperTypes:
PartsOfon a neuron class isn't a meaningful query — anatomical sub-parts
of neuron types aren't modelled at the class level in a way that returns
useful results.NeuronsPartHere("neurons with some part in<a neuron>") doesn't make
sense.
Brain regions, neuropils, and other non-cell anatomy continue to receive both
queries.
Schema
Backward-compatible: RelatedTools is an optional new field; existing
consumers ignoring unknown fields are unaffected.
Motivation
Driven by analysis of a Llama-3.3-70B benchmark run against the VFB MCP, where
the model frequently failed to discover get_hierarchy and to differentiate
stock/publication tools from run_query query types. Surfacing these directly
in get_term_info removes the dependence on the model remembering the
relevant MCP tool exists.
v1.8.2
- Added major.minor package-version cache invalidation for SOLR caching.
- Ensures patch-level releases do not force cache refreshes.
- Invalidates unversioned cache entries on next package upgrade.
- Removed outdated release note files.
v1.8.1
Changes
- OWLERY subclass expansion for class connectivity queries: Connectivity data is now cached per direct neuron class only (no SUBCLASSOF expansion in the indexer). Query functions now follow the classic VFB pattern — OWLERY resolves subclasses at query time, Solr is batch-queried for all subclass docs, and results are merged by partner class with summed statistics.
- Removed SUBCLASSOF from Neo4j fallback in
vfb_connectivity.pyfor consistency with the new caching approach.
v1.8.0
What's New
Graph representations for connectivity queries
Added optional include_graph=true parameter to connectivity endpoints that returns a basic_graph JSON structure alongside query results, ready for visualization.
Supported endpoints:
GET /query_connectivity?...&include_graph=true(class-level and per-neuron modes)GET /run_query?query_type=NeuronNeuronConnectivityQuery&...&include_graph=trueGET /run_query?query_type=NeuronRegionConnectivityQuery&...&include_graph=trueGET /run_query?query_type=DownstreamClassConnectivity&...&include_graph=trueGET /run_query?query_type=UpstreamClassConnectivity&...&include_graph=true
Graph features:
- Nodes enriched with
symbol(display label),full_label(tooltip),group, andcolor - Nodes grouped and colored by neurotransmitter type, sensory system, or brain region
- Batch Neo4j lookup for labels, symbols, and uniqueFacets
- Automatic truncation at 80 nodes / 200 edges with
clippednotification - Compatible with VFBchat's
BasicGraphViewcomponent - Zero impact on caching — graphs generated as post-processing step
Python API:
from vfbquery.graph_builder import graph_from_query_connectivity
from vfbquery import query_connectivity
result = query_connectivity(upstream_type="Kenyon cell", group_by_class=True)
graph = graph_from_query_connectivity(result["connections"], group_by_class=True)v1.7.4
What's Changed
- Relax HA API FlyBase ID rewriting so
resolve_entityandresolve_combinationfall back to the canonical FlyBase ID when VFB term info cannot provide a preferred symbol or label. - Keep the preferred VFB term name rewrite path when term info is available.
- Update HA API validation tests to cover the canonical-ID fallback behavior.
v1.7.3
What's Changed
- Rewrite
resolve_entityandresolve_combinationHA API requests that receive FlyBase IDs to use the preferred VFB term name before querying Chado. - Return
NOT_FOUNDinstead of passing raw IDs to Chado when no preferred name/label can be derived from VFB term info. - Add focused HA API validation tests covering query normalization, ID rewriting, and the no-fallback path.
v1.7.2
What's Changed\n\n- Bump version to 1.7.2
v1.7.1
What's Changed
FlyBase queries wired into term_info
- FindStocks query now appears on FlyBase Feature terms (FBgn/FBal/FBti/FBtp/FBco/FBst) in term_info, allowing users to find available fly stocks directly from a term's query panel
- FindComboPublications query now appears on FBco (split system combination) terms, enabling publication lookup from term_info
- Both queries are available via
/run_query?id=<short_form>&query_type=FindStocks|FindComboPublicationsand registered in the Docker server'sQUERY_TYPE_MAP
v1.7.0
New Features
FlyBase Stock Finder (flybase_stocks)
resolve_entity(name_or_id)— Resolve gene names, allele symbols, or FlyBase IDs (FBgn/FBal/FBti/FBst/FBco) via 3-level search (exact → synonym → broad ILIKE)find_stocks(feature_id, collection_filter=None)— Find available fly stocks with 4-path gene UNION query, 3-path allele query, insertion, combination, and stock detail lookups- Supports collection filtering (Bloomington, Kyoto, VDRC, etc.)
FlyBase Combination Publications (flybase_combo_pubs)
resolve_combination(name_or_id)— Resolve split system combination names/synonyms (e.g. "MB002B") to FBco IDsfind_combo_publications(fbco_id)— Find linked publications with DOI, PMID, and PMCID
VFB Neuron Connectivity (vfb_connectivity)
list_connectome_datasets()— List available connectome datasets (Hemibrain, FlyWire, MANC, etc.)query_connectivity(upstream_type, downstream_type, weight, group_by_class, exclude_dbs)— Query synaptic connections between neuron types with per-neuron or class-aggregated results- Uses VFBquery's own Neo4jConnect client (no vfb_connect dependency)
API Endpoints
All new functions are exposed via the HA API server with full caching, request coalescing, and backpressure support:
GET /resolve_entity?query=<name_or_id>GET /find_stocks?id=<feature_id>&collection=<filter>GET /resolve_combination?query=<name_or_id>GET /find_combo_publications?id=<FBco_ID>GET /list_connectome_datasetsGET /query_connectivity?upstream_type=X&downstream_type=Y&weight=5&group_by_class=false&exclude_dbs=hb,fafb
Dependencies
- Added
psycopg[binary]>=3.0for FlyBase Chado PostgreSQL access
Full Changelog: v1.6.13...v1.7.0
v1.6.13 - Increase Solr cache write timeout
What's Changed (v1.6.13)
Increased Solr cache write timeout
Solr cache writes are performed asynchronously after the query returns to the user.
We now default to a 30 second write timeout (configurable via VFBQUERY_SOLR_WRITE_TIMEOUT).
This helps prevent large or slow cache writes from spamming errors while still allowing the cache to work when Solr is responsive.