@jbrowse/plugin-variants 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +11 -3
- package/dist/LinearVariantDisplay/model.d.ts +52 -49
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -1
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -1
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +2 -1
- package/dist/VariantFeatureWidget/AnnotGrid.js +8 -13
- package/dist/VariantFeatureWidget/AnnotGrid.js.map +1 -1
- package/dist/VariantFeatureWidget/BreakendOptionDialog.d.ts +2 -1
- package/dist/VariantFeatureWidget/BreakendPanel.d.ts +2 -1
- package/dist/VariantFeatureWidget/VariantAnnotationTable.d.ts +6 -0
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +17 -0
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js.map +1 -0
- package/dist/VariantFeatureWidget/VariantFeatureWidget.d.ts +8 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +26 -14
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js.map +1 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -2
- package/dist/VariantFeatureWidget/VariantSampleGrid.js.map +1 -1
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +11 -3
- package/esm/LinearVariantDisplay/model.d.ts +52 -49
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -1
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -1
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +2 -1
- package/esm/VariantFeatureWidget/AnnotGrid.js +8 -13
- package/esm/VariantFeatureWidget/AnnotGrid.js.map +1 -1
- package/esm/VariantFeatureWidget/BreakendOptionDialog.d.ts +2 -1
- package/esm/VariantFeatureWidget/BreakendPanel.d.ts +2 -1
- package/esm/VariantFeatureWidget/VariantAnnotationTable.d.ts +6 -0
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +11 -0
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js.map +1 -0
- package/esm/VariantFeatureWidget/VariantFeatureWidget.d.ts +8 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +26 -14
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js.map +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -2
- package/esm/VariantFeatureWidget/VariantSampleGrid.js.map +1 -1
- package/package.json +2 -2
- package/src/VariantFeatureWidget/AnnotGrid.tsx +16 -17
- package/src/VariantFeatureWidget/VariantAnnotationTable.tsx +27 -0
- package/src/VariantFeatureWidget/VariantFeatureWidget.tsx +61 -16
- package/src/VariantFeatureWidget/VariantSampleGrid.tsx +1 -2
- package/dist/VariantFeatureWidget/VariantAnnPanel.d.ts +0 -4
- package/dist/VariantFeatureWidget/VariantAnnPanel.js +0 -25
- package/dist/VariantFeatureWidget/VariantAnnPanel.js.map +0 -1
- package/dist/VariantFeatureWidget/VariantCsqPanel.d.ts +0 -4
- package/dist/VariantFeatureWidget/VariantCsqPanel.js +0 -25
- package/dist/VariantFeatureWidget/VariantCsqPanel.js.map +0 -1
- package/esm/VariantFeatureWidget/VariantAnnPanel.d.ts +0 -4
- package/esm/VariantFeatureWidget/VariantAnnPanel.js +0 -19
- package/esm/VariantFeatureWidget/VariantAnnPanel.js.map +0 -1
- package/esm/VariantFeatureWidget/VariantCsqPanel.d.ts +0 -4
- package/esm/VariantFeatureWidget/VariantCsqPanel.js +0 -19
- package/esm/VariantFeatureWidget/VariantCsqPanel.js.map +0 -1
- package/src/VariantFeatureWidget/VariantAnnPanel.tsx +0 -31
- package/src/VariantFeatureWidget/VariantCsqPanel.tsx +0 -31
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
1
|
import React from 'react'
|
|
3
2
|
import { observer } from 'mobx-react'
|
|
4
3
|
import { Divider, Paper } from '@mui/material'
|
|
@@ -7,25 +6,31 @@ import { parseBreakend } from '@gmod/vcf'
|
|
|
7
6
|
|
|
8
7
|
// locals
|
|
9
8
|
import VariantSampleGrid from './VariantSampleGrid'
|
|
10
|
-
import VariantCsqPanel from './VariantCsqPanel'
|
|
11
|
-
import VariantAnnPanel from './VariantAnnPanel'
|
|
12
9
|
import BreakendPanel from './BreakendPanel'
|
|
10
|
+
import VariantAnnotationTable from './VariantAnnotationTable'
|
|
11
|
+
import { SimpleFeatureSerialized } from '@jbrowse/core/util'
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
const basicDescriptions = {
|
|
14
|
+
CHROM: 'chromosome: An identifier from the reference genome',
|
|
15
|
+
POS: 'position: The reference position, with the 1st base having position 1',
|
|
16
|
+
ID: 'identifier: Semi-colon separated list of unique identifiers where available',
|
|
17
|
+
REF: 'reference base(s): Each base must be one of A,C,G,T,N (case insensitive).',
|
|
18
|
+
ALT: 'alternate base(s): Comma-separated list of alternate non-reference alleles',
|
|
19
|
+
QUAL: 'quality: Phred-scaled quality score for the assertion made in ALT',
|
|
20
|
+
FILTER:
|
|
21
|
+
'filter status: PASS if this position has passed all filters, otherwise a semicolon-separated list of codes for filters that fail',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function VariantFeatureDetails(props: {
|
|
25
|
+
model: {
|
|
26
|
+
featureData: SimpleFeatureSerialized
|
|
27
|
+
descriptions: Record<string, string>
|
|
28
|
+
}
|
|
29
|
+
}) {
|
|
15
30
|
const { model } = props
|
|
16
31
|
const { featureData, descriptions } = model
|
|
17
32
|
const feat = JSON.parse(JSON.stringify(featureData))
|
|
18
33
|
const { samples, ...rest } = feat
|
|
19
|
-
const basicDescriptions = {
|
|
20
|
-
CHROM: 'chromosome: An identifier from the reference genome',
|
|
21
|
-
POS: 'position: The reference position, with the 1st base having position 1',
|
|
22
|
-
ID: 'identifier: Semi-colon separated list of unique identifiers where available',
|
|
23
|
-
REF: 'reference base(s): Each base must be one of A,C,G,T,N (case insensitive).',
|
|
24
|
-
ALT: 'alternate base(s): Comma-separated list of alternate non-reference alleles',
|
|
25
|
-
QUAL: 'quality: Phred-scaled quality score for the assertion made in ALT',
|
|
26
|
-
FILTER:
|
|
27
|
-
'filter status: PASS if this position has passed all filters, otherwise a semicolon-separated list of codes for filters that fail',
|
|
28
|
-
}
|
|
29
34
|
|
|
30
35
|
return (
|
|
31
36
|
<Paper data-testid="variant-side-drawer">
|
|
@@ -35,9 +40,9 @@ function VariantFeatureDetails(props: any) {
|
|
|
35
40
|
{...props}
|
|
36
41
|
/>
|
|
37
42
|
<Divider />
|
|
38
|
-
<
|
|
43
|
+
<CsqPanel feature={rest} descriptions={descriptions} />
|
|
39
44
|
<Divider />
|
|
40
|
-
<
|
|
45
|
+
<AnnPanel feature={rest} descriptions={descriptions} />
|
|
41
46
|
<Divider />
|
|
42
47
|
{feat.type === 'breakend' ? (
|
|
43
48
|
<BreakendPanel
|
|
@@ -64,4 +69,44 @@ function VariantFeatureDetails(props: any) {
|
|
|
64
69
|
)
|
|
65
70
|
}
|
|
66
71
|
|
|
72
|
+
function AnnPanel({
|
|
73
|
+
descriptions,
|
|
74
|
+
feature,
|
|
75
|
+
}: {
|
|
76
|
+
descriptions: { INFO?: { ANN?: { Description?: string } } }
|
|
77
|
+
feature: { INFO?: { ANN?: string[] } }
|
|
78
|
+
}) {
|
|
79
|
+
const annDesc = descriptions?.INFO?.ANN?.Description
|
|
80
|
+
const annFields =
|
|
81
|
+
annDesc?.match(/.*Functional annotations:'(.*)'$/)?.[1].split('|') || []
|
|
82
|
+
const ann = feature.INFO?.ANN || []
|
|
83
|
+
return (
|
|
84
|
+
<VariantAnnotationTable
|
|
85
|
+
fields={annFields}
|
|
86
|
+
data={ann}
|
|
87
|
+
title="Variant ANN field"
|
|
88
|
+
/>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function CsqPanel({
|
|
93
|
+
descriptions,
|
|
94
|
+
feature,
|
|
95
|
+
}: {
|
|
96
|
+
descriptions: { INFO?: { CSQ?: { Description?: string } } }
|
|
97
|
+
feature: { INFO?: { CSQ?: string[] } }
|
|
98
|
+
}) {
|
|
99
|
+
const csqDescription = descriptions?.INFO?.CSQ?.Description
|
|
100
|
+
const csqFields =
|
|
101
|
+
csqDescription?.match(/.*Format: (.*)/)?.[1].split('|') || []
|
|
102
|
+
const csq = feature.INFO?.CSQ || []
|
|
103
|
+
return (
|
|
104
|
+
<VariantAnnotationTable
|
|
105
|
+
fields={csqFields}
|
|
106
|
+
data={csq}
|
|
107
|
+
title="Variant CSQ field"
|
|
108
|
+
/>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
67
112
|
export default observer(VariantFeatureDetails)
|
|
@@ -54,8 +54,7 @@ function SampleFilters({
|
|
|
54
54
|
|
|
55
55
|
export default function VariantSamples(props: {
|
|
56
56
|
feature: SimpleFeatureSerialized
|
|
57
|
-
|
|
58
|
-
descriptions: any
|
|
57
|
+
descriptions: { FORMAT?: { [key: string]: { Description?: string } } }
|
|
59
58
|
}) {
|
|
60
59
|
const { feature, descriptions = {} } = props
|
|
61
60
|
const { ref, scrollLeft } = useResizeBar()
|
|
@@ -1,25 +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
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail");
|
|
9
|
-
const AnnotGrid_1 = __importDefault(require("./AnnotGrid"));
|
|
10
|
-
function VariantAnnPanel({ feature, descriptions, }) {
|
|
11
|
-
var _a, _b, _c, _d;
|
|
12
|
-
const annFields = (((_d = (_c = (_b = (_a = descriptions === null || descriptions === void 0 ? void 0 : descriptions.INFO) === null || _a === void 0 ? void 0 : _a.ANN) === null || _b === void 0 ? void 0 : _b.Description) === null || _c === void 0 ? void 0 : _c.match(/.*Functional annotations:'(.*)'$/)) === null || _d === void 0 ? void 0 : _d[1].split('|')) || []);
|
|
13
|
-
const ann = (feature.INFO.ANN || []);
|
|
14
|
-
const rows = ann.map((elt, id) => ({
|
|
15
|
-
id,
|
|
16
|
-
...Object.fromEntries(elt.split('|').map((e, i) => [annFields[i], e])),
|
|
17
|
-
})) || [];
|
|
18
|
-
const columns = annFields.map(c => ({
|
|
19
|
-
field: c,
|
|
20
|
-
}));
|
|
21
|
-
return ann.length ? (react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { title: "ANN table" },
|
|
22
|
-
react_1.default.createElement(AnnotGrid_1.default, { rows: rows, columns: columns }))) : null;
|
|
23
|
-
}
|
|
24
|
-
exports.default = VariantAnnPanel;
|
|
25
|
-
//# sourceMappingURL=VariantAnnPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariantAnnPanel.js","sourceRoot":"","sources":["../../src/VariantFeatureWidget/VariantAnnPanel.tsx"],"names":[],"mappings":";;;;;AAAA,uDAAuD;AACvD,kDAAyB;AACzB,yFAA4E;AAC5E,4DAAmC;AAEnC,SAAwB,eAAe,CAAC,EACtC,OAAO,EACP,YAAY,GAIb;;IACC,MAAM,SAAS,GAAG,CAAC,CAAA,MAAA,MAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,0CAAE,GAAG,0CAAE,WAAW,0CAAE,KAAK,CAC5D,kCAAkC,CACnC,0CAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAa,CAAA;IACpC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAa,CAAA;IAEhD,MAAM,IAAI,GACR,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QACpB,EAAE;QACF,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACvE,CAAC,CAAC,IAAI,EAAE,CAAA;IACX,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAClC,KAAK,EAAE,CAAC;KACT,CAAC,CAAC,CAAA;IACH,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB,8BAAC,4BAAQ,IAAC,KAAK,EAAC,WAAW;QACzB,8BAAC,mBAAS,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAClC,CACZ,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAzBD,kCAyBC"}
|
|
@@ -1,25 +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
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const BaseFeatureDetail_1 = require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail");
|
|
9
|
-
const AnnotGrid_1 = __importDefault(require("./AnnotGrid"));
|
|
10
|
-
function VariantCsqPanel({ feature, descriptions, }) {
|
|
11
|
-
var _a, _b, _c, _d;
|
|
12
|
-
const csqFields = (((_d = (_c = (_b = (_a = descriptions === null || descriptions === void 0 ? void 0 : descriptions.INFO) === null || _a === void 0 ? void 0 : _a.CSQ) === null || _b === void 0 ? void 0 : _b.Description) === null || _c === void 0 ? void 0 : _c.match(/.*Format: (.*)/)) === null || _d === void 0 ? void 0 : _d[1].split('|')) || []);
|
|
13
|
-
const csq = (feature.INFO.CSQ || []);
|
|
14
|
-
const rows = csq.map((elt, id) => ({
|
|
15
|
-
id,
|
|
16
|
-
...Object.fromEntries(elt.split('|').map((e, i) => [csqFields[i], e])),
|
|
17
|
-
})) || [];
|
|
18
|
-
const columns = csqFields.map(c => ({
|
|
19
|
-
field: c,
|
|
20
|
-
}));
|
|
21
|
-
return csq.length ? (react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { title: "CSQ table" },
|
|
22
|
-
react_1.default.createElement(AnnotGrid_1.default, { rows: rows, columns: columns }))) : null;
|
|
23
|
-
}
|
|
24
|
-
exports.default = VariantCsqPanel;
|
|
25
|
-
//# sourceMappingURL=VariantCsqPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariantCsqPanel.js","sourceRoot":"","sources":["../../src/VariantFeatureWidget/VariantCsqPanel.tsx"],"names":[],"mappings":";;;;;AAAA,uDAAuD;AACvD,kDAAyB;AACzB,yFAA4E;AAC5E,4DAAmC;AAEnC,SAAwB,eAAe,CAAC,EACtC,OAAO,EACP,YAAY,GAIb;;IACC,MAAM,SAAS,GAAG,CAAC,CAAA,MAAA,MAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,0CAAE,GAAG,0CAAE,WAAW,0CAAE,KAAK,CAC5D,gBAAgB,CACjB,0CAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAa,CAAA;IAEpC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAa,CAAA;IAChD,MAAM,IAAI,GACR,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QACpB,EAAE;QACF,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACvE,CAAC,CAAC,IAAI,EAAE,CAAA;IACX,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAClC,KAAK,EAAE,CAAC;KACT,CAAC,CAAC,CAAA;IACH,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB,8BAAC,4BAAQ,IAAC,KAAK,EAAC,WAAW;QACzB,8BAAC,mBAAS,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAClC,CACZ,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAzBD,kCAyBC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
4
|
-
import AnnotGrid from './AnnotGrid';
|
|
5
|
-
export default function VariantAnnPanel({ feature, descriptions, }) {
|
|
6
|
-
var _a, _b, _c, _d;
|
|
7
|
-
const annFields = (((_d = (_c = (_b = (_a = descriptions === null || descriptions === void 0 ? void 0 : descriptions.INFO) === null || _a === void 0 ? void 0 : _a.ANN) === null || _b === void 0 ? void 0 : _b.Description) === null || _c === void 0 ? void 0 : _c.match(/.*Functional annotations:'(.*)'$/)) === null || _d === void 0 ? void 0 : _d[1].split('|')) || []);
|
|
8
|
-
const ann = (feature.INFO.ANN || []);
|
|
9
|
-
const rows = ann.map((elt, id) => ({
|
|
10
|
-
id,
|
|
11
|
-
...Object.fromEntries(elt.split('|').map((e, i) => [annFields[i], e])),
|
|
12
|
-
})) || [];
|
|
13
|
-
const columns = annFields.map(c => ({
|
|
14
|
-
field: c,
|
|
15
|
-
}));
|
|
16
|
-
return ann.length ? (React.createElement(BaseCard, { title: "ANN table" },
|
|
17
|
-
React.createElement(AnnotGrid, { rows: rows, columns: columns }))) : null;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=VariantAnnPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariantAnnPanel.js","sourceRoot":"","sources":["../../src/VariantFeatureWidget/VariantAnnPanel.tsx"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAA;AAC5E,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAO,EACP,YAAY,GAIb;;IACC,MAAM,SAAS,GAAG,CAAC,CAAA,MAAA,MAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,0CAAE,GAAG,0CAAE,WAAW,0CAAE,KAAK,CAC5D,kCAAkC,CACnC,0CAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAa,CAAA;IACpC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAa,CAAA;IAEhD,MAAM,IAAI,GACR,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QACpB,EAAE;QACF,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACvE,CAAC,CAAC,IAAI,EAAE,CAAA;IACX,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAClC,KAAK,EAAE,CAAC;KACT,CAAC,CAAC,CAAA;IACH,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB,oBAAC,QAAQ,IAAC,KAAK,EAAC,WAAW;QACzB,oBAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAClC,CACZ,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
4
|
-
import AnnotGrid from './AnnotGrid';
|
|
5
|
-
export default function VariantCsqPanel({ feature, descriptions, }) {
|
|
6
|
-
var _a, _b, _c, _d;
|
|
7
|
-
const csqFields = (((_d = (_c = (_b = (_a = descriptions === null || descriptions === void 0 ? void 0 : descriptions.INFO) === null || _a === void 0 ? void 0 : _a.CSQ) === null || _b === void 0 ? void 0 : _b.Description) === null || _c === void 0 ? void 0 : _c.match(/.*Format: (.*)/)) === null || _d === void 0 ? void 0 : _d[1].split('|')) || []);
|
|
8
|
-
const csq = (feature.INFO.CSQ || []);
|
|
9
|
-
const rows = csq.map((elt, id) => ({
|
|
10
|
-
id,
|
|
11
|
-
...Object.fromEntries(elt.split('|').map((e, i) => [csqFields[i], e])),
|
|
12
|
-
})) || [];
|
|
13
|
-
const columns = csqFields.map(c => ({
|
|
14
|
-
field: c,
|
|
15
|
-
}));
|
|
16
|
-
return csq.length ? (React.createElement(BaseCard, { title: "CSQ table" },
|
|
17
|
-
React.createElement(AnnotGrid, { rows: rows, columns: columns }))) : null;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=VariantCsqPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariantCsqPanel.js","sourceRoot":"","sources":["../../src/VariantFeatureWidget/VariantCsqPanel.tsx"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAA;AAC5E,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAO,EACP,YAAY,GAIb;;IACC,MAAM,SAAS,GAAG,CAAC,CAAA,MAAA,MAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,0CAAE,GAAG,0CAAE,WAAW,0CAAE,KAAK,CAC5D,gBAAgB,CACjB,0CAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAa,CAAA;IAEpC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAa,CAAA;IAChD,MAAM,IAAI,GACR,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QACpB,EAAE;QACF,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACvE,CAAC,CAAC,IAAI,EAAE,CAAA;IACX,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAClC,KAAK,EAAE,CAAC;KACT,CAAC,CAAC,CAAA;IACH,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB,oBAAC,QAAQ,IAAC,KAAK,EAAC,WAAW;QACzB,oBAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAClC,CACZ,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail'
|
|
4
|
-
import AnnotGrid from './AnnotGrid'
|
|
5
|
-
|
|
6
|
-
export default function VariantAnnPanel({
|
|
7
|
-
feature,
|
|
8
|
-
descriptions,
|
|
9
|
-
}: {
|
|
10
|
-
feature: any
|
|
11
|
-
descriptions: any
|
|
12
|
-
}) {
|
|
13
|
-
const annFields = (descriptions?.INFO?.ANN?.Description?.match(
|
|
14
|
-
/.*Functional annotations:'(.*)'$/,
|
|
15
|
-
)?.[1].split('|') || []) as string[]
|
|
16
|
-
const ann = (feature.INFO.ANN || []) as string[]
|
|
17
|
-
|
|
18
|
-
const rows =
|
|
19
|
-
ann.map((elt, id) => ({
|
|
20
|
-
id,
|
|
21
|
-
...Object.fromEntries(elt.split('|').map((e, i) => [annFields[i], e])),
|
|
22
|
-
})) || []
|
|
23
|
-
const columns = annFields.map(c => ({
|
|
24
|
-
field: c,
|
|
25
|
-
}))
|
|
26
|
-
return ann.length ? (
|
|
27
|
-
<BaseCard title="ANN table">
|
|
28
|
-
<AnnotGrid rows={rows} columns={columns} />
|
|
29
|
-
</BaseCard>
|
|
30
|
-
) : null
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail'
|
|
4
|
-
import AnnotGrid from './AnnotGrid'
|
|
5
|
-
|
|
6
|
-
export default function VariantCsqPanel({
|
|
7
|
-
feature,
|
|
8
|
-
descriptions,
|
|
9
|
-
}: {
|
|
10
|
-
feature: any
|
|
11
|
-
descriptions: any
|
|
12
|
-
}) {
|
|
13
|
-
const csqFields = (descriptions?.INFO?.CSQ?.Description?.match(
|
|
14
|
-
/.*Format: (.*)/,
|
|
15
|
-
)?.[1].split('|') || []) as string[]
|
|
16
|
-
|
|
17
|
-
const csq = (feature.INFO.CSQ || []) as string[]
|
|
18
|
-
const rows =
|
|
19
|
-
csq.map((elt, id) => ({
|
|
20
|
-
id,
|
|
21
|
-
...Object.fromEntries(elt.split('|').map((e, i) => [csqFields[i], e])),
|
|
22
|
-
})) || []
|
|
23
|
-
const columns = csqFields.map(c => ({
|
|
24
|
-
field: c,
|
|
25
|
-
}))
|
|
26
|
-
return csq.length ? (
|
|
27
|
-
<BaseCard title="CSQ table">
|
|
28
|
-
<AnnotGrid rows={rows} columns={columns} />
|
|
29
|
-
</BaseCard>
|
|
30
|
-
) : null
|
|
31
|
-
}
|