@jbrowse/plugin-wiggle 2.17.0 → 2.18.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/BigWigAdapter/BigWigAdapter.d.ts +4 -3
- package/dist/BigWigAdapter/BigWigAdapter.js +3 -8
- package/dist/BigWigAdapter/configSchema.d.ts +0 -9
- package/dist/BigWigAdapter/configSchema.js +1 -13
- package/dist/BigWigAdapter/index.d.ts +1 -1
- package/dist/CreateMultiWiggleExtension/ConfirmDialog.d.ts +1 -1
- package/dist/CreateMultiWiggleExtension/ConfirmDialog.js +2 -2
- package/dist/CreateMultiWiggleExtension/index.d.ts +1 -1
- package/dist/CreateMultiWiggleExtension/index.js +26 -26
- package/dist/DensityRenderer/DensityRenderer.d.ts +2 -1
- package/dist/DensityRenderer/DensityRenderer.js +1 -1
- package/dist/DensityRenderer/configSchema.js +1 -7
- package/dist/DensityRenderer/index.d.ts +1 -1
- package/dist/DensityRenderer/index.js +1 -1
- package/dist/LinePlotRenderer/LinePlotRenderer.d.ts +3 -2
- package/dist/LinePlotRenderer/LinePlotRenderer.js +1 -1
- package/dist/LinePlotRenderer/configSchema.d.ts +0 -3
- package/dist/LinePlotRenderer/configSchema.js +1 -10
- package/dist/LinePlotRenderer/index.d.ts +1 -1
- package/dist/LinearWiggleDisplay/components/SetColorDialog.js +2 -2
- package/dist/LinearWiggleDisplay/components/Tooltip.d.ts +2 -2
- package/dist/LinearWiggleDisplay/components/Tooltip.js +0 -1
- package/dist/LinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
- package/dist/LinearWiggleDisplay/components/WiggleDisplayComponent.js +2 -2
- package/dist/LinearWiggleDisplay/configSchema.d.ts +1 -12
- package/dist/LinearWiggleDisplay/configSchema.js +0 -15
- package/dist/LinearWiggleDisplay/index.d.ts +1 -1
- package/dist/LinearWiggleDisplay/index.js +1 -1
- package/dist/LinearWiggleDisplay/model.d.ts +13 -71
- package/dist/LinearWiggleDisplay/model.js +2 -51
- package/dist/LinearWiggleDisplay/renderSvg.d.ts +2 -2
- package/dist/LinearWiggleDisplay/renderSvg.js +1 -2
- package/dist/MultiDensityRenderer/MultiDensityRenderer.d.ts +4 -3
- package/dist/MultiDensityRenderer/MultiDensityRenderer.js +2 -3
- package/dist/MultiDensityRenderer/configSchema.js +1 -7
- package/dist/MultiDensityRenderer/index.d.ts +1 -1
- package/dist/MultiLineRenderer/MultiLineRenderer.d.ts +3 -2
- package/dist/MultiLineRenderer/MultiLineRenderer.js +1 -2
- package/dist/MultiLineRenderer/configSchema.d.ts +0 -6
- package/dist/MultiLineRenderer/configSchema.js +1 -13
- package/dist/MultiLineRenderer/index.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/ColorLegend.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/ColorLegend.js +0 -1
- package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/DraggableDialog.js +3 -7
- package/dist/MultiLinearWiggleDisplay/components/RectBg.js +1 -1
- package/dist/MultiLinearWiggleDisplay/components/ScoreLegend.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/SetColorDialog.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/SetColorDialog.js +3 -5
- package/dist/MultiLinearWiggleDisplay/components/SourcesGrid.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/SourcesGrid.js +15 -26
- package/dist/MultiLinearWiggleDisplay/components/Tooltip.d.ts +3 -3
- package/dist/MultiLinearWiggleDisplay/components/Tooltip.js +1 -2
- package/dist/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/YScaleBars.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/YScaleBars.js +1 -1
- package/dist/MultiLinearWiggleDisplay/components/util.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/components/util.js +1 -1
- package/dist/MultiLinearWiggleDisplay/configSchema.d.ts +1 -10
- package/dist/MultiLinearWiggleDisplay/configSchema.js +1 -19
- package/dist/MultiLinearWiggleDisplay/index.d.ts +1 -1
- package/dist/MultiLinearWiggleDisplay/index.js +1 -1
- package/dist/MultiLinearWiggleDisplay/model.d.ts +17 -139
- package/dist/MultiLinearWiggleDisplay/model.js +14 -120
- package/dist/MultiLinearWiggleDisplay/renderSvg.d.ts +2 -2
- package/dist/MultiLinearWiggleDisplay/renderSvg.js +1 -1
- package/dist/MultiQuantitativeTrack/configSchema.d.ts +1 -1
- package/dist/MultiQuantitativeTrack/configSchema.js +1 -7
- package/dist/MultiQuantitativeTrack/index.d.ts +1 -1
- package/dist/MultiQuantitativeTrack/index.js +1 -1
- package/dist/MultiRowLineRenderer/MultiRowLineRenderer.d.ts +3 -2
- package/dist/MultiRowLineRenderer/MultiRowLineRenderer.js +1 -2
- package/dist/MultiRowLineRenderer/configSchema.d.ts +0 -6
- package/dist/MultiRowLineRenderer/configSchema.js +2 -14
- package/dist/MultiRowLineRenderer/index.d.ts +1 -1
- package/dist/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.d.ts +3 -2
- package/dist/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.js +1 -2
- package/dist/MultiRowXYPlotRenderer/configSchema.d.ts +0 -12
- package/dist/MultiRowXYPlotRenderer/configSchema.js +2 -20
- package/dist/MultiRowXYPlotRenderer/index.d.ts +1 -1
- package/dist/MultiWiggleAdapter/MultiWiggleAdapter.d.ts +4 -3
- package/dist/MultiWiggleAdapter/MultiWiggleAdapter.js +8 -13
- package/dist/MultiWiggleAdapter/configSchema.d.ts +0 -6
- package/dist/MultiWiggleAdapter/configSchema.js +1 -10
- package/dist/MultiWiggleAdapter/index.d.ts +1 -1
- package/dist/MultiWiggleAdapter/index.js +1 -1
- package/dist/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.d.ts +1 -1
- package/dist/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +2 -4
- package/dist/MultiWiggleAddTrackWorkflow/index.d.ts +1 -1
- package/dist/MultiWiggleAddTrackWorkflow/index.js +1 -2
- package/dist/MultiWiggleRendering.d.ts +3 -3
- package/dist/MultiWiggleRendering.js +2 -2
- package/dist/MultiXYPlotRenderer/MultiXYPlotRenderer.d.ts +3 -2
- package/dist/MultiXYPlotRenderer/MultiXYPlotRenderer.js +1 -2
- package/dist/MultiXYPlotRenderer/configSchema.d.ts +0 -12
- package/dist/MultiXYPlotRenderer/configSchema.js +1 -19
- package/dist/MultiXYPlotRenderer/index.d.ts +1 -1
- package/dist/QuantitativeTrack/configSchema.d.ts +1 -1
- package/dist/QuantitativeTrack/configSchema.js +1 -7
- package/dist/QuantitativeTrack/index.d.ts +1 -1
- package/dist/QuantitativeTrack/index.js +1 -1
- package/dist/Tooltip.d.ts +1 -1
- package/dist/Tooltip.js +1 -2
- package/dist/WiggleBaseRenderer.d.ts +5 -8
- package/dist/WiggleBaseRenderer.js +0 -1
- package/dist/WiggleRPC/MultiWiggleGetSources.d.ts +5 -12
- package/dist/WiggleRPC/MultiWiggleGetSources.js +2 -29
- package/dist/WiggleRPC/WiggleGetGlobalQuantitativeStats.d.ts +5 -7
- package/dist/WiggleRPC/WiggleGetGlobalQuantitativeStats.js +2 -15
- package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +4 -11
- package/dist/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +2 -29
- package/dist/WiggleRendering.d.ts +2 -2
- package/dist/WiggleRendering.js +1 -3
- package/dist/XYPlotRenderer/XYPlotRenderer.d.ts +3 -2
- package/dist/XYPlotRenderer/XYPlotRenderer.js +3 -5
- package/dist/XYPlotRenderer/configSchema.d.ts +0 -12
- package/dist/XYPlotRenderer/configSchema.js +2 -20
- package/dist/XYPlotRenderer/index.d.ts +1 -1
- package/dist/configSchema.d.ts +0 -18
- package/dist/configSchema.js +1 -23
- package/dist/drawDensity.d.ts +3 -3
- package/dist/drawDensity.js +0 -4
- package/dist/drawLine.d.ts +3 -3
- package/dist/drawLine.js +0 -5
- package/dist/drawXY.d.ts +4 -3
- package/dist/drawXY.js +28 -12
- package/dist/getMultiWiggleSourcesAutorun.d.ts +2 -2
- package/dist/getMultiWiggleSourcesAutorun.js +10 -7
- package/dist/getQuantitativeStats.d.ts +3 -3
- package/dist/getQuantitativeStats.js +2 -10
- package/dist/getQuantitativeStatsAutorun.d.ts +3 -3
- package/dist/getQuantitativeStatsAutorun.js +18 -20
- package/dist/index.d.ts +4 -4
- package/dist/index.js +21 -24
- package/dist/shared/SetMinMaxDialog.js +1 -1
- package/dist/shared/SharedWiggleConfigSchema.d.ts +0 -26
- package/dist/shared/SharedWiggleConfigSchema.js +1 -30
- package/dist/shared/SharedWiggleMixin.d.ts +20 -225
- package/dist/shared/SharedWiggleMixin.js +7 -177
- package/dist/util.d.ts +0 -28
- package/dist/util.js +1 -45
- package/esm/BigWigAdapter/BigWigAdapter.d.ts +4 -3
- package/esm/BigWigAdapter/BigWigAdapter.js +5 -10
- package/esm/BigWigAdapter/configSchema.d.ts +0 -9
- package/esm/BigWigAdapter/configSchema.js +1 -13
- package/esm/BigWigAdapter/index.d.ts +1 -1
- package/esm/CreateMultiWiggleExtension/ConfirmDialog.d.ts +1 -1
- package/esm/CreateMultiWiggleExtension/ConfirmDialog.js +2 -2
- package/esm/CreateMultiWiggleExtension/index.d.ts +1 -1
- package/esm/CreateMultiWiggleExtension/index.js +26 -26
- package/esm/DensityRenderer/DensityRenderer.d.ts +2 -1
- package/esm/DensityRenderer/DensityRenderer.js +1 -1
- package/esm/DensityRenderer/configSchema.js +1 -7
- package/esm/DensityRenderer/index.d.ts +1 -1
- package/esm/DensityRenderer/index.js +1 -1
- package/esm/LinePlotRenderer/LinePlotRenderer.d.ts +3 -2
- package/esm/LinePlotRenderer/LinePlotRenderer.js +1 -1
- package/esm/LinePlotRenderer/configSchema.d.ts +0 -3
- package/esm/LinePlotRenderer/configSchema.js +1 -10
- package/esm/LinePlotRenderer/index.d.ts +1 -1
- package/esm/LinearWiggleDisplay/components/SetColorDialog.js +2 -2
- package/esm/LinearWiggleDisplay/components/Tooltip.d.ts +2 -2
- package/esm/LinearWiggleDisplay/components/Tooltip.js +0 -1
- package/esm/LinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
- package/esm/LinearWiggleDisplay/components/WiggleDisplayComponent.js +3 -3
- package/esm/LinearWiggleDisplay/configSchema.d.ts +1 -12
- package/esm/LinearWiggleDisplay/configSchema.js +0 -15
- package/esm/LinearWiggleDisplay/index.d.ts +1 -1
- package/esm/LinearWiggleDisplay/index.js +1 -1
- package/esm/LinearWiggleDisplay/model.d.ts +13 -71
- package/esm/LinearWiggleDisplay/model.js +4 -53
- package/esm/LinearWiggleDisplay/renderSvg.d.ts +2 -2
- package/esm/LinearWiggleDisplay/renderSvg.js +1 -2
- package/esm/MultiDensityRenderer/MultiDensityRenderer.d.ts +4 -3
- package/esm/MultiDensityRenderer/MultiDensityRenderer.js +1 -2
- package/esm/MultiDensityRenderer/configSchema.js +1 -7
- package/esm/MultiDensityRenderer/index.d.ts +1 -1
- package/esm/MultiLineRenderer/MultiLineRenderer.d.ts +3 -2
- package/esm/MultiLineRenderer/MultiLineRenderer.js +1 -2
- package/esm/MultiLineRenderer/configSchema.d.ts +0 -6
- package/esm/MultiLineRenderer/configSchema.js +1 -13
- package/esm/MultiLineRenderer/index.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/ColorLegend.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/ColorLegend.js +0 -1
- package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/DraggableDialog.js +4 -8
- package/esm/MultiLinearWiggleDisplay/components/RectBg.js +1 -1
- package/esm/MultiLinearWiggleDisplay/components/ScoreLegend.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/ScoreLegend.js +1 -1
- package/esm/MultiLinearWiggleDisplay/components/SetColorDialog.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/SetColorDialog.js +4 -6
- package/esm/MultiLinearWiggleDisplay/components/SourcesGrid.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/SourcesGrid.js +16 -27
- package/esm/MultiLinearWiggleDisplay/components/Tooltip.d.ts +3 -3
- package/esm/MultiLinearWiggleDisplay/components/Tooltip.js +1 -2
- package/esm/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/YScaleBars.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/YScaleBars.js +2 -2
- package/esm/MultiLinearWiggleDisplay/components/util.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/components/util.js +1 -1
- package/esm/MultiLinearWiggleDisplay/configSchema.d.ts +1 -10
- package/esm/MultiLinearWiggleDisplay/configSchema.js +1 -19
- package/esm/MultiLinearWiggleDisplay/index.d.ts +1 -1
- package/esm/MultiLinearWiggleDisplay/index.js +1 -1
- package/esm/MultiLinearWiggleDisplay/model.d.ts +17 -139
- package/esm/MultiLinearWiggleDisplay/model.js +14 -120
- package/esm/MultiLinearWiggleDisplay/renderSvg.d.ts +2 -2
- package/esm/MultiLinearWiggleDisplay/renderSvg.js +1 -1
- package/esm/MultiQuantitativeTrack/configSchema.d.ts +1 -1
- package/esm/MultiQuantitativeTrack/configSchema.js +1 -7
- package/esm/MultiQuantitativeTrack/index.d.ts +1 -1
- package/esm/MultiQuantitativeTrack/index.js +1 -1
- package/esm/MultiRowLineRenderer/MultiRowLineRenderer.d.ts +3 -2
- package/esm/MultiRowLineRenderer/MultiRowLineRenderer.js +1 -2
- package/esm/MultiRowLineRenderer/configSchema.d.ts +0 -6
- package/esm/MultiRowLineRenderer/configSchema.js +2 -14
- package/esm/MultiRowLineRenderer/index.d.ts +1 -1
- package/esm/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.d.ts +3 -2
- package/esm/MultiRowXYPlotRenderer/MultiRowXYPlotRenderer.js +1 -2
- package/esm/MultiRowXYPlotRenderer/configSchema.d.ts +0 -12
- package/esm/MultiRowXYPlotRenderer/configSchema.js +2 -20
- package/esm/MultiRowXYPlotRenderer/index.d.ts +1 -1
- package/esm/MultiWiggleAdapter/MultiWiggleAdapter.d.ts +4 -3
- package/esm/MultiWiggleAdapter/MultiWiggleAdapter.js +9 -14
- package/esm/MultiWiggleAdapter/configSchema.d.ts +0 -6
- package/esm/MultiWiggleAdapter/configSchema.js +1 -10
- package/esm/MultiWiggleAdapter/index.d.ts +1 -1
- package/esm/MultiWiggleAdapter/index.js +1 -1
- package/esm/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.d.ts +1 -1
- package/esm/MultiWiggleAddTrackWorkflow/AddTrackWorkflow.js +2 -4
- package/esm/MultiWiggleAddTrackWorkflow/index.d.ts +1 -1
- package/esm/MultiWiggleAddTrackWorkflow/index.js +1 -2
- package/esm/MultiWiggleRendering.d.ts +3 -3
- package/esm/MultiWiggleRendering.js +2 -2
- package/esm/MultiXYPlotRenderer/MultiXYPlotRenderer.d.ts +3 -2
- package/esm/MultiXYPlotRenderer/MultiXYPlotRenderer.js +1 -2
- package/esm/MultiXYPlotRenderer/configSchema.d.ts +0 -12
- package/esm/MultiXYPlotRenderer/configSchema.js +1 -19
- package/esm/MultiXYPlotRenderer/index.d.ts +1 -1
- package/esm/QuantitativeTrack/configSchema.d.ts +1 -1
- package/esm/QuantitativeTrack/configSchema.js +1 -7
- package/esm/QuantitativeTrack/index.d.ts +1 -1
- package/esm/QuantitativeTrack/index.js +1 -1
- package/esm/Tooltip.d.ts +1 -1
- package/esm/Tooltip.js +1 -2
- package/esm/WiggleBaseRenderer.d.ts +5 -8
- package/esm/WiggleBaseRenderer.js +0 -1
- package/esm/WiggleRPC/MultiWiggleGetSources.d.ts +5 -12
- package/esm/WiggleRPC/MultiWiggleGetSources.js +2 -29
- package/esm/WiggleRPC/WiggleGetGlobalQuantitativeStats.d.ts +5 -7
- package/esm/WiggleRPC/WiggleGetGlobalQuantitativeStats.js +2 -15
- package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.d.ts +4 -11
- package/esm/WiggleRPC/WiggleGetMultiRegionQuantitativeStats.js +2 -29
- package/esm/WiggleRendering.d.ts +2 -2
- package/esm/WiggleRendering.js +1 -3
- package/esm/XYPlotRenderer/XYPlotRenderer.d.ts +3 -2
- package/esm/XYPlotRenderer/XYPlotRenderer.js +3 -5
- package/esm/XYPlotRenderer/configSchema.d.ts +0 -12
- package/esm/XYPlotRenderer/configSchema.js +2 -20
- package/esm/XYPlotRenderer/index.d.ts +1 -1
- package/esm/configSchema.d.ts +0 -18
- package/esm/configSchema.js +1 -23
- package/esm/drawDensity.d.ts +3 -3
- package/esm/drawDensity.js +1 -5
- package/esm/drawLine.d.ts +3 -3
- package/esm/drawLine.js +1 -6
- package/esm/drawXY.d.ts +4 -3
- package/esm/drawXY.js +29 -13
- package/esm/getMultiWiggleSourcesAutorun.d.ts +2 -2
- package/esm/getMultiWiggleSourcesAutorun.js +9 -6
- package/esm/getQuantitativeStats.d.ts +3 -3
- package/esm/getQuantitativeStats.js +3 -11
- package/esm/getQuantitativeStatsAutorun.d.ts +3 -3
- package/esm/getQuantitativeStatsAutorun.js +18 -20
- package/esm/index.d.ts +4 -4
- package/esm/index.js +13 -16
- package/esm/shared/SetMinMaxDialog.js +1 -1
- package/esm/shared/SharedWiggleConfigSchema.d.ts +0 -26
- package/esm/shared/SharedWiggleConfigSchema.js +1 -30
- package/esm/shared/SharedWiggleMixin.d.ts +20 -225
- package/esm/shared/SharedWiggleMixin.js +8 -178
- package/esm/util.d.ts +0 -28
- package/esm/util.js +1 -45
- package/package.json +2 -4
|
@@ -2,6 +2,31 @@ import { lazy } from 'react';
|
|
|
2
2
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
3
|
import { getSession, isSessionWithAddTracks } from '@jbrowse/core/util';
|
|
4
4
|
const ConfirmDialog = lazy(() => import('./ConfirmDialog'));
|
|
5
|
+
function makeTrack({ model, arg, }) {
|
|
6
|
+
const tracks = model.selection;
|
|
7
|
+
const trackIds = tracks.map(c => readConfObject(c, 'name'));
|
|
8
|
+
const subadapters = tracks
|
|
9
|
+
.map(c => readConfObject(c, 'adapter'))
|
|
10
|
+
.map((c, idx) => ({ ...c, source: trackIds[idx] }));
|
|
11
|
+
const now = +Date.now();
|
|
12
|
+
const trackId = `multitrack-${now}-sessionTrack`;
|
|
13
|
+
const session = getSession(model);
|
|
14
|
+
if (isSessionWithAddTracks(session)) {
|
|
15
|
+
session.addTrackConf({
|
|
16
|
+
type: 'MultiQuantitativeTrack',
|
|
17
|
+
trackId,
|
|
18
|
+
name: arg.name,
|
|
19
|
+
assemblyNames: [
|
|
20
|
+
...new Set(tracks.flatMap(c => readConfObject(c, 'assemblyNames'))),
|
|
21
|
+
],
|
|
22
|
+
adapter: {
|
|
23
|
+
type: 'MultiWiggleAdapter',
|
|
24
|
+
subadapters,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
model.view.showTrack(trackId);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
5
30
|
export default function CreateMultiWiggleExtensionF(pm) {
|
|
6
31
|
pm.addToExtensionPoint('TrackSelector-multiTrackMenuItems', (items, props) => {
|
|
7
32
|
const { session } = props;
|
|
@@ -13,38 +38,13 @@ export default function CreateMultiWiggleExtensionF(pm) {
|
|
|
13
38
|
label: 'Create multi-wiggle track',
|
|
14
39
|
onClick: (model) => {
|
|
15
40
|
const tracks = model.selection;
|
|
16
|
-
const trackIds = tracks.map(c => readConfObject(c, 'name'));
|
|
17
|
-
function makeTrack(arg) {
|
|
18
|
-
const subadapters = tracks
|
|
19
|
-
.map(c => readConfObject(c, 'adapter'))
|
|
20
|
-
.map((c, idx) => ({ ...c, source: trackIds[idx] }));
|
|
21
|
-
const assemblyNames = [
|
|
22
|
-
...new Set(tracks.flatMap(c => readConfObject(c, 'assemblyNames'))),
|
|
23
|
-
];
|
|
24
|
-
const now = +Date.now();
|
|
25
|
-
const trackId = `multitrack-${now}-sessionTrack`;
|
|
26
|
-
const session = getSession(model);
|
|
27
|
-
if (isSessionWithAddTracks(session)) {
|
|
28
|
-
session.addTrackConf({
|
|
29
|
-
type: 'MultiQuantitativeTrack',
|
|
30
|
-
trackId,
|
|
31
|
-
name: arg.name,
|
|
32
|
-
assemblyNames,
|
|
33
|
-
adapter: {
|
|
34
|
-
type: 'MultiWiggleAdapter',
|
|
35
|
-
subadapters,
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
model.view.showTrack(trackId);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
41
|
getSession(model).queueDialog(handleClose => [
|
|
42
42
|
ConfirmDialog,
|
|
43
43
|
{
|
|
44
44
|
tracks,
|
|
45
45
|
onClose: (arg, arg1) => {
|
|
46
46
|
if (arg && arg1) {
|
|
47
|
-
makeTrack(arg1);
|
|
47
|
+
makeTrack({ model, arg: arg1 });
|
|
48
48
|
}
|
|
49
49
|
handleClose();
|
|
50
50
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import WiggleBaseRenderer
|
|
1
|
+
import WiggleBaseRenderer from '../WiggleBaseRenderer';
|
|
2
|
+
import type { RenderArgsDeserializedWithFeatures } from '../WiggleBaseRenderer';
|
|
2
3
|
export default class DensityRenderer extends WiggleBaseRenderer {
|
|
3
4
|
draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<{
|
|
4
5
|
reducedFeatures: import("@jbrowse/core/util").Feature[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { drawDensity } from '../drawDensity';
|
|
2
1
|
import WiggleBaseRenderer from '../WiggleBaseRenderer';
|
|
2
|
+
import { drawDensity } from '../drawDensity';
|
|
3
3
|
export default class DensityRenderer extends WiggleBaseRenderer {
|
|
4
4
|
async draw(ctx, props) {
|
|
5
5
|
return drawDensity(ctx, props);
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import baseWiggleRendererConfigSchema from '../configSchema';
|
|
3
|
-
|
|
4
|
-
* #config DensityRenderer
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
7
4
|
const configSchema = ConfigurationSchema('DensityRenderer', {}, {
|
|
8
|
-
/**
|
|
9
|
-
* #baseConfiguration
|
|
10
|
-
*/
|
|
11
5
|
baseConfiguration: baseWiggleRendererConfigSchema,
|
|
12
6
|
explicitlyTyped: true,
|
|
13
7
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function DensityRendererF(pluginManager: PluginManager): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import configSchema from './configSchema';
|
|
2
1
|
import DensityRenderer from './DensityRenderer';
|
|
2
|
+
import configSchema from './configSchema';
|
|
3
3
|
import ReactComponent from '../WiggleRendering';
|
|
4
4
|
export default function DensityRendererF(pluginManager) {
|
|
5
5
|
pluginManager.addRendererType(() => new DensityRenderer({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import WiggleBaseRenderer from '../WiggleBaseRenderer';
|
|
2
|
+
import type { RenderArgsDeserializedWithFeatures } from '../WiggleBaseRenderer';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
4
|
export default class LinePlotRenderer extends WiggleBaseRenderer {
|
|
4
5
|
draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<{
|
|
5
6
|
reducedFeatures: Feature[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
2
|
import WiggleBaseRenderer from '../WiggleBaseRenderer';
|
|
3
|
-
import { YSCALEBAR_LABEL_OFFSET } from '../util';
|
|
4
3
|
import { drawLine } from '../drawLine';
|
|
4
|
+
import { YSCALEBAR_LABEL_OFFSET } from '../util';
|
|
5
5
|
export default class LinePlotRenderer extends WiggleBaseRenderer {
|
|
6
6
|
async draw(ctx, props) {
|
|
7
7
|
const { config } = props;
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import baseWiggleRendererConfigSchema from '../configSchema';
|
|
3
|
-
|
|
4
|
-
* #config LinePlotRenderer
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
7
4
|
const configSchema = ConfigurationSchema('LinePlotRenderer', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
5
|
displayCrossHatches: {
|
|
12
6
|
type: 'boolean',
|
|
13
7
|
description: 'choose to draw cross hatches (sideways lines)',
|
|
14
8
|
defaultValue: false,
|
|
15
9
|
},
|
|
16
10
|
}, {
|
|
17
|
-
/**
|
|
18
|
-
* #baseConfiguration
|
|
19
|
-
*/
|
|
20
11
|
baseConfiguration: baseWiggleRendererConfigSchema,
|
|
21
12
|
explicitlyTyped: true,
|
|
22
13
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinePlotRendererF(pluginManager: PluginManager): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { Button, DialogContent, DialogActions, FormControlLabel, Radio, Typography, } from '@mui/material';
|
|
4
2
|
import { Dialog } from '@jbrowse/core/ui';
|
|
5
3
|
import { ColorPicker } from '@jbrowse/core/ui/ColorPicker';
|
|
4
|
+
import { Button, DialogActions, DialogContent, FormControlLabel, Radio, Typography, } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
6
|
const SetColorDialog = observer(function SetColorDialog({ model, handleClose, }) {
|
|
7
7
|
const [posneg, setPosNeg] = useState(false);
|
|
8
8
|
return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Set color" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { TooltipContentsComponent } from '../../Tooltip';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
4
|
type Coord = [number, number];
|
|
5
5
|
declare const WiggleTooltip: (props: {
|
|
6
6
|
model: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { measureText, getContainingView, getContainingTrack, } from '@jbrowse/core/util';
|
|
4
2
|
import { getConf } from '@jbrowse/core/configuration';
|
|
5
|
-
import {
|
|
3
|
+
import { getContainingTrack, getContainingView, measureText, } from '@jbrowse/core/util';
|
|
4
|
+
import { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
6
|
import YScaleBar from '../../shared/YScaleBar';
|
|
7
7
|
const LinearWiggleDisplay = observer((props) => {
|
|
8
8
|
const { model } = props;
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config LinearWiggleDisplay
|
|
4
|
-
* extends
|
|
5
|
-
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
6
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
7
2
|
export default function WiggleConfigFactory(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
3
|
defaultRendering: {
|
|
12
4
|
type: string;
|
|
13
5
|
model: import("mobx-state-tree").ISimpleType<string>;
|
|
14
6
|
defaultValue: string;
|
|
15
7
|
};
|
|
16
|
-
/**
|
|
17
|
-
* #slot
|
|
18
|
-
*/
|
|
19
8
|
renderers: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
20
9
|
DensityRenderer: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
21
10
|
XYPlotRenderer: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
|
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { types } from 'mobx-state-tree';
|
|
3
|
-
// locals
|
|
4
3
|
import sharedWiggleConfigFactory from '../shared/SharedWiggleConfigSchema';
|
|
5
|
-
/**
|
|
6
|
-
* #config LinearWiggleDisplay
|
|
7
|
-
* extends
|
|
8
|
-
* - [SharedWiggleDisplay](../sharedwiggledisplay)
|
|
9
|
-
*/
|
|
10
4
|
export default function WiggleConfigFactory(pluginManager) {
|
|
11
5
|
const XYPlotRendererConfigSchema = pluginManager.getRendererType('XYPlotRenderer').configSchema;
|
|
12
6
|
const DensityRendererConfigSchema = pluginManager.getRendererType('DensityRenderer').configSchema;
|
|
13
7
|
const LinePlotRendererConfigSchema = pluginManager.getRendererType('LinePlotRenderer').configSchema;
|
|
14
8
|
return ConfigurationSchema('LinearWiggleDisplay', {
|
|
15
|
-
/**
|
|
16
|
-
* #slot
|
|
17
|
-
*/
|
|
18
9
|
defaultRendering: {
|
|
19
10
|
type: 'stringEnum',
|
|
20
11
|
model: types.enumeration('Rendering', ['density', 'xyplot', 'line']),
|
|
21
12
|
defaultValue: 'xyplot',
|
|
22
13
|
},
|
|
23
|
-
/**
|
|
24
|
-
* #slot
|
|
25
|
-
*/
|
|
26
14
|
renderers: ConfigurationSchema('RenderersConfiguration', {
|
|
27
15
|
DensityRenderer: DensityRendererConfigSchema,
|
|
28
16
|
XYPlotRenderer: XYPlotRendererConfigSchema,
|
|
29
17
|
LinePlotRenderer: LinePlotRendererConfigSchema,
|
|
30
18
|
}),
|
|
31
19
|
}, {
|
|
32
|
-
/**
|
|
33
|
-
* #baseConfiguration
|
|
34
|
-
*/
|
|
35
20
|
baseConfiguration: sharedWiggleConfigFactory(),
|
|
36
21
|
explicitlyTyped: true,
|
|
37
22
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearWiggleDisplayF(pluginManager: PluginManager): void;
|
|
3
3
|
export { default as Tooltip } from './components/Tooltip';
|
|
4
4
|
export { default as ReactComponent } from './components/WiggleDisplayComponent';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
1
2
|
import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType';
|
|
2
3
|
import configSchemaFactory from './configSchema';
|
|
3
4
|
import modelFactory from './model';
|
|
4
|
-
import { lazy } from 'react';
|
|
5
5
|
export default function LinearWiggleDisplayF(pluginManager) {
|
|
6
6
|
pluginManager.addDisplayType(() => {
|
|
7
7
|
const configSchema = configSchemaFactory(pluginManager);
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
/**
|
|
7
|
-
* #stateModel LinearWiggleDisplay
|
|
8
|
-
* extends
|
|
9
|
-
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
10
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { AnyReactComponentType } from '@jbrowse/core/util';
|
|
4
|
+
import type { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
5
|
+
import type { Instance } from 'mobx-state-tree';
|
|
11
6
|
declare function stateModelFactory(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
12
7
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
13
8
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -20,21 +15,12 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
20
15
|
} & {
|
|
21
16
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
22
17
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
23
|
-
region: import("mobx-state-tree").
|
|
24
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
25
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
26
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
27
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
28
|
-
} & {
|
|
29
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
30
|
-
}, {
|
|
31
|
-
setRefName(newRefName: string): void;
|
|
32
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
18
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
33
19
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
34
20
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
35
21
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
36
22
|
}, {
|
|
37
|
-
|
|
23
|
+
stopToken: string | undefined;
|
|
38
24
|
filled: boolean;
|
|
39
25
|
reactElement: React.ReactElement | undefined;
|
|
40
26
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -49,9 +35,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
49
35
|
reload: () => void;
|
|
50
36
|
message: React.ReactNode;
|
|
51
37
|
filled?: boolean;
|
|
52
|
-
status
|
|
53
|
-
* #getter
|
|
54
|
-
*/: string;
|
|
38
|
+
status?: string;
|
|
55
39
|
reactElement?: React.ReactElement;
|
|
56
40
|
};
|
|
57
41
|
}) => import("react").JSX.Element | undefined;
|
|
@@ -60,15 +44,9 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
60
44
|
doReload(): void;
|
|
61
45
|
afterAttach(): void;
|
|
62
46
|
setStatus(message: string): void;
|
|
63
|
-
setLoading(
|
|
47
|
+
setLoading(newStopToken: string): void;
|
|
64
48
|
setMessage(messageText: string): void;
|
|
65
|
-
setRendered(props:
|
|
66
|
-
reactElement: React.ReactElement;
|
|
67
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
68
|
-
layout: any;
|
|
69
|
-
maxHeightReached: boolean;
|
|
70
|
-
renderProps: any;
|
|
71
|
-
} | undefined): void;
|
|
49
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
72
50
|
setError(error: unknown): void;
|
|
73
51
|
reload(): void;
|
|
74
52
|
beforeDestroy(): void;
|
|
@@ -120,9 +98,6 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
120
98
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
121
99
|
configuration: AnyConfigurationSchemaType;
|
|
122
100
|
} & {
|
|
123
|
-
/**
|
|
124
|
-
* #property
|
|
125
|
-
*/
|
|
126
101
|
type: import("mobx-state-tree").ISimpleType<"LinearWiggleDisplay">;
|
|
127
102
|
}, {
|
|
128
103
|
rendererTypeName: string;
|
|
@@ -213,6 +188,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
213
188
|
readonly regionTooLarge: boolean;
|
|
214
189
|
readonly regionTooLargeReason: string;
|
|
215
190
|
} & {
|
|
191
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
216
192
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
217
193
|
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
218
194
|
} & {
|
|
@@ -256,7 +232,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
256
232
|
scoreMin: number;
|
|
257
233
|
scoreMax: number;
|
|
258
234
|
} | undefined;
|
|
259
|
-
statsFetchInProgress: undefined |
|
|
235
|
+
statsFetchInProgress: undefined | string;
|
|
260
236
|
} & {
|
|
261
237
|
updateQuantitativeStats(stats: {
|
|
262
238
|
currStatsBpPerPx: number;
|
|
@@ -266,7 +242,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
266
242
|
setColor(color?: string): void;
|
|
267
243
|
setPosColor(color?: string): void;
|
|
268
244
|
setNegColor(color?: string): void;
|
|
269
|
-
setStatsLoading(
|
|
245
|
+
setStatsLoading(arg?: string): void;
|
|
270
246
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
271
247
|
setResolution(res: number): void;
|
|
272
248
|
setFill(fill: number): void;
|
|
@@ -345,27 +321,11 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
345
321
|
} & {
|
|
346
322
|
reload(): Promise<void>;
|
|
347
323
|
} & {
|
|
348
|
-
/**
|
|
349
|
-
* #getter
|
|
350
|
-
*/
|
|
351
324
|
readonly TooltipComponent: AnyReactComponentType;
|
|
352
|
-
/**
|
|
353
|
-
* #getter
|
|
354
|
-
*/
|
|
355
325
|
readonly rendererTypeName: string;
|
|
356
|
-
/**
|
|
357
|
-
* #getter
|
|
358
|
-
* unused currently
|
|
359
|
-
*/
|
|
360
326
|
readonly quantitativeStatsRelevantToCurrentZoom: boolean;
|
|
361
327
|
} & {
|
|
362
|
-
/**
|
|
363
|
-
* #method
|
|
364
|
-
*/
|
|
365
328
|
adapterProps(): any;
|
|
366
|
-
/**
|
|
367
|
-
* #getter
|
|
368
|
-
*/
|
|
369
329
|
readonly ticks: {
|
|
370
330
|
range: number[];
|
|
371
331
|
values: number[];
|
|
@@ -373,26 +333,11 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
373
333
|
position: import("d3-scale").ScaleLinear<number, number, never> | import("d3-scale").ScaleQuantize<number, never>;
|
|
374
334
|
} | undefined;
|
|
375
335
|
} & {
|
|
376
|
-
/**
|
|
377
|
-
* #method
|
|
378
|
-
*/
|
|
379
336
|
renderProps(): any;
|
|
380
|
-
/**
|
|
381
|
-
* #getter
|
|
382
|
-
*/
|
|
383
337
|
readonly needsScalebar: boolean;
|
|
384
|
-
/**
|
|
385
|
-
* #getter
|
|
386
|
-
*/
|
|
387
338
|
readonly fillSetting: 2 | 1 | 0;
|
|
388
|
-
/**
|
|
389
|
-
* #getter
|
|
390
|
-
*/
|
|
391
339
|
readonly quantitativeStatsReady: boolean;
|
|
392
340
|
} & {
|
|
393
|
-
/**
|
|
394
|
-
* #method
|
|
395
|
-
*/
|
|
396
341
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
397
342
|
label: string;
|
|
398
343
|
subMenu: ({
|
|
@@ -439,9 +384,6 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
|
|
|
439
384
|
})[];
|
|
440
385
|
} & {
|
|
441
386
|
afterAttach(): void;
|
|
442
|
-
/**
|
|
443
|
-
* #action
|
|
444
|
-
*/
|
|
445
387
|
renderSvg(opts: ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
446
388
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
447
389
|
export type WiggleDisplayStateModel = ReturnType<typeof stateModelFactory>;
|
|
@@ -1,43 +1,26 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
|
-
import { getConf
|
|
3
|
-
import { getContainingView, getSession
|
|
2
|
+
import { getConf } from '@jbrowse/core/configuration';
|
|
3
|
+
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
4
4
|
import { types } from 'mobx-state-tree';
|
|
5
5
|
import { axisPropsFromTickScale } from 'react-d3-axis-mod';
|
|
6
|
-
// locals
|
|
7
|
-
import { getScale, YSCALEBAR_LABEL_OFFSET } from '../util';
|
|
8
6
|
import SharedWiggleMixin from '../shared/SharedWiggleMixin';
|
|
9
|
-
|
|
7
|
+
import { YSCALEBAR_LABEL_OFFSET, getScale } from '../util';
|
|
10
8
|
const Tooltip = lazy(() => import('./components/Tooltip'));
|
|
11
9
|
const SetColorDialog = lazy(() => import('./components/SetColorDialog'));
|
|
12
|
-
// using a map because it preserves order
|
|
13
10
|
const rendererTypes = new Map([
|
|
14
11
|
['xyplot', 'XYPlotRenderer'],
|
|
15
12
|
['density', 'DensityRenderer'],
|
|
16
13
|
['line', 'LinePlotRenderer'],
|
|
17
14
|
]);
|
|
18
|
-
/**
|
|
19
|
-
* #stateModel LinearWiggleDisplay
|
|
20
|
-
* extends
|
|
21
|
-
* - [SharedWiggleMixin](../sharedwigglemixin)
|
|
22
|
-
*/
|
|
23
15
|
function stateModelFactory(pluginManager, configSchema) {
|
|
24
16
|
return types
|
|
25
17
|
.compose('LinearWiggleDisplay', SharedWiggleMixin(configSchema), types.model({
|
|
26
|
-
/**
|
|
27
|
-
* #property
|
|
28
|
-
*/
|
|
29
18
|
type: types.literal('LinearWiggleDisplay'),
|
|
30
19
|
}))
|
|
31
20
|
.views(self => ({
|
|
32
|
-
/**
|
|
33
|
-
* #getter
|
|
34
|
-
*/
|
|
35
21
|
get TooltipComponent() {
|
|
36
22
|
return Tooltip;
|
|
37
23
|
},
|
|
38
|
-
/**
|
|
39
|
-
* #getter
|
|
40
|
-
*/
|
|
41
24
|
get rendererTypeName() {
|
|
42
25
|
const name = self.rendererTypeNameSimple;
|
|
43
26
|
const rendererType = rendererTypes.get(name);
|
|
@@ -46,10 +29,6 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
46
29
|
}
|
|
47
30
|
return rendererType;
|
|
48
31
|
},
|
|
49
|
-
/**
|
|
50
|
-
* #getter
|
|
51
|
-
* unused currently
|
|
52
|
-
*/
|
|
53
32
|
get quantitativeStatsRelevantToCurrentZoom() {
|
|
54
33
|
var _a;
|
|
55
34
|
const view = getContainingView(self);
|
|
@@ -59,9 +38,6 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
59
38
|
.views(self => {
|
|
60
39
|
const { renderProps: superRenderProps } = self;
|
|
61
40
|
return {
|
|
62
|
-
/**
|
|
63
|
-
* #method
|
|
64
|
-
*/
|
|
65
41
|
adapterProps() {
|
|
66
42
|
const superProps = superRenderProps();
|
|
67
43
|
const { filters, resolution, scaleOpts } = self;
|
|
@@ -76,9 +52,6 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
76
52
|
filters,
|
|
77
53
|
};
|
|
78
54
|
},
|
|
79
|
-
/**
|
|
80
|
-
* #getter
|
|
81
|
-
*/
|
|
82
55
|
get ticks() {
|
|
83
56
|
const { scaleType, domain, height } = self;
|
|
84
57
|
const minimalTicks = getConf(self, 'minimalTicks');
|
|
@@ -104,9 +77,6 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
104
77
|
};
|
|
105
78
|
})
|
|
106
79
|
.views(self => ({
|
|
107
|
-
/**
|
|
108
|
-
* #method
|
|
109
|
-
*/
|
|
110
80
|
renderProps() {
|
|
111
81
|
const { ticks, height } = self;
|
|
112
82
|
const superProps = self.adapterProps();
|
|
@@ -117,16 +87,10 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
117
87
|
ticks,
|
|
118
88
|
};
|
|
119
89
|
},
|
|
120
|
-
/**
|
|
121
|
-
* #getter
|
|
122
|
-
*/
|
|
123
90
|
get needsScalebar() {
|
|
124
91
|
return (self.rendererTypeName === 'XYPlotRenderer' ||
|
|
125
92
|
self.rendererTypeName === 'LinePlotRenderer');
|
|
126
93
|
},
|
|
127
|
-
/**
|
|
128
|
-
* #getter
|
|
129
|
-
*/
|
|
130
94
|
get fillSetting() {
|
|
131
95
|
if (self.filled) {
|
|
132
96
|
return 0;
|
|
@@ -138,24 +102,15 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
138
102
|
return 2;
|
|
139
103
|
}
|
|
140
104
|
},
|
|
141
|
-
/**
|
|
142
|
-
* #getter
|
|
143
|
-
*/
|
|
144
105
|
get quantitativeStatsReady() {
|
|
145
106
|
const view = getContainingView(self);
|
|
146
|
-
return (view.initialized &&
|
|
147
|
-
self.featureDensityStatsReady &&
|
|
148
|
-
!self.regionTooLarge &&
|
|
149
|
-
!self.error);
|
|
107
|
+
return (view.initialized && self.statsReadyAndRegionNotTooLarge && !self.error);
|
|
150
108
|
},
|
|
151
109
|
}))
|
|
152
110
|
.views(self => {
|
|
153
111
|
const { trackMenuItems: superTrackMenuItems } = self;
|
|
154
112
|
const hasRenderings = getConf(self, 'defaultRendering');
|
|
155
113
|
return {
|
|
156
|
-
/**
|
|
157
|
-
* #method
|
|
158
|
-
*/
|
|
159
114
|
trackMenuItems() {
|
|
160
115
|
return [
|
|
161
116
|
...superTrackMenuItems(),
|
|
@@ -225,16 +180,12 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
225
180
|
const { renderSvg: superRenderSvg } = self;
|
|
226
181
|
return {
|
|
227
182
|
afterAttach() {
|
|
228
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
229
183
|
;
|
|
230
184
|
(async () => {
|
|
231
185
|
const { getQuantitativeStatsAutorun } = await import('../getQuantitativeStatsAutorun');
|
|
232
186
|
getQuantitativeStatsAutorun(self);
|
|
233
187
|
})();
|
|
234
188
|
},
|
|
235
|
-
/**
|
|
236
|
-
* #action
|
|
237
|
-
*/
|
|
238
189
|
async renderSvg(opts) {
|
|
239
190
|
const { renderSvg } = await import('./renderSvg');
|
|
240
191
|
return renderSvg(self, opts, superRenderSvg);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { WiggleDisplayModel } from './model';
|
|
3
|
+
import type { ExportSvgDisplayOptions } from '@jbrowse/plugin-linear-genome-view';
|
|
4
4
|
export declare function renderSvg(self: WiggleDisplayModel, opts: ExportSvgDisplayOptions, superRenderSvg: (opts: ExportSvgDisplayOptions) => Promise<React.ReactNode>): Promise<React.JSX.Element>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { getContainingView } from '@jbrowse/core/util';
|
|
3
3
|
import { when } from 'mobx';
|
|
4
|
-
// locals
|
|
5
4
|
import YScaleBar from '../shared/YScaleBar';
|
|
6
5
|
export async function renderSvg(self, opts, superRenderSvg) {
|
|
7
6
|
await when(() => !!self.stats && !!self.regionCannotBeRenderedText);
|
|
8
7
|
const { needsScalebar, stats } = self;
|
|
9
8
|
const { offsetPx } = getContainingView(self);
|
|
10
9
|
return (React.createElement(React.Fragment, null,
|
|
11
|
-
React.createElement("g",
|
|
10
|
+
React.createElement("g", null, await superRenderSvg(opts)),
|
|
12
11
|
needsScalebar && stats ? (React.createElement("g", { transform: `translate(${Math.max(-offsetPx, 0)})` },
|
|
13
12
|
React.createElement(YScaleBar, { model: self, orientation: "left" }))) : null));
|
|
14
13
|
}
|