@jbrowse/plugin-variants 2.16.1 → 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/ChordVariantDisplay/index.d.ts +1 -1
- package/dist/ChordVariantDisplay/index.js +1 -2
- package/dist/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/dist/ChordVariantDisplay/models/configSchema.js +1 -10
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +2 -23
- package/dist/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/dist/LinearVariantDisplay/configSchema.js +1 -10
- package/dist/LinearVariantDisplay/index.d.ts +1 -1
- package/dist/LinearVariantDisplay/index.js +2 -2
- package/dist/LinearVariantDisplay/model.d.ts +8 -38
- package/dist/LinearVariantDisplay/model.js +1 -17
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +73 -0
- package/dist/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/dist/MultiLinearVariantDisplay/configSchema.js +30 -0
- package/dist/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantDisplay/index.js +47 -0
- package/dist/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/dist/MultiLinearVariantDisplay/model.js +235 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantDisplay/renderSvg.js +18 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +42 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +81 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/dist/MultiLinearVariantMatrixDisplay/configSchema.js +22 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixDisplay/index.js +24 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/dist/MultiLinearVariantMatrixDisplay/model.js +218 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/dist/MultiLinearVariantMatrixDisplay/renderSvg.js +21 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/dist/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +106 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +12 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/configSchema.js +6 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantMatrixRenderer/index.js +20 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRenderer.js +60 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/dist/MultiLinearVariantRenderer/MultiVariantRendering.js +43 -0
- package/dist/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/dist/MultiLinearVariantRenderer/configSchema.js +13 -0
- package/dist/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/dist/MultiLinearVariantRenderer/index.js +19 -0
- package/dist/MultiVariantBaseRenderer.d.ts +46 -0
- package/dist/MultiVariantBaseRenderer.js +39 -0
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/dist/StructuralVariantChordRenderer/Chord.js +5 -9
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/dist/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/dist/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/dist/StructuralVariantChordRenderer/index.js +1 -1
- package/dist/Tooltip.d.ts +19 -0
- package/dist/Tooltip.js +58 -0
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/dist/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/dist/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +4 -6
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +9 -13
- package/dist/VariantFeatureWidget/index.d.ts +1 -1
- package/dist/VariantFeatureWidget/index.js +1 -1
- package/dist/VariantFeatureWidget/stateModelFactory.d.ts +3 -3
- package/dist/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/dist/VariantRPC/MultiVariantGetGenotypeMatrix.js +67 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/dist/VariantRPC/MultiVariantGetSimplifiedFeatures.js +63 -0
- package/dist/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/dist/VariantRPC/MultiVariantGetSources.js +22 -0
- package/dist/VariantTrack/configSchema.d.ts +2 -3
- package/dist/VariantTrack/configSchema.js +6 -13
- package/dist/VariantTrack/index.d.ts +1 -1
- package/dist/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/dist/VcfAdapter/VcfAdapter.js +7 -12
- package/dist/VcfAdapter/configSchema.d.ts +0 -3
- package/dist/VcfAdapter/configSchema.js +1 -7
- package/dist/VcfAdapter/index.d.ts +1 -1
- package/dist/VcfFeature/index.d.ts +5 -29
- package/dist/VcfFeature/index.js +35 -26
- package/dist/VcfFeature/util.d.ts +1 -4
- package/dist/VcfFeature/util.js +0 -12
- package/dist/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +10 -5
- package/dist/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/dist/VcfTabixAdapter/configSchema.js +2 -14
- package/dist/VcfTabixAdapter/index.d.ts +1 -1
- package/dist/configSchema.d.ts +34 -0
- package/dist/configSchema.js +44 -0
- package/dist/extensionPoints.d.ts +1 -1
- package/dist/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/dist/getMultiVariantFeaturesAutorun.js +40 -0
- package/dist/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/dist/getMultiVariantSourcesAutorun.js +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -4
- package/dist/shared/BulkEditPanel.d.ts +6 -0
- package/dist/shared/BulkEditPanel.js +103 -0
- package/dist/shared/ClusterDialog.d.ts +12 -0
- package/dist/shared/ClusterDialog.js +150 -0
- package/dist/shared/ColorLegend.d.ts +11 -0
- package/dist/shared/ColorLegend.js +24 -0
- package/dist/shared/DraggableDialog.d.ts +6 -0
- package/dist/shared/DraggableDialog.js +62 -0
- package/dist/shared/LegendBar.d.ts +18 -0
- package/dist/shared/LegendBar.js +38 -0
- package/dist/shared/MAFFilterDialog.d.ts +9 -0
- package/dist/shared/MAFFilterDialog.js +56 -0
- package/dist/shared/RectBg.d.ts +9 -0
- package/dist/shared/RectBg.js +12 -0
- package/dist/shared/RowPalettizer.d.ts +6 -0
- package/dist/shared/RowPalettizer.js +38 -0
- package/dist/shared/SetColorDialog.d.ts +12 -0
- package/dist/shared/SetColorDialog.js +94 -0
- package/dist/shared/SetMinMaxDialog.d.ts +11 -0
- package/dist/shared/SetMinMaxDialog.js +56 -0
- package/dist/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/dist/shared/SharedVariantConfigSchema.js +56 -0
- package/dist/shared/SharedVariantMixin.d.ts +309 -0
- package/dist/shared/SharedVariantMixin.js +58 -0
- package/dist/shared/SourcesGrid.d.ts +8 -0
- package/dist/shared/SourcesGrid.js +143 -0
- package/dist/shared/Tooltip.d.ts +18 -0
- package/dist/shared/Tooltip.js +38 -0
- package/dist/shared/util.d.ts +10 -0
- package/dist/shared/util.js +32 -0
- package/dist/util.d.ts +11 -0
- package/dist/util.js +53 -0
- package/esm/ChordVariantDisplay/index.d.ts +1 -1
- package/esm/ChordVariantDisplay/index.js +1 -2
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +1 -4
- package/esm/ChordVariantDisplay/models/configSchema.js +1 -10
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -27
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +3 -24
- package/esm/LinearVariantDisplay/configSchema.d.ts +2 -2
- package/esm/LinearVariantDisplay/configSchema.js +1 -10
- package/esm/LinearVariantDisplay/index.d.ts +1 -1
- package/esm/LinearVariantDisplay/index.js +2 -2
- package/esm/LinearVariantDisplay/model.d.ts +8 -38
- package/esm/LinearVariantDisplay/model.js +2 -18
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantDisplay/components/VariantDisplayComponent.js +45 -0
- package/esm/MultiLinearVariantDisplay/configSchema.d.ts +80 -0
- package/esm/MultiLinearVariantDisplay/configSchema.js +24 -0
- package/esm/MultiLinearVariantDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantDisplay/index.js +18 -0
- package/esm/MultiLinearVariantDisplay/model.d.ts +278 -0
- package/esm/MultiLinearVariantDisplay/model.js +206 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantDisplay/renderSvg.js +12 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.d.ts +7 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/LinesConnectingMatrixToGenomicPosition.js +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixDisplay/components/VariantDisplayComponent.js +53 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.d.ts +37 -0
- package/esm/MultiLinearVariantMatrixDisplay/configSchema.js +16 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixDisplay/index.js +18 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.d.ts +274 -0
- package/esm/MultiLinearVariantMatrixDisplay/model.js +189 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.d.ts +4 -0
- package/esm/MultiLinearVariantMatrixDisplay/renderSvg.js +15 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.d.ts +62 -0
- package/esm/MultiLinearVariantMatrixRenderer/LinearVariantMatrixRenderer.js +100 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.d.ts +6 -0
- package/esm/MultiLinearVariantMatrixRenderer/components/LinearVariantMatrixRendering.js +7 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/configSchema.js +4 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantMatrixRenderer/index.js +14 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.d.ts +48 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRenderer.js +54 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.d.ts +18 -0
- package/esm/MultiLinearVariantRenderer/MultiVariantRendering.js +18 -0
- package/esm/MultiLinearVariantRenderer/configSchema.d.ts +34 -0
- package/esm/MultiLinearVariantRenderer/configSchema.js +8 -0
- package/esm/MultiLinearVariantRenderer/index.d.ts +2 -0
- package/esm/MultiLinearVariantRenderer/index.js +13 -0
- package/esm/MultiVariantBaseRenderer.d.ts +46 -0
- package/esm/MultiVariantBaseRenderer.js +33 -0
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/Chord.js +5 -9
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +3 -3
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +0 -9
- package/esm/StructuralVariantChordRenderer/configSchema.js +1 -13
- package/esm/StructuralVariantChordRenderer/index.d.ts +1 -1
- package/esm/StructuralVariantChordRenderer/index.js +1 -1
- package/esm/Tooltip.d.ts +19 -0
- package/esm/Tooltip.js +30 -0
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/AnnotGrid.js +2 -2
- package/esm/VariantFeatureWidget/BreakendMultiLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/BreakendSingleLevelOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.d.ts +2 -2
- package/esm/VariantFeatureWidget/LaunchBreakendPanel.js +15 -19
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +5 -7
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +10 -14
- package/esm/VariantFeatureWidget/index.d.ts +1 -1
- package/esm/VariantFeatureWidget/index.js +1 -1
- package/esm/VariantFeatureWidget/stateModelFactory.d.ts +3 -3
- package/esm/VariantFeatureWidget/stateModelFactory.js +1 -1
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.d.ts +17 -0
- package/esm/VariantRPC/MultiVariantGetGenotypeMatrix.js +60 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.d.ts +21 -0
- package/esm/VariantRPC/MultiVariantGetSimplifiedFeatures.js +56 -0
- package/esm/VariantRPC/MultiVariantGetSources.d.ts +14 -0
- package/esm/VariantRPC/MultiVariantGetSources.js +15 -0
- package/esm/VariantTrack/configSchema.d.ts +2 -3
- package/esm/VariantTrack/configSchema.js +5 -13
- package/esm/VariantTrack/index.d.ts +1 -1
- package/esm/VcfAdapter/VcfAdapter.d.ts +3 -2
- package/esm/VcfAdapter/VcfAdapter.js +9 -14
- package/esm/VcfAdapter/configSchema.d.ts +0 -3
- package/esm/VcfAdapter/configSchema.js +1 -7
- package/esm/VcfAdapter/index.d.ts +1 -1
- package/esm/VcfFeature/index.d.ts +5 -29
- package/esm/VcfFeature/index.js +35 -26
- package/esm/VcfFeature/util.d.ts +1 -4
- package/esm/VcfFeature/util.js +0 -12
- package/esm/VcfTabixAdapter/VcfTabixAdapter.d.ts +7 -3
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +11 -6
- package/esm/VcfTabixAdapter/configSchema.d.ts +0 -9
- package/esm/VcfTabixAdapter/configSchema.js +2 -14
- package/esm/VcfTabixAdapter/index.d.ts +1 -1
- package/esm/configSchema.d.ts +34 -0
- package/esm/configSchema.js +42 -0
- package/esm/extensionPoints.d.ts +1 -1
- package/esm/extensionPoints.js +1 -1
- package/esm/getMultiVariantFeaturesAutorun.d.ts +19 -0
- package/esm/getMultiVariantFeaturesAutorun.js +37 -0
- package/esm/getMultiVariantSourcesAutorun.d.ts +16 -0
- package/esm/getMultiVariantSourcesAutorun.js +34 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +18 -4
- package/esm/shared/BulkEditPanel.d.ts +6 -0
- package/esm/shared/BulkEditPanel.js +77 -0
- package/esm/shared/ClusterDialog.d.ts +12 -0
- package/esm/shared/ClusterDialog.js +121 -0
- package/esm/shared/ColorLegend.d.ts +11 -0
- package/esm/shared/ColorLegend.js +19 -0
- package/esm/shared/DraggableDialog.d.ts +6 -0
- package/esm/shared/DraggableDialog.js +34 -0
- package/esm/shared/LegendBar.d.ts +18 -0
- package/esm/shared/LegendBar.js +32 -0
- package/esm/shared/MAFFilterDialog.d.ts +9 -0
- package/esm/shared/MAFFilterDialog.js +31 -0
- package/esm/shared/RectBg.d.ts +9 -0
- package/esm/shared/RectBg.js +7 -0
- package/esm/shared/RowPalettizer.d.ts +6 -0
- package/esm/shared/RowPalettizer.js +32 -0
- package/esm/shared/SetColorDialog.d.ts +12 -0
- package/esm/shared/SetColorDialog.js +65 -0
- package/esm/shared/SetMinMaxDialog.d.ts +11 -0
- package/esm/shared/SetMinMaxDialog.js +30 -0
- package/esm/shared/SharedVariantConfigSchema.d.ts +66 -0
- package/esm/shared/SharedVariantConfigSchema.js +53 -0
- package/esm/shared/SharedVariantMixin.d.ts +309 -0
- package/esm/shared/SharedVariantMixin.js +55 -0
- package/esm/shared/SourcesGrid.d.ts +8 -0
- package/esm/shared/SourcesGrid.js +115 -0
- package/esm/shared/Tooltip.d.ts +18 -0
- package/esm/shared/Tooltip.js +33 -0
- package/esm/shared/util.d.ts +10 -0
- package/esm/shared/util.js +28 -0
- package/esm/util.d.ts +11 -0
- package/esm/util.js +47 -0
- package/package.json +4 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MultiVariantGetSources = void 0;
|
|
7
|
+
const dataAdapterCache_1 = require("@jbrowse/core/data_adapters/dataAdapterCache");
|
|
8
|
+
const RpcMethodTypeWithFiltersAndRenameRegions_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions"));
|
|
9
|
+
class MultiVariantGetSources extends RpcMethodTypeWithFiltersAndRenameRegions_1.default {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.name = 'MultiVariantGetSources';
|
|
13
|
+
}
|
|
14
|
+
async execute(args, rpcDriverClassName) {
|
|
15
|
+
const pm = this.pluginManager;
|
|
16
|
+
const deserializedArgs = await this.deserializeArguments(args, rpcDriverClassName);
|
|
17
|
+
const { regions, adapterConfig, sessionId } = deserializedArgs;
|
|
18
|
+
const { dataAdapter } = await (0, dataAdapterCache_1.getAdapter)(pm, sessionId, adapterConfig);
|
|
19
|
+
return dataAdapter.getSources(regions, deserializedArgs);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.MultiVariantGetSources = MultiVariantGetSources;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
export default function VariantTrackF(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
3
|
name: {
|
|
4
4
|
description: string;
|
|
5
5
|
type: string;
|
|
@@ -77,4 +77,3 @@ declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/c
|
|
|
77
77
|
};
|
|
78
78
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
79
79
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
|
|
80
|
-
export default configSchema;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = VariantTrackF;
|
|
3
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
5
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
11
|
-
const configSchema = (pluginManager) => (0, configuration_1.ConfigurationSchema)('VariantTrack', {}, {
|
|
12
|
-
/**
|
|
13
|
-
* #baseConfiguration
|
|
14
|
-
*/
|
|
15
|
-
baseConfiguration: (0, pluggableElementTypes_1.createBaseTrackConfig)(pluginManager),
|
|
16
|
-
});
|
|
17
|
-
exports.default = configSchema;
|
|
6
|
+
function VariantTrackF(pluginManager) {
|
|
7
|
+
return (0, configuration_1.ConfigurationSchema)('VariantTrack', {}, {
|
|
8
|
+
baseConfiguration: (0, pluggableElementTypes_1.createBaseTrackConfig)(pluginManager),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function VariantTrackF(pm: PluginManager): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import { Region, Feature } from '@jbrowse/core/util';
|
|
3
1
|
import IntervalTree from '@flatten-js/interval-tree';
|
|
2
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
4
5
|
type StatusCallback = (arg: string) => void;
|
|
5
6
|
export default class VcfAdapter extends BaseFeatureDataAdapter {
|
|
6
7
|
calculatedIntervalTreeMap: Record<string, IntervalTree>;
|
|
@@ -3,14 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const interval_tree_1 = __importDefault(require("@flatten-js/interval-tree"));
|
|
7
|
+
const vcf_1 = __importDefault(require("@gmod/vcf"));
|
|
6
8
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
7
9
|
const util_1 = require("@jbrowse/core/util");
|
|
8
10
|
const io_1 = require("@jbrowse/core/util/io");
|
|
9
11
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
10
|
-
const interval_tree_1 = __importDefault(require("@flatten-js/interval-tree"));
|
|
11
|
-
const bgzf_filehandle_1 = require("@gmod/bgzf-filehandle");
|
|
12
|
-
const vcf_1 = __importDefault(require("@gmod/vcf"));
|
|
13
|
-
// local
|
|
14
12
|
const VcfFeature_1 = __importDefault(require("../VcfFeature"));
|
|
15
13
|
class VcfAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
16
14
|
constructor() {
|
|
@@ -28,20 +26,17 @@ class VcfAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
28
26
|
}
|
|
29
27
|
async setupP(opts) {
|
|
30
28
|
const { statusCallback = () => { } } = opts || {};
|
|
31
|
-
const
|
|
32
|
-
const buffer = (0, util_1.
|
|
33
|
-
? await (0, util_1.updateStatus)('Unzipping', statusCallback, () => (0, bgzf_filehandle_1.unzip)(buf))
|
|
34
|
-
: buf;
|
|
29
|
+
const loc = (0, io_1.openLocation)(this.getConf('vcfLocation'), this.pluginManager);
|
|
30
|
+
const buffer = await (0, util_1.fetchAndMaybeUnzip)(loc, opts);
|
|
35
31
|
const headerLines = [];
|
|
36
32
|
const featureMap = {};
|
|
37
33
|
let blockStart = 0;
|
|
38
|
-
const decoder =
|
|
34
|
+
const decoder = new TextDecoder('utf8');
|
|
39
35
|
let i = 0;
|
|
40
36
|
while (blockStart < buffer.length) {
|
|
41
37
|
const n = buffer.indexOf('\n', blockStart);
|
|
42
|
-
// could be a non-newline ended file, so slice to end of file if n===-1
|
|
43
38
|
const b = n === -1 ? buffer.subarray(blockStart) : buffer.subarray(blockStart, n);
|
|
44
|
-
const line =
|
|
39
|
+
const line = decoder.decode(b).trim();
|
|
45
40
|
if (line) {
|
|
46
41
|
if (line.startsWith('#')) {
|
|
47
42
|
headerLines.push(line);
|
|
@@ -114,7 +109,7 @@ class VcfAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
114
109
|
catch (e) {
|
|
115
110
|
observer.error(e);
|
|
116
111
|
}
|
|
117
|
-
}, opts.
|
|
112
|
+
}, opts.stopToken);
|
|
118
113
|
}
|
|
119
114
|
freeResources() { }
|
|
120
115
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config VcfAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const VcfAdapter = (0, configuration_1.ConfigurationSchema)('VcfAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
vcfLocation: {
|
|
13
7
|
type: 'fileLocation',
|
|
14
8
|
defaultValue: { uri: '/path/to/my.vcf', locationType: 'UriLocation' },
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function VcfAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
type
|
|
4
|
-
values: string[] | number[] | null;
|
|
5
|
-
}>>;
|
|
6
|
-
interface FeatureData {
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
refName: string;
|
|
9
|
-
start: number;
|
|
10
|
-
end: number;
|
|
11
|
-
description?: string;
|
|
12
|
-
type?: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
aliases?: string[];
|
|
15
|
-
samples?: Samples;
|
|
16
|
-
}
|
|
1
|
+
import type VCFParser from '@gmod/vcf';
|
|
2
|
+
import type { Variant } from '@gmod/vcf';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
17
4
|
export default class VCFFeature implements Feature {
|
|
18
5
|
private variant;
|
|
19
6
|
private parser;
|
|
20
7
|
private data;
|
|
21
8
|
private _id;
|
|
22
9
|
constructor(args: {
|
|
23
|
-
variant:
|
|
24
|
-
parser:
|
|
10
|
+
variant: Variant;
|
|
11
|
+
parser: VCFParser;
|
|
25
12
|
id: string;
|
|
26
13
|
});
|
|
27
14
|
get(field: string): any;
|
|
28
|
-
set(): void;
|
|
29
15
|
parent(): undefined;
|
|
30
16
|
children(): undefined;
|
|
31
|
-
tags(): string[];
|
|
32
17
|
id(): string;
|
|
33
|
-
dataFromVariant(variant: {
|
|
34
|
-
REF: string;
|
|
35
|
-
POS: number;
|
|
36
|
-
ALT?: string[];
|
|
37
|
-
CHROM: string;
|
|
38
|
-
INFO: any;
|
|
39
|
-
ID?: string[];
|
|
40
|
-
}): FeatureData;
|
|
41
18
|
toJSON(): any;
|
|
42
19
|
}
|
|
43
|
-
export {};
|
package/dist/VcfFeature/index.js
CHANGED
|
@@ -1,55 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// locals
|
|
4
3
|
const util_1 = require("./util");
|
|
4
|
+
function dataFromVariant(variant, parser) {
|
|
5
|
+
const { REF = '', ALT, POS, CHROM, ID } = variant;
|
|
6
|
+
const start = POS - 1;
|
|
7
|
+
const [type, description] = (0, util_1.getSOTermAndDescription)(REF, ALT, parser);
|
|
8
|
+
return {
|
|
9
|
+
refName: CHROM,
|
|
10
|
+
start,
|
|
11
|
+
end: getEnd(variant),
|
|
12
|
+
description,
|
|
13
|
+
type,
|
|
14
|
+
name: ID === null || ID === void 0 ? void 0 : ID.join(','),
|
|
15
|
+
aliases: ID && ID.length > 1 ? ID.slice(1) : undefined,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function getEnd(variant) {
|
|
19
|
+
const { POS, REF = '', ALT } = variant;
|
|
20
|
+
const isTRA = ALT === null || ALT === void 0 ? void 0 : ALT.includes('<TRA>');
|
|
21
|
+
const start = POS - 1;
|
|
22
|
+
const isSymbolic = ALT === null || ALT === void 0 ? void 0 : ALT.some(f => f.includes('<'));
|
|
23
|
+
if (isSymbolic) {
|
|
24
|
+
const info = variant.INFO;
|
|
25
|
+
if (info.END && !isTRA) {
|
|
26
|
+
return +info.END[0];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return start + REF.length;
|
|
30
|
+
}
|
|
5
31
|
class VCFFeature {
|
|
6
32
|
constructor(args) {
|
|
7
33
|
this.variant = args.variant;
|
|
8
34
|
this.parser = args.parser;
|
|
9
|
-
this.data =
|
|
35
|
+
this.data = dataFromVariant(this.variant, this.parser);
|
|
10
36
|
this._id = args.id;
|
|
11
37
|
}
|
|
12
38
|
get(field) {
|
|
13
39
|
var _a;
|
|
14
40
|
return field === 'samples'
|
|
15
|
-
? this.variant.SAMPLES
|
|
16
|
-
:
|
|
41
|
+
? this.variant.SAMPLES()
|
|
42
|
+
: field === 'genotypes'
|
|
43
|
+
? this.variant.GENOTYPES()
|
|
44
|
+
: ((_a = this.data[field]) !== null && _a !== void 0 ? _a : this.variant[field]);
|
|
17
45
|
}
|
|
18
|
-
set() { }
|
|
19
46
|
parent() {
|
|
20
47
|
return undefined;
|
|
21
48
|
}
|
|
22
49
|
children() {
|
|
23
50
|
return undefined;
|
|
24
51
|
}
|
|
25
|
-
tags() {
|
|
26
|
-
return [...Object.keys(this.data), ...Object.keys(this.variant), 'samples'];
|
|
27
|
-
}
|
|
28
52
|
id() {
|
|
29
53
|
return this._id;
|
|
30
54
|
}
|
|
31
|
-
dataFromVariant(variant) {
|
|
32
|
-
const { REF, ALT, POS, CHROM, INFO, ID } = variant;
|
|
33
|
-
const start = POS - 1;
|
|
34
|
-
const [type, description] = (0, util_1.getSOTermAndDescription)(REF, ALT, this.parser);
|
|
35
|
-
const isTRA = ALT === null || ALT === void 0 ? void 0 : ALT.includes('<TRA>');
|
|
36
|
-
const isSymbolic = ALT === null || ALT === void 0 ? void 0 : ALT.some(f => f.includes('<'));
|
|
37
|
-
return {
|
|
38
|
-
refName: CHROM,
|
|
39
|
-
start,
|
|
40
|
-
end: isSymbolic && INFO.END && !isTRA ? +INFO.END[0] : start + REF.length,
|
|
41
|
-
description,
|
|
42
|
-
type,
|
|
43
|
-
name: ID === null || ID === void 0 ? void 0 : ID.join(','),
|
|
44
|
-
aliases: ID && ID.length > 1 ? ID.slice(1) : undefined,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
55
|
toJSON() {
|
|
56
|
+
const { SAMPLES, GENOTYPES, ...rest } = this.variant;
|
|
48
57
|
return {
|
|
49
58
|
uniqueId: this._id,
|
|
50
|
-
...
|
|
59
|
+
...rest,
|
|
51
60
|
...this.data,
|
|
52
|
-
samples: this.variant.SAMPLES,
|
|
61
|
+
samples: this.variant.SAMPLES(),
|
|
53
62
|
};
|
|
54
63
|
}
|
|
55
64
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import VCF from '@gmod/vcf';
|
|
2
|
-
/**
|
|
3
|
-
* Get a sequence ontology (SO) term that describes the variant type
|
|
4
|
-
*/
|
|
1
|
+
import type VCF from '@gmod/vcf';
|
|
5
2
|
export declare function getSOTermAndDescription(ref: string, alt: string[] | undefined, parser: VCF): string[];
|
|
6
3
|
export declare function getSOAndDescFromAltDefs(alt: string, parser: VCF): string[];
|
|
7
4
|
export declare function getSOAndDescByExamination(ref: string, alt: string): string[];
|
package/dist/VcfFeature/util.js
CHANGED
|
@@ -16,11 +16,7 @@ const altTypeToSO = {
|
|
|
16
16
|
NON_REF: 'sequence_variant',
|
|
17
17
|
'*': 'sequence_variant',
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Get a sequence ontology (SO) term that describes the variant type
|
|
21
|
-
*/
|
|
22
19
|
function getSOTermAndDescription(ref, alt, parser) {
|
|
23
|
-
// it's just a remark if there are no alternate alleles
|
|
24
20
|
if (!alt || alt.length === 0) {
|
|
25
21
|
return ['remark', 'no alternative alleles'];
|
|
26
22
|
}
|
|
@@ -37,7 +33,6 @@ function getSOTermAndDescription(ref, alt, parser) {
|
|
|
37
33
|
descriptions.add(description);
|
|
38
34
|
}
|
|
39
35
|
});
|
|
40
|
-
// Combine descriptions like ["SNV G -> A", "SNV G -> T"] to ["SNV G -> A,T"]
|
|
41
36
|
if (descriptions.size > 1) {
|
|
42
37
|
const descs = [...descriptions];
|
|
43
38
|
const prefixes = new Set(descs
|
|
@@ -65,26 +60,19 @@ function getSOAndDescFromAltDefs(alt, parser) {
|
|
|
65
60
|
if (typeof alt === 'string' && !alt.startsWith('<')) {
|
|
66
61
|
return [];
|
|
67
62
|
}
|
|
68
|
-
// look for a definition with an SO type for this
|
|
69
63
|
let soTerm = altTypeToSO[alt];
|
|
70
|
-
// if no SO term but ALT is in metadata, assume sequence_variant
|
|
71
64
|
if (!soTerm && parser.getMetadata('ALT', alt)) {
|
|
72
65
|
soTerm = 'sequence_variant';
|
|
73
66
|
}
|
|
74
67
|
if (soTerm) {
|
|
75
68
|
return [soTerm, alt];
|
|
76
69
|
}
|
|
77
|
-
// try to look for a definition for a parent term if we can
|
|
78
70
|
const modAlt = alt.split(':');
|
|
79
71
|
if (modAlt.length > 1) {
|
|
80
72
|
return getSOAndDescFromAltDefs(`<${modAlt.slice(0, -1).join(':')}>`, parser);
|
|
81
73
|
}
|
|
82
|
-
// no parent
|
|
83
74
|
return [];
|
|
84
75
|
}
|
|
85
|
-
// note: term SNV is used instead of SNP because SO definition of SNP says
|
|
86
|
-
// abundance must be at least 1% in population, and can't be sure we meet
|
|
87
|
-
// that
|
|
88
76
|
function getSOAndDescByExamination(ref, alt) {
|
|
89
77
|
const bnd = (0, vcf_1.parseBreakend)(alt);
|
|
90
78
|
if (bnd) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
3
|
-
import { Feature } from '@jbrowse/core/util';
|
|
4
1
|
import { TabixIndexedFile } from '@gmod/tabix';
|
|
5
2
|
import VcfParser from '@gmod/vcf';
|
|
3
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
5
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
6
|
+
import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
6
7
|
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
7
8
|
private configured?;
|
|
8
9
|
private configurePre;
|
|
@@ -14,5 +15,8 @@ export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
14
15
|
getHeader(): Promise<string>;
|
|
15
16
|
getMetadata(): Promise<any>;
|
|
16
17
|
getFeatures(query: NoAssemblyRegion, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
18
|
+
getSources(): Promise<{
|
|
19
|
+
name: string;
|
|
20
|
+
}[]>;
|
|
17
21
|
freeResources(): void;
|
|
18
22
|
}
|
|
@@ -3,12 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const tabix_1 = require("@gmod/tabix");
|
|
7
|
+
const vcf_1 = __importDefault(require("@gmod/vcf"));
|
|
6
8
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
7
9
|
const io_1 = require("@jbrowse/core/util/io");
|
|
8
10
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
9
|
-
const tabix_1 = require("@gmod/tabix");
|
|
10
|
-
const vcf_1 = __importDefault(require("@gmod/vcf"));
|
|
11
|
-
// local
|
|
12
11
|
const VcfFeature_1 = __importDefault(require("../VcfFeature"));
|
|
13
12
|
class VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
14
13
|
async configurePre() {
|
|
@@ -66,8 +65,14 @@ class VcfTabixAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
66
65
|
...opts,
|
|
67
66
|
});
|
|
68
67
|
observer.complete();
|
|
69
|
-
}, opts.
|
|
68
|
+
}, opts.stopToken);
|
|
69
|
+
}
|
|
70
|
+
async getSources() {
|
|
71
|
+
const { parser } = await this.configure();
|
|
72
|
+
return parser.samples.map(name => ({
|
|
73
|
+
name,
|
|
74
|
+
}));
|
|
70
75
|
}
|
|
71
|
-
freeResources(
|
|
76
|
+
freeResources() { }
|
|
72
77
|
}
|
|
73
78
|
exports.default = VcfTabixAdapter;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const VcfTabixAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
vcfGzLocation: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -10,17 +7,11 @@ declare const VcfTabixAdapter: import("@jbrowse/core/configuration/configuration
|
|
|
10
7
|
};
|
|
11
8
|
};
|
|
12
9
|
index: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
13
|
-
/**
|
|
14
|
-
* #slot index.indexType
|
|
15
|
-
*/
|
|
16
10
|
indexType: {
|
|
17
11
|
model: import("mobx-state-tree").ISimpleType<string>;
|
|
18
12
|
type: string;
|
|
19
13
|
defaultValue: string;
|
|
20
14
|
};
|
|
21
|
-
/**
|
|
22
|
-
* #slot index.location
|
|
23
|
-
*/
|
|
24
15
|
location: {
|
|
25
16
|
type: string;
|
|
26
17
|
defaultValue: {
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
4
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
+
function x() { }
|
|
9
6
|
const VcfTabixAdapter = (0, configuration_1.ConfigurationSchema)('VcfTabixAdapter', {
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
vcfGzLocation: {
|
|
14
8
|
type: 'fileLocation',
|
|
15
9
|
defaultValue: { uri: '/path/to/my.vcf.gz', locationType: 'UriLocation' },
|
|
16
10
|
},
|
|
17
11
|
index: (0, configuration_1.ConfigurationSchema)('VcfIndex', {
|
|
18
|
-
/**
|
|
19
|
-
* #slot index.indexType
|
|
20
|
-
*/
|
|
21
12
|
indexType: {
|
|
22
13
|
model: mobx_state_tree_1.types.enumeration('IndexType', ['TBI', 'CSI']),
|
|
23
14
|
type: 'stringEnum',
|
|
24
15
|
defaultValue: 'TBI',
|
|
25
16
|
},
|
|
26
|
-
/**
|
|
27
|
-
* #slot index.location
|
|
28
|
-
*/
|
|
29
17
|
location: {
|
|
30
18
|
type: 'fileLocation',
|
|
31
19
|
defaultValue: {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const WiggleRenderer: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
color: {
|
|
3
|
+
type: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defaultValue: string;
|
|
6
|
+
};
|
|
7
|
+
posColor: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
defaultValue: string;
|
|
11
|
+
};
|
|
12
|
+
negColor: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
defaultValue: string;
|
|
16
|
+
};
|
|
17
|
+
clipColor: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
defaultValue: string;
|
|
21
|
+
};
|
|
22
|
+
bicolorPivot: {
|
|
23
|
+
type: string;
|
|
24
|
+
model: import("mobx-state-tree").ISimpleType<string>;
|
|
25
|
+
description: string;
|
|
26
|
+
defaultValue: string;
|
|
27
|
+
};
|
|
28
|
+
bicolorPivotValue: {
|
|
29
|
+
type: string;
|
|
30
|
+
defaultValue: number;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
34
|
+
export default WiggleRenderer;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
+
function x() { }
|
|
6
|
+
const WiggleRenderer = (0, configuration_1.ConfigurationSchema)('WiggleRenderer', {
|
|
7
|
+
color: {
|
|
8
|
+
type: 'color',
|
|
9
|
+
description: 'the color of track, overrides posColor and negColor',
|
|
10
|
+
defaultValue: '#f0f',
|
|
11
|
+
},
|
|
12
|
+
posColor: {
|
|
13
|
+
type: 'color',
|
|
14
|
+
description: 'the color to use when the score is positive',
|
|
15
|
+
defaultValue: 'blue',
|
|
16
|
+
},
|
|
17
|
+
negColor: {
|
|
18
|
+
type: 'color',
|
|
19
|
+
description: 'the color to use when the score is negative',
|
|
20
|
+
defaultValue: 'red',
|
|
21
|
+
},
|
|
22
|
+
clipColor: {
|
|
23
|
+
type: 'color',
|
|
24
|
+
description: 'the color of the clipping marker',
|
|
25
|
+
defaultValue: 'red',
|
|
26
|
+
},
|
|
27
|
+
bicolorPivot: {
|
|
28
|
+
type: 'stringEnum',
|
|
29
|
+
model: mobx_state_tree_1.types.enumeration('Scale type', [
|
|
30
|
+
'numeric',
|
|
31
|
+
'mean',
|
|
32
|
+
'z_score',
|
|
33
|
+
'none',
|
|
34
|
+
]),
|
|
35
|
+
description: 'type of bicolor pivot',
|
|
36
|
+
defaultValue: 'numeric',
|
|
37
|
+
},
|
|
38
|
+
bicolorPivotValue: {
|
|
39
|
+
type: 'number',
|
|
40
|
+
defaultValue: 0,
|
|
41
|
+
description: 'value to use for bicolor pivot',
|
|
42
|
+
},
|
|
43
|
+
}, { explicitlyTyped: true });
|
|
44
|
+
exports.default = WiggleRenderer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function ExtensionPointsF(pluginManager: PluginManager): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
export interface Source {
|
|
4
|
+
name: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
group?: string;
|
|
7
|
+
[key: string]: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare function getMultiVariantFeaturesAutorun(self: {
|
|
10
|
+
configuration: AnyConfigurationModel;
|
|
11
|
+
adapterConfig: AnyConfigurationModel;
|
|
12
|
+
sources?: Source[];
|
|
13
|
+
mafFilter: number;
|
|
14
|
+
statsReadyAndRegionNotTooLarge: boolean;
|
|
15
|
+
adapterProps: () => Record<string, unknown>;
|
|
16
|
+
setError: (error: unknown) => void;
|
|
17
|
+
setFeatures: (f: Feature[]) => void;
|
|
18
|
+
setMessage: (str: string) => void;
|
|
19
|
+
}): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMultiVariantFeaturesAutorun = getMultiVariantFeaturesAutorun;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const aborting_1 = require("@jbrowse/core/util/aborting");
|
|
6
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
7
|
+
const mobx_1 = require("mobx");
|
|
8
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
9
|
+
function getMultiVariantFeaturesAutorun(self) {
|
|
10
|
+
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.autorun)(async () => {
|
|
11
|
+
try {
|
|
12
|
+
const view = (0, util_1.getContainingView)(self);
|
|
13
|
+
if (!view.initialized || !self.statsReadyAndRegionNotTooLarge) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const { rpcManager } = (0, util_1.getSession)(self);
|
|
17
|
+
const { sources, mafFilter, adapterConfig } = self;
|
|
18
|
+
if (!sources) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
22
|
+
const features = (await rpcManager.call(sessionId, 'MultiVariantGetSimplifiedFeatures', {
|
|
23
|
+
regions: view.dynamicBlocks.contentBlocks,
|
|
24
|
+
sources,
|
|
25
|
+
mafFilter,
|
|
26
|
+
sessionId,
|
|
27
|
+
adapterConfig,
|
|
28
|
+
}));
|
|
29
|
+
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
30
|
+
self.setFeatures(features.map(f => new util_1.SimpleFeature(f)));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
if (!(0, aborting_1.isAbortException)(e) && (0, mobx_state_tree_1.isAlive)(self)) {
|
|
35
|
+
console.error(e);
|
|
36
|
+
(0, util_1.getSession)(self).notifyError(`${e}`, e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, { delay: 1000 }));
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
2
|
+
export interface Source {
|
|
3
|
+
name: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
[key: string]: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function getMultiVariantSourcesAutorun(self: {
|
|
9
|
+
configuration: AnyConfigurationModel;
|
|
10
|
+
adapterConfig: AnyConfigurationModel;
|
|
11
|
+
adapterProps: () => Record<string, unknown>;
|
|
12
|
+
setSourcesLoading: (aborter: string) => void;
|
|
13
|
+
setError: (error: unknown) => void;
|
|
14
|
+
setMessage: (str: string) => void;
|
|
15
|
+
setSources: (sources: Source[]) => void;
|
|
16
|
+
}): void;
|