@jbrowse/plugin-variants 2.4.2 → 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/configSchema.d.ts +13 -1
- package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +20 -4
- package/dist/LinearVariantDisplay/configSchema.d.ts +25 -1
- package/dist/LinearVariantDisplay/model.d.ts +75 -43
- package/dist/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -2
- package/dist/StructuralVariantChordRenderer/configSchema.d.ts +29 -1
- package/dist/VariantFeatureWidget/AnnotGrid.d.ts +5 -4
- package/dist/VariantFeatureWidget/AnnotGrid.js +34 -14
- package/dist/VariantFeatureWidget/AnnotGrid.js.map +1 -1
- package/dist/VariantFeatureWidget/BreakendOptionDialog.d.ts +3 -4
- package/dist/VariantFeatureWidget/BreakendOptionDialog.js +4 -5
- package/dist/VariantFeatureWidget/BreakendOptionDialog.js.map +1 -1
- package/dist/VariantFeatureWidget/BreakendPanel.d.ts +2 -2
- 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 -2
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +26 -14
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js.map +1 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -3
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +12 -11
- package/dist/VariantFeatureWidget/VariantSampleGrid.js.map +1 -1
- package/dist/VariantFeatureWidget/index.d.ts +4 -1
- package/dist/VariantTrack/configSchema.d.ts +73 -1
- package/dist/VcfAdapter/VcfAdapter.js +1 -1
- package/dist/VcfAdapter/VcfAdapter.js.map +1 -1
- package/dist/VcfAdapter/configSchema.d.ts +12 -1
- package/dist/VcfTabixAdapter/configSchema.d.ts +32 -1
- package/esm/ChordVariantDisplay/models/configSchema.d.ts +13 -1
- package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +20 -4
- package/esm/LinearVariantDisplay/configSchema.d.ts +25 -1
- package/esm/LinearVariantDisplay/model.d.ts +75 -43
- package/esm/StructuralVariantChordRenderer/Chord.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -2
- package/esm/StructuralVariantChordRenderer/configSchema.d.ts +29 -1
- package/esm/VariantFeatureWidget/AnnotGrid.d.ts +5 -4
- package/esm/VariantFeatureWidget/AnnotGrid.js +13 -13
- package/esm/VariantFeatureWidget/AnnotGrid.js.map +1 -1
- package/esm/VariantFeatureWidget/BreakendOptionDialog.d.ts +3 -4
- package/esm/VariantFeatureWidget/BreakendOptionDialog.js +4 -5
- package/esm/VariantFeatureWidget/BreakendOptionDialog.js.map +1 -1
- package/esm/VariantFeatureWidget/BreakendPanel.d.ts +2 -2
- 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 -2
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +26 -14
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js.map +1 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.d.ts +9 -3
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +13 -12
- package/esm/VariantFeatureWidget/VariantSampleGrid.js.map +1 -1
- package/esm/VariantFeatureWidget/index.d.ts +4 -1
- package/esm/VariantTrack/configSchema.d.ts +73 -1
- package/esm/VcfAdapter/VcfAdapter.js +2 -1
- package/esm/VcfAdapter/VcfAdapter.js.map +1 -1
- package/esm/VcfAdapter/configSchema.d.ts +12 -1
- package/esm/VcfTabixAdapter/configSchema.d.ts +32 -1
- package/package.json +3 -3
- package/src/VariantFeatureWidget/AnnotGrid.tsx +41 -18
- package/src/VariantFeatureWidget/BreakendOptionDialog.tsx +4 -5
- package/src/VariantFeatureWidget/VariantAnnotationTable.tsx +27 -0
- package/src/VariantFeatureWidget/VariantFeatureWidget.tsx +61 -16
- package/src/VariantFeatureWidget/VariantSampleGrid.tsx +52 -48
- package/src/VariantFeatureWidget/__snapshots__/VariantFeatureWidget.test.tsx.snap +1 -2
- package/dist/VariantFeatureWidget/VariantAnnPanel.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantAnnPanel.js +0 -25
- package/dist/VariantFeatureWidget/VariantAnnPanel.js.map +0 -1
- package/dist/VariantFeatureWidget/VariantCsqPanel.d.ts +0 -5
- package/dist/VariantFeatureWidget/VariantCsqPanel.js +0 -25
- package/dist/VariantFeatureWidget/VariantCsqPanel.js.map +0 -1
- package/esm/VariantFeatureWidget/VariantAnnPanel.d.ts +0 -5
- package/esm/VariantFeatureWidget/VariantAnnPanel.js +0 -19
- package/esm/VariantFeatureWidget/VariantAnnPanel.js.map +0 -1
- package/esm/VariantFeatureWidget/VariantCsqPanel.d.ts +0 -5
- 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,5 +1,5 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
export declare const configSchema: import("@jbrowse/core/configuration").
|
|
2
|
+
export declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
3
3
|
export declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
4
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
5
5
|
type: import("mobx-state-tree").ISimpleType<"BaseFeatureWidget">;
|
|
@@ -14,10 +14,13 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
14
14
|
type: import("mobx-state-tree").ISimpleType<"VariantFeatureWidget">;
|
|
15
15
|
descriptions: import("mobx-state-tree").IType<any, any, any>;
|
|
16
16
|
}, {
|
|
17
|
+
error: unknown;
|
|
18
|
+
} & {
|
|
17
19
|
setFeatureData(featureData: Record<string, unknown>): void;
|
|
18
20
|
clearFeatureData(): void;
|
|
19
21
|
setFormattedData(feat: Record<string, unknown>): void;
|
|
20
22
|
setExtra(type?: string | undefined, trackId?: string | undefined): void;
|
|
23
|
+
setError(e: unknown): void;
|
|
21
24
|
} & {
|
|
22
25
|
afterCreate(): void;
|
|
23
26
|
}, {
|
|
@@ -1,3 +1,75 @@
|
|
|
1
1
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/core/configuration").
|
|
2
|
+
declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
+
name: {
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
defaultValue: string;
|
|
7
|
+
};
|
|
8
|
+
assemblyNames: {
|
|
9
|
+
description: string;
|
|
10
|
+
type: string;
|
|
11
|
+
defaultValue: string[];
|
|
12
|
+
};
|
|
13
|
+
description: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
defaultValue: string;
|
|
17
|
+
};
|
|
18
|
+
category: {
|
|
19
|
+
description: string;
|
|
20
|
+
type: string;
|
|
21
|
+
defaultValue: never[];
|
|
22
|
+
};
|
|
23
|
+
metadata: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
defaultValue: {};
|
|
27
|
+
};
|
|
28
|
+
adapter: import("mobx-state-tree").IAnyModelType;
|
|
29
|
+
textSearching: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
30
|
+
indexingAttributes: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
defaultValue: string[];
|
|
34
|
+
};
|
|
35
|
+
indexingFeatureTypesToExclude: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
defaultValue: string[];
|
|
39
|
+
};
|
|
40
|
+
textSearchAdapter: import("mobx-state-tree").IAnyModelType;
|
|
41
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
42
|
+
displays: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
43
|
+
formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
44
|
+
feature: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
defaultValue: {};
|
|
48
|
+
contextVariable: string[];
|
|
49
|
+
};
|
|
50
|
+
subfeatures: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
defaultValue: {};
|
|
54
|
+
contextVariable: string[];
|
|
55
|
+
};
|
|
56
|
+
depth: {
|
|
57
|
+
type: string;
|
|
58
|
+
defaultValue: number;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
62
|
+
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
63
|
+
config: {
|
|
64
|
+
type: string;
|
|
65
|
+
description: string;
|
|
66
|
+
defaultValue: {};
|
|
67
|
+
contextVariable: string[];
|
|
68
|
+
};
|
|
69
|
+
hideUris: {
|
|
70
|
+
type: string;
|
|
71
|
+
defaultValue: boolean;
|
|
72
|
+
};
|
|
73
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
74
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
|
|
3
75
|
export default configSchema;
|
|
@@ -25,7 +25,7 @@ const readVcf = (f) => {
|
|
|
25
25
|
function isGzip(buf) {
|
|
26
26
|
return buf[0] === 31 && buf[1] === 139 && buf[2] === 8;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
class VcfAdapter extends BaseFeatureDataAdapter {
|
|
29
29
|
async getHeader() {
|
|
30
30
|
const { header } = await this.setup();
|
|
31
31
|
return header;
|
|
@@ -98,4 +98,5 @@ export default class VcfAdapter extends BaseFeatureDataAdapter {
|
|
|
98
98
|
freeResources() { }
|
|
99
99
|
}
|
|
100
100
|
VcfAdapter.capabilities = ['getFeatures', 'getRefNames'];
|
|
101
|
+
export default VcfAdapter;
|
|
101
102
|
//# sourceMappingURL=VcfAdapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VcfAdapter.js","sourceRoot":"","sources":["../../src/VcfAdapter/VcfAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,GAEvB,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,YAAY,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,GAAG,MAAM,WAAW,CAAA;AAE3B,QAAQ;AACR,OAAO,UAAU,MAAM,eAAe,CAAA;AAEtC,MAAM,OAAO,GAAG,CAAC,CAAS,EAAE,EAAE;IAC5B,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,IAAI,G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,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CACtD,QAAQ,CAAC,IAAI,CACX,IAAI,UAAU,CAAC;oBACb,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;oBACjC,MAAM;oBACN,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE;iBACzB,CAAC,CACH,CACF,CAAA;gBACD,QAAQ,CAAC,QAAQ,EAAE,CAAA;aACpB;YAAC,OAAO,CAAC,EAAE;gBACV,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;aAClB;QACH,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACjB,CAAC;IAEM,aAAa,KAAU,CAAC;;AAxFjB,uBAAY,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,CAAA;eADxC,UAAU"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
declare const VcfAdapter: import("@jbrowse/core/configuration").
|
|
1
|
+
declare const VcfAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
/**
|
|
3
|
+
* #slot
|
|
4
|
+
*/
|
|
5
|
+
vcfLocation: {
|
|
6
|
+
type: string;
|
|
7
|
+
defaultValue: {
|
|
8
|
+
uri: string;
|
|
9
|
+
locationType: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
2
13
|
export default VcfAdapter;
|
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
declare const VcfTabixAdapter: import("@jbrowse/core/configuration").
|
|
1
|
+
declare const VcfTabixAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
+
/**
|
|
3
|
+
* #slot
|
|
4
|
+
*/
|
|
5
|
+
vcfGzLocation: {
|
|
6
|
+
type: string;
|
|
7
|
+
defaultValue: {
|
|
8
|
+
uri: string;
|
|
9
|
+
locationType: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
index: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
13
|
+
/**
|
|
14
|
+
* #slot index.indexType
|
|
15
|
+
*/
|
|
16
|
+
indexType: {
|
|
17
|
+
model: import("mobx-state-tree").ISimpleType<string>;
|
|
18
|
+
type: string;
|
|
19
|
+
defaultValue: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* #slot index.location
|
|
23
|
+
*/
|
|
24
|
+
location: {
|
|
25
|
+
type: string;
|
|
26
|
+
defaultValue: {
|
|
27
|
+
uri: string;
|
|
28
|
+
locationType: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
32
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
2
33
|
export default VcfTabixAdapter;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-variants",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "JBrowse 2 variant adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@gmod/tabix": "^1.5.6",
|
|
43
43
|
"@gmod/vcf": "^5.0.9",
|
|
44
44
|
"@mui/icons-material": "^5.0.2",
|
|
45
|
-
"@mui/x-data-grid": "^
|
|
45
|
+
"@mui/x-data-grid": "^6.0.1",
|
|
46
46
|
"generic-filehandle": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -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": "1cbe7ba097fb2d2763c776e5e429e4670cdd583c"
|
|
68
68
|
}
|
|
@@ -1,28 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
DataGrid,
|
|
4
|
+
GridColDef,
|
|
5
|
+
GridToolbar,
|
|
6
|
+
GridValidRowModel,
|
|
7
|
+
} from '@mui/x-data-grid'
|
|
8
|
+
import { Checkbox, FormControlLabel, Typography } from '@mui/material'
|
|
9
|
+
import ResizeBar, { useResizeBar } from '@jbrowse/core/ui/ResizeBar'
|
|
10
|
+
import { measureGridWidth } from '@jbrowse/core/util'
|
|
4
11
|
|
|
5
12
|
export default function VariantAnnotPanel({
|
|
6
13
|
rows,
|
|
7
14
|
columns,
|
|
8
15
|
}: {
|
|
9
|
-
rows:
|
|
10
|
-
columns:
|
|
16
|
+
rows: GridValidRowModel[]
|
|
17
|
+
columns: GridColDef[]
|
|
11
18
|
}) {
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
19
|
+
const { ref, scrollLeft } = useResizeBar()
|
|
20
|
+
const [checked, setChecked] = useState(false)
|
|
21
|
+
const [widths, setWidths] = useState(
|
|
22
|
+
columns.map(e => measureGridWidth(rows.map(r => r[e.field]))),
|
|
23
|
+
)
|
|
24
|
+
|
|
15
25
|
return rows.length ? (
|
|
16
|
-
<div
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
<div ref={ref}>
|
|
27
|
+
<FormControlLabel
|
|
28
|
+
control={
|
|
29
|
+
<Checkbox
|
|
30
|
+
checked={checked}
|
|
31
|
+
onChange={event => setChecked(event.target.checked)}
|
|
32
|
+
/>
|
|
33
|
+
}
|
|
34
|
+
label={<Typography variant="body2">Show options</Typography>}
|
|
35
|
+
/>
|
|
36
|
+
<div ref={ref}>
|
|
37
|
+
<ResizeBar
|
|
38
|
+
widths={widths}
|
|
39
|
+
setWidths={setWidths}
|
|
40
|
+
scrollLeft={scrollLeft}
|
|
41
|
+
/>
|
|
42
|
+
<DataGrid
|
|
43
|
+
rowHeight={25}
|
|
44
|
+
rows={rows}
|
|
45
|
+
columns={columns.map((c, i) => ({ ...c, width: widths[i] }))}
|
|
46
|
+
slots={{ toolbar: checked ? GridToolbar : null }}
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
26
49
|
</div>
|
|
27
50
|
) : null
|
|
28
51
|
}
|
|
@@ -20,7 +20,7 @@ const useStyles = makeStyles()({
|
|
|
20
20
|
},
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
function BreakendOptionDialog({
|
|
23
|
+
export default observer(function BreakendOptionDialog({
|
|
24
24
|
model,
|
|
25
25
|
handleClose,
|
|
26
26
|
feature,
|
|
@@ -43,7 +43,7 @@ function BreakendOptionDialog({
|
|
|
43
43
|
control={
|
|
44
44
|
<Checkbox
|
|
45
45
|
checked={copyTracks}
|
|
46
|
-
onChange={
|
|
46
|
+
onChange={event => setCopyTracks(event.target.checked)}
|
|
47
47
|
/>
|
|
48
48
|
}
|
|
49
49
|
label="Copy tracks into the new view"
|
|
@@ -54,7 +54,7 @@ function BreakendOptionDialog({
|
|
|
54
54
|
control={
|
|
55
55
|
<Checkbox
|
|
56
56
|
checked={mirrorTracks}
|
|
57
|
-
onChange={
|
|
57
|
+
onChange={event => setMirrorTracks(event.target.checked)}
|
|
58
58
|
/>
|
|
59
59
|
}
|
|
60
60
|
label="Mirror tracks vertically in vertically stacked view"
|
|
@@ -114,5 +114,4 @@ function BreakendOptionDialog({
|
|
|
114
114
|
</DialogActions>
|
|
115
115
|
</Dialog>
|
|
116
116
|
)
|
|
117
|
-
}
|
|
118
|
-
export default observer(BreakendOptionDialog)
|
|
117
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail'
|
|
3
|
+
import AnnotGrid from './AnnotGrid'
|
|
4
|
+
|
|
5
|
+
export default function VariantAnnotationTable({
|
|
6
|
+
data,
|
|
7
|
+
fields,
|
|
8
|
+
title,
|
|
9
|
+
}: {
|
|
10
|
+
data: string[]
|
|
11
|
+
fields: string[]
|
|
12
|
+
title: string
|
|
13
|
+
}) {
|
|
14
|
+
return data.length ? (
|
|
15
|
+
<BaseCard title={title}>
|
|
16
|
+
<AnnotGrid
|
|
17
|
+
rows={
|
|
18
|
+
data.map((elt, id) => ({
|
|
19
|
+
id,
|
|
20
|
+
...Object.fromEntries(elt.split('|').map((e, i) => [fields[i], e])),
|
|
21
|
+
})) || []
|
|
22
|
+
}
|
|
23
|
+
columns={fields.map(c => ({ field: c }))}
|
|
24
|
+
/>
|
|
25
|
+
</BaseCard>
|
|
26
|
+
) : null
|
|
27
|
+
}
|
|
@@ -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)
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Typography,
|
|
8
8
|
} from '@mui/material'
|
|
9
9
|
|
|
10
|
-
import { DataGrid } from '@mui/x-data-grid'
|
|
10
|
+
import { DataGrid, GridToolbar } from '@mui/x-data-grid'
|
|
11
11
|
import { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail'
|
|
12
12
|
import { measureGridWidth, SimpleFeatureSerialized } from '@jbrowse/core/util'
|
|
13
13
|
import ResizeBar, { useResizeBar } from '@jbrowse/core/ui/ResizeBar'
|
|
@@ -30,46 +30,31 @@ function SampleFilters({
|
|
|
30
30
|
filter: Filters
|
|
31
31
|
setFilter: (arg: Filters) => void
|
|
32
32
|
}) {
|
|
33
|
-
const [showFilters, setShowFilters] = useState(false)
|
|
34
33
|
return (
|
|
35
34
|
<>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</Typography>
|
|
53
|
-
{columns.map(({ field }) => (
|
|
54
|
-
<TextField
|
|
55
|
-
key={`filter-${field}`}
|
|
56
|
-
placeholder={`Filter ${field}`}
|
|
57
|
-
value={filter[field] || ''}
|
|
58
|
-
onChange={event =>
|
|
59
|
-
setFilter({ ...filter, [field]: event.target.value })
|
|
60
|
-
}
|
|
61
|
-
/>
|
|
62
|
-
))}
|
|
63
|
-
</>
|
|
64
|
-
) : null}
|
|
35
|
+
<Typography>
|
|
36
|
+
These filters can use a plain text search or regex style query, e.g. in
|
|
37
|
+
the genotype field, entering 1 will query for all genotypes that include
|
|
38
|
+
the first alternate allele e.g. 0|1 or 1|1, entering [1-9]\d* will find
|
|
39
|
+
any non-zero allele e.g. 0|2 or 2/33
|
|
40
|
+
</Typography>
|
|
41
|
+
{columns.map(({ field }) => (
|
|
42
|
+
<TextField
|
|
43
|
+
key={`filter-${field}`}
|
|
44
|
+
placeholder={`Filter ${field}`}
|
|
45
|
+
value={filter[field] || ''}
|
|
46
|
+
onChange={event =>
|
|
47
|
+
setFilter({ ...filter, [field]: event.target.value })
|
|
48
|
+
}
|
|
49
|
+
/>
|
|
50
|
+
))}
|
|
65
51
|
</>
|
|
66
52
|
)
|
|
67
53
|
}
|
|
68
54
|
|
|
69
55
|
export default function VariantSamples(props: {
|
|
70
56
|
feature: SimpleFeatureSerialized
|
|
71
|
-
|
|
72
|
-
descriptions: any
|
|
57
|
+
descriptions: { FORMAT?: { [key: string]: { Description?: string } } }
|
|
73
58
|
}) {
|
|
74
59
|
const { feature, descriptions = {} } = props
|
|
75
60
|
const { ref, scrollLeft } = useResizeBar()
|
|
@@ -98,9 +83,10 @@ export default function VariantSamples(props: {
|
|
|
98
83
|
.filter(row =>
|
|
99
84
|
filters.length
|
|
100
85
|
? filters.every(key => {
|
|
101
|
-
const val = row[key]
|
|
102
86
|
const currFilter = filter[key]
|
|
103
|
-
return currFilter
|
|
87
|
+
return currFilter
|
|
88
|
+
? row[key].match(new RegExp(currFilter, 'i'))
|
|
89
|
+
: true
|
|
104
90
|
})
|
|
105
91
|
: true,
|
|
106
92
|
)
|
|
@@ -109,7 +95,7 @@ export default function VariantSamples(props: {
|
|
|
109
95
|
}
|
|
110
96
|
|
|
111
97
|
const keys = ['sample', ...Object.keys(preFilteredRows[0]?.[1] || {})]
|
|
112
|
-
|
|
98
|
+
const [checked, setChecked] = useState(false)
|
|
113
99
|
const [widths, setWidths] = useState(
|
|
114
100
|
keys.map(e => measureGridWidth(rows.map(r => r[e]))),
|
|
115
101
|
)
|
|
@@ -119,28 +105,46 @@ export default function VariantSamples(props: {
|
|
|
119
105
|
width: widths[index],
|
|
120
106
|
}))
|
|
121
107
|
|
|
122
|
-
//
|
|
108
|
+
// disableRowSelectionOnClick helps avoid
|
|
123
109
|
// https://github.com/mui-org/material-ui-x/issues/1197
|
|
124
110
|
return !preFilteredRows.length ? null : (
|
|
125
111
|
<BaseCard {...props} title="Samples">
|
|
126
112
|
{error ? <Typography color="error">{`${error}`}</Typography> : null}
|
|
127
|
-
<
|
|
113
|
+
<FormControlLabel
|
|
114
|
+
control={
|
|
115
|
+
<Checkbox
|
|
116
|
+
checked={checked}
|
|
117
|
+
onChange={event => setChecked(event.target.checked)}
|
|
118
|
+
/>
|
|
119
|
+
}
|
|
120
|
+
label={<Typography variant="body2">Show options</Typography>}
|
|
121
|
+
/>
|
|
122
|
+
{checked ? (
|
|
123
|
+
<SampleFilters
|
|
124
|
+
setFilter={setFilter}
|
|
125
|
+
columns={columns}
|
|
126
|
+
filter={filter}
|
|
127
|
+
/>
|
|
128
|
+
) : null}
|
|
128
129
|
<div ref={ref}>
|
|
129
130
|
<ResizeBar
|
|
130
131
|
widths={widths}
|
|
131
132
|
setWidths={setWidths}
|
|
132
133
|
scrollLeft={scrollLeft}
|
|
133
134
|
/>
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
<DataGrid
|
|
136
|
+
rows={rows}
|
|
137
|
+
hideFooter={rows.length < 100}
|
|
138
|
+
columns={columns}
|
|
139
|
+
disableRowSelectionOnClick
|
|
140
|
+
rowHeight={25}
|
|
141
|
+
columnHeaderHeight={35}
|
|
142
|
+
disableColumnMenu
|
|
143
|
+
slots={{ toolbar: checked ? GridToolbar : null }}
|
|
144
|
+
slotProps={{
|
|
145
|
+
toolbar: { printOptions: { disableToolbarButton: true } },
|
|
146
|
+
}}
|
|
147
|
+
/>
|
|
144
148
|
</div>
|
|
145
149
|
</BaseCard>
|
|
146
150
|
)
|
|
@@ -188,7 +188,7 @@ exports[`renders with just the required model elements 1`] = `
|
|
|
188
188
|
</div>
|
|
189
189
|
</div>
|
|
190
190
|
<div
|
|
191
|
-
class="css-
|
|
191
|
+
class="css-1lttu3w-container"
|
|
192
192
|
>
|
|
193
193
|
<button
|
|
194
194
|
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-sghohy-MuiButtonBase-root-MuiButton-root"
|
|
@@ -224,7 +224,6 @@ exports[`renders with just the required model elements 1`] = `
|
|
|
224
224
|
/>
|
|
225
225
|
</button>
|
|
226
226
|
</div>
|
|
227
|
-
<br />
|
|
228
227
|
</div>
|
|
229
228
|
</div>
|
|
230
229
|
</div>
|
|
@@ -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,EAA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