@jbrowse/plugin-alignments 2.16.0 → 2.17.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/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +2 -3
- package/dist/AlignmentsFeatureDetail/Flags.js +2 -2
- package/dist/AlignmentsFeatureDetail/LinkedPairedAlignments.js +2 -2
- package/dist/AlignmentsFeatureDetail/SupplementaryAlignments.js +2 -2
- package/dist/AlignmentsFeatureDetail/getSAFeatures.js +2 -2
- package/dist/AlignmentsFeatureDetail/stateModelFactory.d.ts +1 -1
- package/dist/BamAdapter/BamAdapter.d.ts +3 -2
- package/dist/BamAdapter/BamAdapter.js +34 -11
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -17
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +42 -72
- package/dist/CramAdapter/CramAdapter.d.ts +4 -3
- package/dist/CramAdapter/CramAdapter.js +24 -7
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +21 -27
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +74 -73
- package/dist/CramAdapter/util.d.ts +1 -10
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/index.js +2 -2
- package/dist/LinearAlignmentsDisplay/{models/model.d.ts → model.d.ts} +6 -3
- package/dist/LinearAlignmentsDisplay/{models/model.js → model.js} +11 -7
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +6 -27
- package/dist/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +43 -21
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.d.ts +5 -4
- package/dist/LinearPileupDisplay/components/ColorByTagDialog.js +3 -1
- package/dist/LinearPileupDisplay/components/GroupByDialog.js +8 -6
- package/dist/LinearPileupDisplay/components/SortByTagDialog.js +6 -4
- package/dist/LinearPileupDisplay/model.d.ts +41 -45
- package/dist/LinearPileupDisplay/model.js +118 -41
- package/dist/LinearReadArcsDisplay/components/ReactComponent.js +1 -1
- package/dist/LinearReadArcsDisplay/model.d.ts +22 -21
- package/dist/LinearReadArcsDisplay/model.js +13 -14
- package/dist/LinearReadCloudDisplay/components/ReactComponent.js +1 -1
- package/dist/LinearReadCloudDisplay/model.d.ts +14 -22
- package/dist/LinearReadCloudDisplay/model.js +12 -13
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +49 -19
- package/dist/LinearSNPCoverageDisplay/index.js +3 -2
- package/dist/LinearSNPCoverageDisplay/{models/model.d.ts → model.d.ts} +3 -13
- package/dist/LinearSNPCoverageDisplay/{models/model.js → model.js} +71 -45
- package/dist/MismatchParser/cigarToMismatches.d.ts +3 -0
- package/dist/MismatchParser/cigarToMismatches.js +94 -0
- package/dist/MismatchParser/getNextRefPos.d.ts +4 -0
- package/dist/MismatchParser/getNextRefPos.js +40 -0
- package/dist/MismatchParser/index.d.ts +4 -29
- package/dist/MismatchParser/index.js +10 -321
- package/dist/MismatchParser/mdToMismatches.d.ts +3 -0
- package/dist/MismatchParser/mdToMismatches.js +80 -0
- package/dist/ModificationParser/index.d.ts +19 -0
- package/dist/ModificationParser/index.js +144 -0
- package/dist/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
- package/dist/PileupRPC/methods/GetReducedFeatures.d.ts +1 -1
- package/dist/PileupRPC/methods/GetReducedFeatures.js +19 -16
- package/dist/PileupRPC/methods/GetVisibleModifications.d.ts +2 -1
- package/dist/PileupRPC/methods/GetVisibleModifications.js +9 -6
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +8 -7
- package/dist/PileupRenderer/PileupRenderer.d.ts +6 -14
- package/dist/PileupRenderer/PileupRenderer.js +7 -5
- package/dist/PileupRenderer/renderAlignment.js +17 -4
- package/dist/PileupRenderer/renderAlignmentShape.js +102 -21
- package/dist/PileupRenderer/renderMethylation.d.ts +2 -1
- package/dist/PileupRenderer/renderMethylation.js +17 -9
- package/dist/PileupRenderer/renderMismatches.js +19 -19
- package/dist/PileupRenderer/renderModifications.d.ts +3 -2
- package/dist/PileupRenderer/renderModifications.js +31 -34
- package/dist/PileupRenderer/renderPerBaseLettering.d.ts +2 -1
- package/dist/PileupRenderer/renderPerBaseLettering.js +1 -3
- package/dist/PileupRenderer/renderPerBaseQuality.d.ts +2 -1
- package/dist/PileupRenderer/renderPerBaseQuality.js +1 -3
- package/dist/PileupRenderer/renderSoftClipping.js +6 -6
- package/dist/PileupRenderer/sortUtil.d.ts +2 -7
- package/dist/PileupRenderer/sortUtil.js +13 -13
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +10 -5
- package/dist/SNPCoverageAdapter/generateCoverageBins.d.ts +13 -9
- package/dist/SNPCoverageAdapter/generateCoverageBins.js +269 -166
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -1
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +171 -54
- package/dist/shared/color.d.ts +0 -10
- package/dist/shared/color.js +1 -7
- package/{esm/shared → dist/shared/components}/BaseDisplayComponent.d.ts +2 -2
- package/{esm/shared → dist/shared/components}/FilterByTagDialog.d.ts +3 -3
- package/dist/shared/{FilterByTagDialog.js → components/FilterByTagDialog.js} +5 -1
- package/dist/shared/fetchChains.js +1 -2
- package/dist/shared/getMaximumModificationAtEachPosition.d.ts +8 -0
- package/dist/shared/getMaximumModificationAtEachPosition.js +42 -0
- package/dist/shared/getUniqueModifications.d.ts +14 -0
- package/dist/shared/getUniqueModifications.js +16 -0
- package/dist/shared/getUniqueTags.d.ts +15 -0
- package/dist/shared/getUniqueTags.js +18 -0
- package/dist/shared/types.d.ts +94 -0
- package/dist/shared/util.d.ts +8 -0
- package/dist/shared/util.js +26 -0
- package/dist/util.d.ts +7 -4
- package/dist/util.js +30 -30
- package/esm/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +2 -3
- package/esm/AlignmentsFeatureDetail/Flags.js +1 -1
- package/esm/AlignmentsFeatureDetail/LinkedPairedAlignments.js +1 -1
- package/esm/AlignmentsFeatureDetail/SupplementaryAlignments.js +1 -1
- package/esm/AlignmentsFeatureDetail/getSAFeatures.js +2 -2
- package/esm/AlignmentsFeatureDetail/stateModelFactory.d.ts +1 -1
- package/esm/BamAdapter/BamAdapter.d.ts +3 -2
- package/esm/BamAdapter/BamAdapter.js +31 -8
- package/esm/BamAdapter/BamSlightlyLazyFeature.d.ts +3 -17
- package/esm/BamAdapter/BamSlightlyLazyFeature.js +43 -73
- package/esm/CramAdapter/CramAdapter.d.ts +4 -3
- package/esm/CramAdapter/CramAdapter.js +22 -5
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +21 -27
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +74 -73
- package/esm/CramAdapter/util.d.ts +1 -10
- package/esm/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/index.js +2 -2
- package/esm/LinearAlignmentsDisplay/{models/model.d.ts → model.d.ts} +6 -3
- package/esm/LinearAlignmentsDisplay/{models/model.js → model.js} +11 -7
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.d.ts +6 -27
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +45 -23
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.d.ts +5 -4
- package/esm/LinearPileupDisplay/components/ColorByTagDialog.js +3 -1
- package/esm/LinearPileupDisplay/components/GroupByDialog.js +8 -6
- package/esm/LinearPileupDisplay/components/SortByTagDialog.js +6 -4
- package/esm/LinearPileupDisplay/model.d.ts +41 -45
- package/esm/LinearPileupDisplay/model.js +119 -42
- package/esm/LinearReadArcsDisplay/components/ReactComponent.js +1 -1
- package/esm/LinearReadArcsDisplay/model.d.ts +22 -21
- package/esm/LinearReadArcsDisplay/model.js +14 -15
- package/esm/LinearReadCloudDisplay/components/ReactComponent.js +1 -1
- package/esm/LinearReadCloudDisplay/model.d.ts +14 -22
- package/esm/LinearReadCloudDisplay/model.js +13 -14
- package/esm/LinearSNPCoverageDisplay/components/Tooltip.js +49 -19
- package/esm/LinearSNPCoverageDisplay/index.js +3 -2
- package/esm/LinearSNPCoverageDisplay/{models/model.d.ts → model.d.ts} +3 -13
- package/esm/LinearSNPCoverageDisplay/{models/model.js → model.js} +72 -46
- package/esm/MismatchParser/cigarToMismatches.d.ts +3 -0
- package/esm/MismatchParser/cigarToMismatches.js +91 -0
- package/esm/MismatchParser/getNextRefPos.d.ts +4 -0
- package/esm/MismatchParser/getNextRefPos.js +37 -0
- package/esm/MismatchParser/index.d.ts +4 -29
- package/esm/MismatchParser/index.js +5 -311
- package/esm/MismatchParser/mdToMismatches.d.ts +3 -0
- package/esm/MismatchParser/mdToMismatches.js +77 -0
- package/esm/ModificationParser/index.d.ts +19 -0
- package/esm/ModificationParser/index.js +138 -0
- package/esm/PileupRPC/methods/GetGlobalValueForTag.js +1 -2
- package/esm/PileupRPC/methods/GetReducedFeatures.d.ts +1 -1
- package/esm/PileupRPC/methods/GetReducedFeatures.js +19 -16
- package/esm/PileupRPC/methods/GetVisibleModifications.d.ts +2 -1
- package/esm/PileupRPC/methods/GetVisibleModifications.js +9 -6
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +8 -7
- package/esm/PileupRenderer/PileupRenderer.d.ts +6 -14
- package/esm/PileupRenderer/PileupRenderer.js +8 -6
- package/esm/PileupRenderer/renderAlignment.js +17 -4
- package/esm/PileupRenderer/renderAlignmentShape.js +102 -21
- package/esm/PileupRenderer/renderMethylation.d.ts +2 -1
- package/esm/PileupRenderer/renderMethylation.js +17 -9
- package/esm/PileupRenderer/renderMismatches.js +19 -19
- package/esm/PileupRenderer/renderModifications.d.ts +3 -2
- package/esm/PileupRenderer/renderModifications.js +30 -33
- package/esm/PileupRenderer/renderPerBaseLettering.d.ts +2 -1
- package/esm/PileupRenderer/renderPerBaseLettering.js +1 -3
- package/esm/PileupRenderer/renderPerBaseQuality.d.ts +2 -1
- package/esm/PileupRenderer/renderPerBaseQuality.js +1 -3
- package/esm/PileupRenderer/renderSoftClipping.js +6 -6
- package/esm/PileupRenderer/sortUtil.d.ts +2 -7
- package/esm/PileupRenderer/sortUtil.js +13 -13
- package/esm/SNPCoverageAdapter/SNPCoverageAdapter.js +10 -5
- package/esm/SNPCoverageAdapter/generateCoverageBins.d.ts +13 -9
- package/esm/SNPCoverageAdapter/generateCoverageBins.js +269 -166
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +2 -1
- package/esm/SNPCoverageRenderer/SNPCoverageRenderer.js +171 -54
- package/esm/shared/color.d.ts +0 -10
- package/esm/shared/color.js +0 -6
- package/{dist/shared → esm/shared/components}/BaseDisplayComponent.d.ts +2 -2
- package/{dist/shared → esm/shared/components}/FilterByTagDialog.d.ts +3 -3
- package/esm/shared/{FilterByTagDialog.js → components/FilterByTagDialog.js} +5 -1
- package/esm/shared/fetchChains.js +1 -2
- package/esm/shared/getMaximumModificationAtEachPosition.d.ts +8 -0
- package/esm/shared/getMaximumModificationAtEachPosition.js +39 -0
- package/esm/shared/getUniqueModifications.d.ts +14 -0
- package/esm/shared/getUniqueModifications.js +13 -0
- package/esm/shared/getUniqueTags.d.ts +15 -0
- package/esm/shared/getUniqueTags.js +15 -0
- package/esm/shared/types.d.ts +94 -0
- package/esm/shared/util.d.ts +8 -0
- package/esm/shared/util.js +23 -0
- package/esm/util.d.ts +7 -4
- package/esm/util.js +28 -27
- package/package.json +4 -4
- package/dist/LinearPileupDisplay/components/ColorByModificationsDialog.d.ts +0 -15
- package/dist/LinearPileupDisplay/components/ColorByModificationsDialog.js +0 -41
- package/dist/LinearPileupDisplay/components/ModificationsTable.d.ts +0 -4
- package/dist/LinearPileupDisplay/components/ModificationsTable.js +0 -28
- package/dist/SNPCoverageAdapter/util.d.ts +0 -25
- package/dist/shared/index.d.ts +0 -49
- package/dist/shared/index.js +0 -41
- package/esm/LinearPileupDisplay/components/ColorByModificationsDialog.d.ts +0 -15
- package/esm/LinearPileupDisplay/components/ColorByModificationsDialog.js +0 -36
- package/esm/LinearPileupDisplay/components/ModificationsTable.d.ts +0 -4
- package/esm/LinearPileupDisplay/components/ModificationsTable.js +0 -22
- package/esm/SNPCoverageAdapter/util.d.ts +0 -25
- package/esm/shared/index.d.ts +0 -49
- package/esm/shared/index.js +0 -36
- /package/dist/LinearAlignmentsDisplay/{models/alignmentsModel.d.ts → alignmentsModel.d.ts} +0 -0
- /package/dist/LinearAlignmentsDisplay/{models/alignmentsModel.js → alignmentsModel.js} +0 -0
- /package/dist/LinearAlignmentsDisplay/{models/configSchema.d.ts → configSchema.d.ts} +0 -0
- /package/dist/LinearAlignmentsDisplay/{models/configSchema.js → configSchema.js} +0 -0
- /package/dist/LinearAlignmentsDisplay/{models/util.d.ts → util.d.ts} +0 -0
- /package/dist/LinearAlignmentsDisplay/{models/util.js → util.js} +0 -0
- /package/dist/LinearSNPCoverageDisplay/{models/configSchema.d.ts → configSchema.d.ts} +0 -0
- /package/dist/LinearSNPCoverageDisplay/{models/configSchema.js → configSchema.js} +0 -0
- /package/dist/shared/{BaseDisplayComponent.js → components/BaseDisplayComponent.js} +0 -0
- /package/dist/shared/{renderSvg.d.ts → renderSvgUtil.d.ts} +0 -0
- /package/dist/shared/{renderSvg.js → renderSvgUtil.js} +0 -0
- /package/dist/{SNPCoverageAdapter/util.js → shared/types.js} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/alignmentsModel.d.ts → alignmentsModel.d.ts} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/alignmentsModel.js → alignmentsModel.js} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/configSchema.d.ts → configSchema.d.ts} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/configSchema.js → configSchema.js} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/util.d.ts → util.d.ts} +0 -0
- /package/esm/LinearAlignmentsDisplay/{models/util.js → util.js} +0 -0
- /package/esm/LinearSNPCoverageDisplay/{models/configSchema.d.ts → configSchema.d.ts} +0 -0
- /package/esm/LinearSNPCoverageDisplay/{models/configSchema.js → configSchema.js} +0 -0
- /package/esm/shared/{BaseDisplayComponent.js → components/BaseDisplayComponent.js} +0 -0
- /package/esm/shared/{renderSvg.d.ts → renderSvgUtil.d.ts} +0 -0
- /package/esm/shared/{renderSvg.js → renderSvgUtil.js} +0 -0
- /package/esm/{SNPCoverageAdapter/util.js → shared/types.js} +0 -0
|
@@ -5,7 +5,7 @@ import { Dialog, ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
|
|
|
5
5
|
import { getSnapshot } from 'mobx-state-tree';
|
|
6
6
|
import { getContainingTrack, getContainingView, getSession, useDebounce, } from '@jbrowse/core/util';
|
|
7
7
|
// locals
|
|
8
|
-
import {
|
|
8
|
+
import { getUniqueTags } from '../../shared/getUniqueTags';
|
|
9
9
|
function clone(c) {
|
|
10
10
|
return JSON.parse(JSON.stringify(c));
|
|
11
11
|
}
|
|
@@ -27,7 +27,7 @@ const GroupByTagDialog = observer(function (props) {
|
|
|
27
27
|
if (!isInvalid) {
|
|
28
28
|
setError(undefined);
|
|
29
29
|
setLoading(true);
|
|
30
|
-
const vals = await
|
|
30
|
+
const vals = await getUniqueTags({
|
|
31
31
|
self: model,
|
|
32
32
|
tag: debouncedTag,
|
|
33
33
|
blocks: getContainingView(model)
|
|
@@ -54,10 +54,12 @@ const GroupByTagDialog = observer(function (props) {
|
|
|
54
54
|
} }), label: "Make a new subtrack for undefined values of tag as well?" }),
|
|
55
55
|
React.createElement(TextField, { value: tag, onChange: event => {
|
|
56
56
|
setTag(event.target.value);
|
|
57
|
-
}, placeholder: "Enter tag name",
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
}, placeholder: "Enter tag name", error: isInvalid, helperText: isInvalid ? 'Not a valid tag' : '', autoComplete: "off", "data-testid": "group-tag-name", slotProps: {
|
|
58
|
+
htmlInput: {
|
|
59
|
+
maxLength: 2,
|
|
60
|
+
'data-testid': 'group-tag-name-input',
|
|
61
|
+
},
|
|
62
|
+
} }),
|
|
61
63
|
error ? (React.createElement(ErrorMessage, { error: error })) : loading ? (React.createElement(LoadingEllipses, { title: "Loading unique tags" })) : tagSet ? (React.createElement("div", null,
|
|
62
64
|
React.createElement("div", null,
|
|
63
65
|
"Found unique ",
|
|
@@ -12,10 +12,12 @@ const SortByTagDialog = observer(function (props) {
|
|
|
12
12
|
React.createElement(Typography, { color: "textSecondary" }, "Examples: HP for haplotype, RG for read group, etc."),
|
|
13
13
|
React.createElement(TextField, { value: tag, onChange: event => {
|
|
14
14
|
setTag(event.target.value);
|
|
15
|
-
}, placeholder: "Enter tag name",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
}, placeholder: "Enter tag name", error: tag.length === 2 && !validTag, helperText: tag.length === 2 && !validTag ? 'Not a valid tag' : '', autoComplete: "off", "data-testid": "sort-tag-name", slotProps: {
|
|
16
|
+
htmlInput: {
|
|
17
|
+
maxLength: 2,
|
|
18
|
+
'data-testid': 'sort-tag-name-input',
|
|
19
|
+
},
|
|
20
|
+
} }),
|
|
19
21
|
React.createElement(DialogActions, null,
|
|
20
22
|
React.createElement(Button, { variant: "contained", color: "primary", type: "submit", autoFocus: true, onClick: () => {
|
|
21
23
|
model.setSortedBy('tag', tag);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Instance } from 'mobx-state-tree';
|
|
2
2
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
3
|
+
import { ModificationType, ModificationTypeWithColor, SortedBy } from '../shared/types';
|
|
3
4
|
/**
|
|
4
5
|
* #stateModel LinearPileupDisplay
|
|
5
6
|
* #category display
|
|
@@ -48,9 +49,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
48
49
|
message: React.ReactNode;
|
|
49
50
|
filled?: boolean;
|
|
50
51
|
status?: string;
|
|
51
|
-
reactElement
|
|
52
|
-
* #property
|
|
53
|
-
*/: React.ReactElement;
|
|
52
|
+
reactElement?: React.ReactElement;
|
|
54
53
|
};
|
|
55
54
|
}) => import("react").JSX.Element | undefined;
|
|
56
55
|
renderProps: any;
|
|
@@ -61,11 +60,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
61
60
|
setLoading(abortController: AbortController): void;
|
|
62
61
|
setMessage(messageText: string): void;
|
|
63
62
|
setRendered(props: {
|
|
64
|
-
reactElement: React.
|
|
65
|
-
/**
|
|
66
|
-
* #action
|
|
67
|
-
*/
|
|
68
|
-
ReactElement;
|
|
63
|
+
reactElement: React.ReactElement;
|
|
69
64
|
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
70
65
|
layout: any;
|
|
71
66
|
maxHeightReached: boolean;
|
|
@@ -109,33 +104,15 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
109
104
|
noSpacing: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
110
105
|
fadeLikelihood: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
111
106
|
trackMaxHeight: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
112
|
-
colorBy: import("mobx-state-tree").
|
|
113
|
-
|
|
114
|
-
tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
115
|
-
extra: import("mobx-state-tree").IType<any, any, any>;
|
|
116
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
117
|
-
filterBy: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
118
|
-
flagInclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
119
|
-
flagExclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
120
|
-
readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
121
|
-
tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
122
|
-
tag: import("mobx-state-tree").ISimpleType<string>;
|
|
123
|
-
value: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
124
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
125
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
107
|
+
colorBy: import("mobx-state-tree").IType<import("../shared/types").ColorBy | undefined, import("../shared/types").ColorBy | undefined, import("../shared/types").ColorBy | undefined>;
|
|
108
|
+
filterBy: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("../shared/types").FilterBy, import("../shared/types").FilterBy, import("../shared/types").FilterBy>, [undefined]>;
|
|
126
109
|
jexlFilters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
127
110
|
} & {
|
|
128
111
|
type: import("mobx-state-tree").ISimpleType<"LinearPileupDisplay">;
|
|
129
112
|
configuration: AnyConfigurationSchemaType;
|
|
130
113
|
showSoftClipping: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
131
114
|
mismatchAlpha: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<boolean>>;
|
|
132
|
-
sortedBy: import("mobx-state-tree").
|
|
133
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
134
|
-
pos: import("mobx-state-tree").ISimpleType<number>;
|
|
135
|
-
tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
136
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
137
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
138
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
115
|
+
sortedBy: import("mobx-state-tree").IType<SortedBy | undefined, SortedBy | undefined, SortedBy | undefined>;
|
|
139
116
|
}, {
|
|
140
117
|
rendererTypeName: string;
|
|
141
118
|
error: unknown;
|
|
@@ -158,10 +135,10 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
158
135
|
rendererTypeName: string;
|
|
159
136
|
error: unknown;
|
|
160
137
|
message: string | undefined;
|
|
161
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree"
|
|
138
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
139
|
+
onHorizontalScroll? /**
|
|
162
140
|
* #property
|
|
163
|
-
|
|
164
|
-
onHorizontalScroll?: () => void;
|
|
141
|
+
*/: () => void;
|
|
165
142
|
blockState?: Record<string, any>;
|
|
166
143
|
}>;
|
|
167
144
|
readonly DisplayBlurb: React.FC<{
|
|
@@ -181,9 +158,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
181
158
|
rendererTypeName: string;
|
|
182
159
|
error: unknown;
|
|
183
160
|
message: string | undefined;
|
|
184
|
-
}, import("mobx-state-tree"
|
|
185
|
-
* #action
|
|
186
|
-
*/)._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
161
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
187
162
|
}> | null;
|
|
188
163
|
readonly adapterConfig: any;
|
|
189
164
|
readonly parentTrack: any;
|
|
@@ -276,17 +251,13 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
276
251
|
setMaxHeight(n?: number): void;
|
|
277
252
|
setFeatureHeight(n?: number): void;
|
|
278
253
|
setNoSpacing(flag?: boolean): void;
|
|
279
|
-
setColorScheme(colorScheme:
|
|
280
|
-
type: string;
|
|
281
|
-
tag?: string;
|
|
282
|
-
extra?: import("../shared/color").ExtraColorBy;
|
|
283
|
-
}): void;
|
|
254
|
+
setColorScheme(colorScheme: import("../shared/types").ColorBy): void;
|
|
284
255
|
updateColorTagMap(uniqueTag: string[]): void;
|
|
285
256
|
setFeatureUnderMouse(feat?: import("@jbrowse/core/util").Feature): void;
|
|
286
257
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
287
258
|
copyFeatureToClipboard(feature: import("@jbrowse/core/util").Feature): void;
|
|
288
259
|
setConfig(conf: import("@jbrowse/core/configuration").AnyConfigurationModel): void;
|
|
289
|
-
setFilterBy(filter: import("../shared").
|
|
260
|
+
setFilterBy(filter: import("../shared/types").FilterBy): void;
|
|
290
261
|
setJexlFilters(filters: string[]): void;
|
|
291
262
|
} & {
|
|
292
263
|
readonly rendererConfig: {
|
|
@@ -346,9 +317,21 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
346
317
|
} & {
|
|
347
318
|
afterAttach(): void;
|
|
348
319
|
} & {
|
|
320
|
+
/**
|
|
321
|
+
* #volatile
|
|
322
|
+
*/
|
|
349
323
|
sortReady: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* #volatile
|
|
326
|
+
*/
|
|
350
327
|
currSortBpPerPx: number;
|
|
351
|
-
|
|
328
|
+
/**
|
|
329
|
+
* #volatile
|
|
330
|
+
*/
|
|
331
|
+
visibleModifications: import("mobx").ObservableMap<string, ModificationTypeWithColor>;
|
|
332
|
+
/**
|
|
333
|
+
* #volatile
|
|
334
|
+
*/
|
|
352
335
|
modificationsReady: boolean;
|
|
353
336
|
} & {
|
|
354
337
|
/**
|
|
@@ -358,7 +341,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
358
341
|
/**
|
|
359
342
|
* #action
|
|
360
343
|
*/
|
|
361
|
-
|
|
344
|
+
updateVisibleModifications(uniqueModifications: ModificationType[]): void;
|
|
362
345
|
/**
|
|
363
346
|
* #action
|
|
364
347
|
*/
|
|
@@ -395,6 +378,10 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
395
378
|
*/
|
|
396
379
|
reload(): void;
|
|
397
380
|
} & {
|
|
381
|
+
/**
|
|
382
|
+
* #getter
|
|
383
|
+
*/
|
|
384
|
+
readonly visibleModificationTypes: string[];
|
|
398
385
|
/**
|
|
399
386
|
* #getter
|
|
400
387
|
*/
|
|
@@ -455,8 +442,17 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
455
442
|
readonly label: "Pair orientation";
|
|
456
443
|
readonly onClick: () => void;
|
|
457
444
|
}, {
|
|
458
|
-
readonly label: "Modifications
|
|
459
|
-
readonly
|
|
445
|
+
readonly label: "Modifications";
|
|
446
|
+
readonly type: "subMenu";
|
|
447
|
+
readonly subMenu: ({
|
|
448
|
+
label: string;
|
|
449
|
+
onClick: () => void;
|
|
450
|
+
type?: undefined;
|
|
451
|
+
} | {
|
|
452
|
+
type: string;
|
|
453
|
+
label?: undefined;
|
|
454
|
+
onClick?: undefined;
|
|
455
|
+
})[];
|
|
460
456
|
}, {
|
|
461
457
|
readonly label: "Insert size";
|
|
462
458
|
readonly onClick: () => void;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { observable } from 'mobx';
|
|
3
|
+
import { types, isAlive } from 'mobx-state-tree';
|
|
3
4
|
import { ConfigurationReference, readConfObject, getConf, } from '@jbrowse/core/configuration';
|
|
4
5
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
5
6
|
import { getEnv, getSession, getContainingView } from '@jbrowse/core/util';
|
|
6
|
-
import { getUniqueModificationValues } from '../shared';
|
|
7
|
-
import { createAutorun, randomColor, modificationColors } from '../util';
|
|
8
7
|
// icons
|
|
9
8
|
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
10
|
-
import
|
|
9
|
+
import SwapVertIcon from '@mui/icons-material/SwapVert';
|
|
11
10
|
import WorkspacesIcon from '@mui/icons-material/Workspaces';
|
|
12
11
|
import ColorLensIcon from '@mui/icons-material/ColorLens';
|
|
13
12
|
// locals
|
|
14
13
|
import { SharedLinearPileupDisplayMixin } from './SharedLinearPileupDisplayMixin';
|
|
15
|
-
import {
|
|
14
|
+
import { createAutorun, getColorForModification, modificationData, } from '../util';
|
|
15
|
+
import { getUniqueModifications } from '../shared/getUniqueModifications';
|
|
16
16
|
// lazies
|
|
17
17
|
const SortByTagDialog = lazy(() => import('./components/SortByTagDialog'));
|
|
18
18
|
const GroupByDialog = lazy(() => import('./components/GroupByDialog'));
|
|
19
|
-
const ModificationsDialog = lazy(() => import('./components/ColorByModificationsDialog'));
|
|
20
19
|
/**
|
|
21
20
|
* #stateModel LinearPileupDisplay
|
|
22
21
|
* #category display
|
|
@@ -45,18 +44,24 @@ function stateModelFactory(configSchema) {
|
|
|
45
44
|
/**
|
|
46
45
|
* #property
|
|
47
46
|
*/
|
|
48
|
-
sortedBy: types.
|
|
49
|
-
type: types.string,
|
|
50
|
-
pos: types.number,
|
|
51
|
-
tag: types.maybe(types.string),
|
|
52
|
-
refName: types.string,
|
|
53
|
-
assemblyName: types.string,
|
|
54
|
-
})),
|
|
47
|
+
sortedBy: types.frozen(),
|
|
55
48
|
}))
|
|
56
49
|
.volatile(() => ({
|
|
50
|
+
/**
|
|
51
|
+
* #volatile
|
|
52
|
+
*/
|
|
57
53
|
sortReady: false,
|
|
54
|
+
/**
|
|
55
|
+
* #volatile
|
|
56
|
+
*/
|
|
58
57
|
currSortBpPerPx: 0,
|
|
59
|
-
|
|
58
|
+
/**
|
|
59
|
+
* #volatile
|
|
60
|
+
*/
|
|
61
|
+
visibleModifications: observable.map({}),
|
|
62
|
+
/**
|
|
63
|
+
* #volatile
|
|
64
|
+
*/
|
|
60
65
|
modificationsReady: false,
|
|
61
66
|
}))
|
|
62
67
|
.actions(self => ({
|
|
@@ -69,10 +74,13 @@ function stateModelFactory(configSchema) {
|
|
|
69
74
|
/**
|
|
70
75
|
* #action
|
|
71
76
|
*/
|
|
72
|
-
|
|
77
|
+
updateVisibleModifications(uniqueModifications) {
|
|
73
78
|
uniqueModifications.forEach(value => {
|
|
74
|
-
if (!self.
|
|
75
|
-
self.
|
|
79
|
+
if (!self.visibleModifications.has(value.type)) {
|
|
80
|
+
self.visibleModifications.set(value.type, {
|
|
81
|
+
...value,
|
|
82
|
+
color: getColorForModification(value.type),
|
|
83
|
+
});
|
|
76
84
|
}
|
|
77
85
|
});
|
|
78
86
|
},
|
|
@@ -152,6 +160,12 @@ function stateModelFactory(configSchema) {
|
|
|
152
160
|
};
|
|
153
161
|
})
|
|
154
162
|
.views(self => ({
|
|
163
|
+
/**
|
|
164
|
+
* #getter
|
|
165
|
+
*/
|
|
166
|
+
get visibleModificationTypes() {
|
|
167
|
+
return [...self.visibleModifications.keys()];
|
|
168
|
+
},
|
|
155
169
|
/**
|
|
156
170
|
* #getter
|
|
157
171
|
*/
|
|
@@ -196,13 +210,13 @@ function stateModelFactory(configSchema) {
|
|
|
196
210
|
* #method
|
|
197
211
|
*/
|
|
198
212
|
renderPropsPre() {
|
|
199
|
-
const { sortedBy, showSoftClipping,
|
|
213
|
+
const { sortedBy, showSoftClipping, visibleModifications } = self;
|
|
200
214
|
const superProps = superRenderPropsPre();
|
|
201
215
|
return {
|
|
202
216
|
...superProps,
|
|
203
217
|
showSoftClip: showSoftClipping,
|
|
204
218
|
sortedBy,
|
|
205
|
-
|
|
219
|
+
visibleModifications: Object.fromEntries(visibleModifications.toJSON()),
|
|
206
220
|
};
|
|
207
221
|
},
|
|
208
222
|
/**
|
|
@@ -224,7 +238,7 @@ function stateModelFactory(configSchema) {
|
|
|
224
238
|
...superTrackMenuItems(),
|
|
225
239
|
{
|
|
226
240
|
label: 'Sort by...',
|
|
227
|
-
icon:
|
|
241
|
+
icon: SwapVertIcon,
|
|
228
242
|
disabled: self.showSoftClipping,
|
|
229
243
|
subMenu: [
|
|
230
244
|
...['Start location', 'Read strand', 'Base pair'].map(option => ({
|
|
@@ -260,25 +274,88 @@ function stateModelFactory(configSchema) {
|
|
|
260
274
|
{
|
|
261
275
|
label: 'Pair orientation',
|
|
262
276
|
onClick: () => {
|
|
263
|
-
self.setColorScheme({
|
|
277
|
+
self.setColorScheme({
|
|
278
|
+
type: 'pairOrientation',
|
|
279
|
+
});
|
|
264
280
|
},
|
|
265
281
|
},
|
|
266
282
|
{
|
|
267
|
-
label: 'Modifications
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
283
|
+
label: 'Modifications',
|
|
284
|
+
type: 'subMenu',
|
|
285
|
+
subMenu: self.modificationsReady
|
|
286
|
+
? [
|
|
271
287
|
{
|
|
272
|
-
|
|
273
|
-
|
|
288
|
+
label: 'All modifications',
|
|
289
|
+
onClick: () => {
|
|
290
|
+
self.setColorScheme({
|
|
291
|
+
type: 'modifications',
|
|
292
|
+
});
|
|
293
|
+
},
|
|
274
294
|
},
|
|
275
|
-
|
|
276
|
-
|
|
295
|
+
...self.visibleModificationTypes.map(key => {
|
|
296
|
+
var _a;
|
|
297
|
+
return ({
|
|
298
|
+
label: `Show only ${((_a = modificationData[key]) === null || _a === void 0 ? void 0 : _a.name) || key}`,
|
|
299
|
+
onClick: () => {
|
|
300
|
+
self.setColorScheme({
|
|
301
|
+
type: 'modifications',
|
|
302
|
+
modifications: {
|
|
303
|
+
isolatedModification: key,
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
}),
|
|
309
|
+
{ type: 'divider' },
|
|
310
|
+
{
|
|
311
|
+
label: 'All modifications (<50% prob colored blue)',
|
|
312
|
+
onClick: () => {
|
|
313
|
+
self.setColorScheme({
|
|
314
|
+
type: 'modifications',
|
|
315
|
+
modifications: {
|
|
316
|
+
twoColor: true,
|
|
317
|
+
},
|
|
318
|
+
});
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
...self.visibleModificationTypes.map(key => {
|
|
322
|
+
var _a;
|
|
323
|
+
return ({
|
|
324
|
+
label: `Show only ${((_a = modificationData[key]) === null || _a === void 0 ? void 0 : _a.name) || key} (<50% prob colored blue)`,
|
|
325
|
+
onClick: () => {
|
|
326
|
+
self.setColorScheme({
|
|
327
|
+
type: 'modifications',
|
|
328
|
+
modifications: {
|
|
329
|
+
isolatedModification: key,
|
|
330
|
+
twoColor: true,
|
|
331
|
+
},
|
|
332
|
+
});
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
}),
|
|
336
|
+
{ type: 'divider' },
|
|
337
|
+
{
|
|
338
|
+
label: 'All reference CpGs',
|
|
339
|
+
onClick: () => {
|
|
340
|
+
self.setColorScheme({
|
|
341
|
+
type: 'methylation',
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
]
|
|
346
|
+
: [
|
|
347
|
+
{
|
|
348
|
+
label: 'Loading modifications...',
|
|
349
|
+
onClick: () => { },
|
|
350
|
+
},
|
|
351
|
+
],
|
|
277
352
|
},
|
|
278
353
|
{
|
|
279
354
|
label: 'Insert size',
|
|
280
355
|
onClick: () => {
|
|
281
|
-
self.setColorScheme({
|
|
356
|
+
self.setColorScheme({
|
|
357
|
+
type: 'insertSize',
|
|
358
|
+
});
|
|
282
359
|
},
|
|
283
360
|
},
|
|
284
361
|
...superColorSchemeSubMenuItems(),
|
|
@@ -360,25 +437,25 @@ function stateModelFactory(configSchema) {
|
|
|
360
437
|
...self.renderPropsPre(),
|
|
361
438
|
});
|
|
362
439
|
}
|
|
363
|
-
self
|
|
364
|
-
|
|
440
|
+
if (isAlive(self)) {
|
|
441
|
+
self.setCurrSortBpPerPx(bpPerPx);
|
|
442
|
+
self.setSortReady(true);
|
|
443
|
+
}
|
|
365
444
|
}, { delay: 1000 });
|
|
366
445
|
createAutorun(self, async () => {
|
|
367
446
|
if (!self.autorunReady) {
|
|
368
447
|
return;
|
|
369
448
|
}
|
|
370
|
-
const { parentTrack, colorBy } = self;
|
|
371
449
|
const { staticBlocks } = getContainingView(self);
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
self.
|
|
450
|
+
const vals = await getUniqueModifications({
|
|
451
|
+
self,
|
|
452
|
+
adapterConfig: getConf(self.parentTrack, 'adapter'),
|
|
453
|
+
blocks: staticBlocks,
|
|
454
|
+
});
|
|
455
|
+
if (isAlive(self)) {
|
|
456
|
+
self.updateVisibleModifications(vals);
|
|
457
|
+
self.setModificationsReady(true);
|
|
380
458
|
}
|
|
381
|
-
self.setModificationsReady(true);
|
|
382
459
|
});
|
|
383
460
|
},
|
|
384
461
|
}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { observer } from 'mobx-react';
|
|
3
3
|
import { getContainingView } from '@jbrowse/core/util';
|
|
4
|
-
import BaseDisplayComponent from '../../shared/BaseDisplayComponent';
|
|
4
|
+
import BaseDisplayComponent from '../../shared/components/BaseDisplayComponent';
|
|
5
5
|
const Arcs = observer(function ({ model, }) {
|
|
6
6
|
const view = getContainingView(model);
|
|
7
7
|
const width = Math.round(view.dynamicBlocks.totalWidthPx);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Instance } from 'mobx-state-tree';
|
|
3
3
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
4
|
-
import {
|
|
4
|
+
import { ColorBy, FilterBy } from '../shared/types';
|
|
5
5
|
import { ChainData } from '../shared/fetchChains';
|
|
6
6
|
/**
|
|
7
7
|
* #stateModel LinearReadArcsDisplay
|
|
@@ -24,22 +24,10 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
24
24
|
} & {
|
|
25
25
|
type: import("mobx-state-tree").ISimpleType<"LinearReadArcsDisplay">;
|
|
26
26
|
configuration: AnyConfigurationSchemaType;
|
|
27
|
-
filterBy: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").
|
|
28
|
-
flagInclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
29
|
-
flagExclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
30
|
-
readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
31
|
-
tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
32
|
-
tag: import("mobx-state-tree").ISimpleType<string>;
|
|
33
|
-
value: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
34
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
35
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
27
|
+
filterBy: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<FilterBy, FilterBy, FilterBy>, [undefined]>;
|
|
36
28
|
lineWidth: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
37
29
|
jitter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
38
|
-
colorBy: import("mobx-state-tree").
|
|
39
|
-
type: import("mobx-state-tree").ISimpleType<string>;
|
|
40
|
-
tag: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
41
|
-
extra: import("mobx-state-tree").IType<any, any, any>;
|
|
42
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
30
|
+
colorBy: import("mobx-state-tree").IType<ColorBy | undefined, ColorBy | undefined, ColorBy | undefined>;
|
|
43
31
|
drawInter: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
44
32
|
drawLongRange: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
45
33
|
}, {
|
|
@@ -66,9 +54,17 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
66
54
|
message: string | undefined;
|
|
67
55
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
68
56
|
onHorizontalScroll?: () => void;
|
|
69
|
-
blockState
|
|
57
|
+
blockState? /**
|
|
58
|
+
* #property
|
|
59
|
+
*/: Record<string, any>;
|
|
70
60
|
}>;
|
|
71
|
-
readonly DisplayBlurb: React.
|
|
61
|
+
readonly DisplayBlurb: React.
|
|
62
|
+
/**
|
|
63
|
+
* #property
|
|
64
|
+
*/
|
|
65
|
+
FC /**
|
|
66
|
+
* #property
|
|
67
|
+
*/<{
|
|
72
68
|
model: {
|
|
73
69
|
id: string;
|
|
74
70
|
type: string;
|
|
@@ -79,7 +75,9 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
79
75
|
message: string | undefined;
|
|
80
76
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
81
77
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
82
|
-
type: import("mobx-state-tree"
|
|
78
|
+
type: import("mobx-state-tree" /**
|
|
79
|
+
* #action
|
|
80
|
+
*/).ISimpleType<string>;
|
|
83
81
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
84
82
|
}, {
|
|
85
83
|
rendererTypeName: string;
|
|
@@ -91,7 +89,10 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
91
89
|
readonly parentTrack: any;
|
|
92
90
|
renderProps(): any;
|
|
93
91
|
readonly rendererType: import("@jbrowse/core/pluggableElementTypes").RendererType;
|
|
94
|
-
readonly DisplayMessageComponent: undefined | React.FC
|
|
92
|
+
readonly DisplayMessageComponent: undefined | React.FC /**
|
|
93
|
+
* #action
|
|
94
|
+
* thin, bold, extrabold, etc
|
|
95
|
+
*/<any>;
|
|
95
96
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
96
97
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
97
98
|
regionCannotBeRendered(): null;
|
|
@@ -165,7 +166,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
165
166
|
/**
|
|
166
167
|
* #action
|
|
167
168
|
*/
|
|
168
|
-
setColorScheme(
|
|
169
|
+
setColorScheme(colorBy: {
|
|
169
170
|
type: string;
|
|
170
171
|
}): void;
|
|
171
172
|
/**
|
|
@@ -183,7 +184,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
|
|
|
183
184
|
/**
|
|
184
185
|
* #action
|
|
185
186
|
*/
|
|
186
|
-
setFilterBy(filter:
|
|
187
|
+
setFilterBy(filter: FilterBy): void;
|
|
187
188
|
/**
|
|
188
189
|
* #action
|
|
189
190
|
* thin, bold, extrabold, etc
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { types } from 'mobx-state-tree';
|
|
3
3
|
import { ConfigurationReference, getConf, } from '@jbrowse/core/configuration';
|
|
4
4
|
import { getSession } from '@jbrowse/core/util';
|
|
5
5
|
import { BaseDisplay } from '@jbrowse/core/pluggableElementTypes';
|
|
@@ -7,10 +7,9 @@ import { FeatureDensityMixin, TrackHeightMixin, } from '@jbrowse/plugin-linear-g
|
|
|
7
7
|
// icons
|
|
8
8
|
import PaletteIcon from '@mui/icons-material/Palette';
|
|
9
9
|
import FilterListIcon from '@mui/icons-material/ClearAll';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const FilterByTagDialog = lazy(() => import('../shared/FilterByTagDialog'));
|
|
10
|
+
import { defaultFilterFlags } from '../shared/util';
|
|
11
|
+
// lazies
|
|
12
|
+
const FilterByTagDialog = lazy(() => import('../shared/components/FilterByTagDialog'));
|
|
14
13
|
/**
|
|
15
14
|
* #stateModel LinearReadArcsDisplay
|
|
16
15
|
* the arc display is a non-block-based track, so draws to a single canvas and
|
|
@@ -34,7 +33,7 @@ function stateModelFactory(configSchema) {
|
|
|
34
33
|
/**
|
|
35
34
|
* #property
|
|
36
35
|
*/
|
|
37
|
-
filterBy: types.optional(
|
|
36
|
+
filterBy: types.optional(types.frozen(), defaultFilterFlags),
|
|
38
37
|
/**
|
|
39
38
|
* #property
|
|
40
39
|
*/
|
|
@@ -46,11 +45,7 @@ function stateModelFactory(configSchema) {
|
|
|
46
45
|
/**
|
|
47
46
|
* #property
|
|
48
47
|
*/
|
|
49
|
-
colorBy: types.
|
|
50
|
-
type: types.string,
|
|
51
|
-
tag: types.maybe(types.string),
|
|
52
|
-
extra: types.frozen(),
|
|
53
|
-
})),
|
|
48
|
+
colorBy: types.frozen(),
|
|
54
49
|
/**
|
|
55
50
|
* #property
|
|
56
51
|
*/
|
|
@@ -103,8 +98,10 @@ function stateModelFactory(configSchema) {
|
|
|
103
98
|
/**
|
|
104
99
|
* #action
|
|
105
100
|
*/
|
|
106
|
-
setColorScheme(
|
|
107
|
-
self.colorBy =
|
|
101
|
+
setColorScheme(colorBy) {
|
|
102
|
+
self.colorBy = {
|
|
103
|
+
...colorBy,
|
|
104
|
+
};
|
|
108
105
|
},
|
|
109
106
|
/**
|
|
110
107
|
* #action
|
|
@@ -128,7 +125,9 @@ function stateModelFactory(configSchema) {
|
|
|
128
125
|
* #action
|
|
129
126
|
*/
|
|
130
127
|
setFilterBy(filter) {
|
|
131
|
-
self.filterBy =
|
|
128
|
+
self.filterBy = {
|
|
129
|
+
...filter,
|
|
130
|
+
};
|
|
132
131
|
},
|
|
133
132
|
/**
|
|
134
133
|
* #action
|
|
@@ -304,7 +303,7 @@ function stateModelFactory(configSchema) {
|
|
|
304
303
|
* #method
|
|
305
304
|
*/
|
|
306
305
|
async renderSvg(opts) {
|
|
307
|
-
const { renderSvg } = await import('../shared/
|
|
306
|
+
const { renderSvg } = await import('../shared/renderSvgUtil');
|
|
308
307
|
const { drawFeats } = await import('./drawFeats');
|
|
309
308
|
return renderSvg(self, opts, drawFeats);
|
|
310
309
|
},
|