react-msaview 1.2.10 → 1.3.2
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/bundle/colorSchemes.d.ts +16 -0
- package/bundle/colorSchemes.js +455 -0
- package/bundle/components/AboutDlg.d.ts +5 -0
- package/bundle/components/AboutDlg.js +47 -0
- package/bundle/components/AddTrackDlg.d.ts +8 -0
- package/bundle/components/AddTrackDlg.js +26 -0
- package/bundle/components/AnnotationDlg.d.ts +11 -0
- package/bundle/components/AnnotationDlg.js +77 -0
- package/bundle/components/BoxTrack.d.ts +7 -0
- package/bundle/components/BoxTrack.js +143 -0
- package/bundle/components/DetailsDlg.d.ts +8 -0
- package/bundle/components/DetailsDlg.js +12 -0
- package/bundle/components/Header.d.ts +6 -0
- package/bundle/components/Header.js +63 -0
- package/bundle/components/ImportForm.d.ts +6 -0
- package/bundle/components/ImportForm.js +89 -0
- package/bundle/components/MSACanvas.d.ts +6 -0
- package/bundle/components/MSACanvas.js +210 -0
- package/bundle/components/MSAView.d.ts +6 -0
- package/bundle/components/MSAView.js +88 -0
- package/bundle/components/MoreInfoDlg.d.ts +6 -0
- package/bundle/components/MoreInfoDlg.js +11 -0
- package/bundle/components/ResizeHandles.d.ts +8 -0
- package/bundle/components/ResizeHandles.js +110 -0
- package/bundle/components/Rubberband.d.ts +7 -0
- package/bundle/components/Rubberband.js +196 -0
- package/bundle/components/Ruler.d.ts +20 -0
- package/bundle/components/Ruler.js +121 -0
- package/bundle/components/SettingsDlg.d.ts +8 -0
- package/bundle/components/SettingsDlg.js +40 -0
- package/bundle/components/TextTrack.d.ts +7 -0
- package/bundle/components/TextTrack.js +72 -0
- package/bundle/components/Track.d.ts +11 -0
- package/bundle/components/Track.js +81 -0
- package/bundle/components/TrackInfoDlg.d.ts +6 -0
- package/bundle/components/TrackInfoDlg.js +33 -0
- package/bundle/components/TracklistDlg.d.ts +8 -0
- package/bundle/components/TracklistDlg.js +18 -0
- package/bundle/components/TreeCanvas.d.ts +6 -0
- package/bundle/components/TreeCanvas.js +431 -0
- package/bundle/components/TreeRuler.d.ts +6 -0
- package/bundle/components/TreeRuler.js +8 -0
- package/bundle/components/data/seq2.d.ts +3 -0
- package/bundle/components/data/seq2.js +3 -0
- package/bundle/index.d.ts +4 -0
- package/bundle/index.js +97100 -0
- package/bundle/layout.d.ts +23 -0
- package/bundle/layout.js +53 -0
- package/bundle/model.d.ts +364 -0
- package/bundle/model.js +894 -0
- package/bundle/parseNewick.d.ts +64 -0
- package/bundle/parseNewick.js +94 -0
- package/bundle/parsers/ClustalMSA.d.ts +39 -0
- package/bundle/parsers/ClustalMSA.js +77 -0
- package/bundle/parsers/FastaMSA.d.ts +26 -0
- package/bundle/parsers/FastaMSA.js +78 -0
- package/bundle/parsers/StockholmMSA.d.ts +75 -0
- package/bundle/parsers/StockholmMSA.js +142 -0
- package/bundle/util.d.ts +17 -0
- package/bundle/util.js +33 -0
- package/dist/colorSchemes.js +1 -1
- package/dist/components/AboutDlg.js +1 -1
- package/dist/components/AddTrackDlg.js +1 -1
- package/dist/components/AnnotationDlg.js +1 -1
- package/dist/components/BoxTrack.js +4 -4
- package/dist/components/Header.js +1 -1
- package/dist/components/ImportForm.js +10 -2
- package/dist/components/MSACanvas.js +2 -2
- package/dist/components/Rubberband.js +1 -1
- package/dist/components/Ruler.js +2 -2
- package/dist/components/SettingsDlg.js +3 -3
- package/dist/components/TextTrack.js +1 -1
- package/dist/components/TreeCanvas.js +2 -1
- package/dist/components/package.json +13 -6
- package/dist/model.d.ts +68 -4
- package/dist/model.js +8 -6
- package/dist/parsers/StockholmMSA.js +1 -1
- package/dist/util.js +2 -2
- package/package.json +13 -6
|
@@ -16,12 +16,12 @@ var AnnotationBlock = observer(function (_a) {
|
|
|
16
16
|
if (associatedRowName) {
|
|
17
17
|
var s = model.rowSpecificBpToPx(associatedRowName, start - 1);
|
|
18
18
|
var e = model.rowSpecificBpToPx(associatedRowName, end);
|
|
19
|
-
temp.addRect(""
|
|
19
|
+
temp.addRect("".concat(index), s, e, rowHeight, feature);
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
22
|
var s = model.globalBpToPx(start - 1);
|
|
23
23
|
var e = model.globalBpToPx(end);
|
|
24
|
-
temp.addRect(""
|
|
24
|
+
temp.addRect("".concat(index), s, e, rowHeight, feature);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
return temp;
|
|
@@ -42,7 +42,7 @@ var AnnotationBlock = observer(function (_a) {
|
|
|
42
42
|
ctx.clearRect(0, 0, blockSize, height);
|
|
43
43
|
ctx.translate(-offsetX, 0);
|
|
44
44
|
ctx.textAlign = 'center';
|
|
45
|
-
ctx.font = ctx.font.replace(/\d+px/, Math.max(8, rowHeight - 8)
|
|
45
|
+
ctx.font = ctx.font.replace(/\d+px/, "".concat(Math.max(8, rowHeight - 8), "px"));
|
|
46
46
|
var xStart = Math.max(0, Math.floor(offsetX / colWidth));
|
|
47
47
|
ctx.fillStyle = 'goldenrod';
|
|
48
48
|
layout.rectangles.forEach(function (value) {
|
|
@@ -80,7 +80,7 @@ var AnnotationBlock = observer(function (_a) {
|
|
|
80
80
|
ctx.clearRect(0, 0, blockSize, height);
|
|
81
81
|
ctx.translate(-offsetX, 0);
|
|
82
82
|
ctx.textAlign = 'center';
|
|
83
|
-
ctx.font = ctx.font.replace(/\d+px/, Math.max(8, rowHeight - 8)
|
|
83
|
+
ctx.font = ctx.font.replace(/\d+px/, "".concat(Math.max(8, rowHeight - 8), "px"));
|
|
84
84
|
ctx.fillStyle = 'black';
|
|
85
85
|
ctx.textAlign = 'left';
|
|
86
86
|
layout.rectangles.forEach(function (value) {
|
|
@@ -54,7 +54,7 @@ var Header = observer(function (_a) {
|
|
|
54
54
|
model.setCurrentAlignment(+event.target.value);
|
|
55
55
|
model.setScrollX(0);
|
|
56
56
|
model.setScrollY(0);
|
|
57
|
-
} }, alignmentNames.map(function (option, index) { return (React.createElement("option", { key: option
|
|
57
|
+
} }, alignmentNames.map(function (option, index) { return (React.createElement("option", { key: "".concat(option, "-").concat(index), value: index }, option)); }))) : null,
|
|
58
58
|
React.createElement(InfoArea, { model: model }),
|
|
59
59
|
React.createElement("div", { style: { flex: 1 } }),
|
|
60
60
|
React.createElement(IconButton, { onClick: function () { return setAboutDialogVisible(true); } },
|
|
@@ -7,8 +7,9 @@ import { smallTree, smallMSA, smallMSAOnly } from './data/seq2';
|
|
|
7
7
|
var ListItem = function (_a) {
|
|
8
8
|
var onClick = _a.onClick, model = _a.model, children = _a.children;
|
|
9
9
|
return (React.createElement("li", null,
|
|
10
|
-
React.createElement(Link, { onClick: function () {
|
|
10
|
+
React.createElement(Link, { onClick: function (event) {
|
|
11
11
|
model.setError(undefined);
|
|
12
|
+
event.preventDefault();
|
|
12
13
|
onClick();
|
|
13
14
|
}, href: "#" },
|
|
14
15
|
React.createElement(Typography, null, children))));
|
|
@@ -22,7 +23,7 @@ export default observer(function (_a) {
|
|
|
22
23
|
React.createElement("div", { style: { width: '50%' } },
|
|
23
24
|
error ? (React.createElement("div", { style: { padding: 20 } },
|
|
24
25
|
React.createElement(Typography, { color: "error" },
|
|
25
|
-
"Error: ", ""
|
|
26
|
+
"Error: ", "".concat(error)))) : null,
|
|
26
27
|
React.createElement(Typography, null, "Open an MSA file (stockholm or clustal format) and/or a tree file (newick format)."),
|
|
27
28
|
React.createElement(Typography, { color: "error" }, "Note: you can open up just an MSA or just a tree, both are not required. Some MSA files e.g. stockholm format have an embedded tree also and this is fine, and opening a separate tree file is not required.")),
|
|
28
29
|
React.createElement(Grid, { container: true, spacing: 10, justifyContent: "center", alignItems: "center" },
|
|
@@ -47,6 +48,7 @@ export default observer(function (_a) {
|
|
|
47
48
|
React.createElement(ListItem, { model: model, onClick: function () {
|
|
48
49
|
model.setTreeFilehandle({
|
|
49
50
|
uri: 'https://jbrowse.org/genomes/newick_trees/sarscov2phylo.pub.ft.nh',
|
|
51
|
+
locationType: 'UriLocation',
|
|
50
52
|
});
|
|
51
53
|
} }, "230k COVID-19 samples (tree only)"),
|
|
52
54
|
React.createElement(ListItem, { model: model, onClick: function () {
|
|
@@ -58,30 +60,36 @@ export default observer(function (_a) {
|
|
|
58
60
|
React.createElement(ListItem, { model: model, onClick: function () {
|
|
59
61
|
model.setMSAFilehandle({
|
|
60
62
|
uri: 'https://ihh.github.io/abrowse/build/pfam-cov2.stock',
|
|
63
|
+
locationType: 'UriLocation',
|
|
61
64
|
});
|
|
62
65
|
} }, "PFAM SARS-CoV2 multi-stockholm"),
|
|
63
66
|
React.createElement(ListItem, { model: model, onClick: function () {
|
|
64
67
|
model.setMSAFilehandle({
|
|
65
68
|
uri: 'https://jbrowse.org/genomes/multiple_sequence_alignments/Lysine.stock',
|
|
69
|
+
locationType: 'UriLocation',
|
|
66
70
|
});
|
|
67
71
|
} }, "Lysine stockholm file"),
|
|
68
72
|
React.createElement(ListItem, { model: model, onClick: function () {
|
|
69
73
|
model.setMSAFilehandle({
|
|
70
74
|
uri: 'https://jbrowse.org/genomes/multiple_sequence_alignments/PF01601_full.txt',
|
|
75
|
+
locationType: 'UriLocation',
|
|
71
76
|
});
|
|
72
77
|
} }, "PF01601 stockholm file (SARS-CoV2 spike protein)"),
|
|
73
78
|
React.createElement(ListItem, { model: model, onClick: function () {
|
|
74
79
|
model.setMSAFilehandle({
|
|
75
80
|
uri: 'https://jbrowse.org/genomes/multiple_sequence_alignments/europe_covid.fa',
|
|
81
|
+
locationType: 'UriLocation',
|
|
76
82
|
});
|
|
77
83
|
} }, "Europe COVID full genomes (LR883044.1 and 199 other sequences)"),
|
|
78
84
|
React.createElement(ListItem, { model: model, onClick: function () {
|
|
79
85
|
transaction(function () {
|
|
80
86
|
model.setMSAFilehandle({
|
|
81
87
|
uri: 'https://jbrowse.org/genomes/multiple_sequence_alignments/rhv_test-only.aligned_with_mafft_auto.fa',
|
|
88
|
+
locationType: 'UriLocation',
|
|
82
89
|
});
|
|
83
90
|
model.setTreeFilehandle({
|
|
84
91
|
uri: 'https://jbrowse.org/genomes/multiple_sequence_alignments/rhv_test-only.aligned_with_mafft_auto.nh',
|
|
92
|
+
locationType: 'UriLocation',
|
|
85
93
|
});
|
|
86
94
|
});
|
|
87
95
|
} }, "MAFFT+VeryFastTree(17.9k samples)"))))));
|
|
@@ -23,7 +23,7 @@ var MSABlock = observer(function (_a) {
|
|
|
23
23
|
ctx.clearRect(0, 0, blockSize, blockSize);
|
|
24
24
|
ctx.translate(-offsetX, rowHeight / 2 - offsetY);
|
|
25
25
|
ctx.textAlign = 'center';
|
|
26
|
-
ctx.font = ctx.font.replace(/\d+px/, Math.max(8, rowHeight - 8)
|
|
26
|
+
ctx.font = ctx.font.replace(/\d+px/, "".concat(Math.max(8, rowHeight - 8), "px"));
|
|
27
27
|
var leaves = hierarchy.leaves();
|
|
28
28
|
var b = blockSize;
|
|
29
29
|
// slice vertical rows, e.g. tree leaves, avoid negative slice
|
|
@@ -204,7 +204,7 @@ var MSACanvas = observer(function (_a) {
|
|
|
204
204
|
React.createElement(CircularProgress, null),
|
|
205
205
|
React.createElement(Typography, null, "Loading..."))) : (blocks2d.map(function (_a) {
|
|
206
206
|
var bx = _a[0], by = _a[1];
|
|
207
|
-
return (React.createElement(MSABlock, { key: bx
|
|
207
|
+
return (React.createElement(MSABlock, { key: "".concat(bx, "_").concat(by), model: model, offsetX: bx, offsetY: by }));
|
|
208
208
|
}))));
|
|
209
209
|
});
|
|
210
210
|
export default MSACanvas;
|
|
@@ -50,7 +50,7 @@ var VerticalGuide = observer(function (_a) {
|
|
|
50
50
|
var treeAreaWidth = model.treeAreaWidth;
|
|
51
51
|
var classes = useStyles();
|
|
52
52
|
return (React.createElement(React.Fragment, null,
|
|
53
|
-
React.createElement(Tooltip, { open: true, placement: "top", title: ""
|
|
53
|
+
React.createElement(Tooltip, { open: true, placement: "top", title: "".concat(model.pxToBp(coordX) + 1), arrow: true },
|
|
54
54
|
React.createElement("div", { style: {
|
|
55
55
|
left: coordX + treeAreaWidth,
|
|
56
56
|
position: 'absolute',
|
package/dist/components/Ruler.js
CHANGED
|
@@ -68,7 +68,7 @@ function mathPower(num) {
|
|
|
68
68
|
if (num < 999) {
|
|
69
69
|
return String(num);
|
|
70
70
|
}
|
|
71
|
-
return mathPower(~~(num / 1000))
|
|
71
|
+
return "".concat(mathPower(~~(num / 1000)), ",").concat("00".concat(~~(num % 1000)).substr(-3, 3));
|
|
72
72
|
}
|
|
73
73
|
var useStyles = makeStyles(function ( /* theme */) { return ({
|
|
74
74
|
majorTickLabel: {
|
|
@@ -94,7 +94,7 @@ function RulerBlock(_a) {
|
|
|
94
94
|
.filter(function (tick) { return tick.type === 'major'; })
|
|
95
95
|
.map(function (tick) {
|
|
96
96
|
var x = (reversed ? end - tick.base : tick.base - start) / bpPerPx;
|
|
97
|
-
return (React.createElement("text", { x: x, y: 10, key: "label-"
|
|
97
|
+
return (React.createElement("text", { x: x, y: 10, key: "label-".concat(tick.base), textAnchor: "middle", style: { fontSize: '11px' }, className: classes.majorTickLabel }, mathPower(tick.base + 1)));
|
|
98
98
|
})));
|
|
99
99
|
}
|
|
100
100
|
var Ruler = observer(function (_a) {
|
|
@@ -5,9 +5,9 @@ import colorSchemes from '../colorSchemes';
|
|
|
5
5
|
export default observer(function (_a) {
|
|
6
6
|
var model = _a.model, onClose = _a.onClose, open = _a.open;
|
|
7
7
|
var rowHeightInit = model.rowHeight, colWidthInit = model.colWidth, treeWidthInit = model.treeWidth, colorSchemeName = model.colorSchemeName, noTree = model.noTree;
|
|
8
|
-
var _b = useState(""
|
|
9
|
-
var _c = useState(""
|
|
10
|
-
var _d = useState(""
|
|
8
|
+
var _b = useState("".concat(rowHeightInit)), rowHeight = _b[0], setRowHeight = _b[1];
|
|
9
|
+
var _c = useState("".concat(colWidthInit)), colWidth = _c[0], setColWidth = _c[1];
|
|
10
|
+
var _d = useState("".concat(treeWidthInit)), treeWidth = _d[0], setTreeWidth = _d[1];
|
|
11
11
|
function error(n) {
|
|
12
12
|
return Number.isNaN(+n) || +n < 0;
|
|
13
13
|
}
|
|
@@ -24,7 +24,7 @@ var AnnotationBlock = observer(function (_a) {
|
|
|
24
24
|
ctx.clearRect(0, 0, blockSize, rowHeight);
|
|
25
25
|
ctx.translate(-offsetX, 0);
|
|
26
26
|
ctx.textAlign = 'center';
|
|
27
|
-
ctx.font = ctx.font.replace(/\d+px/, Math.max(8, rowHeight - 8)
|
|
27
|
+
ctx.font = ctx.font.replace(/\d+px/, "".concat(Math.max(8, rowHeight - 8), "px"));
|
|
28
28
|
var xStart = Math.max(0, Math.floor(offsetX / colWidth));
|
|
29
29
|
var xEnd = Math.max(0, Math.ceil((offsetX + blockSize) / colWidth));
|
|
30
30
|
var str = data === null || data === void 0 ? void 0 : data.slice(xStart, xEnd);
|
|
@@ -110,7 +110,7 @@ var TreeBlock = observer(function (_a) {
|
|
|
110
110
|
ctx.clearRect(0, 0, treeWidth + padding, blockSize);
|
|
111
111
|
ctx.translate(margin.left, -offsetY);
|
|
112
112
|
var font = ctx.font;
|
|
113
|
-
ctx.font = font.replace(/\d+px/, Math.max(8, rowHeight - 8)
|
|
113
|
+
ctx.font = font.replace(/\d+px/, "".concat(Math.max(8, rowHeight - 8), "px"));
|
|
114
114
|
if (!noTree && drawTree) {
|
|
115
115
|
hierarchy.links().forEach(function (_a) {
|
|
116
116
|
var source = _a.source, target = _a.target;
|
|
@@ -249,6 +249,7 @@ var TreeBlock = observer(function (_a) {
|
|
|
249
249
|
labelsAlignRight,
|
|
250
250
|
treeAreaWidth,
|
|
251
251
|
structures,
|
|
252
|
+
highResScaleFactor,
|
|
252
253
|
]);
|
|
253
254
|
useEffect(function () {
|
|
254
255
|
var canvas = mouseoverRef.current;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.3.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
7
|
-
"dist"
|
|
7
|
+
"dist",
|
|
8
|
+
"bundle"
|
|
8
9
|
],
|
|
9
10
|
"engines": {
|
|
10
11
|
"node": ">=10"
|
|
@@ -15,14 +16,12 @@
|
|
|
15
16
|
"prestart": "npm run clean",
|
|
16
17
|
"prebuild": "npm run clean",
|
|
17
18
|
"start": "yarn tsc --watch",
|
|
18
|
-
"build": "yarn tsc",
|
|
19
|
-
"size": "size-limit",
|
|
20
|
-
"analyze": "size-limit --why",
|
|
19
|
+
"build": "yarn tsc && rollup -c",
|
|
21
20
|
"preversion": "npm run build",
|
|
22
21
|
"postversion": "git push --follow-tags"
|
|
23
22
|
},
|
|
24
23
|
"peerDependencies": {
|
|
25
|
-
"@jbrowse/core": ">=1.
|
|
24
|
+
"@jbrowse/core": ">=1.5.1",
|
|
26
25
|
"@material-ui/core": ">=4.12.2",
|
|
27
26
|
"react": ">=16.8.0",
|
|
28
27
|
"react-dom": ">=16.8.0"
|
|
@@ -30,6 +29,10 @@
|
|
|
30
29
|
"name": "react-msaview",
|
|
31
30
|
"author": "Colin",
|
|
32
31
|
"devDependencies": {
|
|
32
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
33
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
34
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
35
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
33
36
|
"@types/color": "^3.0.1",
|
|
34
37
|
"@types/d3": "^6.7.0",
|
|
35
38
|
"@types/lodash": "^4.14.170",
|
|
@@ -39,6 +42,10 @@
|
|
|
39
42
|
"eslint-config-react-app": "^6.0.0",
|
|
40
43
|
"react": "^17.0.1",
|
|
41
44
|
"react-dom": "^17.0.1",
|
|
45
|
+
"rollup": "^2.60.2",
|
|
46
|
+
"rollup-plugin-node-builtins": "^2.1.2",
|
|
47
|
+
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
48
|
+
"rollup-plugin-polyfill-node": "^0.7.0",
|
|
42
49
|
"tslib": "^2.1.0",
|
|
43
50
|
"typescript": "^4.2.3"
|
|
44
51
|
},
|
package/dist/model.d.ts
CHANGED
|
@@ -74,54 +74,102 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
74
74
|
drawNodeBubbles: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
75
75
|
highResScaleFactor: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
76
76
|
colorSchemeName: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
77
|
-
treeFilehandle: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
77
|
+
treeFilehandle: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISnapshotProcessor<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
78
|
+
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
78
79
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
79
80
|
baseUri: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
81
|
+
internetAccountId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
82
|
+
internetAccountPreAuthorization: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
83
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
84
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
85
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
80
86
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
87
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
81
88
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
82
89
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
90
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
83
91
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
84
92
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
85
93
|
}>>, {
|
|
94
|
+
locationType: "UriLocation";
|
|
86
95
|
uri: string;
|
|
96
|
+
internetAccountId: string | undefined;
|
|
97
|
+
internetAccountPreAuthorization: import("mobx-state-tree").ModelSnapshotType<{
|
|
98
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
99
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
100
|
+
}> | undefined;
|
|
87
101
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
102
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
88
103
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
89
104
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
105
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
90
106
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
91
107
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
92
108
|
}>, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
109
|
+
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
93
110
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
94
111
|
baseUri: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
112
|
+
internetAccountId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
113
|
+
internetAccountPreAuthorization: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
114
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
115
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
116
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
95
117
|
}>> | import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
118
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
96
119
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
97
120
|
}> | import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
121
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
98
122
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
99
123
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
100
|
-
}
|
|
101
|
-
msaFilehandle: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
124
|
+
}>>, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
125
|
+
msaFilehandle: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISnapshotProcessor<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
126
|
+
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
102
127
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
103
128
|
baseUri: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
129
|
+
internetAccountId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
130
|
+
internetAccountPreAuthorization: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
131
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
132
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
133
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
104
134
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
135
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
105
136
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
106
137
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
138
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
107
139
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
108
140
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
109
141
|
}>>, {
|
|
142
|
+
locationType: "UriLocation";
|
|
110
143
|
uri: string;
|
|
144
|
+
internetAccountId: string | undefined;
|
|
145
|
+
internetAccountPreAuthorization: import("mobx-state-tree").ModelSnapshotType<{
|
|
146
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
147
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
148
|
+
}> | undefined;
|
|
111
149
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
150
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
112
151
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
113
152
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
153
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
114
154
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
115
155
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
116
156
|
}>, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
157
|
+
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
117
158
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
118
159
|
baseUri: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
160
|
+
internetAccountId: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
161
|
+
internetAccountPreAuthorization: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IModelType<{
|
|
162
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
163
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
164
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
119
165
|
}>> | import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
166
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
120
167
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
121
168
|
}> | import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
169
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
122
170
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
123
171
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
124
|
-
}
|
|
172
|
+
}>>, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
125
173
|
currentAlignment: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
126
174
|
collapsed: import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>;
|
|
127
175
|
showOnly: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -323,18 +371,34 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
323
371
|
highResScaleFactor: number;
|
|
324
372
|
colorSchemeName: string;
|
|
325
373
|
treeFilehandle: {
|
|
374
|
+
locationType: "UriLocation";
|
|
326
375
|
uri: string;
|
|
376
|
+
internetAccountId: string | undefined;
|
|
377
|
+
internetAccountPreAuthorization: import("mobx-state-tree").ModelSnapshotType<{
|
|
378
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
379
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
380
|
+
}> | undefined;
|
|
327
381
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
382
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
328
383
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
329
384
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
385
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
330
386
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
331
387
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
332
388
|
}> | undefined;
|
|
333
389
|
msaFilehandle: {
|
|
390
|
+
locationType: "UriLocation";
|
|
334
391
|
uri: string;
|
|
392
|
+
internetAccountId: string | undefined;
|
|
393
|
+
internetAccountPreAuthorization: import("mobx-state-tree").ModelSnapshotType<{
|
|
394
|
+
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
395
|
+
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
396
|
+
}> | undefined;
|
|
335
397
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
398
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
336
399
|
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
337
400
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
401
|
+
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
338
402
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
339
403
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
340
404
|
}> | undefined;
|
package/dist/model.js
CHANGED
|
@@ -159,12 +159,12 @@ var UniprotTrack = types
|
|
|
159
159
|
case 0:
|
|
160
160
|
_a.trys.push([0, 3, , 4]);
|
|
161
161
|
accession = self.accession;
|
|
162
|
-
url = "https://www.uniprot.org/uniprot/"
|
|
162
|
+
url = "https://www.uniprot.org/uniprot/".concat(accession, ".gff");
|
|
163
163
|
return [4 /*yield*/, fetch(url)];
|
|
164
164
|
case 1:
|
|
165
165
|
response = _a.sent();
|
|
166
166
|
if (!response.ok) {
|
|
167
|
-
throw new Error("HTTP "
|
|
167
|
+
throw new Error("HTTP ".concat(response.status, " ").concat(response.statusText, " fetching ").concat(url));
|
|
168
168
|
}
|
|
169
169
|
return [4 /*yield*/, response.text()];
|
|
170
170
|
case 2:
|
|
@@ -295,7 +295,9 @@ var MSAModel = types
|
|
|
295
295
|
self.selectedStructures = [];
|
|
296
296
|
},
|
|
297
297
|
setError: function (error) {
|
|
298
|
-
|
|
298
|
+
if (error) {
|
|
299
|
+
console.error(error);
|
|
300
|
+
}
|
|
299
301
|
self.error = error;
|
|
300
302
|
},
|
|
301
303
|
setMousePos: function (col, row) {
|
|
@@ -501,9 +503,9 @@ var MSAModel = types
|
|
|
501
503
|
return ((_a = this.MSA) === null || _a === void 0 ? void 0 : _a.getDetails()) || {};
|
|
502
504
|
},
|
|
503
505
|
getRowDetails: function (name) {
|
|
504
|
-
var _a;
|
|
506
|
+
var _a, _b;
|
|
505
507
|
//@ts-ignore
|
|
506
|
-
var details = (_a = this.MSA) === null || _a === void 0 ? void 0 : _a.getRowDetails(name);
|
|
508
|
+
var details = (_b = (_a = this.MSA) === null || _a === void 0 ? void 0 : _a.getRowDetails) === null || _b === void 0 ? void 0 : _b.call(_a, name);
|
|
507
509
|
var matches = name.match(/\S+\/(\d+)-(\d+)/);
|
|
508
510
|
return __assign(__assign({}, details), (matches && { range: { start: +matches[1], end: +matches[2] } }));
|
|
509
511
|
},
|
|
@@ -772,7 +774,7 @@ var MSAModel = types
|
|
|
772
774
|
? Object.entries(region.attributes)
|
|
773
775
|
.map(function (_a) {
|
|
774
776
|
var k = _a[0], v = _a[1];
|
|
775
|
-
return k
|
|
777
|
+
return "".concat(k, "=").concat(v.join(','));
|
|
776
778
|
})
|
|
777
779
|
.join(';')
|
|
778
780
|
: '.';
|
|
@@ -32,7 +32,7 @@ var StockholmMSA = /** @class */ (function () {
|
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(StockholmMSA.prototype, "alignmentNames", {
|
|
34
34
|
get: function () {
|
|
35
|
-
return this.data.map(function (aln, index) { var _a; return ((_a = aln.gf.DE) === null || _a === void 0 ? void 0 : _a[0]) || "Alignment "
|
|
35
|
+
return this.data.map(function (aln, index) { var _a; return ((_a = aln.gf.DE) === null || _a === void 0 ? void 0 : _a[0]) || "Alignment ".concat(index + 1); });
|
|
36
36
|
},
|
|
37
37
|
enumerable: false,
|
|
38
38
|
configurable: true
|
package/dist/util.js
CHANGED
|
@@ -17,9 +17,9 @@ export function generateNodeIds(tree, parent, depth) {
|
|
|
17
17
|
var _a;
|
|
18
18
|
if (parent === void 0) { parent = 'node'; }
|
|
19
19
|
if (depth === void 0) { depth = 0; }
|
|
20
|
-
var id = parent
|
|
20
|
+
var id = "".concat(parent, "-").concat(depth);
|
|
21
21
|
return __assign(__assign({}, tree), { id: id, branchset: ((_a = tree.branchset) === null || _a === void 0 ? void 0 : _a.map(function (b, i) {
|
|
22
|
-
return generateNodeIds(b, id
|
|
22
|
+
return generateNodeIds(b, "".concat(id, "-").concat(i), depth + 1);
|
|
23
23
|
})) || [] });
|
|
24
24
|
}
|
|
25
25
|
export function colorContrast(colorScheme, theme) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2
|
|
2
|
+
"version": "1.3.2",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
7
|
-
"dist"
|
|
7
|
+
"dist",
|
|
8
|
+
"bundle"
|
|
8
9
|
],
|
|
9
10
|
"engines": {
|
|
10
11
|
"node": ">=10"
|
|
@@ -15,14 +16,12 @@
|
|
|
15
16
|
"prestart": "npm run clean",
|
|
16
17
|
"prebuild": "npm run clean",
|
|
17
18
|
"start": "yarn tsc --watch",
|
|
18
|
-
"build": "yarn tsc",
|
|
19
|
-
"size": "size-limit",
|
|
20
|
-
"analyze": "size-limit --why",
|
|
19
|
+
"build": "yarn tsc && rollup -c",
|
|
21
20
|
"preversion": "npm run build",
|
|
22
21
|
"postversion": "git push --follow-tags"
|
|
23
22
|
},
|
|
24
23
|
"peerDependencies": {
|
|
25
|
-
"@jbrowse/core": ">=1.
|
|
24
|
+
"@jbrowse/core": ">=1.5.1",
|
|
26
25
|
"@material-ui/core": ">=4.12.2",
|
|
27
26
|
"react": ">=16.8.0",
|
|
28
27
|
"react-dom": ">=16.8.0"
|
|
@@ -30,6 +29,10 @@
|
|
|
30
29
|
"name": "react-msaview",
|
|
31
30
|
"author": "Colin",
|
|
32
31
|
"devDependencies": {
|
|
32
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
33
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
34
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
35
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
33
36
|
"@types/color": "^3.0.1",
|
|
34
37
|
"@types/d3": "^6.7.0",
|
|
35
38
|
"@types/lodash": "^4.14.170",
|
|
@@ -39,6 +42,10 @@
|
|
|
39
42
|
"eslint-config-react-app": "^6.0.0",
|
|
40
43
|
"react": "^17.0.1",
|
|
41
44
|
"react-dom": "^17.0.1",
|
|
45
|
+
"rollup": "^2.60.2",
|
|
46
|
+
"rollup-plugin-node-builtins": "^2.1.2",
|
|
47
|
+
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
48
|
+
"rollup-plugin-polyfill-node": "^0.7.0",
|
|
42
49
|
"tslib": "^2.1.0",
|
|
43
50
|
"typescript": "^4.2.3"
|
|
44
51
|
},
|