gramene-search 2.4.0 → 2.5.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 +24 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1624,7 +1624,8 @@ const $24971af0a229e0e3$var$grameneViews = {
|
|
|
1624
1624
|
'list',
|
|
1625
1625
|
'export',
|
|
1626
1626
|
'exprViz',
|
|
1627
|
-
'ontologyEnrichment'
|
|
1627
|
+
'ontologyEnrichment',
|
|
1628
|
+
'userLists'
|
|
1628
1629
|
]);
|
|
1629
1630
|
const autoDisable = numFound === 0 || !hasFilters;
|
|
1630
1631
|
const hasFirebase = !!(config && config.firebaseConfig);
|
|
@@ -7447,12 +7448,13 @@ const $047461923b1badda$export$964d88edb00bbcaa = (suggestion)=>{
|
|
|
7447
7448
|
const $64fad37f770d2bfe$var$genomeZone = (0, $gXNCa$tbrowse.createGenomeZone)({
|
|
7448
7449
|
id: 'genome'
|
|
7449
7450
|
});
|
|
7450
|
-
|
|
7451
|
+
// The genome (gene-structure) zone is gated behind the site-config flag
|
|
7452
|
+
// `enable_tbrowse_genome_zone` (defaults to false) — see getTbrowseZones().
|
|
7453
|
+
const $64fad37f770d2bfe$var$TBROWSE_BASE_ZONES = [
|
|
7451
7454
|
(0, $gXNCa$tbrowse.treeZone),
|
|
7452
7455
|
(0, $gXNCa$tbrowse.labelsZone),
|
|
7453
7456
|
(0, $gXNCa$tbrowse.msaZone),
|
|
7454
|
-
(0, $gXNCa$tbrowse.neighborhoodZone)
|
|
7455
|
-
$64fad37f770d2bfe$var$genomeZone
|
|
7457
|
+
(0, $gXNCa$tbrowse.neighborhoodZone)
|
|
7456
7458
|
];
|
|
7457
7459
|
class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$react))).Component {
|
|
7458
7460
|
constructor(props){
|
|
@@ -7485,7 +7487,18 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
|
|
|
7485
7487
|
return slice && slice.homology || {};
|
|
7486
7488
|
}
|
|
7487
7489
|
getViewer() {
|
|
7488
|
-
return this.getHomologySlice().viewer || '
|
|
7490
|
+
return this.getHomologySlice().viewer || 'tbrowse';
|
|
7491
|
+
}
|
|
7492
|
+
// The genome (gene-structure) zone is opt-in per site via
|
|
7493
|
+
// `enable_tbrowse_genome_zone` (defaults to false).
|
|
7494
|
+
isGenomeZoneEnabled() {
|
|
7495
|
+
return !!(this.props.configuration && this.props.configuration.enable_tbrowse_genome_zone);
|
|
7496
|
+
}
|
|
7497
|
+
getTbrowseZones() {
|
|
7498
|
+
return this.isGenomeZoneEnabled() ? [
|
|
7499
|
+
...$64fad37f770d2bfe$var$TBROWSE_BASE_ZONES,
|
|
7500
|
+
$64fad37f770d2bfe$var$genomeZone
|
|
7501
|
+
] : $64fad37f770d2bfe$var$TBROWSE_BASE_ZONES;
|
|
7489
7502
|
}
|
|
7490
7503
|
getHeight() {
|
|
7491
7504
|
const h = this.getHomologySlice().height;
|
|
@@ -7542,7 +7555,7 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
|
|
|
7542
7555
|
// logic — zones default to visible unless their definition opts out
|
|
7543
7556
|
// (e.g. neighborhood and genome opt out so they only appear once
|
|
7544
7557
|
// their async data lands; tbrowse's Layout auto-flips them on then).
|
|
7545
|
-
zones:
|
|
7558
|
+
zones: this.getTbrowseZones().map((z)=>({
|
|
7546
7559
|
id: z.id,
|
|
7547
7560
|
width: z.defaultWidth,
|
|
7548
7561
|
visible: z.defaultVisible ?? true
|
|
@@ -7583,7 +7596,8 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
|
|
|
7583
7596
|
]);
|
|
7584
7597
|
}
|
|
7585
7598
|
this.fetchNeighborhood(treeId);
|
|
7586
|
-
|
|
7599
|
+
// Only pay for gene-structure data when the genome zone is actually enabled.
|
|
7600
|
+
if (this.isGenomeZoneEnabled()) this.fetchGeneStructures(treeId, this._tbrowseData.tree);
|
|
7587
7601
|
}
|
|
7588
7602
|
fetchNeighborhood(treeId) {
|
|
7589
7603
|
if (this._neighborhoodFetchedFor === treeId) return;
|
|
@@ -7754,7 +7768,7 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
|
|
|
7754
7768
|
exonJunctions: this._tbrowseData.exonJunctions,
|
|
7755
7769
|
neighborhood: neighborhood,
|
|
7756
7770
|
geneStructures: geneStructures,
|
|
7757
|
-
zones:
|
|
7771
|
+
zones: this.getTbrowseZones(),
|
|
7758
7772
|
nodeOfInterest: this.gene._id,
|
|
7759
7773
|
viewState: tbrowseVS,
|
|
7760
7774
|
onViewStateChange: (next)=>this.setTbrowseViewState(next),
|
|
@@ -7791,8 +7805,8 @@ class $64fad37f770d2bfe$var$Homology extends (0, ($parcel$interopDefault($gXNCa$
|
|
|
7791
7805
|
margin: '8px 0'
|
|
7792
7806
|
},
|
|
7793
7807
|
children: [
|
|
7794
|
-
btn('
|
|
7795
|
-
btn('
|
|
7808
|
+
btn('tbrowse', 'TBrowse'),
|
|
7809
|
+
btn('treevis', 'TreeVis')
|
|
7796
7810
|
]
|
|
7797
7811
|
});
|
|
7798
7812
|
}
|