@jbrowse/plugin-alignments 1.6.9 → 1.7.3
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.d.ts +6 -6
- package/dist/AlignmentsFeatureDetail/AlignmentsFeatureDetail.js +216 -0
- package/dist/AlignmentsFeatureDetail/index.d.ts +13 -13
- package/dist/AlignmentsFeatureDetail/index.js +63 -0
- package/dist/AlignmentsFeatureDetail/index.test.js +60 -0
- package/dist/AlignmentsTrack/index.d.ts +2 -2
- package/dist/AlignmentsTrack/index.js +37 -0
- package/dist/BamAdapter/BamAdapter.d.ts +40 -30
- package/dist/BamAdapter/BamAdapter.js +598 -0
- package/dist/BamAdapter/BamAdapter.test.js +177 -0
- package/dist/BamAdapter/BamSlightlyLazyFeature.d.ts +33 -33
- package/dist/BamAdapter/BamSlightlyLazyFeature.js +176 -0
- package/dist/BamAdapter/MismatchParser.d.ts +28 -28
- package/dist/BamAdapter/MismatchParser.js +384 -0
- package/dist/BamAdapter/MismatchParser.test.js +259 -0
- package/dist/BamAdapter/configSchema.d.ts +2 -2
- package/dist/BamAdapter/configSchema.js +48 -0
- package/dist/BamAdapter/index.d.ts +3 -3
- package/dist/BamAdapter/index.js +36 -0
- package/dist/CramAdapter/CramAdapter.d.ts +52 -43
- package/dist/CramAdapter/CramAdapter.js +660 -0
- package/dist/CramAdapter/CramAdapter.test.js +138 -0
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +49 -49
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +447 -0
- package/dist/CramAdapter/CramTestAdapters.d.ts +29 -29
- package/dist/CramAdapter/CramTestAdapters.js +234 -0
- package/dist/CramAdapter/configSchema.d.ts +3 -3
- package/dist/CramAdapter/configSchema.js +40 -0
- package/dist/CramAdapter/index.d.ts +3 -3
- package/dist/CramAdapter/index.js +36 -0
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +9 -9
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.js +97 -0
- package/dist/HtsgetBamAdapter/configSchema.d.ts +2 -2
- package/dist/HtsgetBamAdapter/configSchema.js +31 -0
- package/dist/HtsgetBamAdapter/index.d.ts +3 -3
- package/dist/HtsgetBamAdapter/index.js +42 -0
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.d.ts +7 -7
- package/dist/LinearAlignmentsDisplay/components/AlignmentsDisplay.js +69 -0
- package/dist/LinearAlignmentsDisplay/index.d.ts +2 -2
- package/dist/LinearAlignmentsDisplay/index.js +31 -0
- package/dist/LinearAlignmentsDisplay/models/configSchema.d.ts +4 -4
- package/dist/LinearAlignmentsDisplay/models/configSchema.js +25 -0
- package/dist/LinearAlignmentsDisplay/models/configSchema.test.js +83 -0
- package/dist/LinearAlignmentsDisplay/models/model.d.ts +105 -105
- package/dist/LinearAlignmentsDisplay/models/model.js +250 -0
- package/dist/LinearPileupDisplay/components/ColorByModifications.d.ts +14 -14
- package/dist/LinearPileupDisplay/components/ColorByModifications.js +123 -0
- package/dist/LinearPileupDisplay/components/ColorByTag.d.ts +9 -9
- package/dist/LinearPileupDisplay/components/ColorByTag.js +98 -0
- package/dist/LinearPileupDisplay/components/FilterByTag.d.ts +18 -18
- package/dist/LinearPileupDisplay/components/FilterByTag.js +203 -0
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.d.ts +13 -13
- package/dist/LinearPileupDisplay/components/LinearPileupDisplayBlurb.js +32 -0
- package/dist/LinearPileupDisplay/components/SetFeatureHeight.d.ts +16 -16
- package/dist/LinearPileupDisplay/components/SetFeatureHeight.js +99 -0
- package/dist/LinearPileupDisplay/components/SetMaxHeight.d.ts +10 -10
- package/dist/LinearPileupDisplay/components/SetMaxHeight.js +90 -0
- package/dist/LinearPileupDisplay/components/SortByTag.d.ts +9 -9
- package/dist/LinearPileupDisplay/components/SortByTag.js +95 -0
- package/dist/LinearPileupDisplay/configSchema.d.ts +6 -6
- package/dist/LinearPileupDisplay/configSchema.js +47 -0
- package/dist/LinearPileupDisplay/configSchema.test.js +92 -0
- package/dist/LinearPileupDisplay/index.d.ts +2 -2
- package/dist/LinearPileupDisplay/index.js +30 -0
- package/dist/LinearPileupDisplay/model.d.ts +319 -321
- package/dist/LinearPileupDisplay/model.js +602 -0
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.d.ts +10 -10
- package/dist/LinearSNPCoverageDisplay/components/Tooltip.js +63 -0
- package/dist/LinearSNPCoverageDisplay/index.d.ts +2 -2
- package/dist/LinearSNPCoverageDisplay/index.js +30 -0
- package/dist/LinearSNPCoverageDisplay/models/configSchema.d.ts +2 -2
- package/dist/LinearSNPCoverageDisplay/models/configSchema.js +57 -0
- package/dist/LinearSNPCoverageDisplay/models/configSchema.test.js +62 -0
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +346 -96
- package/dist/LinearSNPCoverageDisplay/models/model.js +237 -0
- package/dist/NestedFrequencyTable.d.ts +14 -14
- package/dist/NestedFrequencyTable.js +152 -0
- package/dist/PileupRPC/rpcMethods.d.ts +34 -34
- package/dist/PileupRPC/rpcMethods.js +285 -0
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +29 -29
- package/dist/PileupRenderer/PileupLayoutSession.js +79 -0
- package/dist/PileupRenderer/PileupRenderer.d.ts +125 -125
- package/dist/PileupRenderer/PileupRenderer.js +1220 -0
- package/dist/PileupRenderer/components/PileupRendering.d.ts +23 -23
- package/dist/PileupRenderer/components/PileupRendering.js +270 -0
- package/dist/PileupRenderer/components/PileupRendering.test.js +36 -0
- package/dist/PileupRenderer/configSchema.d.ts +2 -2
- package/dist/PileupRenderer/configSchema.js +72 -0
- package/dist/PileupRenderer/index.d.ts +2 -2
- package/dist/PileupRenderer/index.js +25 -0
- package/dist/PileupRenderer/sortUtil.d.ts +8 -8
- package/dist/PileupRenderer/sortUtil.js +112 -0
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.d.ts +67 -71
- package/dist/SNPCoverageAdapter/SNPCoverageAdapter.js +606 -0
- package/dist/SNPCoverageAdapter/configSchema.d.ts +3 -3
- package/dist/SNPCoverageAdapter/configSchema.js +22 -0
- package/dist/SNPCoverageAdapter/index.d.ts +3 -3
- package/dist/SNPCoverageAdapter/index.js +45 -0
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.d.ts +20 -20
- package/dist/SNPCoverageRenderer/SNPCoverageRenderer.js +296 -0
- package/dist/SNPCoverageRenderer/configSchema.d.ts +2 -2
- package/dist/SNPCoverageRenderer/configSchema.js +40 -0
- package/dist/SNPCoverageRenderer/index.d.ts +3 -3
- package/dist/SNPCoverageRenderer/index.js +34 -0
- package/dist/declare.d.js +1 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.js +154 -6
- package/dist/index.test.js +26 -0
- package/dist/shared.d.ts +25 -25
- package/dist/shared.js +96 -0
- package/dist/util.d.ts +19 -19
- package/dist/util.js +135 -0
- package/package.json +5 -8
- package/src/BamAdapter/BamAdapter.ts +35 -8
- package/src/CramAdapter/CramAdapter.ts +42 -15
- package/src/LinearPileupDisplay/components/SetMaxHeight.tsx +1 -1
- package/src/LinearPileupDisplay/model.ts +2 -22
- package/src/LinearSNPCoverageDisplay/models/model.ts +6 -36
- package/src/PileupRenderer/PileupRenderer.tsx +3 -6
- package/src/SNPCoverageAdapter/SNPCoverageAdapter.ts +11 -17
- package/dist/AlignmentsFeatureDetail/index.test.d.ts +0 -1
- package/dist/LinearAlignmentsDisplay/models/configSchema.test.d.ts +0 -1
- package/dist/LinearPileupDisplay/configSchema.test.d.ts +0 -1
- package/dist/LinearSNPCoverageDisplay/models/configSchema.test.d.ts +0 -1
- package/dist/PileupRenderer/components/PileupRendering.test.d.ts +0 -1
- package/dist/plugin-alignments.cjs.development.js +0 -8438
- package/dist/plugin-alignments.cjs.development.js.map +0 -1
- package/dist/plugin-alignments.cjs.production.min.js +0 -2
- package/dist/plugin-alignments.cjs.production.min.js.map +0 -1
- package/dist/plugin-alignments.esm.js +0 -8430
- package/dist/plugin-alignments.esm.js.map +0 -1
package/dist/shared.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { BlockSet } from '@jbrowse/core/util/blockTypes';
|
|
2
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
3
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
|
|
4
|
-
export declare function getUniqueTagValues(self: IAnyStateTreeNode & {
|
|
5
|
-
adapterConfig: AnyConfigurationModel;
|
|
6
|
-
}, colorScheme: {
|
|
7
|
-
type: string;
|
|
8
|
-
tag?: string;
|
|
9
|
-
}, blocks: BlockSet, opts?: {
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
signal?: AbortSignal;
|
|
12
|
-
filters?: string[];
|
|
13
|
-
}): Promise<string[]>;
|
|
14
|
-
export declare function getUniqueModificationValues(self: IAnyStateTreeNode & {
|
|
15
|
-
parentTrack: IAnyStateTreeNode & {
|
|
16
|
-
configuration: AnyConfigurationModel;
|
|
17
|
-
};
|
|
18
|
-
}, adapterConfig: AnyConfigurationModel, colorScheme: {
|
|
19
|
-
type: string;
|
|
20
|
-
tag?: string;
|
|
21
|
-
}, blocks: BlockSet, opts?: {
|
|
22
|
-
headers?: Record<string, string>;
|
|
23
|
-
signal?: AbortSignal;
|
|
24
|
-
filters?: string[];
|
|
25
|
-
}): Promise<string[]>;
|
|
1
|
+
import { BlockSet } from '@jbrowse/core/util/blockTypes';
|
|
2
|
+
import { IAnyStateTreeNode } from 'mobx-state-tree';
|
|
3
|
+
import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
|
|
4
|
+
export declare function getUniqueTagValues(self: IAnyStateTreeNode & {
|
|
5
|
+
adapterConfig: AnyConfigurationModel;
|
|
6
|
+
}, colorScheme: {
|
|
7
|
+
type: string;
|
|
8
|
+
tag?: string;
|
|
9
|
+
}, blocks: BlockSet, opts?: {
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
filters?: string[];
|
|
13
|
+
}): Promise<string[]>;
|
|
14
|
+
export declare function getUniqueModificationValues(self: IAnyStateTreeNode & {
|
|
15
|
+
parentTrack: IAnyStateTreeNode & {
|
|
16
|
+
configuration: AnyConfigurationModel;
|
|
17
|
+
};
|
|
18
|
+
}, adapterConfig: AnyConfigurationModel, colorScheme: {
|
|
19
|
+
type: string;
|
|
20
|
+
tag?: string;
|
|
21
|
+
}, blocks: BlockSet, opts?: {
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
filters?: string[];
|
|
25
|
+
}): Promise<string[]>;
|
package/dist/shared.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getUniqueModificationValues = getUniqueModificationValues;
|
|
9
|
+
exports.getUniqueTagValues = getUniqueTagValues;
|
|
10
|
+
|
|
11
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
12
|
+
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
|
|
15
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
16
|
+
|
|
17
|
+
var _util = require("@jbrowse/core/util");
|
|
18
|
+
|
|
19
|
+
var _tracks = require("@jbrowse/core/util/tracks");
|
|
20
|
+
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
|
+
|
|
25
|
+
function getUniqueTagValues(_x, _x2, _x3, _x4) {
|
|
26
|
+
return _getUniqueTagValues.apply(this, arguments);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function _getUniqueTagValues() {
|
|
30
|
+
_getUniqueTagValues = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(self, colorScheme, blocks, opts) {
|
|
31
|
+
var _getSession, rpcManager, adapterConfig, sessionId, values;
|
|
32
|
+
|
|
33
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
34
|
+
while (1) {
|
|
35
|
+
switch (_context.prev = _context.next) {
|
|
36
|
+
case 0:
|
|
37
|
+
_getSession = (0, _util.getSession)(self), rpcManager = _getSession.rpcManager;
|
|
38
|
+
adapterConfig = self.adapterConfig;
|
|
39
|
+
sessionId = (0, _tracks.getRpcSessionId)(self);
|
|
40
|
+
_context.next = 5;
|
|
41
|
+
return rpcManager.call((0, _tracks.getRpcSessionId)(self), 'PileupGetGlobalValueForTag', _objectSpread({
|
|
42
|
+
adapterConfig: adapterConfig,
|
|
43
|
+
tag: colorScheme.tag,
|
|
44
|
+
sessionId: sessionId,
|
|
45
|
+
regions: blocks.contentBlocks
|
|
46
|
+
}, opts));
|
|
47
|
+
|
|
48
|
+
case 5:
|
|
49
|
+
values = _context.sent;
|
|
50
|
+
return _context.abrupt("return", values);
|
|
51
|
+
|
|
52
|
+
case 7:
|
|
53
|
+
case "end":
|
|
54
|
+
return _context.stop();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, _callee);
|
|
58
|
+
}));
|
|
59
|
+
return _getUniqueTagValues.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getUniqueModificationValues(_x5, _x6, _x7, _x8, _x9) {
|
|
63
|
+
return _getUniqueModificationValues.apply(this, arguments);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _getUniqueModificationValues() {
|
|
67
|
+
_getUniqueModificationValues = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(self, adapterConfig, colorScheme, blocks, opts) {
|
|
68
|
+
var _getSession2, rpcManager, sessionId, values;
|
|
69
|
+
|
|
70
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
71
|
+
while (1) {
|
|
72
|
+
switch (_context2.prev = _context2.next) {
|
|
73
|
+
case 0:
|
|
74
|
+
_getSession2 = (0, _util.getSession)(self), rpcManager = _getSession2.rpcManager;
|
|
75
|
+
sessionId = (0, _tracks.getRpcSessionId)(self);
|
|
76
|
+
_context2.next = 4;
|
|
77
|
+
return rpcManager.call(sessionId, 'PileupGetVisibleModifications', _objectSpread({
|
|
78
|
+
adapterConfig: adapterConfig,
|
|
79
|
+
tag: colorScheme.tag,
|
|
80
|
+
sessionId: sessionId,
|
|
81
|
+
regions: blocks.contentBlocks
|
|
82
|
+
}, opts));
|
|
83
|
+
|
|
84
|
+
case 4:
|
|
85
|
+
values = _context2.sent;
|
|
86
|
+
return _context2.abrupt("return", values);
|
|
87
|
+
|
|
88
|
+
case 6:
|
|
89
|
+
case "end":
|
|
90
|
+
return _context2.stop();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, _callee2);
|
|
94
|
+
}));
|
|
95
|
+
return _getUniqueModificationValues.apply(this, arguments);
|
|
96
|
+
}
|
package/dist/util.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
3
|
-
import { AugmentedRegion } from '@jbrowse/core/util';
|
|
4
|
-
export declare function getTag(feature: Feature, tag: string): any;
|
|
5
|
-
export declare function getTagAlt(feature: Feature, tag: string, alt: string): any;
|
|
6
|
-
export declare const orientationTypes: {
|
|
7
|
-
fr: {
|
|
8
|
-
[key: string]: string;
|
|
9
|
-
};
|
|
10
|
-
rf: {
|
|
11
|
-
[key: string]: string;
|
|
12
|
-
};
|
|
13
|
-
ff: {
|
|
14
|
-
[key: string]: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare function getColorWGBS(strand: number, base: string): "#f00" | "#00f" | "#888";
|
|
18
|
-
export declare function fetchSequence(region: AugmentedRegion, adapter: BaseFeatureDataAdapter): Promise<any>;
|
|
19
|
-
export declare function shouldFetchReferenceSequence(type?: string): boolean;
|
|
1
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
3
|
+
import { AugmentedRegion } from '@jbrowse/core/util';
|
|
4
|
+
export declare function getTag(feature: Feature, tag: string): any;
|
|
5
|
+
export declare function getTagAlt(feature: Feature, tag: string, alt: string): any;
|
|
6
|
+
export declare const orientationTypes: {
|
|
7
|
+
fr: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
rf: {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
ff: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare function getColorWGBS(strand: number, base: string): "#f00" | "#00f" | "#888";
|
|
18
|
+
export declare function fetchSequence(region: AugmentedRegion, adapter: BaseFeatureDataAdapter): Promise<any>;
|
|
19
|
+
export declare function shouldFetchReferenceSequence(type?: string): boolean;
|
package/dist/util.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.fetchSequence = fetchSequence;
|
|
9
|
+
exports.getColorWGBS = getColorWGBS;
|
|
10
|
+
exports.getTag = getTag;
|
|
11
|
+
exports.getTagAlt = getTagAlt;
|
|
12
|
+
exports.orientationTypes = void 0;
|
|
13
|
+
exports.shouldFetchReferenceSequence = shouldFetchReferenceSequence;
|
|
14
|
+
|
|
15
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
16
|
+
|
|
17
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
+
|
|
19
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
20
|
+
|
|
21
|
+
var _operators = require("rxjs/operators");
|
|
22
|
+
|
|
23
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24
|
+
|
|
25
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26
|
+
|
|
27
|
+
// get tag from BAM or CRAM feature, where CRAM uses feature.get('tags') and
|
|
28
|
+
// BAM does not
|
|
29
|
+
function getTag(feature, tag) {
|
|
30
|
+
var tags = feature.get('tags');
|
|
31
|
+
return tags ? tags[tag] : feature.get(tag);
|
|
32
|
+
} // use fallback alt tag, used in situations where upper case/lower case tags
|
|
33
|
+
// exist e.g. Mm/MM for base modifications
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
function getTagAlt(feature, tag, alt) {
|
|
37
|
+
return getTag(feature, tag) || getTag(feature, alt);
|
|
38
|
+
} // orientation definitions from igv.js, see also
|
|
39
|
+
// https://software.broadinstitute.org/software/igv/interpreting_pair_orientations
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var orientationTypes = {
|
|
43
|
+
fr: {
|
|
44
|
+
F1R2: 'LR',
|
|
45
|
+
F2R1: 'LR',
|
|
46
|
+
F1F2: 'LL',
|
|
47
|
+
F2F1: 'LL',
|
|
48
|
+
R1R2: 'RR',
|
|
49
|
+
R2R1: 'RR',
|
|
50
|
+
R1F2: 'RL',
|
|
51
|
+
R2F1: 'RL'
|
|
52
|
+
},
|
|
53
|
+
rf: {
|
|
54
|
+
R1F2: 'LR',
|
|
55
|
+
R2F1: 'LR',
|
|
56
|
+
R1R2: 'LL',
|
|
57
|
+
R2R1: 'LL',
|
|
58
|
+
F1F2: 'RR',
|
|
59
|
+
F2F1: 'RR',
|
|
60
|
+
F1R2: 'RL',
|
|
61
|
+
F2R1: 'RL'
|
|
62
|
+
},
|
|
63
|
+
ff: {
|
|
64
|
+
F2F1: 'LR',
|
|
65
|
+
R1R2: 'LR',
|
|
66
|
+
F2R1: 'LL',
|
|
67
|
+
R1F2: 'LL',
|
|
68
|
+
R2F1: 'RR',
|
|
69
|
+
F1R2: 'RR',
|
|
70
|
+
R2R1: 'RL',
|
|
71
|
+
F1F2: 'RL'
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.orientationTypes = orientationTypes;
|
|
75
|
+
|
|
76
|
+
function getColorWGBS(strand, base) {
|
|
77
|
+
if (strand === 1) {
|
|
78
|
+
if (base === 'C') {
|
|
79
|
+
return '#f00';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (base === 'T') {
|
|
83
|
+
return '#00f';
|
|
84
|
+
}
|
|
85
|
+
} else if (strand === -1) {
|
|
86
|
+
if (base === 'G') {
|
|
87
|
+
return '#f00';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (base === 'A') {
|
|
91
|
+
return '#00f';
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return '#888';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function fetchSequence(_x, _x2) {
|
|
99
|
+
return _fetchSequence.apply(this, arguments);
|
|
100
|
+
} // has to check underlying C-G (aka CpG) on the reference sequence
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
function _fetchSequence() {
|
|
104
|
+
_fetchSequence = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(region, adapter) {
|
|
105
|
+
var _feats$;
|
|
106
|
+
|
|
107
|
+
var end, originalRefName, refName, feats;
|
|
108
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
109
|
+
while (1) {
|
|
110
|
+
switch (_context.prev = _context.next) {
|
|
111
|
+
case 0:
|
|
112
|
+
end = region.end, originalRefName = region.originalRefName, refName = region.refName;
|
|
113
|
+
_context.next = 3;
|
|
114
|
+
return adapter.getFeatures(_objectSpread(_objectSpread({}, region), {}, {
|
|
115
|
+
refName: originalRefName || refName,
|
|
116
|
+
end: end + 1
|
|
117
|
+
})).pipe((0, _operators.toArray)()).toPromise();
|
|
118
|
+
|
|
119
|
+
case 3:
|
|
120
|
+
feats = _context.sent;
|
|
121
|
+
return _context.abrupt("return", (_feats$ = feats[0]) === null || _feats$ === void 0 ? void 0 : _feats$.get('seq'));
|
|
122
|
+
|
|
123
|
+
case 5:
|
|
124
|
+
case "end":
|
|
125
|
+
return _context.stop();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, _callee);
|
|
129
|
+
}));
|
|
130
|
+
return _fetchSequence.apply(this, arguments);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function shouldFetchReferenceSequence(type) {
|
|
134
|
+
return type === 'methylation';
|
|
135
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-alignments",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"description": "JBrowse 2 alignments adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -18,15 +18,13 @@
|
|
|
18
18
|
"distMain": "dist/index.js",
|
|
19
19
|
"srcMain": "src/index.ts",
|
|
20
20
|
"main": "dist/index.js",
|
|
21
|
-
"distModule": "dist/plugin-alignments.esm.js",
|
|
22
|
-
"module": "dist/plugin-alignments.esm.js",
|
|
23
21
|
"files": [
|
|
24
22
|
"dist",
|
|
25
23
|
"src"
|
|
26
24
|
],
|
|
27
25
|
"scripts": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
26
|
+
"build": "babel src --root-mode upward --out-dir dist --extensions .ts,.js,.tsx,.jsx",
|
|
27
|
+
"postbuild": "tsc --build tsconfig.build.json",
|
|
30
28
|
"test": "cd ../..; jest plugins/alignments",
|
|
31
29
|
"prepublishOnly": "yarn test",
|
|
32
30
|
"prepack": "yarn build; yarn useDist",
|
|
@@ -43,8 +41,7 @@
|
|
|
43
41
|
"copy-to-clipboard": "^3.3.1",
|
|
44
42
|
"fast-deep-equal": "^3.1.3",
|
|
45
43
|
"generic-filehandle": "^2.2.2",
|
|
46
|
-
"json-stable-stringify": "^1.0.1"
|
|
47
|
-
"react-d3-axis-mod": "^0.1.3"
|
|
44
|
+
"json-stable-stringify": "^1.0.1"
|
|
48
45
|
},
|
|
49
46
|
"peerDependencies": {
|
|
50
47
|
"@jbrowse/core": "^1.0.0",
|
|
@@ -61,5 +58,5 @@
|
|
|
61
58
|
"publishConfig": {
|
|
62
59
|
"access": "public"
|
|
63
60
|
},
|
|
64
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "09b13c85acf4ac68dd71ab23af87656c7552fdaf"
|
|
65
62
|
}
|
|
@@ -4,11 +4,7 @@ import {
|
|
|
4
4
|
BaseOptions,
|
|
5
5
|
} from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
6
6
|
import { Region } from '@jbrowse/core/util/types'
|
|
7
|
-
import {
|
|
8
|
-
checkAbortSignal,
|
|
9
|
-
bytesForRegions,
|
|
10
|
-
updateStatus,
|
|
11
|
-
} from '@jbrowse/core/util'
|
|
7
|
+
import { bytesForRegions, updateStatus } from '@jbrowse/core/util'
|
|
12
8
|
import { openLocation } from '@jbrowse/core/util/io'
|
|
13
9
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs'
|
|
14
10
|
import { Feature } from '@jbrowse/core/util/simpleFeature'
|
|
@@ -170,17 +166,29 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
170
166
|
|
|
171
167
|
getFeatures(
|
|
172
168
|
region: Region & { originalRefName?: string },
|
|
173
|
-
opts?: BaseOptions
|
|
169
|
+
opts?: BaseOptions & {
|
|
170
|
+
filterBy: {
|
|
171
|
+
flagInclude: number
|
|
172
|
+
flagExclude: number
|
|
173
|
+
tagFilter: { tag: string; value: unknown }
|
|
174
|
+
name: string
|
|
175
|
+
}
|
|
176
|
+
},
|
|
174
177
|
) {
|
|
175
178
|
const { refName, start, end, originalRefName } = region
|
|
176
|
-
const { signal, statusCallback = () => {} } = opts || {}
|
|
179
|
+
const { signal, filterBy, statusCallback = () => {} } = opts || {}
|
|
177
180
|
return ObservableCreate<Feature>(async observer => {
|
|
178
181
|
const { bam } = await this.configure()
|
|
179
182
|
await this.setup(opts)
|
|
180
183
|
statusCallback('Downloading alignments')
|
|
181
184
|
const records = await bam.getRecordsForRange(refName, start, end, opts)
|
|
182
185
|
|
|
183
|
-
|
|
186
|
+
const {
|
|
187
|
+
flagInclude = 0,
|
|
188
|
+
flagExclude = 0,
|
|
189
|
+
tagFilter,
|
|
190
|
+
name,
|
|
191
|
+
} = filterBy || {}
|
|
184
192
|
|
|
185
193
|
for (const record of records) {
|
|
186
194
|
let ref: string | undefined
|
|
@@ -191,6 +199,25 @@ export default class BamAdapter extends BaseFeatureDataAdapter {
|
|
|
191
199
|
record.get('end'),
|
|
192
200
|
)
|
|
193
201
|
}
|
|
202
|
+
|
|
203
|
+
const flags = record.flags
|
|
204
|
+
if (
|
|
205
|
+
!((flags & flagInclude) === flagInclude && !(flags & flagExclude))
|
|
206
|
+
) {
|
|
207
|
+
continue
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (tagFilter) {
|
|
211
|
+
const val = record.get(tagFilter.tag)
|
|
212
|
+
if (!(val === '*' ? val !== undefined : val === tagFilter.value)) {
|
|
213
|
+
continue
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (name && record.get('name') !== name) {
|
|
218
|
+
continue
|
|
219
|
+
}
|
|
220
|
+
|
|
194
221
|
observer.next(new BamSlightlyLazyFeature(record, this, ref))
|
|
195
222
|
}
|
|
196
223
|
statusCallback('')
|
|
@@ -3,12 +3,9 @@ import {
|
|
|
3
3
|
BaseFeatureDataAdapter,
|
|
4
4
|
BaseOptions,
|
|
5
5
|
} from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
6
|
-
import { Region } from '@jbrowse/core/util
|
|
7
|
-
import { checkAbortSignal } from '@jbrowse/core/util'
|
|
6
|
+
import { checkAbortSignal, Region, Feature } from '@jbrowse/core/util'
|
|
8
7
|
import { openLocation } from '@jbrowse/core/util/io'
|
|
9
|
-
import { readConfObject } from '@jbrowse/core/configuration'
|
|
10
8
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs'
|
|
11
|
-
import { Feature } from '@jbrowse/core/util/simpleFeature'
|
|
12
9
|
import { toArray } from 'rxjs/operators'
|
|
13
10
|
import CramSlightlyLazyFeature from './CramSlightlyLazyFeature'
|
|
14
11
|
|
|
@@ -39,8 +36,8 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
39
36
|
private seqIdToOriginalRefName: string[] = []
|
|
40
37
|
|
|
41
38
|
public async configure() {
|
|
42
|
-
const cramLocation =
|
|
43
|
-
const craiLocation =
|
|
39
|
+
const cramLocation = this.getConf('cramLocation')
|
|
40
|
+
const craiLocation = this.getConf('craiLocation')
|
|
44
41
|
if (!cramLocation) {
|
|
45
42
|
throw new Error('missing cramLocation argument')
|
|
46
43
|
}
|
|
@@ -59,16 +56,13 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
59
56
|
fetchSizeLimit: 200_000_000, // just make this a large size to avoid hitting it
|
|
60
57
|
})
|
|
61
58
|
// instantiate the sequence adapter
|
|
62
|
-
const sequenceAdapterType =
|
|
63
|
-
'sequenceAdapter',
|
|
64
|
-
'type',
|
|
65
|
-
])
|
|
59
|
+
const sequenceAdapterType = this.getConf(['sequenceAdapter', 'type'])
|
|
66
60
|
|
|
67
61
|
if (!this.getSubAdapter) {
|
|
68
62
|
throw new Error('Error getting subadapter')
|
|
69
63
|
}
|
|
70
64
|
|
|
71
|
-
const seqConf =
|
|
65
|
+
const seqConf = this.getConf('sequenceAdapter')
|
|
72
66
|
const { dataAdapter: sequenceAdapter } = await this.getSubAdapter(seqConf)
|
|
73
67
|
|
|
74
68
|
if (!(sequenceAdapter instanceof BaseFeatureDataAdapter)) {
|
|
@@ -211,9 +205,16 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
211
205
|
|
|
212
206
|
getFeatures(
|
|
213
207
|
region: Region & { originalRefName?: string },
|
|
214
|
-
opts?: BaseOptions
|
|
208
|
+
opts?: BaseOptions & {
|
|
209
|
+
filterBy: {
|
|
210
|
+
flagInclude: number
|
|
211
|
+
flagExclude: number
|
|
212
|
+
tagFilter: { tag: string; value: unknown }
|
|
213
|
+
name: string
|
|
214
|
+
}
|
|
215
|
+
},
|
|
215
216
|
) {
|
|
216
|
-
const { signal, statusCallback = () => {} } = opts || {}
|
|
217
|
+
const { signal, filterBy, statusCallback = () => {} } = opts || {}
|
|
217
218
|
const { refName, start, end, originalRefName } = region
|
|
218
219
|
|
|
219
220
|
return ObservableCreate<Feature>(async observer => {
|
|
@@ -229,8 +230,34 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
229
230
|
}
|
|
230
231
|
const records = await cram.getRecordsForRange(refId, start, end, opts)
|
|
231
232
|
checkAbortSignal(signal)
|
|
233
|
+
const {
|
|
234
|
+
flagInclude = 0,
|
|
235
|
+
flagExclude = 0,
|
|
236
|
+
tagFilter,
|
|
237
|
+
name,
|
|
238
|
+
} = filterBy || {}
|
|
239
|
+
|
|
240
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
241
|
+
let filtered = records.filter((record: any) => {
|
|
242
|
+
const flags = record.flags
|
|
243
|
+
return (flags & flagInclude) === flagInclude && !(flags & flagExclude)
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
if (tagFilter) {
|
|
247
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
248
|
+
filtered = filtered.filter((record: any) => {
|
|
249
|
+
const val = record[tagFilter.tag]
|
|
250
|
+
return val === '*' ? val !== undefined : val === tagFilter.value
|
|
251
|
+
})
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (name) {
|
|
255
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
256
|
+
filtered = filtered.filter((record: any) => record.name === name)
|
|
257
|
+
}
|
|
258
|
+
|
|
232
259
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
233
|
-
|
|
260
|
+
filtered.forEach((record: any) => {
|
|
234
261
|
observer.next(this.cramRecordToFeature(record))
|
|
235
262
|
})
|
|
236
263
|
} else {
|
|
@@ -250,7 +277,7 @@ export default class CramAdapter extends BaseFeatureDataAdapter {
|
|
|
250
277
|
// we return the configured fetchSizeLimit, and the bytes for the region
|
|
251
278
|
async estimateRegionsStats(regions: Region[], opts?: BaseOptions) {
|
|
252
279
|
const bytes = await this.bytesForRegions(regions, opts)
|
|
253
|
-
const fetchSizeLimit =
|
|
280
|
+
const fetchSizeLimit = this.getConf('fetchSizeLimit')
|
|
254
281
|
return {
|
|
255
282
|
bytes,
|
|
256
283
|
fetchSizeLimit,
|
|
@@ -55,7 +55,7 @@ function SetMaxHeightDlg(props: {
|
|
|
55
55
|
<DialogContent className={classes.root}>
|
|
56
56
|
<Typography>
|
|
57
57
|
Set max height for the track. For example, you can increase this if
|
|
58
|
-
the layout says
|
|
58
|
+
the layout says "Max height reached"
|
|
59
59
|
</Typography>
|
|
60
60
|
<TextField
|
|
61
61
|
value={max}
|
|
@@ -27,7 +27,6 @@ import FilterListIcon from '@material-ui/icons/ClearAll'
|
|
|
27
27
|
|
|
28
28
|
import { autorun, observable } from 'mobx'
|
|
29
29
|
import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema'
|
|
30
|
-
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain'
|
|
31
30
|
import { LinearPileupDisplayConfigModel } from './configSchema'
|
|
32
31
|
import LinearPileupDisplayBlurb from './components/LinearPileupDisplayBlurb'
|
|
33
32
|
|
|
@@ -377,26 +376,6 @@ const stateModelFactory = (configSchema: LinearPileupDisplayConfigModel) =>
|
|
|
377
376
|
return LinearPileupDisplayBlurb
|
|
378
377
|
},
|
|
379
378
|
|
|
380
|
-
get filters() {
|
|
381
|
-
let filters: string[] = []
|
|
382
|
-
const { flagInclude, flagExclude, tagFilter, readName } =
|
|
383
|
-
self.filterBy
|
|
384
|
-
|
|
385
|
-
filters = [
|
|
386
|
-
`jexl:((get(feature,'flags')&${flagInclude})==${flagInclude}) && !(get(feature,'flags')&${flagExclude})`,
|
|
387
|
-
]
|
|
388
|
-
if (tagFilter) {
|
|
389
|
-
const { tag, value } = tagFilter
|
|
390
|
-
filters.push(
|
|
391
|
-
`jexl:"${value}" =='*' ? getTag(feature,"${tag}") != undefined : getTag(feature,"${tag}") == "${value}"`,
|
|
392
|
-
)
|
|
393
|
-
}
|
|
394
|
-
if (readName) {
|
|
395
|
-
filters.push(`jexl:get(feature,'name') == "${readName}"`)
|
|
396
|
-
}
|
|
397
|
-
return new SerializableFilterChain({ filters })
|
|
398
|
-
},
|
|
399
|
-
|
|
400
379
|
renderProps() {
|
|
401
380
|
const view = getContainingView(self) as LGV
|
|
402
381
|
const {
|
|
@@ -404,6 +383,7 @@ const stateModelFactory = (configSchema: LinearPileupDisplayConfigModel) =>
|
|
|
404
383
|
modificationTagMap,
|
|
405
384
|
sortedBy,
|
|
406
385
|
colorBy,
|
|
386
|
+
filterBy,
|
|
407
387
|
rpcDriverName,
|
|
408
388
|
} = self
|
|
409
389
|
|
|
@@ -419,9 +399,9 @@ const stateModelFactory = (configSchema: LinearPileupDisplayConfigModel) =>
|
|
|
419
399
|
displayModel: self,
|
|
420
400
|
sortedBy,
|
|
421
401
|
colorBy,
|
|
402
|
+
filterBy,
|
|
422
403
|
colorTagMap: JSON.parse(JSON.stringify(colorTagMap)),
|
|
423
404
|
modificationTagMap: JSON.parse(JSON.stringify(modificationTagMap)),
|
|
424
|
-
filters: this.filters,
|
|
425
405
|
showSoftClip: self.showSoftClipping,
|
|
426
406
|
config: self.rendererConfig,
|
|
427
407
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { addDisposer, types, cast, getEnv, getSnapshot } from 'mobx-state-tree'
|
|
2
2
|
import { observable, autorun } from 'mobx'
|
|
3
|
-
import { getConf, readConfObject } from '@jbrowse/core/configuration'
|
|
4
|
-
import { linearWiggleDisplayModelFactory } from '@jbrowse/plugin-wiggle'
|
|
5
3
|
import {
|
|
4
|
+
getConf,
|
|
5
|
+
readConfObject,
|
|
6
6
|
AnyConfigurationSchemaType,
|
|
7
7
|
AnyConfigurationModel,
|
|
8
|
-
} from '@jbrowse/core/configuration
|
|
8
|
+
} from '@jbrowse/core/configuration'
|
|
9
|
+
import { linearWiggleDisplayModelFactory } from '@jbrowse/plugin-wiggle'
|
|
10
|
+
|
|
9
11
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
10
|
-
import SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain'
|
|
11
12
|
import { getContainingView } from '@jbrowse/core/util'
|
|
12
13
|
import Tooltip from '../components/Tooltip'
|
|
13
14
|
import { getUniqueModificationValues } from '../../shared'
|
|
@@ -135,7 +136,6 @@ const stateModelFactory = (
|
|
|
135
136
|
return {
|
|
136
137
|
...superProps,
|
|
137
138
|
notReady: superProps.notReady || !this.modificationsReady,
|
|
138
|
-
filters: self.filters,
|
|
139
139
|
modificationTagMap: JSON.parse(
|
|
140
140
|
JSON.stringify(self.modificationTagMap),
|
|
141
141
|
),
|
|
@@ -143,6 +143,7 @@ const stateModelFactory = (
|
|
|
143
143
|
// must use getSnapshot because otherwise changes to e.g. just the
|
|
144
144
|
// colorBy.type are not read
|
|
145
145
|
colorBy: self.colorBy ? getSnapshot(self.colorBy) : undefined,
|
|
146
|
+
filterBy: self.filterBy,
|
|
146
147
|
}
|
|
147
148
|
},
|
|
148
149
|
}
|
|
@@ -241,37 +242,6 @@ const stateModelFactory = (
|
|
|
241
242
|
},
|
|
242
243
|
]
|
|
243
244
|
},
|
|
244
|
-
// The SNPCoverage filters are called twice because the BAM/CRAM
|
|
245
|
-
// features pass filters and then the SNPCoverage score features pass
|
|
246
|
-
// through here, and are already have 'snpinfo' are passed through
|
|
247
|
-
get filters() {
|
|
248
|
-
let filters: string[] = []
|
|
249
|
-
if (self.filterBy) {
|
|
250
|
-
const { flagInclude, flagExclude, tagFilter, readName } =
|
|
251
|
-
self.filterBy
|
|
252
|
-
filters = [
|
|
253
|
-
`jexl:get(feature,'snpinfo') != undefined ? true : ` +
|
|
254
|
-
`((get(feature,'flags')&${flagInclude})==${flagInclude}) && ` +
|
|
255
|
-
`!((get(feature,'flags')&${flagExclude}))`,
|
|
256
|
-
]
|
|
257
|
-
|
|
258
|
-
if (tagFilter) {
|
|
259
|
-
const { tag, value } = tagFilter
|
|
260
|
-
filters.push(
|
|
261
|
-
`jexl:get(feature,'snpinfo') != undefined ? true : ` +
|
|
262
|
-
`"${value}" =='*' ? getTag(feature,"${tag}") != undefined : ` +
|
|
263
|
-
`getTag(feature,"${tag}") == "${value}"`,
|
|
264
|
-
)
|
|
265
|
-
}
|
|
266
|
-
if (readName) {
|
|
267
|
-
filters.push(
|
|
268
|
-
`jexl:get(feature,'snpinfo') != undefined ? true : ` +
|
|
269
|
-
`get(feature,'name') == "${readName}"`,
|
|
270
|
-
)
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
return new SerializableFilterChain({ filters })
|
|
274
|
-
},
|
|
275
245
|
}
|
|
276
246
|
})
|
|
277
247
|
|