Repository navigation
scRNAseq: term info and queries for Samples, Assays and Clusterings; stage and tissue columns; strain stocks - #136
Merged
Merged
Conversation
term_info_fallback builds their pages when Solr has none, reusing the indexer's Cluster query on any VFBseq_ Individual; a Clustering's page leaves its Samples to a query. Related-individual links fall back to the IRI's tail when the relation has no short_form. Licence records with no licence node are dropped, so stock pages lose an empty Licence row.
A strain page lists the centre stocks derived from it: Chado links them by
strainprop derived_stock_strain_<centre> ("@fbst...:name@"), with no
stock-strain table. vfb-scRNAseq Samples now link strains (DGRP lines,
Canton-S).
Nine queries: a Clustering's Clusters, Samples and Assays; the Clusterings using a Sample; a Dataset's Clusterings, Samples and Assays; and Samples and Clusters from a stock, strain or genetic entity (hasScRNAseqSample). Cluster rows give the filtered gene count; anatScRNAseqQuery gives cell counts; scRNAdatasetData's count matches its rows (Clusters with a cell type, not every Individual). Stage and tissue are curated on Samples; a Cluster has its own stage only when determined from its expression. Tables show them apart: "Cluster stage (from expression)", and the stages / tissues of the Samples of the cluster's Clustering, fetched once per Clustering. Sample stages collapse along FBdv substage_of, never above embryonic, larval, prepupal, pupal, pharate adult or adult stage. The stage edge is matched by type (both existence_overlaps and `existence overlaps`) as well as id: untyped, it expands every expresses edge (gene -> clusters 0.2 s -> 14 s).
This was referenced Nov 2, 2026
Merged
Robbie1977
approved these changes
Nov 5, 2026
Robbie1977
left a comment
Contributor
There was a problem hiding this comment.
Reviewed, looks good.
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.
vfb-scRNAseq (the 17
VFBseq_datasets that replace the FBlc loads) adds Sample, Assay and Clustering individuals. It also links Samples to FlyBase stocks, strains and genetic entities. Until now none of these had term info or queries. Three commits: term info, FindStocks for strains, then the queries with stage and tissue columns.What changed
Term info
term_info_fallbackwhen Solr has no document. A newScRNAseqEntityTermInfoQueryIndexerreuses the indexer's Cluster query on anyVFBseq_Individual. A Clustering's page doesn't list its Samples inline;SamplesInClusteringlists them._real_licenses). Stock pages showed an empty Licence row.New queries (registered in
ha_api.QUERY_TYPE_MAP; reference entry 31a–i)ClustersInClustering,SamplesInClustering,AssaysInClustering.ClusteringsWithSample, which includes other Datasets that reuse the Sample.ClusteringsInDataset,SamplesInDataset,AssaysInDataset.ScRNAseqSamplesFromandScRNAseqClustersFrom, on nodes labelledhasScRNAseqSample(stocks, strains, alleles, splits). They follow BAO is derived from and GENO has_genotype.Existing queries
anatScRNAseqQueryshows cell counts.scRNAdatasetData: the count now uses the same pattern as the rows, Clusters with a cell type. It used to count every Individual from the Dataset, including Samples, Assays and Clusterings.anatScRNAseqQuery,expressionCluster,scRNAdatasetData,ScRNAseqClustersFrom): all three columns.substage_ofto the narrowest stage covering each period. They never go above embryonic, larval, prepupal, pupal, pharate adult or adult stage. For example, Davie's eight adult ages show as adult stage.existence_overlapsandexistence overlaps. With this, gene → clusters stays at 0.3–0.6 s; an untyped match took 14 s.derived_stock_strain_<centre>.Testing
test_stage_collapse.py(stage collapsing);test_stage_columns.py(turning raw query output into the stage and tissue columns, with the pdb lookups stubbed);test_licenses.py(dropping null licences).test_scrnaseq_clustering.py(the 9 queries, their columns, limits and schemas);test_stage_columns.py:substage_ofancestors resolve;test_licenses.py: a stock page has no empty licence, and a dataset keeps its licence;test_flybase_stocks.py(DGRP-304; Canton-S at BDSC and Kyoto; DGRP-28, whose stock is gone).test_term_info_fallback.py.