gramene-search 1.6.27 → 1.6.29
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/.parcel-cache/83e7562660f7cc15-BundleGraph +0 -0
- package/.parcel-cache/d3a1b9507cb44047-AssetGraph +0 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/dc1da35000e13623-RequestGraph +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/.parcel-cache/snapshot-dc1da35000e13623.txt +2 -2
- package/dist/index.js +79 -47
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
- package/src/bundles/api.js +38 -1
- package/src/components/results/details/Expression.js +17 -27
- package/src/components/results/details/Homology.js +16 -0
|
Binary file
|
|
Binary file
|
package/.parcel-cache/data.mdb
CHANGED
|
Binary file
|
|
Binary file
|
package/.parcel-cache/lock.mdb
CHANGED
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
176344589
|
|
2
|
+
1750133941590159000
|
package/dist/index.js
CHANGED
|
@@ -13,8 +13,6 @@ var $gXNCa$reactswitch = require("react-switch");
|
|
|
13
13
|
var $gXNCa$reacticonsio5 = require("react-icons/io5");
|
|
14
14
|
var $gXNCa$reacticonsbs = require("react-icons/bs");
|
|
15
15
|
var $gXNCa$reacticonsgr = require("react-icons/gr");
|
|
16
|
-
var $gXNCa$reactbootstraptypeahead = require("react-bootstrap-typeahead");
|
|
17
|
-
require("react-bootstrap-typeahead/css/Typeahead.css");
|
|
18
16
|
var $gXNCa$grameneefpbrowser = require("gramene-efp-browser");
|
|
19
17
|
var $gXNCa$gramenegenetreevis = require("gramene-genetree-vis");
|
|
20
18
|
var $gXNCa$lodashkeyBy = require("lodash/keyBy");
|
|
@@ -571,6 +569,47 @@ const $9d9aeaf9299e61a1$var$grameneOrthologs = {
|
|
|
571
569
|
},
|
|
572
570
|
selectGrameneOrthologs: (state)=>state.grameneOrthologs
|
|
573
571
|
};
|
|
572
|
+
const $9d9aeaf9299e61a1$var$grameneParalogs = {
|
|
573
|
+
name: 'grameneParalogs',
|
|
574
|
+
getReducer: ()=>{
|
|
575
|
+
const initialState = {};
|
|
576
|
+
return (state = initialState, { type: type, payload: payload })=>{
|
|
577
|
+
let newState;
|
|
578
|
+
switch(type){
|
|
579
|
+
case 'GRAMENE_PARALOGS_REQUESTED':
|
|
580
|
+
if (!state.hasOwnProperty(payload)) {
|
|
581
|
+
newState = Object.assign({}, state);
|
|
582
|
+
newState[payload] = [];
|
|
583
|
+
return newState;
|
|
584
|
+
}
|
|
585
|
+
break;
|
|
586
|
+
case 'GRAMENE_PARALOGS_RECEIVED':
|
|
587
|
+
return Object.assign({}, state, payload);
|
|
588
|
+
}
|
|
589
|
+
return state;
|
|
590
|
+
};
|
|
591
|
+
},
|
|
592
|
+
doRequestParalogs: (geneId, supertree, taxon_id)=>({ dispatch: dispatch, store: store })=>{
|
|
593
|
+
const paralogs = store.selectGrameneParalogs();
|
|
594
|
+
if (!paralogs.hasOwnProperty(geneId)) {
|
|
595
|
+
dispatch({
|
|
596
|
+
type: 'GRAMENE_PARALOGS_REQUESTED',
|
|
597
|
+
payload: geneId
|
|
598
|
+
});
|
|
599
|
+
const API = store.selectGrameneAPI();
|
|
600
|
+
const q = supertree ? `supertree_attr_s:${supertree}` : `homology__within_species_paralog:${geneId}`;
|
|
601
|
+
fetch(`${API}/search?q=${q}&rows=100&fq=taxon_id:${taxon_id}`).then((res)=>res.json()).then((res)=>{
|
|
602
|
+
let newParalogs = {};
|
|
603
|
+
newParalogs[geneId] = res.response.docs.map((d)=>d.id);
|
|
604
|
+
dispatch({
|
|
605
|
+
type: 'GRAMENE_PARALOGS_RECEIVED',
|
|
606
|
+
payload: newParalogs
|
|
607
|
+
});
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
selectGrameneParalogs: (state)=>state.grameneParalogs
|
|
612
|
+
};
|
|
574
613
|
var // function selectFacetIDs(store, field) {
|
|
575
614
|
// const path = `grameneGenes.data.facet_counts.facet_fields.${field}`;
|
|
576
615
|
// if (_.has(store,path)) {
|
|
@@ -631,6 +670,7 @@ $9d9aeaf9299e61a1$export$2e2bcd8739ae039 = [
|
|
|
631
670
|
$9d9aeaf9299e61a1$var$grameneTaxonomy,
|
|
632
671
|
$9d9aeaf9299e61a1$var$grameneTaxDist,
|
|
633
672
|
$9d9aeaf9299e61a1$var$grameneOrthologs,
|
|
673
|
+
$9d9aeaf9299e61a1$var$grameneParalogs,
|
|
634
674
|
$9d9aeaf9299e61a1$var$curatedGenes,
|
|
635
675
|
$9d9aeaf9299e61a1$var$grameneGermplasm,
|
|
636
676
|
$9d9aeaf9299e61a1$var$grameneGeneAttribs,
|
|
@@ -2211,8 +2251,6 @@ var $541b8b0d8c5501d2$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.conn
|
|
|
2211
2251
|
|
|
2212
2252
|
|
|
2213
2253
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
2254
|
|
|
2217
2255
|
function $9e29a4f60318db7a$var$DynamicIframe(props) {
|
|
2218
2256
|
// Create a ref for the iframe element
|
|
@@ -2262,12 +2300,14 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
|
|
|
2262
2300
|
props.expressionStudies
|
|
2263
2301
|
]);
|
|
2264
2302
|
let paralogs_url;
|
|
2265
|
-
let gene_url = `https://dev.gramene.org/static/atlasWidget.html?genes=${gene.atlas_id || gene._id}&
|
|
2303
|
+
let gene_url = `https://dev.gramene.org/static/atlasWidget.html?genes=${gene.atlas_id || gene._id}&localAPI=${isLocal}`;
|
|
2266
2304
|
let paralogs = [];
|
|
2267
|
-
if (
|
|
2305
|
+
if (props.grameneParalogs && props.grameneParalogs[gene._id]) paralogs = props.grameneParalogs[gene._id];
|
|
2306
|
+
else props.doRequestParalogs(gene._id, gene.homology.supertree, gene.taxon_id);
|
|
2307
|
+
// if (gene.homology && gene.homology.homologous_genes && gene.homology.homologous_genes.within_species_paralog) {
|
|
2308
|
+
// paralogs = gene.homology.homologous_genes.within_species_paralog;
|
|
2309
|
+
// }
|
|
2268
2310
|
if (paralogs.length > 1 && atlasExperiment) paralogs_url = `https://dev.gramene.org/static/atlasWidget.html?genes=${paralogs.join(' ')}&experiment=${atlasExperiment}&localAPI=${isLocal}`;
|
|
2269
|
-
const ref = (0, $gXNCa$react.useRef)(null);
|
|
2270
|
-
const ref2 = (0, $gXNCa$react.useRef)(null);
|
|
2271
2311
|
return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)((0, $gXNCa$reactbootstrap.Tabs), {
|
|
2272
2312
|
children: [
|
|
2273
2313
|
paralogs_url && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)((0, $gXNCa$reactbootstrap.Tab), {
|
|
@@ -2275,52 +2315,31 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
|
|
|
2275
2315
|
eventKey: "paralogs",
|
|
2276
2316
|
title: `Paralogs`,
|
|
2277
2317
|
children: [
|
|
2278
|
-
/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
placeholder: "Choose an experiment...",
|
|
2291
|
-
options: atlasExperimentList,
|
|
2292
|
-
labelKey: (experiment)=>`${experiment.type}: ${experiment.description || experiment._id}`
|
|
2318
|
+
/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Form).Select, {
|
|
2319
|
+
"aria-label": "experiment selector",
|
|
2320
|
+
placeholder: "Select experiment",
|
|
2321
|
+
onChange: (e)=>setAtlasExperiment(e.target.value),
|
|
2322
|
+
children: atlasExperimentList.map((e, idx)=>/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("option", {
|
|
2323
|
+
value: e._id,
|
|
2324
|
+
children: [
|
|
2325
|
+
e.type,
|
|
2326
|
+
": ",
|
|
2327
|
+
e.description || e._id
|
|
2328
|
+
]
|
|
2329
|
+
}, idx))
|
|
2293
2330
|
}),
|
|
2294
2331
|
/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$DynamicIframe, {
|
|
2295
2332
|
url: paralogs_url
|
|
2296
2333
|
})
|
|
2297
2334
|
]
|
|
2298
2335
|
}, "gxaparalogs"),
|
|
2299
|
-
/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.
|
|
2336
|
+
/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Tab), {
|
|
2300
2337
|
tabClassName: "gxa",
|
|
2301
2338
|
eventKey: "gene",
|
|
2302
2339
|
title: "All Studies",
|
|
2303
|
-
children:
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
size: "sm",
|
|
2307
|
-
id: "experiment-selector2",
|
|
2308
|
-
ref: ref,
|
|
2309
|
-
labelKey: "experiment",
|
|
2310
|
-
onChange: (exps)=>{
|
|
2311
|
-
if (exps.length > 0) {
|
|
2312
|
-
setAtlasExperiment(exps[0]._id);
|
|
2313
|
-
setTimeout(()=>ref.current?.clear(), 2000);
|
|
2314
|
-
}
|
|
2315
|
-
},
|
|
2316
|
-
placeholder: "Choose an experiment...",
|
|
2317
|
-
options: atlasExperimentList,
|
|
2318
|
-
labelKey: (experiment)=>`${experiment.type}: ${experiment.description || experiment._id}`
|
|
2319
|
-
}),
|
|
2320
|
-
/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$DynamicIframe, {
|
|
2321
|
-
url: gene_url
|
|
2322
|
-
})
|
|
2323
|
-
]
|
|
2340
|
+
children: /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$DynamicIframe, {
|
|
2341
|
+
url: gene_url
|
|
2342
|
+
})
|
|
2324
2343
|
}, "gxa"),
|
|
2325
2344
|
(0, $gXNCa$grameneefpbrowser.haveBAR)(gene) && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Tab), {
|
|
2326
2345
|
tabClassName: "eFP",
|
|
@@ -2333,8 +2352,7 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
|
|
|
2333
2352
|
]
|
|
2334
2353
|
});
|
|
2335
2354
|
};
|
|
2336
|
-
var $9e29a4f60318db7a$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)(//'
|
|
2337
|
-
'selectExpressionStudies', //'doRequestParalogExpression',
|
|
2355
|
+
var $9e29a4f60318db7a$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.connect)('selectGrameneParalogs', 'selectExpressionStudies', 'doRequestParalogs', //'doRequestParalogExpression',
|
|
2338
2356
|
$9e29a4f60318db7a$var$Detail);
|
|
2339
2357
|
|
|
2340
2358
|
|
|
@@ -2559,6 +2577,14 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
|
|
|
2559
2577
|
name: `Paralogs of ${this.gene.name}`
|
|
2560
2578
|
}));
|
|
2561
2579
|
}
|
|
2580
|
+
searchSupertree() {
|
|
2581
|
+
this.props.doReplaceGrameneFilters((0, $047461923b1badda$export$964d88edb00bbcaa)({
|
|
2582
|
+
category: 'Gene Tree',
|
|
2583
|
+
fq_field: 'supertree_attr_s',
|
|
2584
|
+
fq_value: this.gene.homology.supertree,
|
|
2585
|
+
name: this.gene.homology.supertree
|
|
2586
|
+
}));
|
|
2587
|
+
}
|
|
2562
2588
|
orthologList() {
|
|
2563
2589
|
return this.orthoParaList('ortholog');
|
|
2564
2590
|
}
|
|
@@ -2603,6 +2629,12 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
|
|
|
2603
2629
|
count: this.paralogs.length,
|
|
2604
2630
|
handleClick: this.filterParalogs.bind(this)
|
|
2605
2631
|
});
|
|
2632
|
+
if (this.gene.homology.supertree) x.push({
|
|
2633
|
+
name: `Supertree`,
|
|
2634
|
+
category: `Gene Tree`,
|
|
2635
|
+
count: this.gene.homology.supertree,
|
|
2636
|
+
handleClick: this.searchSupertree.bind(this)
|
|
2637
|
+
});
|
|
2606
2638
|
return x;
|
|
2607
2639
|
}
|
|
2608
2640
|
links() {
|