react-msaview 1.2.8 → 1.3.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/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 +97264 -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/components/AboutDlg.d.ts +1 -0
- package/dist/components/AboutDlg.js +41 -27
- package/dist/components/AddTrackDlg.d.ts +1 -0
- package/dist/components/AddTrackDlg.js +17 -26
- package/dist/components/AnnotationDlg.d.ts +1 -0
- package/dist/components/AnnotationDlg.js +49 -47
- package/dist/components/BoxTrack.d.ts +1 -0
- package/dist/components/BoxTrack.js +22 -33
- package/dist/components/DetailsDlg.d.ts +1 -0
- package/dist/components/DetailsDlg.js +5 -14
- package/dist/components/Header.d.ts +1 -0
- package/dist/components/Header.js +38 -39
- package/dist/components/ImportForm.d.ts +1 -0
- package/dist/components/ImportForm.js +80 -73
- package/dist/components/MSACanvas.d.ts +1 -0
- package/dist/components/MSACanvas.js +10 -21
- package/dist/components/MSAView.d.ts +1 -0
- package/dist/components/MSAView.js +25 -17
- package/dist/components/MoreInfoDlg.d.ts +1 -0
- package/dist/components/MoreInfoDlg.js +5 -14
- package/dist/components/ResizeHandles.d.ts +1 -0
- package/dist/components/ResizeHandles.js +7 -6
- package/dist/components/Rubberband.js +46 -48
- package/dist/components/Ruler.d.ts +1 -0
- package/dist/components/Ruler.js +17 -26
- package/dist/components/SettingsDlg.d.ts +1 -0
- package/dist/components/SettingsDlg.js +24 -33
- package/dist/components/TextTrack.d.ts +1 -0
- package/dist/components/TextTrack.js +5 -17
- package/dist/components/Track.d.ts +1 -0
- package/dist/components/Track.js +24 -31
- package/dist/components/TrackInfoDlg.d.ts +1 -0
- package/dist/components/TrackInfoDlg.js +16 -23
- package/dist/components/TracklistDlg.d.ts +1 -0
- package/dist/components/TracklistDlg.js +12 -20
- package/dist/components/TreeCanvas.d.ts +1 -0
- package/dist/components/TreeCanvas.js +96 -84
- package/dist/components/TreeRuler.d.ts +1 -0
- package/dist/components/TreeRuler.js +2 -2
- package/dist/components/package.json +15 -10
- package/dist/model.d.ts +79 -6
- package/dist/model.js +25 -7
- package/package.json +15 -10
|
@@ -1,36 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
import { useState } from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
14
2
|
import { Dialog, DialogTitle, DialogContent, Typography, Link, } from '@material-ui/core';
|
|
15
3
|
import { version } from './package.json';
|
|
16
4
|
function LicenseDialog(_a) {
|
|
17
5
|
var onClose = _a.onClose, open = _a.open;
|
|
18
|
-
return (
|
|
19
|
-
|
|
6
|
+
return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
|
|
7
|
+
React.createElement(DialogTitle, null, "Biotite License"),
|
|
8
|
+
React.createElement(DialogContent, null,
|
|
9
|
+
React.createElement("pre", { style: { height: 100, overflow: 'auto' } }, "\nCopyright 2017 - 2020, The Biotite contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n "))));
|
|
20
10
|
}
|
|
21
11
|
export default function AboutDialog(_a) {
|
|
22
12
|
var onClose = _a.onClose, open = _a.open;
|
|
23
13
|
var _b = useState(false), dlgOpen = _b[0], setDlgOpen = _b[1];
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
return (React.createElement(React.Fragment, null,
|
|
15
|
+
React.createElement(LicenseDialog, { onClose: function () { return setDlgOpen(false); }, open: dlgOpen }),
|
|
16
|
+
React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
|
|
17
|
+
React.createElement(DialogTitle, null, "About this plugin"),
|
|
18
|
+
React.createElement(DialogContent, null,
|
|
19
|
+
React.createElement(Typography, null,
|
|
20
|
+
"MSAView ",
|
|
21
|
+
version,
|
|
22
|
+
" (",
|
|
23
|
+
React.createElement(Link, { href: "https://github.com/gmod/jbrowse-plugin-msaview" }, "Github"),
|
|
24
|
+
")"),
|
|
25
|
+
React.createElement("ul", null,
|
|
26
|
+
React.createElement("li", null,
|
|
27
|
+
React.createElement(Typography, null,
|
|
28
|
+
"We use some color schemes from the",
|
|
29
|
+
' ',
|
|
30
|
+
React.createElement(Link, { href: "https://github.com/biotite-dev/biotite" }, "biotite"),
|
|
31
|
+
' ',
|
|
32
|
+
"project, and their license is reproduced",
|
|
33
|
+
' ',
|
|
34
|
+
React.createElement(Link, { onClick: function () { return setDlgOpen(true); } }, "here"))),
|
|
35
|
+
React.createElement("li", null,
|
|
36
|
+
React.createElement(Typography, null,
|
|
37
|
+
"See this page for some information on jalview colorings",
|
|
38
|
+
' ',
|
|
39
|
+
React.createElement(Link, { href: "https://www.jalview.org/help/html/colourSchemes/" }, "here"))),
|
|
40
|
+
React.createElement("li", null,
|
|
41
|
+
React.createElement(Typography, null,
|
|
42
|
+
"See this page for some info on the clustal, cinema, maeditor, and lesk color schemes",
|
|
43
|
+
' ',
|
|
44
|
+
React.createElement(Link, { href: "http://www.bioinformatics.nl/~berndb/aacolour.html" }, "here"))),
|
|
45
|
+
React.createElement("li", null,
|
|
46
|
+
React.createElement(Typography, null,
|
|
47
|
+
"See this paper about the flower color scheme",
|
|
48
|
+
' ',
|
|
49
|
+
React.createElement(Link, { href: "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7245768/" }, "here"))))))));
|
|
36
50
|
}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useState } from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
14
2
|
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, TextField, MenuItem, Typography, } from '@material-ui/core';
|
|
15
3
|
import { FileSelector } from '@jbrowse/core/ui';
|
|
16
4
|
import { observer } from 'mobx-react';
|
|
@@ -19,17 +7,20 @@ export default observer(function (_a) {
|
|
|
19
7
|
var options = model.rows.map(function (r) { return r[0]; });
|
|
20
8
|
var _b = useState(), trackFile = _b[0], setTrackFile = _b[1];
|
|
21
9
|
var _c = useState(''), currentOption = _c[0], setCurrentOption = _c[1];
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
10
|
+
return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
|
|
11
|
+
React.createElement(DialogTitle, null, "Add track"),
|
|
12
|
+
React.createElement(DialogContent, null,
|
|
13
|
+
React.createElement(Typography, null, "Open relevant per-alignment tracks e.g. protein domains"),
|
|
14
|
+
React.createElement(TextField, { select: true, helperText: "Which row does this track apply to?", value: currentOption, onChange: function (event) {
|
|
15
|
+
setCurrentOption(event.target.value);
|
|
16
|
+
} }, options.map(function (option, index) { return (React.createElement(MenuItem, { key: option + "-" + index, value: option }, option)); })),
|
|
17
|
+
React.createElement(FileSelector, { location: trackFile, setLocation: setTrackFile }),
|
|
18
|
+
React.createElement(DialogActions, null,
|
|
19
|
+
React.createElement(Button, { onClick: function () {
|
|
20
|
+
model.setError(undefined);
|
|
21
|
+
if (trackFile) {
|
|
22
|
+
model.setMSAFilehandle(trackFile);
|
|
23
|
+
}
|
|
24
|
+
}, variant: "contained", color: "primary" }, "Open"),
|
|
25
|
+
React.createElement(Button, { color: "secondary", variant: "contained", onClick: function () { return onClose(); } }, "Cancel")))));
|
|
35
26
|
});
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
t[p] = s[p];
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
11
9
|
};
|
|
12
|
-
|
|
13
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
14
|
-
to[j] = from[i];
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
import { useState } from 'react';
|
|
10
|
+
import React, { useState } from 'react';
|
|
19
11
|
import { observer } from 'mobx-react';
|
|
20
12
|
import { Button, Dialog, DialogActions, DialogTitle, DialogContent, IconButton, TextField, Typography, } from '@material-ui/core';
|
|
21
13
|
import DeleteIcon from '@material-ui/icons/Delete';
|
|
@@ -31,9 +23,11 @@ var specialFromEntries = function (val) {
|
|
|
31
23
|
};
|
|
32
24
|
var Row = observer(function (_a) {
|
|
33
25
|
var name = _a.name, value = _a.value, setValue = _a.setValue, setName = _a.setName, onDelete = _a.onDelete;
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
return (React.createElement("div", null,
|
|
27
|
+
React.createElement(IconButton, { onClick: onDelete, style: { margin: 10 } },
|
|
28
|
+
React.createElement(DeleteIcon, null)),
|
|
29
|
+
React.createElement(TextField, { value: name, onChange: function (event) { return setName(event.target.value); }, label: "Key" }),
|
|
30
|
+
React.createElement(TextField, { value: value, onChange: function (event) { return setValue(event.target.value); }, label: "Value" })));
|
|
37
31
|
});
|
|
38
32
|
export default observer(function (_a) {
|
|
39
33
|
var onClose = _a.onClose, data = _a.data, model = _a.model;
|
|
@@ -44,32 +38,40 @@ export default observer(function (_a) {
|
|
|
44
38
|
['ID', ''],
|
|
45
39
|
['Note', ''],
|
|
46
40
|
]), rows = _b[0], setRows = _b[1];
|
|
47
|
-
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
41
|
+
return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: true },
|
|
42
|
+
React.createElement(DialogTitle, null, "Create new region annotation"),
|
|
43
|
+
React.createElement(DialogContent, null,
|
|
44
|
+
React.createElement(Typography, null,
|
|
45
|
+
"Do you want to add an annotation to the MSA at ",
|
|
46
|
+
l,
|
|
47
|
+
"..",
|
|
48
|
+
r,
|
|
49
|
+
' ',
|
|
50
|
+
blanks.length
|
|
51
|
+
? " (gapped " + model.getPos(l) + ".." + model.getPos(r)
|
|
52
|
+
: ''),
|
|
53
|
+
rows.map(function (_a, index) {
|
|
54
|
+
var key = _a[0], val = _a[1];
|
|
55
|
+
return (React.createElement(Row, { key: index, name: key, value: val, setValue: function (newValue) {
|
|
56
|
+
var newRows = __spreadArray([], rows, true);
|
|
57
|
+
newRows[index][1] = newValue;
|
|
58
|
+
setRows(newRows);
|
|
59
|
+
}, setName: function (newName) {
|
|
60
|
+
var newRows = __spreadArray([], rows, true);
|
|
61
|
+
newRows[index][0] = newName;
|
|
62
|
+
setRows(newRows);
|
|
63
|
+
}, onDelete: function () {
|
|
64
|
+
rows.splice(index, 1);
|
|
65
|
+
setRows(__spreadArray([], rows, true));
|
|
66
|
+
} }));
|
|
67
|
+
}),
|
|
68
|
+
React.createElement(Button, { onClick: function () {
|
|
69
|
+
setRows(__spreadArray(__spreadArray([], rows, true), [['', '']], false));
|
|
70
|
+
} }, "Add row"),
|
|
71
|
+
React.createElement(DialogActions, null,
|
|
72
|
+
React.createElement(Button, { onClick: function () {
|
|
73
|
+
model.addAnnotation(l, r, specialFromEntries(rows));
|
|
74
|
+
onClose();
|
|
75
|
+
}, variant: "contained", color: "primary" }, "Submit"),
|
|
76
|
+
React.createElement(Button, { variant: "contained", color: "secondary", onClick: function () { return onClose(); } }, "Cancel")))));
|
|
75
77
|
});
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useRef, useMemo, useEffect } from 'react';
|
|
1
|
+
import React, { useRef, useMemo, useEffect } from 'react';
|
|
14
2
|
import { observer } from 'mobx-react';
|
|
15
3
|
import { getSnapshot, isStateTreeNode } from 'mobx-state-tree';
|
|
16
4
|
import Layout from '../layout';
|
|
@@ -121,34 +109,35 @@ var AnnotationBlock = observer(function (_a) {
|
|
|
121
109
|
rowHeight,
|
|
122
110
|
blanks,
|
|
123
111
|
]);
|
|
124
|
-
return !features ? null : (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
112
|
+
return !features ? null : (React.createElement(React.Fragment, null,
|
|
113
|
+
React.createElement("canvas", { ref: ref, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
|
|
114
|
+
position: 'absolute',
|
|
115
|
+
left: scrollX + offsetX,
|
|
116
|
+
width: blockSize,
|
|
117
|
+
height: height,
|
|
118
|
+
} }),
|
|
119
|
+
React.createElement("canvas", { ref: labelRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
|
|
120
|
+
position: 'absolute',
|
|
121
|
+
left: scrollX + offsetX,
|
|
122
|
+
width: blockSize,
|
|
123
|
+
height: height,
|
|
124
|
+
} }),
|
|
125
|
+
React.createElement("canvas", { ref: mouseoverRef, height: height * highResScaleFactor, width: blockSize * highResScaleFactor, style: {
|
|
126
|
+
position: 'absolute',
|
|
127
|
+
left: scrollX + offsetX,
|
|
128
|
+
width: blockSize,
|
|
129
|
+
height: height,
|
|
130
|
+
} })));
|
|
142
131
|
});
|
|
143
132
|
var AnnotationTrack = observer(function (_a) {
|
|
144
133
|
var model = _a.model, track = _a.track;
|
|
145
134
|
var blocksX = model.blocksX, msaAreaWidth = model.msaAreaWidth;
|
|
146
135
|
var height = track.model.height;
|
|
147
|
-
return (
|
|
136
|
+
return (React.createElement("div", { style: {
|
|
148
137
|
position: 'relative',
|
|
149
138
|
height: height,
|
|
150
139
|
width: msaAreaWidth,
|
|
151
140
|
overflow: 'hidden',
|
|
152
|
-
} },
|
|
141
|
+
} }, blocksX.map(function (bx) { return (React.createElement(AnnotationBlock, { track: track, key: bx, model: model, offsetX: bx })); })));
|
|
153
142
|
});
|
|
154
143
|
export default AnnotationTrack;
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import React from 'react';
|
|
13
2
|
import { Dialog, DialogTitle, DialogContent } from '@material-ui/core';
|
|
14
3
|
import { observer } from 'mobx-react';
|
|
15
4
|
import { Attributes } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
16
5
|
export default observer(function (_a) {
|
|
17
6
|
var model = _a.model, onClose = _a.onClose, open = _a.open;
|
|
18
7
|
var alignmentDetails = model.alignmentDetails;
|
|
19
|
-
return (
|
|
20
|
-
|
|
8
|
+
return (React.createElement(Dialog, { onClose: function () { return onClose(); }, open: open },
|
|
9
|
+
React.createElement(DialogTitle, null, "Metadata"),
|
|
10
|
+
React.createElement(DialogContent, null,
|
|
11
|
+
React.createElement(Attributes, { attributes: alignmentDetails }))));
|
|
21
12
|
});
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { useState } from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
14
2
|
import { IconButton, Select, Typography } from '@material-ui/core';
|
|
15
3
|
import { observer } from 'mobx-react';
|
|
16
4
|
import SettingsDialog from './SettingsDlg';
|
|
@@ -26,9 +14,14 @@ import ListIcon from '@material-ui/icons/List';
|
|
|
26
14
|
var InfoArea = observer(function (_a) {
|
|
27
15
|
var model = _a.model;
|
|
28
16
|
var mouseOverRowName = model.mouseOverRowName, mouseCol = model.mouseCol;
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
return (React.createElement("div", null,
|
|
18
|
+
React.createElement(Typography, { display: "inline" },
|
|
19
|
+
"Row name: ",
|
|
20
|
+
mouseOverRowName),
|
|
21
|
+
React.createElement("span", { style: { marginLeft: 10 } }),
|
|
22
|
+
React.createElement(Typography, { display: "inline" },
|
|
23
|
+
"Position: ",
|
|
24
|
+
mouseCol)));
|
|
32
25
|
});
|
|
33
26
|
var Header = observer(function (_a) {
|
|
34
27
|
var model = _a.model;
|
|
@@ -37,28 +30,34 @@ var Header = observer(function (_a) {
|
|
|
37
30
|
var _d = useState(false), detailsDialogVisible = _d[0], setDetailsDialogVisible = _d[1];
|
|
38
31
|
var _e = useState(false), tracklistDialogVisible = _e[0], setTracklistDialogVisible = _e[1];
|
|
39
32
|
var currentAlignment = model.currentAlignment, alignmentNames = model.alignmentNames;
|
|
40
|
-
return (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
33
|
+
return (React.createElement("div", { style: { display: 'flex' } },
|
|
34
|
+
React.createElement(IconButton, { onClick: function () {
|
|
35
|
+
model.setData({ tree: '', msa: '' });
|
|
36
|
+
model.setTreeFilehandle(undefined);
|
|
37
|
+
model.setMSAFilehandle(undefined);
|
|
38
|
+
model.setScrollY(0);
|
|
39
|
+
model.setScrollX(0);
|
|
40
|
+
model.setCurrentAlignment(0);
|
|
41
|
+
} },
|
|
42
|
+
React.createElement(FolderOpenIcon, null)),
|
|
43
|
+
React.createElement(IconButton, { onClick: function () { return setSettingsDialogVisible(true); } },
|
|
44
|
+
React.createElement(SettingsIcon, null)),
|
|
45
|
+
React.createElement(IconButton, { onClick: function () { return setDetailsDialogVisible(true); } },
|
|
46
|
+
React.createElement(AssignmentIcon, null)),
|
|
47
|
+
React.createElement(IconButton, { onClick: function () { return setTracklistDialogVisible(true); } },
|
|
48
|
+
React.createElement(ListIcon, null)),
|
|
49
|
+
settingsDialogVisible ? (React.createElement(SettingsDialog, { open: true, model: model, onClose: function () { return setSettingsDialogVisible(false); } })) : null,
|
|
50
|
+
aboutDialogVisible ? (React.createElement(AboutDialog, { open: true, onClose: function () { return setAboutDialogVisible(false); } })) : null,
|
|
51
|
+
detailsDialogVisible ? (React.createElement(DetailsDialog, { open: true, model: model, onClose: function () { return setDetailsDialogVisible(false); } })) : null,
|
|
52
|
+
tracklistDialogVisible ? (React.createElement(TracklistDialog, { open: true, model: model, onClose: function () { return setTracklistDialogVisible(false); } })) : null,
|
|
53
|
+
alignmentNames.length > 0 ? (React.createElement(Select, { native: true, value: currentAlignment, onChange: function (event) {
|
|
54
|
+
model.setCurrentAlignment(+event.target.value);
|
|
55
|
+
model.setScrollX(0);
|
|
56
|
+
model.setScrollY(0);
|
|
57
|
+
} }, alignmentNames.map(function (option, index) { return (React.createElement("option", { key: option + "-" + index, value: index }, option)); }))) : null,
|
|
58
|
+
React.createElement(InfoArea, { model: model }),
|
|
59
|
+
React.createElement("div", { style: { flex: 1 } }),
|
|
60
|
+
React.createElement(IconButton, { onClick: function () { return setAboutDialogVisible(true); } },
|
|
61
|
+
React.createElement(HelpIcon, null))));
|
|
63
62
|
});
|
|
64
63
|
export default Header;
|