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