@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
package/esm/util.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
|
2
2
|
import { Feature, AugmentedRegion } from '@jbrowse/core/util';
|
|
3
3
|
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
4
4
|
import { IAutorunOptions } from 'mobx';
|
|
5
|
-
export declare function getTag(feature: Feature, tag: string): any;
|
|
6
5
|
export declare function getTagAlt(feature: Feature, tag: string, alt: string): any;
|
|
7
6
|
export declare const orientationTypes: {
|
|
8
7
|
fr: Record<string, string>;
|
|
@@ -17,11 +16,15 @@ export declare const pairMap: {
|
|
|
17
16
|
};
|
|
18
17
|
export declare function getColorWGBS(strand: number, base: string): "#f00" | "#00f" | "#888";
|
|
19
18
|
export declare function fetchSequence(region: AugmentedRegion, adapter: BaseFeatureDataAdapter): Promise<any>;
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
interface ModificationData {
|
|
20
|
+
color: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const modificationData: Record<string, ModificationData>;
|
|
22
24
|
type DisplayModel = IAnyStateTreeNode & {
|
|
23
25
|
setError: (arg: unknown) => void;
|
|
24
26
|
};
|
|
25
27
|
export declare function createAutorun(self: DisplayModel, cb: () => Promise<void>, opts?: IAutorunOptions): void;
|
|
26
|
-
export declare function randomColor(): string;
|
|
28
|
+
export declare function randomColor(str: string): string;
|
|
29
|
+
export declare function getColorForModification(str: string): string;
|
|
27
30
|
export {};
|
package/esm/util.js
CHANGED
|
@@ -2,17 +2,12 @@ import { toArray } from 'rxjs/operators';
|
|
|
2
2
|
import { firstValueFrom } from 'rxjs';
|
|
3
3
|
import { addDisposer, isAlive } from 'mobx-state-tree';
|
|
4
4
|
import { autorun } from 'mobx';
|
|
5
|
-
// get tag from BAM or CRAM feature, where CRAM uses feature.get('tags') and
|
|
6
|
-
// BAM does not
|
|
7
|
-
export function getTag(feature, tag) {
|
|
8
|
-
const tags = feature.get('tags');
|
|
9
|
-
return tags !== undefined ? tags[tag] : feature.get(tag);
|
|
10
|
-
}
|
|
11
5
|
// use fallback alt tag, used in situations where upper case/lower case tags
|
|
12
6
|
// exist e.g. Mm/MM for base modifications
|
|
13
7
|
export function getTagAlt(feature, tag, alt) {
|
|
14
8
|
var _a;
|
|
15
|
-
|
|
9
|
+
const tags = feature.get('tags');
|
|
10
|
+
return (_a = tags[tag]) !== null && _a !== void 0 ? _a : tags[alt];
|
|
16
11
|
}
|
|
17
12
|
// orientation definitions from igv.js, see also
|
|
18
13
|
// https://software.broadinstitute.org/software/igv/interpreting_pair_orientations
|
|
@@ -73,8 +68,6 @@ export function getColorWGBS(strand, base) {
|
|
|
73
68
|
}
|
|
74
69
|
return '#888';
|
|
75
70
|
}
|
|
76
|
-
// fetches region sequence augmenting by +/- 1bp for CpG on either side of
|
|
77
|
-
// requested region
|
|
78
71
|
export async function fetchSequence(region, adapter) {
|
|
79
72
|
var _a;
|
|
80
73
|
const { start, end, originalRefName, refName } = region;
|
|
@@ -82,27 +75,27 @@ export async function fetchSequence(region, adapter) {
|
|
|
82
75
|
.getFeatures({
|
|
83
76
|
...region,
|
|
84
77
|
refName: originalRefName || refName,
|
|
85
|
-
end
|
|
86
|
-
start
|
|
78
|
+
end,
|
|
79
|
+
start,
|
|
87
80
|
})
|
|
88
81
|
.pipe(toArray()));
|
|
89
82
|
return (_a = feats[0]) === null || _a === void 0 ? void 0 : _a.get('seq');
|
|
90
83
|
}
|
|
91
|
-
// has to check underlying C-G (aka CpG) on the reference sequence
|
|
92
|
-
export function shouldFetchReferenceSequence(type) {
|
|
93
|
-
return type === 'methylation';
|
|
94
|
-
}
|
|
95
84
|
// adapted from IGV
|
|
96
|
-
// https://github.com/igvteam/igv/blob/
|
|
97
|
-
export const
|
|
98
|
-
m: 'rgb(255,0,0)',
|
|
99
|
-
h: 'rgb(
|
|
100
|
-
o: 'rgb(111, 78, 129)',
|
|
101
|
-
f: 'rgb(246, 200, 95)',
|
|
102
|
-
c: 'rgb(157, 216, 102)',
|
|
103
|
-
g: 'rgb(255, 160, 86)',
|
|
104
|
-
e: 'rgb(141, 221, 208)',
|
|
105
|
-
b: 'rgb(
|
|
85
|
+
// https://github.com/igvteam/igv/blob/af07c3b1be8806cfd77343ee04982aeff17d2beb/src/main/resources/org/broad/igv/prefs/preferences.tab#L230-L242
|
|
86
|
+
export const modificationData = {
|
|
87
|
+
m: { color: 'rgb(255,0,0)', name: '5mC' },
|
|
88
|
+
h: { color: 'rgb(255,0,255)', name: '5hmC' },
|
|
89
|
+
o: { color: 'rgb(111, 78, 129)', name: '8oxoG' },
|
|
90
|
+
f: { color: 'rgb(246, 200, 95)', name: '5fC' },
|
|
91
|
+
c: { color: 'rgb(157, 216, 102)', name: '5cac' },
|
|
92
|
+
g: { color: 'rgb(255, 160, 86)', name: '5hmu' },
|
|
93
|
+
e: { color: 'rgb(141, 221, 208)', name: '5fU' },
|
|
94
|
+
b: { color: 'rgb(0,100,47)', name: '5caU' },
|
|
95
|
+
a: { color: 'rgb(51,0,111)', name: '6mA' },
|
|
96
|
+
17082: { color: 'rgb(51,153,255)', name: 'pseU' },
|
|
97
|
+
17596: { color: 'rgb(102,153,0)', name: 'inosine' },
|
|
98
|
+
21839: { color: 'rgb(153,0,153)', name: '4mC' },
|
|
106
99
|
};
|
|
107
100
|
export function createAutorun(self, cb, opts) {
|
|
108
101
|
addDisposer(self, autorun(async () => {
|
|
@@ -116,6 +109,14 @@ export function createAutorun(self, cb, opts) {
|
|
|
116
109
|
}
|
|
117
110
|
}, opts));
|
|
118
111
|
}
|
|
119
|
-
export function randomColor() {
|
|
120
|
-
|
|
112
|
+
export function randomColor(str) {
|
|
113
|
+
let sum = 0;
|
|
114
|
+
for (let i = 0; i < str.length; i++) {
|
|
115
|
+
sum += str.charCodeAt(i);
|
|
116
|
+
}
|
|
117
|
+
return `hsl(${sum * 10}, 20%, 50%)`;
|
|
118
|
+
}
|
|
119
|
+
export function getColorForModification(str) {
|
|
120
|
+
var _a;
|
|
121
|
+
return ((_a = modificationData[str]) === null || _a === void 0 ? void 0 : _a.color) || randomColor(str);
|
|
121
122
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-alignments",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "JBrowse 2 alignments adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@gmod/bam": "^
|
|
39
|
+
"@gmod/bam": "^4.0.1",
|
|
40
40
|
"@gmod/cram": "^3.0.3",
|
|
41
|
-
"@jbrowse/sv-core": "^2.
|
|
41
|
+
"@jbrowse/sv-core": "^2.17.0",
|
|
42
42
|
"@mui/icons-material": "^6.0.0",
|
|
43
43
|
"canvas2svg": "^1.0.16",
|
|
44
44
|
"clone": "^2.1.2",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"distModule": "esm/index.js",
|
|
65
65
|
"srcModule": "src/index.ts",
|
|
66
66
|
"module": "esm/index.js",
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "eed30b5e671f8f7823652d7cecc51aa89226de46"
|
|
68
68
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ObservableMap } from 'mobx';
|
|
3
|
-
declare const ColorByModificationsDialog: ({ model, handleClose, }: {
|
|
4
|
-
model: {
|
|
5
|
-
setColorScheme: (arg: {
|
|
6
|
-
type: string;
|
|
7
|
-
}) => void;
|
|
8
|
-
modificationTagMap: ObservableMap<string, string>;
|
|
9
|
-
colorBy?: {
|
|
10
|
-
type: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
handleClose: () => void;
|
|
14
|
-
}) => React.JSX.Element;
|
|
15
|
-
export default ColorByModificationsDialog;
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const mobx_react_1 = require("mobx-react");
|
|
8
|
-
const material_1 = require("@mui/material");
|
|
9
|
-
const ui_1 = require("@jbrowse/core/ui");
|
|
10
|
-
const ModificationsTable_1 = __importDefault(require("./ModificationsTable"));
|
|
11
|
-
const ColorByModificationsDialog = (0, mobx_react_1.observer)(function ({ model, handleClose, }) {
|
|
12
|
-
const { colorBy, modificationTagMap } = model;
|
|
13
|
-
const modifications = [...modificationTagMap.entries()];
|
|
14
|
-
return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: handleClose, title: "Color by modifications" },
|
|
15
|
-
react_1.default.createElement(material_1.DialogContent, null,
|
|
16
|
-
react_1.default.createElement(material_1.Typography, null, "You can choose to color the modifications in the BAM/CRAM MM/ML specification using this dialog. Choosing modifications colors the modified positions and can color multiple modification types. Choosing the methylation setting colors methylated and unmethylated CpG."),
|
|
17
|
-
react_1.default.createElement(material_1.Typography, null, "Note: you can revisit this dialog to see the current mapping of colors to modification type for the modification coloring mode"),
|
|
18
|
-
react_1.default.createElement("div", { style: { margin: 20 } },
|
|
19
|
-
(colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications' ? (react_1.default.createElement("div", null, modifications.length ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
20
|
-
"Current modification-type-to-color mapping",
|
|
21
|
-
react_1.default.createElement(ModificationsTable_1.default, { modifications: [...modificationTagMap.entries()] }))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
22
|
-
react_1.default.createElement(material_1.Typography, null, "Note: color by modifications is already enabled. Loading current modifications..."),
|
|
23
|
-
react_1.default.createElement(material_1.CircularProgress, { size: 15 }))))) : null,
|
|
24
|
-
(colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'methylation' ? (react_1.default.createElement(ModificationsTable_1.default, { modifications: [
|
|
25
|
-
['methylated', 'red'],
|
|
26
|
-
['unmethylated', 'blue'],
|
|
27
|
-
] })) : null),
|
|
28
|
-
react_1.default.createElement(material_1.DialogActions, null,
|
|
29
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => {
|
|
30
|
-
model.setColorScheme({ type: 'modifications' });
|
|
31
|
-
handleClose();
|
|
32
|
-
} }, "Modifications"),
|
|
33
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => {
|
|
34
|
-
model.setColorScheme({ type: 'methylation' });
|
|
35
|
-
handleClose();
|
|
36
|
-
} }, "Methylation"),
|
|
37
|
-
react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
38
|
-
handleClose();
|
|
39
|
-
} }, "Cancel")))));
|
|
40
|
-
});
|
|
41
|
-
exports.default = ColorByModificationsDialog;
|
|
@@ -1,28 +0,0 @@
|
|
|
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.default = ModificationTable;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const mui_1 = require("tss-react/mui");
|
|
9
|
-
const useStyles = (0, mui_1.makeStyles)()(theme => ({
|
|
10
|
-
table: {
|
|
11
|
-
border: '1px solid #888',
|
|
12
|
-
margin: theme.spacing(4),
|
|
13
|
-
'& td': {
|
|
14
|
-
padding: theme.spacing(1),
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
}));
|
|
18
|
-
function ModificationTable({ modifications, }) {
|
|
19
|
-
const { classes } = useStyles();
|
|
20
|
-
return (react_1.default.createElement("table", { className: classes.table },
|
|
21
|
-
react_1.default.createElement("tbody", null, modifications.map(([key, value]) => (react_1.default.createElement("tr", { key: key },
|
|
22
|
-
react_1.default.createElement("td", null, key),
|
|
23
|
-
react_1.default.createElement("td", null, value),
|
|
24
|
-
react_1.default.createElement("td", { style: {
|
|
25
|
-
width: '1em',
|
|
26
|
-
background: value,
|
|
27
|
-
} })))))));
|
|
28
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type SkipMap = Record<string, {
|
|
2
|
-
score: number;
|
|
3
|
-
feature: unknown;
|
|
4
|
-
start: number;
|
|
5
|
-
end: number;
|
|
6
|
-
strand: number;
|
|
7
|
-
xs: string;
|
|
8
|
-
}>;
|
|
9
|
-
export interface BinType {
|
|
10
|
-
total?: number;
|
|
11
|
-
strands?: Record<string, number>;
|
|
12
|
-
}
|
|
13
|
-
export interface Bin {
|
|
14
|
-
refbase?: string;
|
|
15
|
-
total: number;
|
|
16
|
-
all: number;
|
|
17
|
-
ref: number;
|
|
18
|
-
'-1': number;
|
|
19
|
-
'0': number;
|
|
20
|
-
'1': number;
|
|
21
|
-
lowqual: BinType;
|
|
22
|
-
cov: BinType;
|
|
23
|
-
delskips: BinType;
|
|
24
|
-
noncov: BinType;
|
|
25
|
-
}
|
package/dist/shared/index.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
2
|
-
import { BlockSet } from '@jbrowse/core/util/blockTypes';
|
|
3
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
-
export declare function getUniqueTagValues({ self, tag, blocks, opts, }: {
|
|
5
|
-
self: IAnyStateTreeNode & {
|
|
6
|
-
adapterConfig: AnyConfigurationModel;
|
|
7
|
-
};
|
|
8
|
-
tag: string;
|
|
9
|
-
blocks: BlockSet;
|
|
10
|
-
opts?: {
|
|
11
|
-
headers?: Record<string, string>;
|
|
12
|
-
signal?: AbortSignal;
|
|
13
|
-
filters: string[];
|
|
14
|
-
};
|
|
15
|
-
}): Promise<string[]>;
|
|
16
|
-
type Track = IAnyStateTreeNode & {
|
|
17
|
-
configuration: AnyConfigurationModel;
|
|
18
|
-
};
|
|
19
|
-
export declare function getUniqueModificationValues({ self, adapterConfig, blocks, opts, }: {
|
|
20
|
-
self: IAnyStateTreeNode & {
|
|
21
|
-
parentTrack: Track;
|
|
22
|
-
};
|
|
23
|
-
adapterConfig: AnyConfigurationModel;
|
|
24
|
-
blocks: BlockSet;
|
|
25
|
-
opts?: {
|
|
26
|
-
headers?: Record<string, string>;
|
|
27
|
-
signal?: AbortSignal;
|
|
28
|
-
filters: string[];
|
|
29
|
-
};
|
|
30
|
-
}): Promise<string[]>;
|
|
31
|
-
export declare const FilterModel: import("mobx-state-tree").IModelType<{
|
|
32
|
-
flagInclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
33
|
-
flagExclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
34
|
-
readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
35
|
-
tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
36
|
-
tag: import("mobx-state-tree").ISimpleType<string>;
|
|
37
|
-
value: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
38
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
39
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
40
|
-
export interface IFilter {
|
|
41
|
-
flagExclude: number;
|
|
42
|
-
flagInclude: number;
|
|
43
|
-
readName?: string;
|
|
44
|
-
tagFilter?: {
|
|
45
|
-
tag: string;
|
|
46
|
-
value?: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export {};
|
package/dist/shared/index.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilterModel = void 0;
|
|
4
|
-
exports.getUniqueTagValues = getUniqueTagValues;
|
|
5
|
-
exports.getUniqueModificationValues = getUniqueModificationValues;
|
|
6
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
7
|
-
const util_1 = require("@jbrowse/core/util");
|
|
8
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
9
|
-
async function getUniqueTagValues({ self, tag, blocks, opts, }) {
|
|
10
|
-
const { rpcManager } = (0, util_1.getSession)(self);
|
|
11
|
-
const { adapterConfig } = self;
|
|
12
|
-
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
13
|
-
const values = await rpcManager.call((0, tracks_1.getRpcSessionId)(self), 'PileupGetGlobalValueForTag', {
|
|
14
|
-
adapterConfig,
|
|
15
|
-
tag,
|
|
16
|
-
sessionId,
|
|
17
|
-
regions: blocks.contentBlocks,
|
|
18
|
-
...opts,
|
|
19
|
-
});
|
|
20
|
-
return values;
|
|
21
|
-
}
|
|
22
|
-
async function getUniqueModificationValues({ self, adapterConfig, blocks, opts, }) {
|
|
23
|
-
const { rpcManager } = (0, util_1.getSession)(self);
|
|
24
|
-
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
25
|
-
const values = await rpcManager.call(sessionId, 'PileupGetVisibleModifications', {
|
|
26
|
-
adapterConfig,
|
|
27
|
-
sessionId,
|
|
28
|
-
regions: blocks.contentBlocks,
|
|
29
|
-
...opts,
|
|
30
|
-
});
|
|
31
|
-
return values;
|
|
32
|
-
}
|
|
33
|
-
exports.FilterModel = mobx_state_tree_1.types.model({
|
|
34
|
-
flagInclude: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 0),
|
|
35
|
-
flagExclude: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.number, 1540),
|
|
36
|
-
readName: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
37
|
-
tagFilter: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.model({
|
|
38
|
-
tag: mobx_state_tree_1.types.string,
|
|
39
|
-
value: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.string),
|
|
40
|
-
})),
|
|
41
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ObservableMap } from 'mobx';
|
|
3
|
-
declare const ColorByModificationsDialog: ({ model, handleClose, }: {
|
|
4
|
-
model: {
|
|
5
|
-
setColorScheme: (arg: {
|
|
6
|
-
type: string;
|
|
7
|
-
}) => void;
|
|
8
|
-
modificationTagMap: ObservableMap<string, string>;
|
|
9
|
-
colorBy?: {
|
|
10
|
-
type: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
handleClose: () => void;
|
|
14
|
-
}) => React.JSX.Element;
|
|
15
|
-
export default ColorByModificationsDialog;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { Button, CircularProgress, DialogActions, DialogContent, Typography, } from '@mui/material';
|
|
4
|
-
import { Dialog } from '@jbrowse/core/ui';
|
|
5
|
-
import ModificationTable from './ModificationsTable';
|
|
6
|
-
const ColorByModificationsDialog = observer(function ({ model, handleClose, }) {
|
|
7
|
-
const { colorBy, modificationTagMap } = model;
|
|
8
|
-
const modifications = [...modificationTagMap.entries()];
|
|
9
|
-
return (React.createElement(Dialog, { open: true, onClose: handleClose, title: "Color by modifications" },
|
|
10
|
-
React.createElement(DialogContent, null,
|
|
11
|
-
React.createElement(Typography, null, "You can choose to color the modifications in the BAM/CRAM MM/ML specification using this dialog. Choosing modifications colors the modified positions and can color multiple modification types. Choosing the methylation setting colors methylated and unmethylated CpG."),
|
|
12
|
-
React.createElement(Typography, null, "Note: you can revisit this dialog to see the current mapping of colors to modification type for the modification coloring mode"),
|
|
13
|
-
React.createElement("div", { style: { margin: 20 } },
|
|
14
|
-
(colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications' ? (React.createElement("div", null, modifications.length ? (React.createElement(React.Fragment, null,
|
|
15
|
-
"Current modification-type-to-color mapping",
|
|
16
|
-
React.createElement(ModificationTable, { modifications: [...modificationTagMap.entries()] }))) : (React.createElement(React.Fragment, null,
|
|
17
|
-
React.createElement(Typography, null, "Note: color by modifications is already enabled. Loading current modifications..."),
|
|
18
|
-
React.createElement(CircularProgress, { size: 15 }))))) : null,
|
|
19
|
-
(colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'methylation' ? (React.createElement(ModificationTable, { modifications: [
|
|
20
|
-
['methylated', 'red'],
|
|
21
|
-
['unmethylated', 'blue'],
|
|
22
|
-
] })) : null),
|
|
23
|
-
React.createElement(DialogActions, null,
|
|
24
|
-
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
25
|
-
model.setColorScheme({ type: 'modifications' });
|
|
26
|
-
handleClose();
|
|
27
|
-
} }, "Modifications"),
|
|
28
|
-
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
29
|
-
model.setColorScheme({ type: 'methylation' });
|
|
30
|
-
handleClose();
|
|
31
|
-
} }, "Methylation"),
|
|
32
|
-
React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
33
|
-
handleClose();
|
|
34
|
-
} }, "Cancel")))));
|
|
35
|
-
});
|
|
36
|
-
export default ColorByModificationsDialog;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { makeStyles } from 'tss-react/mui';
|
|
3
|
-
const useStyles = makeStyles()(theme => ({
|
|
4
|
-
table: {
|
|
5
|
-
border: '1px solid #888',
|
|
6
|
-
margin: theme.spacing(4),
|
|
7
|
-
'& td': {
|
|
8
|
-
padding: theme.spacing(1),
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
}));
|
|
12
|
-
export default function ModificationTable({ modifications, }) {
|
|
13
|
-
const { classes } = useStyles();
|
|
14
|
-
return (React.createElement("table", { className: classes.table },
|
|
15
|
-
React.createElement("tbody", null, modifications.map(([key, value]) => (React.createElement("tr", { key: key },
|
|
16
|
-
React.createElement("td", null, key),
|
|
17
|
-
React.createElement("td", null, value),
|
|
18
|
-
React.createElement("td", { style: {
|
|
19
|
-
width: '1em',
|
|
20
|
-
background: value,
|
|
21
|
-
} })))))));
|
|
22
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type SkipMap = Record<string, {
|
|
2
|
-
score: number;
|
|
3
|
-
feature: unknown;
|
|
4
|
-
start: number;
|
|
5
|
-
end: number;
|
|
6
|
-
strand: number;
|
|
7
|
-
xs: string;
|
|
8
|
-
}>;
|
|
9
|
-
export interface BinType {
|
|
10
|
-
total?: number;
|
|
11
|
-
strands?: Record<string, number>;
|
|
12
|
-
}
|
|
13
|
-
export interface Bin {
|
|
14
|
-
refbase?: string;
|
|
15
|
-
total: number;
|
|
16
|
-
all: number;
|
|
17
|
-
ref: number;
|
|
18
|
-
'-1': number;
|
|
19
|
-
'0': number;
|
|
20
|
-
'1': number;
|
|
21
|
-
lowqual: BinType;
|
|
22
|
-
cov: BinType;
|
|
23
|
-
delskips: BinType;
|
|
24
|
-
noncov: BinType;
|
|
25
|
-
}
|
package/esm/shared/index.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
2
|
-
import { BlockSet } from '@jbrowse/core/util/blockTypes';
|
|
3
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
-
export declare function getUniqueTagValues({ self, tag, blocks, opts, }: {
|
|
5
|
-
self: IAnyStateTreeNode & {
|
|
6
|
-
adapterConfig: AnyConfigurationModel;
|
|
7
|
-
};
|
|
8
|
-
tag: string;
|
|
9
|
-
blocks: BlockSet;
|
|
10
|
-
opts?: {
|
|
11
|
-
headers?: Record<string, string>;
|
|
12
|
-
signal?: AbortSignal;
|
|
13
|
-
filters: string[];
|
|
14
|
-
};
|
|
15
|
-
}): Promise<string[]>;
|
|
16
|
-
type Track = IAnyStateTreeNode & {
|
|
17
|
-
configuration: AnyConfigurationModel;
|
|
18
|
-
};
|
|
19
|
-
export declare function getUniqueModificationValues({ self, adapterConfig, blocks, opts, }: {
|
|
20
|
-
self: IAnyStateTreeNode & {
|
|
21
|
-
parentTrack: Track;
|
|
22
|
-
};
|
|
23
|
-
adapterConfig: AnyConfigurationModel;
|
|
24
|
-
blocks: BlockSet;
|
|
25
|
-
opts?: {
|
|
26
|
-
headers?: Record<string, string>;
|
|
27
|
-
signal?: AbortSignal;
|
|
28
|
-
filters: string[];
|
|
29
|
-
};
|
|
30
|
-
}): Promise<string[]>;
|
|
31
|
-
export declare const FilterModel: import("mobx-state-tree").IModelType<{
|
|
32
|
-
flagInclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
33
|
-
flagExclude: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
34
|
-
readName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
35
|
-
tagFilter: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
36
|
-
tag: import("mobx-state-tree").ISimpleType<string>;
|
|
37
|
-
value: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
38
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
39
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
40
|
-
export interface IFilter {
|
|
41
|
-
flagExclude: number;
|
|
42
|
-
flagInclude: number;
|
|
43
|
-
readName?: string;
|
|
44
|
-
tagFilter?: {
|
|
45
|
-
tag: string;
|
|
46
|
-
value?: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export {};
|
package/esm/shared/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { types } from 'mobx-state-tree';
|
|
2
|
-
import { getSession } from '@jbrowse/core/util';
|
|
3
|
-
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
4
|
-
export async function getUniqueTagValues({ self, tag, blocks, opts, }) {
|
|
5
|
-
const { rpcManager } = getSession(self);
|
|
6
|
-
const { adapterConfig } = self;
|
|
7
|
-
const sessionId = getRpcSessionId(self);
|
|
8
|
-
const values = await rpcManager.call(getRpcSessionId(self), 'PileupGetGlobalValueForTag', {
|
|
9
|
-
adapterConfig,
|
|
10
|
-
tag,
|
|
11
|
-
sessionId,
|
|
12
|
-
regions: blocks.contentBlocks,
|
|
13
|
-
...opts,
|
|
14
|
-
});
|
|
15
|
-
return values;
|
|
16
|
-
}
|
|
17
|
-
export async function getUniqueModificationValues({ self, adapterConfig, blocks, opts, }) {
|
|
18
|
-
const { rpcManager } = getSession(self);
|
|
19
|
-
const sessionId = getRpcSessionId(self);
|
|
20
|
-
const values = await rpcManager.call(sessionId, 'PileupGetVisibleModifications', {
|
|
21
|
-
adapterConfig,
|
|
22
|
-
sessionId,
|
|
23
|
-
regions: blocks.contentBlocks,
|
|
24
|
-
...opts,
|
|
25
|
-
});
|
|
26
|
-
return values;
|
|
27
|
-
}
|
|
28
|
-
export const FilterModel = types.model({
|
|
29
|
-
flagInclude: types.optional(types.number, 0),
|
|
30
|
-
flagExclude: types.optional(types.number, 1540),
|
|
31
|
-
readName: types.maybe(types.string),
|
|
32
|
-
tagFilter: types.maybe(types.model({
|
|
33
|
-
tag: types.string,
|
|
34
|
-
value: types.maybe(types.string),
|
|
35
|
-
})),
|
|
36
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|