gramene-search 2.19.0 → 2.20.1
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 +53 -76
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -370,6 +370,50 @@ $9d9aeaf9299e61a1$var$grameneMaps.reactGrameneMaps = (0, $gXNCa$reduxbundler.cre
|
|
|
370
370
|
actionCreator: 'doFetchGrameneMaps'
|
|
371
371
|
};
|
|
372
372
|
});
|
|
373
|
+
/**
|
|
374
|
+
* The site's reference genome, derived from /maps rather than configured per site.
|
|
375
|
+
*
|
|
376
|
+
* `is_anchor` marks the reference genome of a species group and `anchor_taxon_id`
|
|
377
|
+
* is that group's bare species id. Note the two are deliberately different scales:
|
|
378
|
+
* an anchor's own taxon_id is genome-level (4558006) and never equals its
|
|
379
|
+
* anchor_taxon_id (4558), so the anchor is found by group, not by matching ids.
|
|
380
|
+
*
|
|
381
|
+
* A deployment is whichever group it carries the most genomes for — sorghum_v11
|
|
382
|
+
* has 120 of 128 genomes under 4558, whose anchor is 4558006 (Sb bicolor BTx623
|
|
383
|
+
* v3). Deriving it this way keeps every site correct across releases; the value
|
|
384
|
+
* that used to be configured had drifted to 4558001, a non-anchor wild relative
|
|
385
|
+
* (Sb verticilliflorum 353).
|
|
386
|
+
*
|
|
387
|
+
* Returns null in two cases callers must tolerate: before /maps has loaded, and
|
|
388
|
+
* on a release whose /maps carries no anchor fields at all — gramene main is like
|
|
389
|
+
* that today (114 genomes, not one with is_anchor), so that deployment simply has
|
|
390
|
+
* no reference genome rather than a wrong one.
|
|
391
|
+
*
|
|
392
|
+
* Verified across deployments: sorghum 4558006 (Sb bicolor BTx623 v3),
|
|
393
|
+
* oryza 39947013 and maize 4577003 (both Nipponbare / B73 v5). The genome-level
|
|
394
|
+
* id differs per release, which is the reason to resolve it rather than pin it.
|
|
395
|
+
*/ $9d9aeaf9299e61a1$var$grameneMaps.selectTargetTaxonId = (0, $gXNCa$reduxbundler.createSelector)('selectGrameneMaps', (grameneMaps)=>{
|
|
396
|
+
if (!grameneMaps) return null;
|
|
397
|
+
const genomes = Object.values(grameneMaps);
|
|
398
|
+
if (!genomes.length) return null;
|
|
399
|
+
const perGroup = {};
|
|
400
|
+
genomes.forEach((g)=>{
|
|
401
|
+
if (!g || g.anchor_taxon_id === undefined || g.anchor_taxon_id === null) return;
|
|
402
|
+
const k = String(g.anchor_taxon_id);
|
|
403
|
+
perGroup[k] = (perGroup[k] || 0) + 1;
|
|
404
|
+
});
|
|
405
|
+
let group = null;
|
|
406
|
+
let best = -1;
|
|
407
|
+
Object.keys(perGroup).forEach((k)=>{
|
|
408
|
+
if (perGroup[k] > best) {
|
|
409
|
+
best = perGroup[k];
|
|
410
|
+
group = k;
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
if (group === null) return null;
|
|
414
|
+
const anchor = genomes.find((g)=>g && g.is_anchor && String(g.anchor_taxon_id) === group);
|
|
415
|
+
return anchor ? anchor.taxon_id : null;
|
|
416
|
+
});
|
|
373
417
|
const $9d9aeaf9299e61a1$var$expressionStudies = (0, $gXNCa$reduxbundler.createAsyncResourceBundle)({
|
|
374
418
|
name: 'expressionStudies',
|
|
375
419
|
actionBaseType: 'EXPRESSION_STUDIES',
|
|
@@ -672,50 +716,6 @@ const $9d9aeaf9299e61a1$var$grameneTaxDist = {
|
|
|
672
716
|
return null;
|
|
673
717
|
})
|
|
674
718
|
};
|
|
675
|
-
// this query will give the sorghum orthologs of AT1G01260
|
|
676
|
-
// want to provide these on non-sorghum genes if available
|
|
677
|
-
// http://data.gramene.org/search?q=homology__all_orthologs:AT1G01260&fq=taxon_id:4558&fl=id
|
|
678
|
-
const $9d9aeaf9299e61a1$var$grameneOrthologs = {
|
|
679
|
-
name: 'grameneOrthologs',
|
|
680
|
-
getReducer: ()=>{
|
|
681
|
-
const initialState = {};
|
|
682
|
-
return (state = initialState, { type: type, payload: payload })=>{
|
|
683
|
-
let newState;
|
|
684
|
-
switch(type){
|
|
685
|
-
case 'GRAMENE_ORTHOLOGS_REQUESTED':
|
|
686
|
-
if (!state.hasOwnProperty(payload)) {
|
|
687
|
-
newState = Object.assign({}, state);
|
|
688
|
-
newState[payload] = [];
|
|
689
|
-
return newState;
|
|
690
|
-
}
|
|
691
|
-
break;
|
|
692
|
-
case 'GRAMENE_ORTHOLOGS_RECEIVED':
|
|
693
|
-
return Object.assign({}, state, payload);
|
|
694
|
-
}
|
|
695
|
-
return state;
|
|
696
|
-
};
|
|
697
|
-
},
|
|
698
|
-
doRequestOrthologs: (geneId)=>({ dispatch: dispatch, store: store })=>{
|
|
699
|
-
const orthologs = store.selectGrameneOrthologs();
|
|
700
|
-
if (!orthologs.hasOwnProperty(geneId)) {
|
|
701
|
-
dispatch({
|
|
702
|
-
type: 'GRAMENE_ORTHOLOGS_REQUESTED',
|
|
703
|
-
payload: geneId
|
|
704
|
-
});
|
|
705
|
-
const API = store.selectGrameneAPI();
|
|
706
|
-
const taxonId = store.selectTargetTaxonId();
|
|
707
|
-
fetch(`${API}/search?q=homology__all_orthologs:${geneId}&fq=taxon_id:${taxonId}&fl=id`).then((res)=>res.json()).then((res)=>{
|
|
708
|
-
let newOrthologs = {};
|
|
709
|
-
newOrthologs[geneId] = res.response.docs.map((d)=>d.id);
|
|
710
|
-
dispatch({
|
|
711
|
-
type: 'GRAMENE_ORTHOLOGS_RECEIVED',
|
|
712
|
-
payload: newOrthologs
|
|
713
|
-
});
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
},
|
|
717
|
-
selectGrameneOrthologs: (state)=>state.grameneOrthologs
|
|
718
|
-
};
|
|
719
719
|
const $9d9aeaf9299e61a1$var$grameneParalogs = {
|
|
720
720
|
name: 'grameneParalogs',
|
|
721
721
|
getReducer: ()=>{
|
|
@@ -819,7 +819,6 @@ $9d9aeaf9299e61a1$export$2e2bcd8739ae039 = [
|
|
|
819
819
|
$9d9aeaf9299e61a1$var$grameneMaps,
|
|
820
820
|
$9d9aeaf9299e61a1$var$grameneTaxonomy,
|
|
821
821
|
$9d9aeaf9299e61a1$var$grameneTaxDist,
|
|
822
|
-
$9d9aeaf9299e61a1$var$grameneOrthologs,
|
|
823
822
|
$9d9aeaf9299e61a1$var$grameneParalogs,
|
|
824
823
|
$9d9aeaf9299e61a1$var$grameneGermplasm,
|
|
825
824
|
$9d9aeaf9299e61a1$var$expressionSamples,
|
|
@@ -4912,7 +4911,6 @@ const $4b8473139e48e77e$export$c6dbe9be8c8b382e = {
|
|
|
4912
4911
|
fg: '#c0392b'
|
|
4913
4912
|
}
|
|
4914
4913
|
};
|
|
4915
|
-
const $4b8473139e48e77e$export$39a35029fe99c21 = '#d35400'; // specific-to dot / enhanced-in outline
|
|
4916
4914
|
function $4b8473139e48e77e$export$8ca7625ba2054603(tokens) {
|
|
4917
4915
|
const out = {};
|
|
4918
4916
|
(tokens || []).forEach((t)=>{
|
|
@@ -8196,7 +8194,7 @@ const $5c2c79352d3d7b81$export$b2e089eb3692b073 = (props)=>/*#__PURE__*/ (0, $gX
|
|
|
8196
8194
|
// Host-defined tbrowse zone for the Homology gene tree, redesigned to compare
|
|
8197
8195
|
// expression across a gene family. Three parts, aligned to the tree leaves:
|
|
8198
8196
|
// 1. a gene × organ heatmap of ordinal expression levels (expr_organ_level),
|
|
8199
|
-
//
|
|
8197
|
+
// tissue-specific / -enhanced organs are noted in cell tooltips;
|
|
8200
8198
|
// 2. a Max TPM column (expr_max_tpm), log-scaled magnitude;
|
|
8201
8199
|
// 3. a Stress column of ↑activated / ↓repressed condition chips
|
|
8202
8200
|
// (expr_activated_by / expr_repressed_by).
|
|
@@ -8388,29 +8386,17 @@ const $cd8bc494277e92a4$var$OrganCell = ({ organ: organ, gene: gene })=>{
|
|
|
8388
8386
|
const enhanced = !!(gene && gene.enhancedIn.has(organ));
|
|
8389
8387
|
const title = level ? `${(0, $4b8473139e48e77e$export$50c1f966fd3af83e)(organ)}: ${(0, $4b8473139e48e77e$export$433053e2c141d410)[level] || level}${specific ? " \xb7 specific" : enhanced ? " \xb7 enhanced" : ''}` : `${(0, $4b8473139e48e77e$export$50c1f966fd3af83e)(organ)}: not assayed`;
|
|
8390
8388
|
const style = {
|
|
8391
|
-
position: 'relative',
|
|
8392
8389
|
width: $cd8bc494277e92a4$var$ORGAN_CELL_W,
|
|
8393
8390
|
height: '100%',
|
|
8394
8391
|
boxSizing: 'border-box',
|
|
8395
8392
|
background: level ? (0, $4b8473139e48e77e$export$b352e11f7a2ac9c5)[level] || 'transparent' : 'transparent',
|
|
8396
8393
|
borderRight: $cd8bc494277e92a4$var$gridBorder
|
|
8397
8394
|
};
|
|
8398
|
-
//
|
|
8399
|
-
|
|
8395
|
+
// Tissue-specific / -enhanced organs are reported in the cell's tooltip rather
|
|
8396
|
+
// than with a marker, so the grid reads purely as expression level.
|
|
8400
8397
|
return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("div", {
|
|
8401
8398
|
title: title,
|
|
8402
|
-
style: style
|
|
8403
|
-
children: specific && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("span", {
|
|
8404
|
-
style: {
|
|
8405
|
-
position: 'absolute',
|
|
8406
|
-
top: 1,
|
|
8407
|
-
right: 1,
|
|
8408
|
-
width: 4,
|
|
8409
|
-
height: 4,
|
|
8410
|
-
borderRadius: '50%',
|
|
8411
|
-
background: (0, $4b8473139e48e77e$export$39a35029fe99c21)
|
|
8412
|
-
}
|
|
8413
|
-
})
|
|
8399
|
+
style: style
|
|
8414
8400
|
});
|
|
8415
8401
|
};
|
|
8416
8402
|
const $cd8bc494277e92a4$var$StressCell = ({ gene: gene, width: width })=>{
|
|
@@ -11484,10 +11470,6 @@ class $6c5c4f90059875bf$var$Gene extends (0, ($parcel$interopDefault($gXNCa$reac
|
|
|
11484
11470
|
const panSite = this.props.config.panSite;
|
|
11485
11471
|
const searchResult = this.props.searchResult;
|
|
11486
11472
|
const taxName = this.props.taxName;
|
|
11487
|
-
// let orthologs='';
|
|
11488
|
-
// if (this.props.orthologs && this.props.orthologs.hasOwnProperty(searchResult.id)) {
|
|
11489
|
-
// orthologs = this.props.orthologs[searchResult.id].join(', ');
|
|
11490
|
-
// }
|
|
11491
11473
|
const numWordsInDescription = searchResult.description.split(' ').length;
|
|
11492
11474
|
return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("div", {
|
|
11493
11475
|
className: "result-gene",
|
|
@@ -11646,8 +11628,6 @@ const $6c5c4f90059875bf$var$GeneList = (props)=>{
|
|
|
11646
11628
|
taxName: props.grameneTaxonomy[g.taxon_id].name,
|
|
11647
11629
|
geneDocs: props.grameneGenes,
|
|
11648
11630
|
requestGene: props.doRequestGrameneGene,
|
|
11649
|
-
requestOrthologs: props.doRequestOrthologs,
|
|
11650
|
-
orthologs: props.grameneOrthologs,
|
|
11651
11631
|
taxLut: props.grameneTaxonomy,
|
|
11652
11632
|
expandedDetail: props.grameneSearch.response.numFound === 1 && g.can_show.homology ? 'homology' : null
|
|
11653
11633
|
}, idx)),
|
|
@@ -11659,7 +11639,7 @@ const $6c5c4f90059875bf$var$GeneList = (props)=>{
|
|
|
11659
11639
|
}
|
|
11660
11640
|
return null;
|
|
11661
11641
|
};
|
|
11662
|
-
var $6c5c4f90059875bf$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)('selectConfiguration', 'selectGrameneSearch', 'selectGrameneTaxonomy', 'selectGrameneGenes', '
|
|
11642
|
+
var $6c5c4f90059875bf$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)('selectConfiguration', 'selectGrameneSearch', 'selectGrameneTaxonomy', 'selectGrameneGenes', 'selectGrameneSearchOffset', 'selectGrameneSearchRows', 'doRequestGrameneGene', 'doRequestResultsPage', $6c5c4f90059875bf$var$GeneList);
|
|
11663
11643
|
|
|
11664
11644
|
|
|
11665
11645
|
|
|
@@ -18083,14 +18063,11 @@ const $8f8e530286a37ce9$var$AttrTableViewCmp = (props)=>{
|
|
|
18083
18063
|
return `${(0, $4b8473139e48e77e$export$50c1f966fd3af83e)(o)}: ${(0, $4b8473139e48e77e$export$433053e2c141d410)[lvl] || lvl}${sp}`;
|
|
18084
18064
|
},
|
|
18085
18065
|
comparator: (a, b)=>((0, $4b8473139e48e77e$export$a61929d6d484c6d4)[a] ?? -1) - ((0, $4b8473139e48e77e$export$a61929d6d484c6d4)[b] ?? -1),
|
|
18086
|
-
|
|
18087
|
-
|
|
18066
|
+
// Specific / enhanced are reported in the tooltip above rather than
|
|
18067
|
+
// with an outline, so the grid reads purely as expression level.
|
|
18068
|
+
cellStyle: (p)=>({
|
|
18088
18069
|
background: p.value ? (0, $4b8473139e48e77e$export$b352e11f7a2ac9c5)[p.value] || 'transparent' : 'transparent'
|
|
18089
|
-
}
|
|
18090
|
-
if (p.data && p.data._specific.has(o)) style.boxShadow = `inset 0 0 0 2px ${0, $4b8473139e48e77e$export$39a35029fe99c21}`;
|
|
18091
|
-
else if (p.data && p.data._enhanced.has(o)) style.boxShadow = `inset 0 0 0 1px ${0, $4b8473139e48e77e$export$39a35029fe99c21}`;
|
|
18092
|
-
return style;
|
|
18093
|
-
}
|
|
18070
|
+
})
|
|
18094
18071
|
});
|
|
18095
18072
|
});
|
|
18096
18073
|
return;
|