@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
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
-
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
3
1
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
4
|
-
|
|
2
|
+
import RpcMethodTypeWithFiltersAndRenameRegions from '@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions';
|
|
3
|
+
export class WiggleGetGlobalQuantitativeStats extends RpcMethodTypeWithFiltersAndRenameRegions {
|
|
5
4
|
constructor() {
|
|
6
5
|
super(...arguments);
|
|
7
6
|
this.name = 'WiggleGetGlobalQuantitativeStats';
|
|
8
7
|
}
|
|
9
|
-
async deserializeArguments(args, rpcDriverClassName) {
|
|
10
|
-
const l = await super.deserializeArguments(args, rpcDriverClassName);
|
|
11
|
-
return {
|
|
12
|
-
...l,
|
|
13
|
-
filters: args.filters
|
|
14
|
-
? new SerializableFilterChain({
|
|
15
|
-
filters: args.filters,
|
|
16
|
-
})
|
|
17
|
-
: undefined,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
8
|
async execute(args, rpcDriverClassName) {
|
|
21
9
|
const pm = this.pluginManager;
|
|
22
10
|
const deserializedArgs = await this.deserializeArguments(args, rpcDriverClassName);
|
|
23
11
|
const { adapterConfig, sessionId } = deserializedArgs;
|
|
24
12
|
const { dataAdapter } = await getAdapter(pm, sessionId, adapterConfig);
|
|
25
|
-
// @ts-expect-error
|
|
26
13
|
return dataAdapter.getGlobalStats(deserializedArgs);
|
|
27
14
|
}
|
|
28
15
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { Region } from '@jbrowse/core/util';
|
|
5
|
-
export declare class WiggleGetMultiRegionQuantitativeStats extends RpcMethodType {
|
|
1
|
+
import RpcMethodTypeWithFiltersAndRenameRegions from '@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions';
|
|
2
|
+
import type { Region } from '@jbrowse/core/util';
|
|
3
|
+
export declare class WiggleGetMultiRegionQuantitativeStats extends RpcMethodTypeWithFiltersAndRenameRegions {
|
|
6
4
|
name: string;
|
|
7
|
-
deserializeArguments(args: any, rpcDriverClassName: string): Promise<any>;
|
|
8
|
-
serializeArguments(args: RenderArgs & {
|
|
9
|
-
signal?: AbortSignal;
|
|
10
|
-
statusCallback?: (arg: string) => void;
|
|
11
|
-
}, rpcDriverClassName: string): Promise<Record<string, unknown>>;
|
|
12
5
|
execute(args: {
|
|
13
6
|
adapterConfig: Record<string, unknown>;
|
|
14
|
-
|
|
7
|
+
stopToken?: string;
|
|
15
8
|
sessionId: string;
|
|
16
9
|
headers?: Record<string, string>;
|
|
17
10
|
regions: Region[];
|
|
@@ -1,42 +1,15 @@
|
|
|
1
|
-
import RpcMethodType from '@jbrowse/core/pluggableElementTypes/RpcMethodType';
|
|
2
|
-
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
3
1
|
import { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
4
|
-
import
|
|
5
|
-
export class WiggleGetMultiRegionQuantitativeStats extends
|
|
2
|
+
import RpcMethodTypeWithFiltersAndRenameRegions from '@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions';
|
|
3
|
+
export class WiggleGetMultiRegionQuantitativeStats extends RpcMethodTypeWithFiltersAndRenameRegions {
|
|
6
4
|
constructor() {
|
|
7
5
|
super(...arguments);
|
|
8
6
|
this.name = 'WiggleGetMultiRegionQuantitativeStats';
|
|
9
7
|
}
|
|
10
|
-
async deserializeArguments(args, rpcDriverClassName) {
|
|
11
|
-
const l = await super.deserializeArguments(args, rpcDriverClassName);
|
|
12
|
-
return {
|
|
13
|
-
...l,
|
|
14
|
-
filters: args.filters
|
|
15
|
-
? new SerializableFilterChain({
|
|
16
|
-
filters: args.filters,
|
|
17
|
-
})
|
|
18
|
-
: undefined,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
async serializeArguments(args, rpcDriverClassName) {
|
|
22
|
-
var _a, _b, _c;
|
|
23
|
-
const pm = this.pluginManager;
|
|
24
|
-
const assemblyManager = (_b = (_a = pm.rootModel) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.assemblyManager;
|
|
25
|
-
if (!assemblyManager) {
|
|
26
|
-
return args;
|
|
27
|
-
}
|
|
28
|
-
const renamedArgs = await renameRegionsIfNeeded(assemblyManager, {
|
|
29
|
-
...args,
|
|
30
|
-
filters: (_c = args.filters) === null || _c === void 0 ? void 0 : _c.toJSON().filters,
|
|
31
|
-
});
|
|
32
|
-
return super.serializeArguments(renamedArgs, rpcDriverClassName);
|
|
33
|
-
}
|
|
34
8
|
async execute(args, rpcDriverClassName) {
|
|
35
9
|
const pm = this.pluginManager;
|
|
36
10
|
const deserializedArgs = await this.deserializeArguments(args, rpcDriverClassName);
|
|
37
11
|
const { regions, adapterConfig, sessionId } = deserializedArgs;
|
|
38
12
|
const { dataAdapter } = await getAdapter(pm, sessionId, adapterConfig);
|
|
39
|
-
// @ts-expect-error
|
|
40
13
|
return dataAdapter.getMultiRegionQuantitativeStats(regions, deserializedArgs);
|
|
41
14
|
}
|
|
42
15
|
}
|
package/esm/WiggleRendering.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import type { Region } from '@jbrowse/core/util/types';
|
|
4
4
|
declare const WiggleRendering: (props: {
|
|
5
5
|
regions: Region[];
|
|
6
6
|
features: Map<string, Feature>;
|
package/esm/WiggleRendering.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { observer } from 'mobx-react';
|
|
2
1
|
import React, { useRef } from 'react';
|
|
3
2
|
import { PrerenderedCanvas } from '@jbrowse/core/ui';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
4
|
const WiggleRendering = observer(function (props) {
|
|
5
5
|
const { regions, features, bpPerPx, width, height, onMouseLeave, onMouseMove, onFeatureClick, } = props;
|
|
6
6
|
const region = regions[0];
|
|
7
7
|
const ref = useRef(null);
|
|
8
8
|
function getFeatureUnderMouse(eventClientX) {
|
|
9
|
-
// calculates feature under mouse
|
|
10
9
|
let offset = 0;
|
|
11
10
|
if (ref.current) {
|
|
12
11
|
offset = ref.current.getBoundingClientRect().left;
|
|
@@ -16,7 +15,6 @@ const WiggleRendering = observer(function (props) {
|
|
|
16
15
|
const clientBp = region.start + bpPerPx * px;
|
|
17
16
|
let featureUnderMouse;
|
|
18
17
|
for (const feature of features.values()) {
|
|
19
|
-
// bpPerPx added to the end to accommodate "reduced features" (one feature per px)
|
|
20
18
|
if (clientBp <= feature.get('end') + bpPerPx &&
|
|
21
19
|
clientBp >= feature.get('start')) {
|
|
22
20
|
featureUnderMouse = feature;
|
|
@@ -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 XYPlotRenderer extends WiggleBaseRenderer {
|
|
4
5
|
draw(ctx: CanvasRenderingContext2D, props: RenderArgsDeserializedWithFeatures): Promise<{
|
|
5
6
|
reducedFeatures: Feature[];
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
-
import { drawXY } from '../drawXY';
|
|
3
2
|
import WiggleBaseRenderer from '../WiggleBaseRenderer';
|
|
3
|
+
import { drawXY } from '../drawXY';
|
|
4
4
|
import { YSCALEBAR_LABEL_OFFSET } from '../util';
|
|
5
5
|
export default class XYPlotRenderer extends WiggleBaseRenderer {
|
|
6
6
|
async draw(ctx, props) {
|
|
7
|
-
const { features, config } = props;
|
|
8
|
-
// the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
|
|
9
|
-
// wiggle display, and makes the height of the actual drawn area add
|
|
10
|
-
// "padding" to the top and bottom of the display
|
|
7
|
+
const { stopToken, features, config } = props;
|
|
11
8
|
const pivotValue = readConfObject(config, 'bicolorPivotValue');
|
|
12
9
|
const negColor = readConfObject(config, 'negColor');
|
|
13
10
|
const posColor = readConfObject(config, 'posColor');
|
|
@@ -18,6 +15,7 @@ export default class XYPlotRenderer extends WiggleBaseRenderer {
|
|
|
18
15
|
: (feature, _score) => readConfObject(config, 'color', { feature }),
|
|
19
16
|
offset: YSCALEBAR_LABEL_OFFSET,
|
|
20
17
|
features: [...features.values()],
|
|
18
|
+
stopToken,
|
|
21
19
|
});
|
|
22
20
|
}
|
|
23
21
|
}
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
filled: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: boolean;
|
|
8
5
|
};
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
displayCrossHatches: {
|
|
13
7
|
type: string;
|
|
14
8
|
description: string;
|
|
15
9
|
defaultValue: boolean;
|
|
16
10
|
};
|
|
17
|
-
/**
|
|
18
|
-
* #slot
|
|
19
|
-
*/
|
|
20
11
|
summaryScoreMode: {
|
|
21
12
|
type: string;
|
|
22
13
|
model: import("mobx-state-tree").ISimpleType<string>;
|
|
23
14
|
description: string;
|
|
24
15
|
defaultValue: string;
|
|
25
16
|
};
|
|
26
|
-
/**
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
17
|
minSize: {
|
|
30
18
|
type: string;
|
|
31
19
|
defaultValue: number;
|
|
@@ -1,46 +1,28 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
import baseWiggleRendererConfigSchema from '../configSchema';
|
|
3
2
|
import { types } from 'mobx-state-tree';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
import baseWiggleRendererConfigSchema from '../configSchema';
|
|
4
|
+
function x() { }
|
|
8
5
|
const configSchema = ConfigurationSchema('XYPlotRenderer', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
filled: {
|
|
13
7
|
type: 'boolean',
|
|
14
8
|
defaultValue: true,
|
|
15
9
|
},
|
|
16
|
-
/**
|
|
17
|
-
* #slot
|
|
18
|
-
*/
|
|
19
10
|
displayCrossHatches: {
|
|
20
11
|
type: 'boolean',
|
|
21
12
|
description: 'choose to draw cross hatches (sideways lines)',
|
|
22
13
|
defaultValue: false,
|
|
23
14
|
},
|
|
24
|
-
/**
|
|
25
|
-
* #slot
|
|
26
|
-
*/
|
|
27
15
|
summaryScoreMode: {
|
|
28
16
|
type: 'stringEnum',
|
|
29
17
|
model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
|
|
30
18
|
description: 'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
|
|
31
19
|
defaultValue: 'whiskers',
|
|
32
20
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #slot
|
|
35
|
-
*/
|
|
36
21
|
minSize: {
|
|
37
22
|
type: 'number',
|
|
38
23
|
defaultValue: 0.7,
|
|
39
24
|
},
|
|
40
25
|
}, {
|
|
41
|
-
/**
|
|
42
|
-
* #baseConfiguration
|
|
43
|
-
*/
|
|
44
26
|
baseConfiguration: baseWiggleRendererConfigSchema,
|
|
45
27
|
explicitlyTyped: true,
|
|
46
28
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function XYPlotRendererF(pluginManager: PluginManager): void;
|
|
3
3
|
export { default as XYPlotRenderer } from './XYPlotRenderer';
|
|
4
4
|
export { default as ReactComponent } from '../WiggleRendering';
|
package/esm/configSchema.d.ts
CHANGED
|
@@ -1,48 +1,30 @@
|
|
|
1
1
|
declare const WiggleRenderer: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
color: {
|
|
6
3
|
type: string;
|
|
7
4
|
description: string;
|
|
8
5
|
defaultValue: string;
|
|
9
6
|
};
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
posColor: {
|
|
14
8
|
type: string;
|
|
15
9
|
description: string;
|
|
16
10
|
defaultValue: string;
|
|
17
11
|
};
|
|
18
|
-
/**
|
|
19
|
-
* #slot
|
|
20
|
-
*/
|
|
21
12
|
negColor: {
|
|
22
13
|
type: string;
|
|
23
14
|
description: string;
|
|
24
15
|
defaultValue: string;
|
|
25
16
|
};
|
|
26
|
-
/**
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
17
|
clipColor: {
|
|
30
18
|
type: string;
|
|
31
19
|
description: string;
|
|
32
20
|
defaultValue: string;
|
|
33
21
|
};
|
|
34
|
-
/**
|
|
35
|
-
* #slot
|
|
36
|
-
*/
|
|
37
22
|
bicolorPivot: {
|
|
38
23
|
type: string;
|
|
39
24
|
model: import("mobx-state-tree").ISimpleType<string>;
|
|
40
25
|
description: string;
|
|
41
26
|
defaultValue: string;
|
|
42
27
|
};
|
|
43
|
-
/**
|
|
44
|
-
* #slot
|
|
45
|
-
*/
|
|
46
28
|
bicolorPivotValue: {
|
|
47
29
|
type: string;
|
|
48
30
|
defaultValue: number;
|
package/esm/configSchema.js
CHANGED
|
@@ -1,46 +1,27 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { types } from 'mobx-state-tree';
|
|
3
|
-
|
|
4
|
-
* #config WiggleRenderer
|
|
5
|
-
* this is the "base wiggle renderer config schema"
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
8
4
|
const WiggleRenderer = ConfigurationSchema('WiggleRenderer', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
5
|
color: {
|
|
13
6
|
type: 'color',
|
|
14
7
|
description: 'the color of track, overrides posColor and negColor',
|
|
15
8
|
defaultValue: '#f0f',
|
|
16
9
|
},
|
|
17
|
-
/**
|
|
18
|
-
* #slot
|
|
19
|
-
*/
|
|
20
10
|
posColor: {
|
|
21
11
|
type: 'color',
|
|
22
12
|
description: 'the color to use when the score is positive',
|
|
23
13
|
defaultValue: 'blue',
|
|
24
14
|
},
|
|
25
|
-
/**
|
|
26
|
-
* #slot
|
|
27
|
-
*/
|
|
28
15
|
negColor: {
|
|
29
16
|
type: 'color',
|
|
30
17
|
description: 'the color to use when the score is negative',
|
|
31
18
|
defaultValue: 'red',
|
|
32
19
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #slot
|
|
35
|
-
*/
|
|
36
20
|
clipColor: {
|
|
37
21
|
type: 'color',
|
|
38
22
|
description: 'the color of the clipping marker',
|
|
39
23
|
defaultValue: 'red',
|
|
40
24
|
},
|
|
41
|
-
/**
|
|
42
|
-
* #slot
|
|
43
|
-
*/
|
|
44
25
|
bicolorPivot: {
|
|
45
26
|
type: 'stringEnum',
|
|
46
27
|
model: types.enumeration('Scale type', [
|
|
@@ -52,9 +33,6 @@ const WiggleRenderer = ConfigurationSchema('WiggleRenderer', {
|
|
|
52
33
|
description: 'type of bicolor pivot',
|
|
53
34
|
defaultValue: 'numeric',
|
|
54
35
|
},
|
|
55
|
-
/**
|
|
56
|
-
* #slot
|
|
57
|
-
*/
|
|
58
36
|
bicolorPivotValue: {
|
|
59
37
|
type: 'number',
|
|
60
38
|
defaultValue: 0,
|
package/esm/drawDensity.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { ScaleOpts } from './util';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
4
4
|
export declare function drawDensity(ctx: CanvasRenderingContext2D, props: {
|
|
5
5
|
features: Map<string, Feature> | Feature[];
|
|
6
6
|
regions: Region[];
|
package/esm/drawDensity.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { readConfObject
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
2
|
import { featureSpanPx } from '@jbrowse/core/util';
|
|
3
|
-
// locals
|
|
4
3
|
import { fillRectCtx, getScale } from './util';
|
|
5
4
|
const fudgeFactor = 0.3;
|
|
6
5
|
const clipHeight = 2;
|
|
@@ -31,7 +30,6 @@ export function drawDensity(ctx, props) {
|
|
|
31
30
|
const reducedFeatures = [];
|
|
32
31
|
for (const feature of features.values()) {
|
|
33
32
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
34
|
-
// create reduced features, avoiding multiple features per px
|
|
35
33
|
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
36
34
|
reducedFeatures.push(feature);
|
|
37
35
|
prevLeftPx = leftPx;
|
|
@@ -42,8 +40,6 @@ export function drawDensity(ctx, props) {
|
|
|
42
40
|
ctx.fillStyle = cb(feature, score);
|
|
43
41
|
ctx.fillRect(leftPx, 0, w, height);
|
|
44
42
|
}
|
|
45
|
-
// second pass: draw clipping
|
|
46
|
-
// avoid persisting the red fillstyle with save/restore
|
|
47
43
|
ctx.save();
|
|
48
44
|
if (hasClipping) {
|
|
49
45
|
ctx.fillStyle = clipColor;
|
package/esm/drawLine.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { ScaleOpts } from './util';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
4
4
|
export declare function drawLine(ctx: CanvasRenderingContext2D, props: {
|
|
5
5
|
features: Map<string, Feature> | Feature[];
|
|
6
6
|
regions: Region[];
|
package/esm/drawLine.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { readConfObject
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
2
|
import { clamp, featureSpanPx } from '@jbrowse/core/util';
|
|
3
|
-
// locals
|
|
4
3
|
import { getScale } from './util';
|
|
5
4
|
const fudgeFactor = 0.3;
|
|
6
5
|
const clipHeight = 2;
|
|
@@ -8,9 +7,6 @@ export function drawLine(ctx, props) {
|
|
|
8
7
|
const { features, regions, bpPerPx, scaleOpts, height: unadjustedHeight, ticks: { values }, displayCrossHatches, colorCallback, config, offset = 0, } = props;
|
|
9
8
|
const region = regions[0];
|
|
10
9
|
const width = (region.end - region.start) / bpPerPx;
|
|
11
|
-
// the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
|
|
12
|
-
// wiggle display, and makes the height of the actual drawn area add
|
|
13
|
-
// "padding" to the top and bottom of the display
|
|
14
10
|
const height = unadjustedHeight - offset * 2;
|
|
15
11
|
const clipColor = readConfObject(config, 'clipColor');
|
|
16
12
|
const scale = getScale({ ...scaleOpts, range: [0, height] });
|
|
@@ -23,7 +19,6 @@ export function drawLine(ctx, props) {
|
|
|
23
19
|
const reducedFeatures = [];
|
|
24
20
|
for (const feature of features.values()) {
|
|
25
21
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
26
|
-
// create reduced features, avoiding multiple features per px
|
|
27
22
|
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
28
23
|
reducedFeatures.push(feature);
|
|
29
24
|
prevLeftPx = leftPx;
|
package/esm/drawXY.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { ScaleOpts } from './util';
|
|
2
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
3
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
4
4
|
export declare function drawXY(ctx: CanvasRenderingContext2D, props: {
|
|
5
|
+
stopToken?: string;
|
|
5
6
|
features: Map<string, Feature> | Feature[];
|
|
6
7
|
bpPerPx: number;
|
|
7
8
|
regions: Region[];
|
package/esm/drawXY.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { readConfObject
|
|
2
|
-
import { colord } from '@jbrowse/core/util/colord';
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
3
2
|
import { clamp, featureSpanPx } from '@jbrowse/core/util';
|
|
4
|
-
|
|
3
|
+
import { colord } from '@jbrowse/core/util/colord';
|
|
4
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
5
5
|
import { fillRectCtx, getOrigin, getScale } from './util';
|
|
6
6
|
function lighten(color, amount) {
|
|
7
7
|
const hslColor = color.toHsl();
|
|
@@ -19,9 +19,6 @@ export function drawXY(ctx, props) {
|
|
|
19
19
|
const { features, bpPerPx, regions, scaleOpts, height: unadjustedHeight, config, ticks, displayCrossHatches, offset = 0, colorCallback, } = props;
|
|
20
20
|
const region = regions[0];
|
|
21
21
|
const width = (region.end - region.start) / bpPerPx;
|
|
22
|
-
// the adjusted height takes into account YSCALEBAR_LABEL_OFFSET from the
|
|
23
|
-
// wiggle display, and makes the height of the actual drawn area add
|
|
24
|
-
// "padding" to the top and bottom of the display
|
|
25
22
|
const height = unadjustedHeight - offset * 2;
|
|
26
23
|
const filled = readConfObject(config, 'filled');
|
|
27
24
|
const clipColor = readConfObject(config, 'clipColor');
|
|
@@ -40,13 +37,16 @@ export function drawXY(ctx, props) {
|
|
|
40
37
|
let prevLeftPx = Number.NEGATIVE_INFINITY;
|
|
41
38
|
const reducedFeatures = [];
|
|
42
39
|
const crossingOrigin = niceMin < pivotValue && niceMax > pivotValue;
|
|
43
|
-
|
|
44
|
-
// passes. this reduces subpixel rendering issues. note: for stylistic
|
|
45
|
-
// reasons, clipping indicator is only drawn for score, not min/max score
|
|
40
|
+
let start = performance.now();
|
|
46
41
|
if (summaryScoreMode === 'whiskers') {
|
|
47
42
|
let lastCol;
|
|
48
43
|
let lastMix;
|
|
44
|
+
start = performance.now();
|
|
49
45
|
for (const feature of features.values()) {
|
|
46
|
+
if (performance.now() - start > 400) {
|
|
47
|
+
checkStopToken();
|
|
48
|
+
start = performance.now();
|
|
49
|
+
}
|
|
50
50
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
51
51
|
if (feature.get('summary')) {
|
|
52
52
|
const w = Math.max(rightPx - leftPx + fudgeFactor, minSize);
|
|
@@ -63,7 +63,12 @@ export function drawXY(ctx, props) {
|
|
|
63
63
|
}
|
|
64
64
|
lastMix = undefined;
|
|
65
65
|
lastCol = undefined;
|
|
66
|
+
start = performance.now();
|
|
66
67
|
for (const feature of features.values()) {
|
|
68
|
+
if (performance.now() - start > 400) {
|
|
69
|
+
checkStopToken();
|
|
70
|
+
start = performance.now();
|
|
71
|
+
}
|
|
67
72
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
68
73
|
const score = feature.get('score');
|
|
69
74
|
const max = feature.get('maxScore');
|
|
@@ -78,7 +83,6 @@ export function drawXY(ctx, props) {
|
|
|
78
83
|
.toString())
|
|
79
84
|
: c;
|
|
80
85
|
const w = Math.max(rightPx - leftPx + fudgeFactor, minSize);
|
|
81
|
-
// create reduced features, avoiding multiple features per px
|
|
82
86
|
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
83
87
|
reducedFeatures.push(feature);
|
|
84
88
|
prevLeftPx = leftPx;
|
|
@@ -89,7 +93,12 @@ export function drawXY(ctx, props) {
|
|
|
89
93
|
}
|
|
90
94
|
lastMix = undefined;
|
|
91
95
|
lastCol = undefined;
|
|
96
|
+
start = performance.now();
|
|
92
97
|
for (const feature of features.values()) {
|
|
98
|
+
if (performance.now() - start > 400) {
|
|
99
|
+
checkStopToken();
|
|
100
|
+
start = performance.now();
|
|
101
|
+
}
|
|
93
102
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
94
103
|
if (feature.get('summary')) {
|
|
95
104
|
const min = feature.get('minScore');
|
|
@@ -106,9 +115,13 @@ export function drawXY(ctx, props) {
|
|
|
106
115
|
}
|
|
107
116
|
}
|
|
108
117
|
else {
|
|
118
|
+
start = performance.now();
|
|
109
119
|
for (const feature of features.values()) {
|
|
120
|
+
if (performance.now() - start > 400) {
|
|
121
|
+
checkStopToken();
|
|
122
|
+
start = performance.now();
|
|
123
|
+
}
|
|
110
124
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
111
|
-
// create reduced features, avoiding multiple features per px
|
|
112
125
|
if (Math.floor(leftPx) !== Math.floor(prevLeftPx)) {
|
|
113
126
|
reducedFeatures.push(feature);
|
|
114
127
|
prevLeftPx = leftPx;
|
|
@@ -130,12 +143,15 @@ export function drawXY(ctx, props) {
|
|
|
130
143
|
}
|
|
131
144
|
}
|
|
132
145
|
}
|
|
133
|
-
// second pass: draw clipping
|
|
134
|
-
// avoid persisting the red fillstyle with save/restore
|
|
135
146
|
ctx.save();
|
|
136
147
|
if (hasClipping) {
|
|
137
148
|
ctx.fillStyle = clipColor;
|
|
149
|
+
start = performance.now();
|
|
138
150
|
for (const feature of features.values()) {
|
|
151
|
+
if (performance.now() - start > 400) {
|
|
152
|
+
checkStopToken();
|
|
153
|
+
start = performance.now();
|
|
154
|
+
}
|
|
139
155
|
const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx);
|
|
140
156
|
const w = rightPx - leftPx + fudgeFactor;
|
|
141
157
|
const score = feature.get('score');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
2
|
export interface Source {
|
|
3
3
|
name: string;
|
|
4
4
|
color?: string;
|
|
@@ -10,7 +10,7 @@ export declare function getMultiWiggleSourcesAutorun(self: {
|
|
|
10
10
|
adapterConfig: AnyConfigurationModel;
|
|
11
11
|
autoscaleType: string;
|
|
12
12
|
adapterProps: () => Record<string, unknown>;
|
|
13
|
-
|
|
13
|
+
setSourcesLoading: (aborter: string) => void;
|
|
14
14
|
setError: (error: unknown) => void;
|
|
15
15
|
setMessage: (str: string) => void;
|
|
16
16
|
setSources: (sources: Source[]) => void;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
2
|
+
import { isAbortException } from '@jbrowse/core/util/aborting';
|
|
3
|
+
import { createStopToken } from '@jbrowse/core/util/stopToken';
|
|
4
|
+
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
1
5
|
import { autorun } from 'mobx';
|
|
2
6
|
import { addDisposer, isAlive } from 'mobx-state-tree';
|
|
3
|
-
// jbrowse
|
|
4
|
-
import { getContainingView, getSession, isAbortException, } from '@jbrowse/core/util';
|
|
5
|
-
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
6
7
|
export function getMultiWiggleSourcesAutorun(self) {
|
|
7
8
|
addDisposer(self, autorun(async () => {
|
|
8
9
|
try {
|
|
9
|
-
const { rpcManager } = getSession(self);
|
|
10
|
-
const { adapterConfig } = self;
|
|
11
|
-
const sessionId = getRpcSessionId(self);
|
|
12
10
|
const view = getContainingView(self);
|
|
13
11
|
if (!view.initialized) {
|
|
14
12
|
return;
|
|
15
13
|
}
|
|
14
|
+
const { rpcManager } = getSession(self);
|
|
15
|
+
const { adapterConfig } = self;
|
|
16
|
+
const token = createStopToken();
|
|
17
|
+
self.setSourcesLoading(token);
|
|
18
|
+
const sessionId = getRpcSessionId(self);
|
|
16
19
|
const sources = (await rpcManager.call(sessionId, 'MultiWiggleGetSources', {
|
|
17
20
|
regions: view.staticBlocks.contentBlocks,
|
|
18
21
|
sessionId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { QuantitativeStats } from '@jbrowse/core/util/stats';
|
|
3
3
|
export declare function getQuantitativeStats(self: {
|
|
4
4
|
adapterConfig: AnyConfigurationModel;
|
|
5
5
|
configuration: AnyConfigurationModel;
|
|
@@ -7,7 +7,7 @@ export declare function getQuantitativeStats(self: {
|
|
|
7
7
|
setMessage: (str: string) => void;
|
|
8
8
|
}, opts: {
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
|
-
|
|
10
|
+
stopToken?: string;
|
|
11
11
|
filters: string[];
|
|
12
12
|
currStatsBpPerPx: number;
|
|
13
13
|
}): Promise<QuantitativeStats>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { isAlive } from 'mobx-state-tree';
|
|
2
|
-
// jbrowse
|
|
3
|
-
import { getSession, getContainingView } from '@jbrowse/core/util';
|
|
4
|
-
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
5
1
|
import { getConf } from '@jbrowse/core/configuration';
|
|
2
|
+
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
3
|
+
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
4
|
+
import { isAlive } from 'mobx-state-tree';
|
|
6
5
|
export async function getQuantitativeStats(self, opts) {
|
|
7
6
|
const { rpcManager } = getSession(self);
|
|
8
7
|
const numStdDev = getConf(self, 'numStdDev') || 3;
|
|
@@ -22,10 +21,6 @@ export async function getQuantitativeStats(self, opts) {
|
|
|
22
21
|
if (autoscaleType === 'global' || autoscaleType === 'globalsd') {
|
|
23
22
|
const results = (await rpcManager.call(sessionId, 'WiggleGetGlobalQuantitativeStats', params));
|
|
24
23
|
const { scoreMin, scoreMean, scoreStdDev } = results;
|
|
25
|
-
// globalsd uses heuristic to avoid unnecessary scoreMin<0
|
|
26
|
-
//
|
|
27
|
-
// if the scoreMin is never less than 0 helps with most coverage bigwigs
|
|
28
|
-
// just being >0
|
|
29
24
|
return autoscaleType === 'globalsd'
|
|
30
25
|
? {
|
|
31
26
|
...results,
|
|
@@ -53,9 +48,6 @@ export async function getQuantitativeStats(self, opts) {
|
|
|
53
48
|
bpPerPx,
|
|
54
49
|
}));
|
|
55
50
|
const { scoreMin, scoreMean, scoreStdDev } = results;
|
|
56
|
-
// localsd uses heuristic to avoid unnecessary scoreMin<0 if the
|
|
57
|
-
// scoreMin is never less than 0 helps with most coverage bigwigs
|
|
58
|
-
// just being >0
|
|
59
51
|
return autoscaleType === 'localsd'
|
|
60
52
|
? {
|
|
61
53
|
...results,
|