gramene-search 1.6.12 → 1.6.13

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.
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- 60898790
2
- 1734408546738528000
1
+ 61385834
2
+ 1734410523034014000
package/dist/index.js CHANGED
@@ -2056,7 +2056,6 @@ var $27617dbc24e7faf0$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.conn
2056
2056
  function $541b8b0d8c5501d2$var$showMatches(text, x) {
2057
2057
  let re = new RegExp(`(${x})`, "ig");
2058
2058
  let match = text.split(re);
2059
- console.log("showMatches", text, x, match);
2060
2059
  return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("span", {
2061
2060
  children: match.map((str, idx)=>{
2062
2061
  if (idx % 2 === 1) return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("span", {
@@ -2078,6 +2077,19 @@ function $541b8b0d8c5501d2$var$logAction(sugg) {
2078
2077
  label: sugg.name
2079
2078
  });
2080
2079
  }
2080
+ function $541b8b0d8c5501d2$var$getLowestCommonAncestorName(tids, taxonomy) {
2081
+ let lca;
2082
+ tids.forEach((tid)=>{
2083
+ if (!lca) lca = [
2084
+ ...taxonomy[tid].ancestors
2085
+ ];
2086
+ else {
2087
+ let ancestors = new Set(taxonomy[tid].ancestors);
2088
+ while(!ancestors.has(lca[0]))lca.shift();
2089
+ }
2090
+ });
2091
+ return taxonomy[lca[0]].short_name;
2092
+ }
2081
2093
  const $541b8b0d8c5501d2$var$Suggestions = (props)=>{
2082
2094
  let suggestions = props.grameneSuggestions;
2083
2095
  if (suggestions && suggestions.grouped) {
@@ -2161,6 +2173,12 @@ const $541b8b0d8c5501d2$var$Suggestions = (props)=>{
2161
2173
  /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Badge), {
2162
2174
  bg: "secondary",
2163
2175
  children: sugg.num_genes
2176
+ }),
2177
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("i", {
2178
+ children: [
2179
+ "\xa0",
2180
+ $541b8b0d8c5501d2$var$getLowestCommonAncestorName(sugg.taxon_id, props.grameneTaxonomy)
2181
+ ]
2164
2182
  })
2165
2183
  ]
2166
2184
  }, jdx))
@@ -2170,7 +2188,7 @@ const $541b8b0d8c5501d2$var$Suggestions = (props)=>{
2170
2188
  });
2171
2189
  } else return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("div", {});
2172
2190
  };
2173
- var $541b8b0d8c5501d2$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)("selectGrameneSuggestions", "selectSuggestionsQuery", "doAcceptSuggestion", "doAcceptGrameneSuggestion", $541b8b0d8c5501d2$var$Suggestions);
2191
+ var $541b8b0d8c5501d2$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)("selectGrameneSuggestions", "selectSuggestionsQuery", "selectGrameneTaxonomy", "doAcceptSuggestion", "doAcceptGrameneSuggestion", $541b8b0d8c5501d2$var$Suggestions);
2174
2192
 
2175
2193
 
2176
2194