jbrowse-plugin-graphgenomeviewer 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GraphGenomeView/components/AreYouSureDialog.d.ts +6 -0
- package/dist/GraphGenomeView/components/AreYouSureDialog.js +22 -0
- package/dist/GraphGenomeView/components/AreYouSureDialog.js.map +1 -0
- package/dist/GraphGenomeView/components/FeatureDialog.d.ts +3 -1
- package/dist/GraphGenomeView/components/FeatureDialog.js +10 -14
- package/dist/GraphGenomeView/components/FeatureDialog.js.map +1 -1
- package/dist/GraphGenomeView/components/GraphGenomeView.js +8 -7
- package/dist/GraphGenomeView/components/GraphGenomeView.js.map +1 -1
- package/dist/GraphGenomeView/components/GraphPanel.js +10 -6
- package/dist/GraphGenomeView/components/GraphPanel.js.map +1 -1
- package/dist/GraphGenomeView/components/GraphSettings.d.ts +14 -0
- package/dist/GraphGenomeView/components/GraphSettings.js +64 -0
- package/dist/GraphGenomeView/components/GraphSettings.js.map +1 -0
- package/dist/GraphGenomeView/components/Header.js +39 -39
- package/dist/GraphGenomeView/components/Header.js.map +1 -1
- package/dist/GraphGenomeView/components/HeaderMenu.d.ts +6 -0
- package/dist/GraphGenomeView/components/HeaderMenu.js +83 -0
- package/dist/GraphGenomeView/components/HeaderMenu.js.map +1 -0
- package/dist/GraphGenomeView/components/HelpDialog.d.ts +5 -0
- package/dist/GraphGenomeView/components/HelpDialog.js +15 -0
- package/dist/GraphGenomeView/components/HelpDialog.js.map +1 -0
- package/dist/GraphGenomeView/components/LocStringInput.d.ts +6 -0
- package/dist/GraphGenomeView/components/LocStringInput.js +23 -0
- package/dist/GraphGenomeView/components/LocStringInput.js.map +1 -0
- package/dist/GraphGenomeView/components/ServerSettings.d.ts +6 -0
- package/dist/GraphGenomeView/components/ServerSettings.js +22 -0
- package/dist/GraphGenomeView/components/ServerSettings.js.map +1 -0
- package/dist/GraphGenomeView/components/SettingsDialog.js +30 -9
- package/dist/GraphGenomeView/components/SettingsDialog.js.map +1 -1
- package/dist/GraphGenomeView/graphSettingsModel.d.ts +26 -0
- package/dist/GraphGenomeView/graphSettingsModel.js +105 -0
- package/dist/GraphGenomeView/graphSettingsModel.js.map +1 -0
- package/dist/GraphGenomeView/model.d.ts +99 -4
- package/dist/GraphGenomeView/model.js +87 -5
- package/dist/GraphGenomeView/model.js.map +1 -1
- package/dist/jbrowse-plugin-graphgenomeviewer.umd.production.min.js +44 -26
- package/dist/jbrowse-plugin-graphgenomeviewer.umd.production.min.js.map +4 -4
- package/package.json +4 -3
- package/src/GraphGenomeView/components/AreYouSureDialog.tsx +50 -0
- package/src/GraphGenomeView/components/FeatureDialog.tsx +21 -36
- package/src/GraphGenomeView/components/GraphGenomeView.tsx +11 -9
- package/src/GraphGenomeView/components/GraphPanel.tsx +36 -8
- package/src/GraphGenomeView/components/GraphSettings.tsx +138 -0
- package/src/GraphGenomeView/components/Header.tsx +36 -52
- package/src/GraphGenomeView/components/HeaderMenu.tsx +98 -0
- package/src/GraphGenomeView/components/HelpDialog.tsx +45 -0
- package/src/GraphGenomeView/components/LocStringInput.tsx +47 -0
- package/src/GraphGenomeView/components/ServerSettings.tsx +44 -0
- package/src/GraphGenomeView/components/SettingsDialog.tsx +73 -21
- package/src/GraphGenomeView/graphSettingsModel.ts +147 -0
- package/src/GraphGenomeView/model.ts +93 -6
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
+
import { Button, DialogActions, DialogContent, DialogContentText, } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
const SettingsDialog = observer(function ({ data, handleClose, }) {
|
|
6
|
+
return (React.createElement(Dialog, { open: true, maxWidth: "xl", title: "Large file warning", onClose: handleClose },
|
|
7
|
+
React.createElement(DialogContent, { style: { minWidth: 800 } },
|
|
8
|
+
React.createElement(DialogContentText, null,
|
|
9
|
+
"Are you sure you want to open file (detected size",
|
|
10
|
+
' ',
|
|
11
|
+
data.length / 1_000_000,
|
|
12
|
+
"Mb?")),
|
|
13
|
+
React.createElement(DialogActions, null,
|
|
14
|
+
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
15
|
+
handleClose(true);
|
|
16
|
+
} }, "Submit"),
|
|
17
|
+
React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
|
|
18
|
+
handleClose(false);
|
|
19
|
+
} }, "Cancel"))));
|
|
20
|
+
});
|
|
21
|
+
export default SettingsDialog;
|
|
22
|
+
//# sourceMappingURL=AreYouSureDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreYouSureDialog.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/AreYouSureDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EACL,MAAM,EACN,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,MAAM,cAAc,GAAG,QAAQ,CAAC,UAAU,EACxC,IAAI,EACJ,WAAW,GAIZ;IACC,OAAO,CACL,oBAAC,MAAM,IAAC,IAAI,QAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,oBAAoB,EAAC,OAAO,EAAE,WAAW;QACxE,oBAAC,aAAa,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;YACrC,oBAAC,iBAAiB;;gBACkC,GAAG;gBACpD,IAAI,CAAC,MAAM,GAAG,SAAS;sBACN,CACN;QAChB,oBAAC,aAAa;YACZ,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,CAAC,IAAI,CAAC,CAAA;gBACnB,CAAC,aAGM;YACT,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,CAAC,KAAK,CAAC,CAAA;gBACpB,CAAC,aAGM,CACK,CACT,CACV,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,cAAc,CAAA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { GraphGenomeViewModel } from '../model';
|
|
3
|
+
export default function FeatureDialog({ data, model, onClose, }: {
|
|
3
4
|
data: Record<string, unknown>;
|
|
5
|
+
model: GraphGenomeViewModel;
|
|
4
6
|
onClose: () => void;
|
|
5
7
|
}): React.JSX.Element;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
// @ts-expect-error
|
|
3
|
+
import { Attributes } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail';
|
|
2
4
|
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
React.createElement("hr", null),
|
|
12
|
-
data.tags && Object.keys(data.tags).length > 0 ? (React.createElement(React.Fragment, null,
|
|
13
|
-
React.createElement("div", null, "Tags"),
|
|
14
|
-
Object.entries(data.tags).map(([key, value]) => (React.createElement("div", { key: `${key}_${value}`, style: { display: 'flex', maxHeight: 150, margin: 3 } },
|
|
15
|
-
React.createElement("div", { style: { backgroundColor: '#dda', minWidth: 100 } }, key),
|
|
16
|
-
React.createElement("div", { style: { wordBreak: 'break-word', overflow: 'auto' } }, String(value))))))) : null));
|
|
5
|
+
import { getEnv } from '@jbrowse/core/util';
|
|
6
|
+
import { DialogContent } from '@mui/material';
|
|
7
|
+
export default function FeatureDialog({ data, model, onClose, }) {
|
|
8
|
+
const { pluginManager } = getEnv(model);
|
|
9
|
+
const { BaseAttributes } = pluginManager.jbrequire('@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail');
|
|
10
|
+
const omit = ['sequence', 'source', 'target'];
|
|
11
|
+
return (React.createElement(Dialog, { open: true, maxWidth: "xl", title: "Feature details", onClose: onClose },
|
|
12
|
+
React.createElement(DialogContent, { style: { minWidth: 800 } }, BaseAttributes ? (React.createElement(BaseAttributes, { feature: data, omit: omit })) : (React.createElement(Attributes, { attributes: data, omit: omit })))));
|
|
17
13
|
}
|
|
18
14
|
//# sourceMappingURL=FeatureDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureDialog.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/FeatureDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"FeatureDialog.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/FeatureDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,mBAAmB;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAA;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAI7C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,KAAK,EACL,OAAO,GAKR;IACC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACvC,MAAM,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC,SAAS,CAChD,mDAAmD,CACpD,CAAA;IACD,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC7C,OAAO,CACL,oBAAC,MAAM,IAAC,IAAI,QAAC,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,OAAO;QACjE,oBAAC,aAAa,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,IACpC,cAAc,CAAC,CAAC,CAAC,CAChB,oBAAC,cAAc,IAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAI,CAC9C,CAAC,CAAC,CAAC,CACF,oBAAC,UAAU,IAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAI,CAC7C,CACa,CACT,CACV,CAAA;AACH,CAAC"}
|
|
@@ -5,13 +5,14 @@ import GraphPanel from './GraphPanel';
|
|
|
5
5
|
import Header from './Header';
|
|
6
6
|
const GraphGenomeView = observer(function ({ model, }) {
|
|
7
7
|
const { error } = model;
|
|
8
|
-
return (React.createElement("div",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
return (React.createElement("div", null,
|
|
9
|
+
React.createElement("div", { style: {
|
|
10
|
+
padding: 10,
|
|
11
|
+
} },
|
|
12
|
+
React.createElement(Header, { model: model }),
|
|
13
|
+
React.createElement("div", null,
|
|
14
|
+
error ? React.createElement(ErrorMessage, { error: error }) : null,
|
|
15
|
+
React.createElement(GraphPanel, { model: model })))));
|
|
15
16
|
});
|
|
16
17
|
export default GraphGenomeView;
|
|
17
18
|
//# sourceMappingURL=GraphGenomeView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphGenomeView.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/GraphGenomeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,MAAM,MAAM,UAAU,CAAA;AAI7B,MAAM,eAAe,GAAG,QAAQ,CAAC,UAAU,EACzC,KAAK,GAGN;IACC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;IACvB,OAAO,CACL,6BACE,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"GraphGenomeView.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/GraphGenomeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,MAAM,MAAM,UAAU,CAAA;AAI7B,MAAM,eAAe,GAAG,QAAQ,CAAC,UAAU,EACzC,KAAK,GAGN;IACC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;IACvB,OAAO,CACL;QACE,6BACE,KAAK,EAAE;gBACL,OAAO,EAAE,EAAE;aACZ;YAED,oBAAC,MAAM,IAAC,KAAK,EAAE,KAAK,GAAI;YACxB;gBACG,KAAK,CAAC,CAAC,CAAC,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI;gBAC9C,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI,CACxB,CACF,CACF,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,eAAe,CAAA"}
|
|
@@ -3,15 +3,19 @@ import { Graph } from 'graphgenomeviewer';
|
|
|
3
3
|
import { observer } from 'mobx-react';
|
|
4
4
|
import FeatureDialog from './FeatureDialog';
|
|
5
5
|
const GraphPanel = observer(function ({ model, }) {
|
|
6
|
-
const { graph } = model;
|
|
6
|
+
const { graph, height, graphSettings, resultData, redrawCounter } = model;
|
|
7
|
+
const { chunkSize, colorScheme, linkSteps, linkThickness, sequenceThickness, drawPaths, drawLabels, drawNodeHandles, } = graphSettings;
|
|
7
8
|
const [featureData, setFeatureData] = useState();
|
|
8
|
-
return graph ? (React.createElement(
|
|
9
|
-
featureData ? (React.createElement(FeatureDialog, { data: featureData, onClose: () => {
|
|
9
|
+
return graph ? (React.createElement("div", null,
|
|
10
|
+
featureData ? (React.createElement(FeatureDialog, { data: featureData, model: model, onClose: () => {
|
|
10
11
|
setFeatureData(undefined);
|
|
11
12
|
} })) : null,
|
|
12
|
-
React.createElement(
|
|
13
|
-
|
|
14
|
-
} }
|
|
13
|
+
React.createElement("div", { ref: ref => {
|
|
14
|
+
model.setRef(ref);
|
|
15
|
+
} },
|
|
16
|
+
React.createElement(Graph, { key: `${resultData}-${redrawCounter}-${chunkSize}`, graph: graph, height: height, chunkSize: chunkSize, linkSteps: linkSteps, sequenceThickness: sequenceThickness, linkThickness: linkThickness, colorScheme: colorScheme, drawLabels: drawLabels, drawNodeHandles: drawNodeHandles, drawPaths: drawPaths, onFeatureClick: data => {
|
|
17
|
+
setFeatureData(data);
|
|
18
|
+
} })))) : null;
|
|
15
19
|
});
|
|
16
20
|
export default GraphPanel;
|
|
17
21
|
//# sourceMappingURL=GraphPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphPanel.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/GraphPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAI3C,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,EACpC,KAAK,GAGN;IACC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"GraphPanel.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/GraphPanel.tsx"],"names":[],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AAS,EACpB,cAAc,EAAE,IAAI,CAAC,EAAE;oBACrB,cAAc,CAAC,IAAI,CAAC,CAAA;gBACtB,CAAC,GACD,CACE,CACF,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAC,CAAA;AAEF,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const GraphSettings: ({ tmpLinkSteps, setTmpLinkSteps, tmpChunkSize, setTmpChunkSize, tmpStrengthCenter, setTmpStrengthCenter, tmpSequenceThickness, setTmpSequenceThickness, tmpLinkThickness, setTmpLinkThickness, }: {
|
|
3
|
+
tmpLinkSteps: number;
|
|
4
|
+
setTmpLinkSteps: (val: number) => void;
|
|
5
|
+
tmpChunkSize: string;
|
|
6
|
+
setTmpChunkSize: (val: string) => void;
|
|
7
|
+
tmpStrengthCenter: number;
|
|
8
|
+
setTmpStrengthCenter: (val: number) => void;
|
|
9
|
+
tmpSequenceThickness: number;
|
|
10
|
+
setTmpSequenceThickness: (val: number) => void;
|
|
11
|
+
tmpLinkThickness: number;
|
|
12
|
+
setTmpLinkThickness: (val: number) => void;
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
export default GraphSettings;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Paper, Slider, TextField, Typography } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
const GraphSettings = observer(function ({ tmpLinkSteps, setTmpLinkSteps, tmpChunkSize, setTmpChunkSize, tmpStrengthCenter, setTmpStrengthCenter, tmpSequenceThickness, setTmpSequenceThickness, tmpLinkThickness, setTmpLinkThickness, }) {
|
|
5
|
+
return (React.createElement("div", { style: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
flexDirection: 'column',
|
|
8
|
+
gap: 20,
|
|
9
|
+
marginTop: 20,
|
|
10
|
+
} },
|
|
11
|
+
React.createElement(Paper, { elevation: 6, style: { padding: 16 } },
|
|
12
|
+
React.createElement("div", null,
|
|
13
|
+
React.createElement(Typography, { variant: "h6" }, "Number of simulation steps for the links"),
|
|
14
|
+
React.createElement("br", null),
|
|
15
|
+
React.createElement("div", null, "Increases the rigidity of the simulation, higher numbers e.g. 10 makes things much less floppy")),
|
|
16
|
+
React.createElement("div", null,
|
|
17
|
+
React.createElement(Slider, { min: 1, max: 20, value: +tmpLinkSteps, onChange: (_event, val) => {
|
|
18
|
+
setTmpLinkSteps(val);
|
|
19
|
+
} }),
|
|
20
|
+
"Current value: ",
|
|
21
|
+
tmpLinkSteps)),
|
|
22
|
+
React.createElement(Paper, { elevation: 6, style: { padding: 16 } },
|
|
23
|
+
React.createElement("div", null,
|
|
24
|
+
React.createElement(Typography, { variant: "h6" }, "Sequence chunk size"),
|
|
25
|
+
React.createElement("br", null),
|
|
26
|
+
React.createElement("div", null, "If a contig is of length 5000, then chunk length 1000 would become 5 segments. Note: contigs smaller than the chunk length may be less proportionally sized (they do not get spaghettified)")),
|
|
27
|
+
React.createElement("div", null,
|
|
28
|
+
React.createElement(TextField, { value: tmpChunkSize, onChange: event => {
|
|
29
|
+
setTmpChunkSize(event.target.value);
|
|
30
|
+
} }))),
|
|
31
|
+
React.createElement(Paper, { elevation: 6, style: { padding: 16 } },
|
|
32
|
+
React.createElement("div", null,
|
|
33
|
+
React.createElement(Typography, { variant: "h6" }, "Strength (particle charge)"),
|
|
34
|
+
React.createElement("br", null),
|
|
35
|
+
React.createElement("div", null, "Akin to charged particle force, a large negative number increases the repulsive force")),
|
|
36
|
+
React.createElement("div", null,
|
|
37
|
+
React.createElement(Slider, { min: -100, max: -1, value: tmpStrengthCenter, onChange: (_event, val) => {
|
|
38
|
+
setTmpStrengthCenter(val);
|
|
39
|
+
} }),
|
|
40
|
+
"Current value: ",
|
|
41
|
+
tmpStrengthCenter)),
|
|
42
|
+
React.createElement(Paper, { elevation: 6, style: { padding: 16 } },
|
|
43
|
+
React.createElement("div", null,
|
|
44
|
+
React.createElement(Typography, { variant: "h6" }, "Sequence thickness (px)")),
|
|
45
|
+
React.createElement("div", null,
|
|
46
|
+
React.createElement(Slider, { min: 1, max: 20, value: tmpSequenceThickness, onChange: (_event, val) => {
|
|
47
|
+
setTmpSequenceThickness(val);
|
|
48
|
+
} }),
|
|
49
|
+
"Current value: ",
|
|
50
|
+
tmpSequenceThickness,
|
|
51
|
+
"px")),
|
|
52
|
+
React.createElement(Paper, { elevation: 6, style: { padding: 16 } },
|
|
53
|
+
React.createElement("div", null,
|
|
54
|
+
React.createElement(Typography, { variant: "h6" }, "Link thickness (px)")),
|
|
55
|
+
React.createElement("div", null,
|
|
56
|
+
React.createElement(Slider, { min: 1, max: 20, value: tmpLinkThickness, onChange: (_event, val) => {
|
|
57
|
+
setTmpLinkThickness(val);
|
|
58
|
+
} }),
|
|
59
|
+
"Current value: ",
|
|
60
|
+
tmpLinkThickness,
|
|
61
|
+
"px"))));
|
|
62
|
+
});
|
|
63
|
+
export default GraphSettings;
|
|
64
|
+
//# sourceMappingURL=GraphSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphSettings.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/GraphSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU,EACvC,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,GAYpB;IACC,OAAO,CACL,6BACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,EAA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AC,KAAK,IAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YACzC;gBACE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,8BAAqC,CACzD;YACN;gBACE,oBAAC,MAAM,IACL,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,EAAE,EACP,KAAK,EAAE,oBAAoB,EAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;wBACxB,uBAAuB,CAAC,GAAa,CAAC,CAAA;oBACxC,CAAC,GACD;;gBACc,oBAAoB;qBAChC,CACA;QACR,oBAAC,KAAK,IAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YACzC;gBACE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,0BAAiC,CACrD;YACN;gBACE,oBAAC,MAAM,IACL,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,EAAE,EACP,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;wBACxB,mBAAmB,CAAC,GAAa,CAAC,CAAA;oBACpC,CAAC,GACD;;gBACc,gBAAgB;qBAC5B,CACA,CACJ,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,aAAa,CAAA"}
|
|
@@ -2,58 +2,58 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
3
|
import { getSession } from '@jbrowse/core/util';
|
|
4
4
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
5
|
-
import { Button, IconButton, TextField } from '@mui/material';
|
|
6
5
|
import { observer } from 'mobx-react';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import AreYouSureDialog from './AreYouSureDialog';
|
|
7
|
+
import HeaderMenu from './HeaderMenu';
|
|
8
|
+
import LocStringInput from './LocStringInput';
|
|
9
9
|
const Header = observer(function ({ model }) {
|
|
10
10
|
const { mode } = model;
|
|
11
|
-
const [val, setVal] = useState('GRCh38#chr21:1000-2000');
|
|
12
11
|
const [loc, setLoc] = useState();
|
|
13
12
|
useEffect(() => {
|
|
14
13
|
if (!loc) {
|
|
15
14
|
return;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
17
|
+
;
|
|
18
|
+
(async () => {
|
|
19
|
+
try {
|
|
20
|
+
model.setError(undefined);
|
|
21
|
+
const data = await openLocation(loc).readFile('utf8');
|
|
22
|
+
if (data.length > 5_000_000) {
|
|
23
|
+
getSession(globalThis).queueDialog(handleClose => [
|
|
24
|
+
AreYouSureDialog,
|
|
25
|
+
{
|
|
26
|
+
handleClose: (arg) => {
|
|
27
|
+
if (arg) {
|
|
28
|
+
if ('uri' in loc) {
|
|
29
|
+
model.setGfaUrl(loc.uri);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
model.setResultData(data);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
handleClose();
|
|
36
|
+
},
|
|
37
|
+
data,
|
|
38
|
+
},
|
|
39
|
+
]);
|
|
28
40
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
model.setError(e);
|
|
41
|
+
else {
|
|
42
|
+
model.setResultData(data);
|
|
32
43
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
console.error(e);
|
|
47
|
+
model.setError(e);
|
|
48
|
+
}
|
|
49
|
+
})();
|
|
35
50
|
});
|
|
36
|
-
return (React.createElement("div", { style: { display: 'flex' } },
|
|
51
|
+
return (React.createElement("div", { style: { display: 'flex', gap: 40 } },
|
|
52
|
+
React.createElement(HeaderMenu, { model: model }),
|
|
37
53
|
mode === 'files' ? (React.createElement("div", { style: { maxWidth: 500 } },
|
|
38
|
-
React.createElement(FileSelector, { name: "GFA
|
|
54
|
+
React.createElement(FileSelector, { name: "Open a GFA file", inline: true, location: loc, setLocation: loc => {
|
|
39
55
|
setLoc(loc);
|
|
40
|
-
} }))) : (React.createElement(
|
|
41
|
-
React.createElement(TextField, { type: "text", variant: "outlined", margin: "normal", size: "small", value: val, style: { minWidth: 500 }, onChange: event => {
|
|
42
|
-
setVal(event.target.value);
|
|
43
|
-
} }),
|
|
44
|
-
React.createElement(Button, { variant: "contained", type: "submit" }, "Submit"))),
|
|
45
|
-
React.createElement("div", { style: { flexGrow: 1 } }),
|
|
46
|
-
React.createElement("div", null,
|
|
47
|
-
React.createElement(IconButton, { onClick: () => {
|
|
48
|
-
getSession(model).queueDialog(handleClose => [
|
|
49
|
-
SettingsDialog,
|
|
50
|
-
{
|
|
51
|
-
handleClose,
|
|
52
|
-
model,
|
|
53
|
-
},
|
|
54
|
-
]);
|
|
55
|
-
} },
|
|
56
|
-
React.createElement(Settings, null)))));
|
|
56
|
+
} }))) : (React.createElement(LocStringInput, { model: model }))));
|
|
57
57
|
});
|
|
58
58
|
export default Header;
|
|
59
59
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAgB,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/Header.tsx"],"names":[],"mappings":"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AC;wCACN,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;oCAC3B,CAAC;gCACH,CAAC;gCACD,WAAW,EAAE,CAAA;4BACf,CAAC;4BACD,IAAI;yBACL;qBACF,CAAC,CAAA;gBACJ,CAAC;qBAAM,CAAC;oBACN,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;gBAC3B,CAAC;YACH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAChB,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;YACnB,CAAC;QACH,CAAC,CAAC,EAAE,CAAA;IACN,CAAC,CAAC,CAAA;IACF,OAAO,CACL,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE;QACtC,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI;QAE3B,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAClB,6BAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;YAC3B,oBAAC,YAAY,IACX,IAAI,EAAC,iBAAiB,EACtB,MAAM,QACN,QAAQ,EAAE,GAAG,EACb,WAAW,EAAE,GAAG,CAAC,EAAE;oBACjB,MAAM,CAAC,GAAG,CAAC,CAAA;gBACb,CAAC,GACD,CACE,CACP,CAAC,CAAC,CAAC,CACF,oBAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,CACjC,CACG,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CascadingMenuButton from '@jbrowse/core/ui/CascadingMenuButton';
|
|
3
|
+
import { getSession } from '@jbrowse/core/util';
|
|
4
|
+
import MenuIcon from '@mui/icons-material/Menu';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { Settings } from '@mui/icons-material';
|
|
7
|
+
import SettingsDialog from './SettingsDialog';
|
|
8
|
+
const HeaderMenu = observer(function ({ model, }) {
|
|
9
|
+
const { graphSettings } = model;
|
|
10
|
+
const { colorScheme, drawNodeHandles, drawPaths, drawLabels } = graphSettings;
|
|
11
|
+
return (React.createElement(CascadingMenuButton, { menuItems: [
|
|
12
|
+
{
|
|
13
|
+
label: 'Draw labels',
|
|
14
|
+
type: 'checkbox',
|
|
15
|
+
checked: drawLabels,
|
|
16
|
+
onClick: () => {
|
|
17
|
+
graphSettings.setDrawLabels(!drawLabels);
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'Draw paths',
|
|
22
|
+
type: 'checkbox',
|
|
23
|
+
checked: drawPaths,
|
|
24
|
+
onClick: () => {
|
|
25
|
+
graphSettings.setDrawPaths(!drawPaths);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'Draw node handles',
|
|
30
|
+
type: 'checkbox',
|
|
31
|
+
checked: drawNodeHandles,
|
|
32
|
+
onClick: () => {
|
|
33
|
+
graphSettings.setDrawNodeHandles(!drawNodeHandles);
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: 'Force redraw',
|
|
38
|
+
onClick: () => {
|
|
39
|
+
model.redraw();
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'Color scheme',
|
|
44
|
+
subMenu: [
|
|
45
|
+
'JustGrey',
|
|
46
|
+
'Turbo',
|
|
47
|
+
'Rainbow',
|
|
48
|
+
'Spectral',
|
|
49
|
+
'Viridis',
|
|
50
|
+
'RdYlBu',
|
|
51
|
+
].map(r => ({
|
|
52
|
+
label: r,
|
|
53
|
+
type: 'radio',
|
|
54
|
+
checked: colorScheme === r,
|
|
55
|
+
onClick: () => {
|
|
56
|
+
graphSettings.setColorScheme(r);
|
|
57
|
+
},
|
|
58
|
+
})),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Export SVG',
|
|
62
|
+
onClick: () => {
|
|
63
|
+
model.exportSVG();
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Settings',
|
|
68
|
+
icon: Settings,
|
|
69
|
+
onClick: () => {
|
|
70
|
+
getSession(model).queueDialog(handleClose => [
|
|
71
|
+
SettingsDialog,
|
|
72
|
+
{
|
|
73
|
+
handleClose,
|
|
74
|
+
model,
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
] },
|
|
80
|
+
React.createElement(MenuIcon, null)));
|
|
81
|
+
});
|
|
82
|
+
export default HeaderMenu;
|
|
83
|
+
//# sourceMappingURL=HeaderMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderMenu.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/HeaderMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,mBAAmB,MAAM,sCAAsC,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,QAAQ,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAI7C,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,EACpC,KAAK,GAGN;IACC,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAA;IAC/B,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,aAAa,CAAA;IAC7E,OAAO,CACL,oBAAC,mBAAmB,IAClB,SAAS,EAAE;YACT;gBACE,KAAK,EAAE,aAAa;gBACpB,IAAI,EAAE,UAAU;gBAChB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WAAW,CAAC,WAAW,CAAC,EAAE,CAAC;wBAC3C,cAAc;wBACd;4BACE,WAAW;4BACX,KAAK;yBACN;qBACF,CAAC,CAAA;gBACJ,CAAC;aACF;SACF;QAED,oBAAC,QAAQ,OAAG,CACQ,CACvB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
+
import { Button, DialogActions, DialogContent, DialogContentText, } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
const HelpDialog = observer(function ({ handleClose, }) {
|
|
6
|
+
return (React.createElement(Dialog, { open: true, maxWidth: "xl", title: "Help with loc string input", onClose: handleClose },
|
|
7
|
+
React.createElement(DialogContent, { style: { maxWidth: 500 } },
|
|
8
|
+
React.createElement(DialogContentText, null, "Enter a genomic region, including the PanSN prefix for the assembly e.g. GRCh38#chr21:1,000,000-1,000,500. This parameter will be passed as the \"--path\" argument to vg chunk")),
|
|
9
|
+
React.createElement(DialogActions, null,
|
|
10
|
+
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
11
|
+
handleClose();
|
|
12
|
+
} }, "Close"))));
|
|
13
|
+
});
|
|
14
|
+
export default HelpDialog;
|
|
15
|
+
//# sourceMappingURL=HelpDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpDialog.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/HelpDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EACL,MAAM,EACN,aAAa,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,EACpC,WAAW,GAGZ;IACC,OAAO,CACL,oBAAC,MAAM,IACL,IAAI,QACJ,QAAQ,EAAC,IAAI,EACb,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,WAAW;QAEpB,oBAAC,aAAa,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;YACrC,oBAAC,iBAAiB,0LAIE,CACN;QAChB,oBAAC,aAAa;YACZ,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,EAAE,CAAA;gBACf,CAAC,YAGM,CACK,CACT,CACV,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getSession } from '@jbrowse/core/util';
|
|
3
|
+
import { Button, IconButton, TextField } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import { Help } from '@mui/icons-material';
|
|
6
|
+
import HelpDialog from './HelpDialog';
|
|
7
|
+
const LocStringInput = observer(function LocStringInput({ model, }) {
|
|
8
|
+
const { locstring } = model;
|
|
9
|
+
return (React.createElement("div", null,
|
|
10
|
+
React.createElement(TextField, { type: "text", variant: "outlined", placeholder: "GRCh38#chr21:1,000,000-1,000,500", value: locstring, style: { margin: 0, marginRight: 10, minWidth: 500 }, onChange: event => {
|
|
11
|
+
model.setGenomicRegionLocString(event.target.value);
|
|
12
|
+
} }),
|
|
13
|
+
React.createElement(Button, { variant: "contained", type: "submit" }, "Submit"),
|
|
14
|
+
React.createElement(IconButton, { onClick: () => {
|
|
15
|
+
getSession(model).queueDialog(handleClose => [
|
|
16
|
+
HelpDialog,
|
|
17
|
+
{ handleClose },
|
|
18
|
+
]);
|
|
19
|
+
} },
|
|
20
|
+
React.createElement(Help, null))));
|
|
21
|
+
});
|
|
22
|
+
export default LocStringInput;
|
|
23
|
+
//# sourceMappingURL=LocStringInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocStringInput.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/LocStringInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAE1C,OAAO,UAAU,MAAM,cAAc,CAAA;AAIrC,MAAM,cAAc,GAAG,QAAQ,CAAC,SAAS,cAAc,CAAC,EACtD,KAAK,GAGN;IACC,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAA;IAC3B,OAAO,CACL;QACE,oBAAC,SAAS,IACR,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,UAAU,EAClB,WAAW,EAAC,kCAAkC,EAC9C,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,EACpD,QAAQ,EAAE,KAAK,CAAC,EAAE;gBAChB,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACrD,CAAC,GACD;QACF,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,QAAQ,aAEhC;QACT,oBAAC,UAAU,IACT,OAAO,EAAE,GAAG,EAAE;gBACZ,UAAU,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC;oBAC3C,UAAU;oBACV,EAAE,WAAW,EAAE;iBAChB,CAAC,CAAA;YACJ,CAAC;YAED,oBAAC,IAAI,OAAG,CACG,CACT,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AACF,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextField, Typography } from '@mui/material';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
const ServerSettings = observer(function ({ model, }) {
|
|
5
|
+
const { serverRoot } = model;
|
|
6
|
+
return (React.createElement("div", null,
|
|
7
|
+
React.createElement("div", null, "Server settings:"),
|
|
8
|
+
React.createElement(TextField, { label: "Path to the simpleGfaServer e.g. http://localhost:9000/", style: { minWidth: 500 }, value: serverRoot, onChange: event => {
|
|
9
|
+
model.setServerRoot(event.target.value);
|
|
10
|
+
} }),
|
|
11
|
+
React.createElement("div", null,
|
|
12
|
+
React.createElement(Typography, { variant: "h6" }, "What is the GFA server?"),
|
|
13
|
+
React.createElement("div", null,
|
|
14
|
+
"It is a server that runs vg commands on pre-configured .vg graph files. It requires a server side setup to use, please see",
|
|
15
|
+
' ',
|
|
16
|
+
React.createElement("a", { href: "https://github.com/cmdcolin/jbrowse-plugin-graphgenomeviewer/" }, "here"),
|
|
17
|
+
' ',
|
|
18
|
+
"for details"),
|
|
19
|
+
React.createElement("div", null, "The alternative way to use this plugin is to run these vg commands yourself, and open the raw GFA files"))));
|
|
20
|
+
});
|
|
21
|
+
export default ServerSettings;
|
|
22
|
+
//# sourceMappingURL=ServerSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerSettings.js","sourceRoot":"","sources":["../../../src/GraphGenomeView/components/ServerSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAIrC,MAAM,cAAc,GAAG,QAAQ,CAAC,UAAU,EACxC,KAAK,GAGN;IACC,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;IAC5B,OAAO,CACL;QACE,oDAA2B;QAC3B,oBAAC,SAAS,IACR,KAAK,EAAC,yDAAyD,EAC/D,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,EACxB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,KAAK,CAAC,EAAE;gBAChB,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACzC,CAAC,GACD;QACF;YACE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,8BAAqC;YAC7D;;gBAE4D,GAAG;gBAC7D,2BAAG,IAAI,EAAC,+DAA+D,WAEnE;gBAAC,GAAG;8BAEJ;YACN,2IAGM,CACF,CACF,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,cAAc,CAAA"}
|
|
@@ -1,19 +1,40 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import { Dialog } from '@jbrowse/core/ui';
|
|
3
|
-
import { Button, DialogActions, DialogContent, FormControl, FormControlLabel, Radio, RadioGroup, } from '@mui/material';
|
|
3
|
+
import { Button, DialogActions, DialogContent, FormControl, FormControlLabel, Radio, RadioGroup, Tab, Tabs, } from '@mui/material';
|
|
4
4
|
import { observer } from 'mobx-react';
|
|
5
|
+
import GraphSettings from './GraphSettings';
|
|
6
|
+
import ServerSettings from './ServerSettings';
|
|
5
7
|
const SettingsDialog = observer(function ({ model, handleClose, }) {
|
|
6
|
-
const { mode } = model;
|
|
8
|
+
const { mode, graphSettings } = model;
|
|
9
|
+
const [tabValue, setTabValue] = useState(0);
|
|
10
|
+
const { chunkSize, strengthCenter, linkThickness, linkSteps, sequenceThickness, } = graphSettings;
|
|
11
|
+
const [tmpChunkSize, setTmpChunkSize] = useState(`${chunkSize}`);
|
|
12
|
+
const [tmpLinkSteps, setTmpLinkSteps] = useState(linkSteps);
|
|
13
|
+
const [tmpStrengthCenter, setTmpStrengthCenter] = useState(strengthCenter);
|
|
14
|
+
const [tmpSequenceThickness, setTmpSequenceThickness] = useState(sequenceThickness);
|
|
15
|
+
const [tmpLinkThickness, setTmpLinkThickness] = useState(linkThickness);
|
|
7
16
|
return (React.createElement(Dialog, { open: true, maxWidth: "xl", title: "Settings", onClose: handleClose },
|
|
8
17
|
React.createElement(DialogContent, { style: { minWidth: 800 } },
|
|
9
|
-
React.createElement(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
React.createElement(Tabs, { value: tabValue, onChange: (_event, newValue) => {
|
|
19
|
+
setTabValue(newValue);
|
|
20
|
+
} },
|
|
21
|
+
React.createElement(Tab, { label: "Graph Settings" }),
|
|
22
|
+
React.createElement(Tab, { label: "Mode Settings" })),
|
|
23
|
+
tabValue === 1 ? (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(FormControl, { component: "fieldset" },
|
|
25
|
+
React.createElement(RadioGroup, { value: mode, onChange: event => {
|
|
26
|
+
model.setMode(event.target.value);
|
|
27
|
+
} },
|
|
28
|
+
React.createElement(FormControlLabel, { value: "files", control: React.createElement(Radio, null), label: "Use GFA files" }),
|
|
29
|
+
React.createElement(FormControlLabel, { value: "server", control: React.createElement(Radio, null), label: "Use GFA server" }))),
|
|
30
|
+
mode === 'server' ? React.createElement(ServerSettings, { model: model }) : null)) : (React.createElement(GraphSettings, { tmpLinkSteps: tmpLinkSteps, setTmpLinkSteps: setTmpLinkSteps, tmpChunkSize: tmpChunkSize, setTmpChunkSize: setTmpChunkSize, tmpStrengthCenter: tmpStrengthCenter, setTmpStrengthCenter: setTmpStrengthCenter, tmpSequenceThickness: tmpSequenceThickness, setTmpSequenceThickness: setTmpSequenceThickness, tmpLinkThickness: tmpLinkThickness, setTmpLinkThickness: setTmpLinkThickness }))),
|
|
15
31
|
React.createElement(DialogActions, null,
|
|
16
32
|
React.createElement(Button, { variant: "contained", onClick: () => {
|
|
33
|
+
graphSettings.setChunkSize(+tmpChunkSize);
|
|
34
|
+
graphSettings.setLinkSteps(+tmpLinkSteps);
|
|
35
|
+
graphSettings.setStrengthCenter(+tmpStrengthCenter);
|
|
36
|
+
graphSettings.setSequenceThickness(+tmpSequenceThickness);
|
|
37
|
+
graphSettings.setLinkThickness(+tmpLinkThickness);
|
|
17
38
|
handleClose();
|
|
18
39
|
} }, "Submit"),
|
|
19
40
|
React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
|