gramene-search 2.16.0 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -864,6 +864,17 @@ const $af4441dd29af05df$export$da3188ffd2da2525 = {
864
864
  // expansion than orthologs (11 vs 70 for msd2).
865
865
  from: 'homology__within_species_paralog',
866
866
  to: 'id'
867
+ },
868
+ neighborhood: {
869
+ label: "neighborhood (\xb110)",
870
+ // Same edge pair TBrowse walks for its neighborhood zone (see
871
+ // components/results/details/Homology.js). Unlike the homology fields these are
872
+ // numeric: a gene's compara_neighbors_10 lists the compara_idx values of the 10
873
+ // genes either side, matched against compara_idx_multi on the target. TBrowse
874
+ // omits returnRoot, which Solr defaults to true — the same as every expansion
875
+ // here — so a seed gene expands to 21: itself plus 20 neighbours.
876
+ from: 'compara_neighbors_10',
877
+ to: 'compara_idx_multi'
867
878
  }
868
879
  };
869
880
  function $af4441dd29af05df$export$a6dc3fef1cecdf28(node) {
@@ -7411,18 +7422,33 @@ function $541b8b0d8c5501d2$var$logAction(sugg) {
7411
7422
  label: sugg.name
7412
7423
  });
7413
7424
  }
7425
+ // The species label under a suggestion. Returns '' rather than throwing when the
7426
+ // taxonomy can't explain a taxon: this runs during render, so anything thrown here
7427
+ // takes down the whole suggestions panel and the search box looks broken.
7428
+ //
7429
+ // That is not hypothetical. `grameneTaxonomy` is persisted with a 24h staleAfter, so
7430
+ // after a data release adds genomes — v11 added 4558118/4558119/4558120 — every
7431
+ // browser still holding the previous release's taxonomy has suggestions referencing
7432
+ // taxa it has never heard of. Broad queries ("kinase", "sb") hit all three.
7414
7433
  function $541b8b0d8c5501d2$var$getLowestCommonAncestorName(tids, taxonomy) {
7434
+ if (!Array.isArray(tids) || !taxonomy) return '';
7415
7435
  let lca;
7416
7436
  tids.forEach((tid)=>{
7437
+ const node = taxonomy[tid];
7438
+ if (!node || !Array.isArray(node.ancestors)) return; // unknown taxon: ignore it
7417
7439
  if (!lca) lca = [
7418
- ...taxonomy[tid].ancestors
7440
+ ...node.ancestors
7419
7441
  ];
7420
7442
  else {
7421
- let ancestors = new Set(taxonomy[tid].ancestors);
7422
- while(!ancestors.has(lca[0]))lca.shift();
7443
+ let ancestors = new Set(node.ancestors);
7444
+ // `lca.length &&` matters: with no ancestor in common this shifted an empty
7445
+ // array forever, since ancestors.has(undefined) is never true.
7446
+ while(lca.length && !ancestors.has(lca[0]))lca.shift();
7423
7447
  }
7424
7448
  });
7425
- return taxonomy[lca[0]].short_name;
7449
+ if (!lca || !lca.length) return '';
7450
+ const root = taxonomy[lca[0]];
7451
+ return root ? root.short_name : '';
7426
7452
  }
7427
7453
  const $541b8b0d8c5501d2$var$TryPan = (props)=>{
7428
7454
  const query = props.query;
@@ -8988,6 +9014,7 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
8988
9014
  nodeOfInterest: this.gene._id,
8989
9015
  viewState: effectiveVS,
8990
9016
  onViewStateChange: onViewStateChange,
9017
+ densityControls: true,
8991
9018
  defaultOpenSections: {
8992
9019
  zones: true,
8993
9020
  search: true
@@ -20019,6 +20046,7 @@ const $15504f5eba8e73bd$var$TaxDistTbrowse = (props)=>{
20019
20046
  showHeader: true,
20020
20047
  rowHeight: 14,
20021
20048
  fontSize: 10,
20049
+ densityControls: true,
20022
20050
  autoHeight: true,
20023
20051
  defaultOpenSections: {
20024
20052
  search: true,
@@ -20661,7 +20689,7 @@ const $693dd8c7a5607c3a$var$Filter = ({ node: node, moveCopyMode: moveCopyMode,
20661
20689
  // group means "expand whatever this group matches".
20662
20690
  menuItems.push(/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("li", {
20663
20691
  className: "gramene-filter-menu-label",
20664
- children: "expand filter(s)"
20692
+ children: "expand search"
20665
20693
  }, key++));
20666
20694
  Object.keys((0, $af4441dd29af05df$export$da3188ffd2da2525)).forEach((type)=>{
20667
20695
  const checked = expType === type;