@jbrowse/core 2.5.0 → 2.6.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/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +0 -1
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +8 -25
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +2 -1
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +2 -1
- package/BaseFeatureWidget/BaseFeatureDetail/{DataGrid.d.ts → DataGridDetails.d.ts} +2 -1
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +1 -1
- package/BaseFeatureWidget/BaseFeatureDetail/{BasicField.d.ts → SimpleField.d.ts} +2 -2
- package/BaseFeatureWidget/BaseFeatureDetail/{BasicField.js → SimpleField.js} +3 -3
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +2 -1
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.d.ts +2 -1
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +9 -38
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +14 -225
- package/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +1 -0
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +24 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +10 -13
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureSettingsDialog.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceHelpDialog.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceHelpDialog.js +1 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/index.d.ts +2 -1
- package/BaseFeatureWidget/SequenceFeatureDetails/test_data/DLGAP3.d.ts +17 -17
- package/BaseFeatureWidget/SequenceFeatureDetails/test_data/NCDN.d.ts +16 -16
- package/BaseFeatureWidget/util.js +15 -5
- package/PluginManager.d.ts +3 -3
- package/README.md +0 -2
- package/ReExports/modules.d.ts +3 -3
- package/ReExports/modules.js +0 -3
- package/assemblyManager/assemblyConfigSchema.d.ts +2 -0
- package/assemblyManager/assemblyConfigSchema.js +1 -0
- package/assemblyManager/assemblyManager.d.ts +112 -0
- package/assemblyManager/assemblyManager.js +12 -1
- package/assemblyManager/index.d.ts +1 -0
- package/configuration/index.d.ts +1 -1
- package/configuration/types.d.ts +3 -1
- package/data_adapters/BaseAdapter/BaseAdapter.js +1 -1
- package/data_adapters/BaseAdapter/index.d.ts +1 -1
- package/package.json +2 -2
- package/pluggableElementTypes/RpcMethodType.d.ts +9 -7
- package/pluggableElementTypes/RpcMethodType.js +9 -7
- package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +18 -0
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +9 -0
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +10 -1
- package/pluggableElementTypes/models/BaseDisplayModel.js +9 -1
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +1 -0
- package/pluggableElementTypes/models/BaseTrackModel.js +1 -0
- package/pluggableElementTypes/models/BaseViewModel.d.ts +46 -2
- package/pluggableElementTypes/models/BaseViewModel.js +6 -0
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +6 -2
- package/pluggableElementTypes/models/InternetAccountModel.js +27 -20
- package/pluggableElementTypes/models/baseConnectionConfig.d.ts +5 -2
- package/pluggableElementTypes/models/baseConnectionConfig.js +2 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -1
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +2 -2
- package/pluggableElementTypes/models/baseTrackConfig.js +7 -5
- package/pluggableElementTypes/models/index.d.ts +1 -1
- package/pluggableElementTypes/renderers/BoxRendererType.js +1 -2
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +2 -1
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +3 -1
- package/pluggableElementTypes/renderers/FeatureRendererType.js +4 -6
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -1
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
- package/rpc/BaseRpcDriver.js +1 -7
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AppLogo.d.ts +2 -1
- package/ui/AssemblySelector.d.ts +2 -1
- package/ui/AssemblySelector.js +1 -1
- package/ui/CascadingMenu.d.ts +2 -1
- package/ui/CascadingMenuButton.d.ts +8 -0
- package/ui/CascadingMenuButton.js +20 -0
- package/ui/ColorPicker.d.ts +4 -3
- package/ui/Dialog.d.ts +5 -4
- package/ui/Dialog.js +5 -6
- package/ui/DropDownMenu.d.ts +2 -1
- package/ui/EditableTypography.js +1 -1
- package/ui/ErrorMessage.d.ts +2 -1
- package/ui/ErrorMessage.js +6 -2
- package/ui/FactoryResetDialog.d.ts +2 -1
- package/ui/FatalErrorDialog.d.ts +6 -6
- package/ui/FatalErrorDialog.js +7 -7
- package/ui/FileSelector/FileSelector.d.ts +2 -1
- package/ui/FileSelector/FileSelector.js +3 -2
- package/ui/FileSelector/LocalFileChooser.d.ts +2 -1
- package/ui/FileSelector/UrlChooser.d.ts +3 -3
- package/ui/FileSelector/UrlChooser.js +8 -10
- package/ui/Icons.d.ts +10 -9
- package/ui/LoadingEllipses.d.ts +2 -1
- package/ui/Logo.d.ts +3 -2
- package/ui/Menu.d.ts +2 -2
- package/ui/PrerenderedCanvas.d.ts +2 -1
- package/ui/ResizeBar.d.ts +1 -1
- package/ui/ResizeHandle.d.ts +2 -1
- package/ui/ReturnToImportFormDialog.d.ts +2 -1
- package/ui/SanitizedHTML.d.ts +2 -1
- package/ui/Snackbar.d.ts +7 -8
- package/ui/Snackbar.js +12 -17
- package/ui/SnackbarModel.d.ts +9 -3
- package/ui/SnackbarModel.js +3 -3
- package/ui/Tooltip.d.ts +2 -1
- package/ui/index.d.ts +0 -1
- package/ui/index.js +1 -3
- package/util/Base1DUtils.js +2 -1
- package/util/QuickLRU.d.ts +1 -1
- package/util/blockTypes.js +1 -1
- package/util/formatFastaStrings.js +1 -1
- package/util/index.d.ts +14 -0
- package/util/index.js +65 -8
- package/util/io/index.js +1 -1
- package/util/mst-reflection.js +1 -2
- package/util/offscreenCanvasUtils.d.ts +2 -2
- package/util/types/index.d.ts +6 -2
- package/util/types/index.js +6 -2
- package/util/types/util.d.ts +0 -3
- package/ui/AboutDialog.d.ts +0 -11
- package/ui/AboutDialog.js +0 -125
- package/ui/App.d.ts +0 -18
- package/ui/App.js +0 -114
- package/ui/AppToolbar.d.ts +0 -19
- package/ui/AppToolbar.js +0 -56
- package/ui/Drawer.d.ts +0 -8
- package/ui/Drawer.js +0 -34
- package/ui/DrawerWidget.d.ts +0 -5
- package/ui/DrawerWidget.js +0 -132
- package/ui/ViewContainer.d.ts +0 -9
- package/ui/ViewContainer.js +0 -76
- package/ui/ViewContainerTitle.d.ts +0 -5
- package/ui/ViewContainerTitle.js +0 -42
- package/ui/ViewLauncher.d.ts +0 -17
- package/ui/ViewLauncher.js +0 -50
- package/ui/ViewMenu.d.ts +0 -8
- package/ui/ViewMenu.js +0 -69
- package/ui/ViewPanel.d.ts +0 -18
- package/ui/ViewPanel.js +0 -49
- /package/BaseFeatureWidget/BaseFeatureDetail/{DataGrid.js → DataGridDetails.js} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { Feat } from '../util';
|
|
2
3
|
export default function ProteinSequence({ cds, sequence, codonTable, }: {
|
|
3
4
|
cds: Feat[];
|
|
@@ -5,4 +6,4 @@ export default function ProteinSequence({ cds, sequence, codonTable, }: {
|
|
|
5
6
|
codonTable: {
|
|
6
7
|
[key: string]: string;
|
|
7
8
|
};
|
|
8
|
-
}): JSX.Element;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { BaseProps } from './../types';
|
|
2
|
-
export default function SequenceFeatureDetails({ model, feature: prefeature, }: BaseProps): JSX.Element;
|
|
3
|
+
export default function SequenceFeatureDetails({ model, feature: prefeature, }: BaseProps): React.JSX.Element;
|
|
@@ -56,40 +56,37 @@ function SequenceFeatureDetails({ model, feature: prefeature, }) {
|
|
|
56
56
|
var _a, _b;
|
|
57
57
|
const { classes } = useStyles();
|
|
58
58
|
const feature = prefeature;
|
|
59
|
-
const hasCDS = (_a = feature.subfeatures) === null || _a === void 0 ? void 0 : _a.some(sub => sub.type === 'CDS');
|
|
60
|
-
const hasExon = (_b = feature.subfeatures) === null || _b === void 0 ? void 0 : _b.some(sub => sub.type === 'exon');
|
|
61
59
|
const seqPanelRef = (0, react_1.useRef)(null);
|
|
62
60
|
const [intronBp, setIntronBp] = (0, util_1.useLocalStorage)('intronBp', 10);
|
|
63
61
|
const [upDownBp, setUpDownBp] = (0, util_1.useLocalStorage)('upDownBp', 500);
|
|
64
62
|
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
65
63
|
const [copiedHtml, setCopiedHtml] = (0, react_1.useState)(false);
|
|
66
64
|
const [force, setForce] = (0, react_1.useState)(false);
|
|
65
|
+
const hasCDS = (_a = feature.subfeatures) === null || _a === void 0 ? void 0 : _a.some(sub => sub.type === 'CDS');
|
|
66
|
+
const hasExon = (_b = feature.subfeatures) === null || _b === void 0 ? void 0 : _b.some(sub => sub.type === 'exon');
|
|
67
|
+
const hasExonOrCDS = hasExon || hasCDS;
|
|
67
68
|
const { sequence, error } = (0, hooks_1.useFeatureSequence)(model, prefeature, upDownBp, force);
|
|
68
69
|
const [mode, setMode] = (0, react_1.useState)(hasCDS ? 'cds' : hasExon ? 'cdna' : 'genomic');
|
|
69
70
|
const rest = {
|
|
70
71
|
...(hasCDS ? { cds: 'CDS' } : {}),
|
|
71
72
|
...(hasCDS ? { protein: 'Protein' } : {}),
|
|
72
|
-
...(
|
|
73
|
-
...(
|
|
74
|
-
|
|
75
|
-
gene: `Genomic w/ full introns`,
|
|
76
|
-
}
|
|
77
|
-
: {}),
|
|
78
|
-
...(hasExon
|
|
73
|
+
...(hasExonOrCDS ? { cdna: 'cDNA' } : {}),
|
|
74
|
+
...(hasExonOrCDS ? { gene: `Genomic w/ full introns` } : {}),
|
|
75
|
+
...(hasExonOrCDS
|
|
79
76
|
? {
|
|
80
77
|
gene_updownstream: `Genomic w/ full introns +/- ${upDownBp}bp up+down stream`,
|
|
81
78
|
}
|
|
82
79
|
: {}),
|
|
83
|
-
...(
|
|
80
|
+
...(hasExonOrCDS
|
|
84
81
|
? { gene_collapsed_intron: `Genomic w/ ${intronBp}bp intron` }
|
|
85
82
|
: {}),
|
|
86
|
-
...(
|
|
83
|
+
...(hasExonOrCDS
|
|
87
84
|
? {
|
|
88
85
|
gene_updownstream_collapsed_intron: `Genomic w/ ${intronBp}bp intron +/- ${upDownBp}bp up+down stream `,
|
|
89
86
|
}
|
|
90
87
|
: {}),
|
|
91
|
-
...(!
|
|
92
|
-
...(!
|
|
88
|
+
...(!hasExonOrCDS ? { genomic: 'Genomic' } : {}),
|
|
89
|
+
...(!hasExonOrCDS
|
|
93
90
|
? {
|
|
94
91
|
genomic_sequence_updownstream: `Genomic +/- ${upDownBp}bp up+down stream`,
|
|
95
92
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export default function SequenceFeatureSettingsDialog({ handleClose, intronBp: intronBpArg, upDownBp: upDownBpArg, }: {
|
|
2
3
|
handleClose: (arg?: {
|
|
3
4
|
intronBp: number;
|
|
@@ -5,4 +6,4 @@ export default function SequenceFeatureSettingsDialog({ handleClose, intronBp: i
|
|
|
5
6
|
}) => void;
|
|
6
7
|
intronBp: number;
|
|
7
8
|
upDownBp: number;
|
|
8
|
-
}): JSX.Element;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -16,7 +16,7 @@ function HelpDialog({ handleClose, }) {
|
|
|
16
16
|
react_1.default.createElement("ul", null,
|
|
17
17
|
react_1.default.createElement("li", null, "CDS - shows the stitched together CDS sequences"),
|
|
18
18
|
react_1.default.createElement("li", null, "Protein - the translated coding sequence, with the \"standard\" genetic code"),
|
|
19
|
-
react_1.default.createElement("li", null, "cDNA - shows the 'DNA'
|
|
19
|
+
react_1.default.createElement("li", null, "cDNA - shows the 'copy DNA' of transcript, formed from exon sequences"),
|
|
20
20
|
react_1.default.createElement("li", null, "Genomic w/ introns +/- Nbp up+down stream - the sequence underlying the entire gene including including introns, with UTR and CDS highlighted")),
|
|
21
21
|
react_1.default.createElement(material_1.Typography, { paragraph: true }, "For other feature types, the options are:"),
|
|
22
22
|
react_1.default.createElement("ul", null,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SeqState, ErrorState } from '../util';
|
|
2
2
|
import { SimpleFeatureSerialized } from '../../util';
|
|
3
3
|
export declare function useFeatureSequence(model: {
|
|
4
|
-
view
|
|
5
|
-
assemblyNames
|
|
4
|
+
view?: {
|
|
5
|
+
assemblyNames?: string[];
|
|
6
6
|
};
|
|
7
7
|
} | undefined, feature: SimpleFeatureSerialized, upDownBp: number, forceLoad: boolean): {
|
|
8
8
|
sequence: SeqState | ErrorState | undefined;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
let source: string;
|
|
3
|
+
let type: string;
|
|
4
|
+
let start: number;
|
|
5
|
+
let end: number;
|
|
6
|
+
let strand: number;
|
|
7
|
+
let phase: number;
|
|
8
|
+
let refName: string;
|
|
9
|
+
let id: string;
|
|
10
|
+
let dbxref: string[];
|
|
11
|
+
let name: string;
|
|
12
|
+
let description: string;
|
|
13
|
+
let gbkey: string;
|
|
14
|
+
let gene: string;
|
|
15
|
+
let gene_biotype: string;
|
|
16
|
+
let gene_synonym: string[];
|
|
17
|
+
let subfeatures: {
|
|
18
18
|
source: string;
|
|
19
19
|
type: string;
|
|
20
20
|
start: number;
|
|
@@ -75,6 +75,6 @@ declare namespace _default {
|
|
|
75
75
|
uniqueId: string;
|
|
76
76
|
parentId: string;
|
|
77
77
|
}[];
|
|
78
|
-
|
|
78
|
+
let uniqueId: string;
|
|
79
79
|
}
|
|
80
80
|
export default _default;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
let source: string;
|
|
3
|
+
let type: string;
|
|
4
|
+
let start: number;
|
|
5
|
+
let end: number;
|
|
6
|
+
let strand: number;
|
|
7
|
+
let phase: number;
|
|
8
|
+
let refName: string;
|
|
9
|
+
let id: string;
|
|
10
|
+
let dbxref: string[];
|
|
11
|
+
let name: string;
|
|
12
|
+
let description: string;
|
|
13
|
+
let gbkey: string;
|
|
14
|
+
let gene: string;
|
|
15
|
+
let gene_biotype: string;
|
|
16
|
+
let subfeatures: ({
|
|
17
17
|
source: string;
|
|
18
18
|
type: string;
|
|
19
19
|
start: number;
|
|
@@ -136,6 +136,6 @@ declare namespace _default {
|
|
|
136
136
|
parentId: string;
|
|
137
137
|
tag?: undefined;
|
|
138
138
|
})[];
|
|
139
|
-
|
|
139
|
+
let uniqueId: string;
|
|
140
140
|
}
|
|
141
141
|
export default _default;
|
|
@@ -24,10 +24,15 @@ function revlist(list, seqlen) {
|
|
|
24
24
|
.sort((a, b) => a.start - b.start);
|
|
25
25
|
}
|
|
26
26
|
exports.revlist = revlist;
|
|
27
|
-
// calculates UTRs using impliedUTRs logic
|
|
28
27
|
function calculateUTRs(cds, exons) {
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
// checking length ensures the .at below are valid
|
|
29
|
+
if (!cds.length) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
33
|
+
const firstCds = cds.at(0);
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
35
|
+
const lastCds = cds.at(-1);
|
|
31
36
|
const firstCdsIdx = exons.findIndex(exon => exon.end >= firstCds.start && exon.start <= firstCds.start);
|
|
32
37
|
const lastCdsIdx = exons.findIndex(exon => exon.end >= lastCds.end && exon.start <= lastCds.end);
|
|
33
38
|
const lastCdsExon = exons[lastCdsIdx];
|
|
@@ -45,8 +50,13 @@ function calculateUTRs(cds, exons) {
|
|
|
45
50
|
exports.calculateUTRs = calculateUTRs;
|
|
46
51
|
// calculates UTRs using impliedUTRs logic, but there are no exon subfeatures
|
|
47
52
|
function calculateUTRs2(cds, parentFeat) {
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
if (!cds.length) {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
57
|
+
const firstCds = cds.at(0);
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
59
|
+
const lastCds = cds.at(-1);
|
|
50
60
|
const fiveUTRs = [{ start: parentFeat.start, end: firstCds.start }].map(elt => ({ ...elt, type: 'five_prime_UTR' }));
|
|
51
61
|
const threeUTRs = [{ start: lastCds.end, end: parentFeat.end }].map(elt => ({
|
|
52
62
|
...elt,
|
package/PluginManager.d.ts
CHANGED
|
@@ -207,9 +207,9 @@ export default class PluginManager {
|
|
|
207
207
|
'@jbrowse/core/util/mst-reflection': typeof import("./util/mst-reflection");
|
|
208
208
|
'@jbrowse/core/util/rxjs': typeof import("./util/rxjs");
|
|
209
209
|
'@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail': {
|
|
210
|
-
Attributes: (props: any) => JSX.Element;
|
|
211
|
-
FeatureDetails: (props: any) => JSX.Element;
|
|
212
|
-
BaseCard: (props: any) => JSX.Element;
|
|
210
|
+
Attributes: (props: any) => import("react").JSX.Element;
|
|
211
|
+
FeatureDetails: (props: any) => import("react").JSX.Element;
|
|
212
|
+
BaseCard: (props: any) => import("react").JSX.Element;
|
|
213
213
|
};
|
|
214
214
|
'@jbrowse/core/data_adapters/BaseAdapter': typeof import("./data_adapters/BaseAdapter");
|
|
215
215
|
mobx: typeof import("mobx");
|
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# jbrowse-core
|
|
2
2
|
|
|
3
3
|
[](https://npmjs.org/package/@jbrowse/core)
|
|
4
|
-
[](https://travis-ci.org/GMOD/jbrowse-components)
|
|
5
|
-
[](https://codecov.io/gh/GMOD/jbrowse-components/branch/main)
|
|
6
4
|
|
|
7
5
|
Core JBrowse libraries used by most JBrowse plugins.
|
|
8
6
|
|
package/ReExports/modules.d.ts
CHANGED
|
@@ -124,9 +124,9 @@ declare const libs: {
|
|
|
124
124
|
'@jbrowse/core/util/mst-reflection': typeof coreMstReflection;
|
|
125
125
|
'@jbrowse/core/util/rxjs': typeof rxjs;
|
|
126
126
|
'@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail': {
|
|
127
|
-
Attributes: (props: any) => JSX.Element;
|
|
128
|
-
FeatureDetails: (props: any) => JSX.Element;
|
|
129
|
-
BaseCard: (props: any) => JSX.Element;
|
|
127
|
+
Attributes: (props: any) => React.JSX.Element;
|
|
128
|
+
FeatureDetails: (props: any) => React.JSX.Element;
|
|
129
|
+
BaseCard: (props: any) => React.JSX.Element;
|
|
130
130
|
};
|
|
131
131
|
'@jbrowse/core/data_adapters/BaseAdapter': typeof BaseAdapterExports;
|
|
132
132
|
mobx: typeof mobx;
|
package/ReExports/modules.js
CHANGED
|
@@ -306,9 +306,6 @@ const DataGridEntries = {
|
|
|
306
306
|
GridSaveAltIcon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
307
307
|
default: module.GridSaveAltIcon,
|
|
308
308
|
}))),
|
|
309
|
-
GridScrollArea: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
310
|
-
default: module.GridScrollArea,
|
|
311
|
-
}))),
|
|
312
309
|
GridSearchIcon: (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('@mui/x-data-grid'))).then(module => ({
|
|
313
310
|
default: module.GridSearchIcon,
|
|
314
311
|
}))),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PluginManager from '../PluginManager';
|
|
2
2
|
/**
|
|
3
3
|
* #config BaseAssembly
|
|
4
|
+
* #category assemblyManagement
|
|
4
5
|
* This corresponds to the assemblies section of the config
|
|
5
6
|
*/
|
|
6
7
|
declare function assemblyConfigSchema(pluginManager: PluginManager): import("../configuration/configurationSchema").ConfigurationSchemaType<{
|
|
@@ -54,3 +55,4 @@ declare function assemblyConfigSchema(pluginManager: PluginManager): import("../
|
|
|
54
55
|
};
|
|
55
56
|
}, import("../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name">>;
|
|
56
57
|
export default assemblyConfigSchema;
|
|
58
|
+
export type BaseAssemblyConfigSchema = ReturnType<typeof assemblyConfigSchema>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const configuration_1 = require("../configuration");
|
|
4
4
|
/**
|
|
5
5
|
* #config BaseAssembly
|
|
6
|
+
* #category assemblyManagement
|
|
6
7
|
* This corresponds to the assemblies section of the config
|
|
7
8
|
*/
|
|
8
9
|
function assemblyConfigSchema(pluginManager) {
|
|
@@ -68,6 +68,118 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
68
68
|
}>;
|
|
69
69
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
70
70
|
}, {
|
|
71
|
+
readonly assemblyNameMap: {
|
|
72
|
+
[key: string]: ({
|
|
73
|
+
configuration: any;
|
|
74
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
75
|
+
error: unknown;
|
|
76
|
+
loaded: boolean;
|
|
77
|
+
loadingP: Promise<void> | undefined;
|
|
78
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
79
|
+
refNameAliases: {
|
|
80
|
+
[x: string]: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
lowerCaseRefNameAliases: {
|
|
83
|
+
[x: string]: string | undefined;
|
|
84
|
+
} | undefined;
|
|
85
|
+
cytobands: import("../util").Feature[] | undefined;
|
|
86
|
+
} & {
|
|
87
|
+
readonly initialized: boolean;
|
|
88
|
+
readonly name: string;
|
|
89
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
90
|
+
readonly aliases: string[];
|
|
91
|
+
readonly displayName: string | undefined;
|
|
92
|
+
hasName(name: string): boolean;
|
|
93
|
+
readonly allAliases: string[];
|
|
94
|
+
readonly allRefNames: string[] | undefined;
|
|
95
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
96
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
97
|
+
readonly rpcManager: RpcManager;
|
|
98
|
+
readonly refNameColors: string[];
|
|
99
|
+
} & {
|
|
100
|
+
readonly refNames: string[] | undefined;
|
|
101
|
+
} & {
|
|
102
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
103
|
+
getRefNameColor(refName: string): string | undefined;
|
|
104
|
+
isValidRefName(refName: string): boolean;
|
|
105
|
+
} & {
|
|
106
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
107
|
+
setError(e: unknown): void;
|
|
108
|
+
setRegions(regions: import("../util").Region[]): void;
|
|
109
|
+
setRefNameAliases(aliases: {
|
|
110
|
+
[x: string]: string | undefined;
|
|
111
|
+
}, lcAliases: {
|
|
112
|
+
[x: string]: string | undefined;
|
|
113
|
+
}): void;
|
|
114
|
+
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
115
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
116
|
+
load(): Promise<void>;
|
|
117
|
+
loadPre(): Promise<void>;
|
|
118
|
+
} & {
|
|
119
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
120
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
121
|
+
[x: string]: string | undefined;
|
|
122
|
+
}>;
|
|
123
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
124
|
+
[x: string]: string | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
127
|
+
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
128
|
+
}, {
|
|
129
|
+
error: unknown;
|
|
130
|
+
loaded: boolean;
|
|
131
|
+
loadingP: Promise<void> | undefined;
|
|
132
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
133
|
+
refNameAliases: {
|
|
134
|
+
[x: string]: string | undefined;
|
|
135
|
+
} | undefined;
|
|
136
|
+
lowerCaseRefNameAliases: {
|
|
137
|
+
[x: string]: string | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
cytobands: import("../util").Feature[] | undefined;
|
|
140
|
+
} & {
|
|
141
|
+
readonly initialized: boolean;
|
|
142
|
+
readonly name: string;
|
|
143
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
144
|
+
readonly aliases: string[];
|
|
145
|
+
readonly displayName: string | undefined;
|
|
146
|
+
hasName(name: string): boolean;
|
|
147
|
+
readonly allAliases: string[];
|
|
148
|
+
readonly allRefNames: string[] | undefined;
|
|
149
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
150
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
151
|
+
readonly rpcManager: RpcManager;
|
|
152
|
+
readonly refNameColors: string[];
|
|
153
|
+
} & {
|
|
154
|
+
readonly refNames: string[] | undefined;
|
|
155
|
+
} & {
|
|
156
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
157
|
+
getRefNameColor(refName: string): string | undefined;
|
|
158
|
+
isValidRefName(refName: string): boolean;
|
|
159
|
+
} & {
|
|
160
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
161
|
+
setError(e: unknown): void;
|
|
162
|
+
setRegions(regions: import("../util").Region[]): void;
|
|
163
|
+
setRefNameAliases(aliases: {
|
|
164
|
+
[x: string]: string | undefined;
|
|
165
|
+
}, lcAliases: {
|
|
166
|
+
[x: string]: string | undefined;
|
|
167
|
+
}): void;
|
|
168
|
+
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
169
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
170
|
+
load(): Promise<void>;
|
|
171
|
+
loadPre(): Promise<void>;
|
|
172
|
+
} & {
|
|
173
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
174
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
175
|
+
[x: string]: string | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
178
|
+
[x: string]: string | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
181
|
+
};
|
|
182
|
+
} & {
|
|
71
183
|
/**
|
|
72
184
|
* #method
|
|
73
185
|
*/
|
|
@@ -22,12 +22,23 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
22
22
|
*/
|
|
23
23
|
assemblies: mobx_state_tree_1.types.array((0, assembly_1.default)(conf, pm)),
|
|
24
24
|
})
|
|
25
|
+
.views(self => ({
|
|
26
|
+
get assemblyNameMap() {
|
|
27
|
+
const obj = {};
|
|
28
|
+
for (const assembly of self.assemblies) {
|
|
29
|
+
for (const name of assembly.allAliases) {
|
|
30
|
+
obj[name] = assembly;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return obj;
|
|
34
|
+
},
|
|
35
|
+
}))
|
|
25
36
|
.views(self => ({
|
|
26
37
|
/**
|
|
27
38
|
* #method
|
|
28
39
|
*/
|
|
29
40
|
get(asmName) {
|
|
30
|
-
return self.
|
|
41
|
+
return self.assemblyNameMap[asmName];
|
|
31
42
|
},
|
|
32
43
|
/**
|
|
33
44
|
* #getter
|
package/configuration/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ConfigurationSchema, ConfigurationReference, } from './configurationSchema';
|
|
2
|
-
export type { AnyConfigurationSchemaType, AnyConfigurationModel, AnyConfigurationSlot, AnyConfigurationSlotType, } from './types';
|
|
2
|
+
export type { AnyConfigurationSchemaType, AnyConfigurationModel, AnyConfigurationSlot, AnyConfigurationSlotType, AnyConfiguration, } from './types';
|
|
3
3
|
export * from './util';
|
package/configuration/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IStateTreeNode, Instance } from 'mobx-state-tree';
|
|
1
|
+
import type { IStateTreeNode, Instance, SnapshotOut } from 'mobx-state-tree';
|
|
2
2
|
import type { ConfigurationSchemaType, ConfigurationSchemaOptions } from './configurationSchema';
|
|
3
3
|
import type ConfigSlot from './configurationSlot';
|
|
4
4
|
export type GetOptions<SCHEMA> = SCHEMA extends ConfigurationSchemaType<any, infer OPTIONS> ? OPTIONS : never;
|
|
@@ -10,4 +10,6 @@ export type AnyConfigurationSchemaType = ConfigurationSchemaType<any, any>;
|
|
|
10
10
|
export type AnyConfigurationModel = Instance<AnyConfigurationSchemaType>;
|
|
11
11
|
export type AnyConfigurationSlotType = ReturnType<typeof ConfigSlot>;
|
|
12
12
|
export type AnyConfigurationSlot = Instance<AnyConfigurationSlotType>;
|
|
13
|
+
/** any configuration model, or snapshot thereof */
|
|
14
|
+
export type AnyConfiguration = AnyConfigurationModel | SnapshotOut<AnyConfigurationModel>;
|
|
13
15
|
export type ConfigurationModel<SCHEMA extends AnyConfigurationSchemaType> = Instance<SCHEMA>;
|
|
@@ -11,5 +11,5 @@ export type { BaseTextSearchAdapter } from './BaseTextSearchAdapter';
|
|
|
11
11
|
export type { BaseRefNameAliasAdapter } from './BaseRefNameAliasAdapter';
|
|
12
12
|
export type { RegionsAdapter } from './RegionsAdapter';
|
|
13
13
|
export interface AnyAdapter {
|
|
14
|
-
new (config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager
|
|
14
|
+
new (config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager): AnyDataAdapter;
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"access": "public",
|
|
75
75
|
"directory": "dist"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "9962c94711dd3386dcb76c16f3646937d9c4751a"
|
|
78
78
|
}
|
|
@@ -2,20 +2,22 @@ import PluginManager from '../PluginManager';
|
|
|
2
2
|
import PluggableElementBase from './PluggableElementBase';
|
|
3
3
|
import { UriLocation } from '../util/types';
|
|
4
4
|
import { RemoteAbortSignal } from '../rpc/remoteAbortSignals';
|
|
5
|
+
interface SerializedArgs {
|
|
6
|
+
signal?: RemoteAbortSignal;
|
|
7
|
+
blobMap?: Record<string, File>;
|
|
8
|
+
}
|
|
5
9
|
export type RpcMethodConstructor = new (pm: PluginManager) => RpcMethodType;
|
|
6
10
|
export default abstract class RpcMethodType extends PluggableElementBase {
|
|
7
11
|
pluginManager: PluginManager;
|
|
8
12
|
constructor(pluginManager: PluginManager);
|
|
9
|
-
serializeArguments(args: {},
|
|
10
|
-
serializeNewAuthArguments(loc: UriLocation): Promise<UriLocation>;
|
|
11
|
-
deserializeArguments<T extends {
|
|
12
|
-
signal?: RemoteAbortSignal;
|
|
13
|
-
blobMap?: Record<string, File>;
|
|
14
|
-
}>(serializedArgs: T, _rpcDriverClassName: string): Promise<T & {
|
|
13
|
+
serializeArguments(args: {}, rpcDriverClassName: string): Promise<{}>;
|
|
14
|
+
serializeNewAuthArguments(loc: UriLocation, rpcDriverClassName: string): Promise<UriLocation>;
|
|
15
|
+
deserializeArguments<T extends SerializedArgs>(serializedArgs: T, _rpcDriverClassName: string): Promise<T & {
|
|
15
16
|
signal: AbortSignal | undefined;
|
|
16
17
|
}>;
|
|
17
18
|
abstract execute(serializedArgs: unknown, rpcDriverClassName: string): Promise<unknown>;
|
|
18
19
|
serializeReturn(originalReturn: unknown, _args: unknown, _rpcDriverClassName: string): Promise<unknown>;
|
|
19
|
-
deserializeReturn(serializedReturn: unknown, _args: unknown,
|
|
20
|
+
deserializeReturn(serializedReturn: unknown, _args: unknown, _rpcDriverClassName: string): Promise<unknown>;
|
|
20
21
|
private augmentLocationObjects;
|
|
21
22
|
}
|
|
23
|
+
export {};
|
|
@@ -13,19 +13,21 @@ class RpcMethodType extends PluggableElementBase_1.default {
|
|
|
13
13
|
super({});
|
|
14
14
|
this.pluginManager = pluginManager;
|
|
15
15
|
}
|
|
16
|
-
async serializeArguments(args,
|
|
16
|
+
async serializeArguments(args, rpcDriverClassName) {
|
|
17
17
|
const blobMap = (0, tracks_1.getBlobMap)();
|
|
18
|
-
await this.augmentLocationObjects(args);
|
|
18
|
+
await this.augmentLocationObjects(args, rpcDriverClassName);
|
|
19
19
|
return { ...args, blobMap };
|
|
20
20
|
}
|
|
21
|
-
async serializeNewAuthArguments(loc) {
|
|
21
|
+
async serializeNewAuthArguments(loc, rpcDriverClassName) {
|
|
22
22
|
const rootModel = this.pluginManager.rootModel;
|
|
23
23
|
// args dont need auth or already have auth
|
|
24
24
|
if (!(0, types_1.isAppRootModel)(rootModel) || loc.internetAccountPreAuthorization) {
|
|
25
25
|
return loc;
|
|
26
26
|
}
|
|
27
27
|
const account = rootModel.findAppropriateInternetAccount(loc);
|
|
28
|
-
|
|
28
|
+
// mutating loc object is not allowed in MainThreadRpcDriver, and is only
|
|
29
|
+
// needed for web worker RPC
|
|
30
|
+
if (account && rpcDriverClassName !== 'MainThreadRpcDriver') {
|
|
29
31
|
loc.internetAccountPreAuthorization =
|
|
30
32
|
await account.getPreAuthorizationInformation(loc);
|
|
31
33
|
}
|
|
@@ -46,7 +48,7 @@ class RpcMethodType extends PluggableElementBase_1.default {
|
|
|
46
48
|
async serializeReturn(originalReturn, _args, _rpcDriverClassName) {
|
|
47
49
|
return originalReturn;
|
|
48
50
|
}
|
|
49
|
-
async deserializeReturn(serializedReturn, _args,
|
|
51
|
+
async deserializeReturn(serializedReturn, _args, _rpcDriverClassName) {
|
|
50
52
|
var _a;
|
|
51
53
|
let r;
|
|
52
54
|
try {
|
|
@@ -63,7 +65,7 @@ class RpcMethodType extends PluggableElementBase_1.default {
|
|
|
63
65
|
}
|
|
64
66
|
return r;
|
|
65
67
|
}
|
|
66
|
-
async augmentLocationObjects(thing) {
|
|
68
|
+
async augmentLocationObjects(thing, rpcDriverClassName) {
|
|
67
69
|
const uris = [];
|
|
68
70
|
// using map-obj avoids cycles, seen in circular view svg export
|
|
69
71
|
(0, map_obj_1.default)(thing, val => {
|
|
@@ -72,7 +74,7 @@ class RpcMethodType extends PluggableElementBase_1.default {
|
|
|
72
74
|
}
|
|
73
75
|
});
|
|
74
76
|
for (const uri of uris) {
|
|
75
|
-
await this.serializeNewAuthArguments(uri);
|
|
77
|
+
await this.serializeNewAuthArguments(uri, rpcDriverClassName);
|
|
76
78
|
}
|
|
77
79
|
return thing;
|
|
78
80
|
}
|
|
@@ -12,6 +12,23 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
12
12
|
* #property
|
|
13
13
|
*/
|
|
14
14
|
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
15
|
+
/**
|
|
16
|
+
* #property
|
|
17
|
+
*/
|
|
18
|
+
configuration: import("../../configuration/configurationSchema").ConfigurationSchemaType<{
|
|
19
|
+
name: {
|
|
20
|
+
type: string;
|
|
21
|
+
defaultValue: string;
|
|
22
|
+
description: string;
|
|
23
|
+
}; /**
|
|
24
|
+
* #property
|
|
25
|
+
*/
|
|
26
|
+
assemblyNames: {
|
|
27
|
+
type: string;
|
|
28
|
+
defaultValue: never[];
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
}, import("../../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>;
|
|
15
32
|
}, {
|
|
16
33
|
afterAttach(): void;
|
|
17
34
|
/**
|
|
@@ -31,4 +48,5 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
31
48
|
*/
|
|
32
49
|
clear(): void;
|
|
33
50
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
51
|
+
export type BaseConnectionModel = ReturnType<typeof stateModelFactory>;
|
|
34
52
|
export default stateModelFactory;
|