@jbrowse/plugin-linear-comparative-view 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LGVSyntenyDisplay/model.d.ts +4 -7
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +4 -0
- package/dist/LinearComparativeDisplay/stateModelFactory.js +14 -7
- package/dist/LinearComparativeView/components/HeaderSearchBoxes.js +2 -2
- package/dist/LinearComparativeView/components/Rubberband.d.ts +2 -2
- package/dist/LinearComparativeView/components/Rubberband.js +16 -154
- package/dist/LinearComparativeView/components/RubberbandSpan.d.ts +15 -0
- package/dist/LinearComparativeView/components/RubberbandSpan.js +38 -0
- package/dist/LinearComparativeView/components/RubberbandTooltip.d.ts +5 -0
- package/dist/LinearComparativeView/components/RubberbandTooltip.js +20 -0
- package/dist/LinearComparativeView/components/useRangeSelect.d.ts +59 -0
- package/dist/LinearComparativeView/components/useRangeSelect.js +128 -0
- package/dist/LinearComparativeView/components/util.d.ts +4 -0
- package/dist/LinearComparativeView/components/util.js +6 -0
- package/dist/LinearComparativeView/model.d.ts +2 -0
- package/dist/LinearSyntenyDisplay/components/BlockError.d.ts +3 -0
- package/dist/LinearSyntenyDisplay/components/BlockError.js +16 -0
- package/dist/LinearSyntenyDisplay/components/BlockMessage.d.ts +3 -0
- package/dist/LinearSyntenyDisplay/components/BlockMessage.js +24 -0
- package/dist/LinearSyntenyDisplay/components/Component.js +11 -50
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.d.ts +3 -0
- package/dist/LinearSyntenyDisplay/components/LoadingMessage.js +21 -0
- package/dist/LinearSyntenyDisplay/model.d.ts +4 -0
- package/dist/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +2 -51
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +3 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +13 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +3 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +13 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.d.ts +19 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.js +10 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +3 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +20 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.d.ts +13 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +32 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +4 -0
- package/dist/LinearSyntenyView/components/ImportForm/selectors/index.js +27 -0
- package/dist/LinearSyntenyView/model.d.ts +2 -0
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +1 -1
- package/esm/LGVSyntenyDisplay/model.d.ts +4 -7
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +4 -0
- package/esm/LinearComparativeDisplay/stateModelFactory.js +14 -7
- package/esm/LinearComparativeView/components/HeaderSearchBoxes.js +2 -2
- package/esm/LinearComparativeView/components/Rubberband.d.ts +2 -2
- package/esm/LinearComparativeView/components/Rubberband.js +17 -155
- package/esm/LinearComparativeView/components/RubberbandSpan.d.ts +15 -0
- package/esm/LinearComparativeView/components/RubberbandSpan.js +32 -0
- package/esm/LinearComparativeView/components/RubberbandTooltip.d.ts +5 -0
- package/esm/LinearComparativeView/components/RubberbandTooltip.js +17 -0
- package/esm/LinearComparativeView/components/useRangeSelect.d.ts +59 -0
- package/esm/LinearComparativeView/components/useRangeSelect.js +125 -0
- package/esm/LinearComparativeView/components/util.d.ts +4 -0
- package/esm/LinearComparativeView/components/util.js +3 -0
- package/esm/LinearComparativeView/model.d.ts +2 -0
- package/esm/LinearSyntenyDisplay/components/BlockError.d.ts +3 -0
- package/esm/LinearSyntenyDisplay/components/BlockError.js +13 -0
- package/esm/LinearSyntenyDisplay/components/BlockMessage.d.ts +3 -0
- package/esm/LinearSyntenyDisplay/components/BlockMessage.js +21 -0
- package/esm/LinearSyntenyDisplay/components/Component.js +9 -48
- package/esm/LinearSyntenyDisplay/components/LoadingMessage.d.ts +3 -0
- package/esm/LinearSyntenyDisplay/components/LoadingMessage.js +18 -0
- package/esm/LinearSyntenyDisplay/model.d.ts +4 -0
- package/esm/LinearSyntenyView/components/ImportForm/ImportSyntenyOpenCustomTrack.js +3 -49
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.d.ts +3 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/AnchorsSelector.js +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.d.ts +3 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/PifGzSelector.js +8 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.d.ts +19 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/SelectorTypes.js +7 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.d.ts +3 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/StandardFormatSelector.js +15 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.d.ts +13 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/SwapAssemblies.js +27 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.d.ts +4 -0
- package/esm/LinearSyntenyView/components/ImportForm/selectors/index.js +4 -0
- package/esm/LinearSyntenyView/model.d.ts +2 -0
- package/esm/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +1 -1
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { ErrorMessage, FileSelector } from '@jbrowse/core/ui';
|
|
4
|
-
import
|
|
5
|
-
import { Button, FormControlLabel, Grid, Paper, Radio, RadioGroup, Tooltip, Typography, } from '@mui/material';
|
|
4
|
+
import { FormControlLabel, Grid, Paper, Radio, RadioGroup, Typography, } from '@mui/material';
|
|
6
5
|
import { observer } from 'mobx-react';
|
|
7
6
|
import { getAdapter } from './getAdapter';
|
|
7
|
+
import { AnchorsSelector, PifGzSelector, StandardFormatSelector, } from './selectors';
|
|
8
8
|
import { basename, extName, getName, stripGz } from './util';
|
|
9
9
|
const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, assembly2, selectedRow, }) {
|
|
10
10
|
const [swap, setSwap] = useState(false);
|
|
@@ -59,13 +59,6 @@ const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, asse
|
|
|
59
59
|
indexFileLocation,
|
|
60
60
|
radioOption,
|
|
61
61
|
]);
|
|
62
|
-
const helpStrings = {
|
|
63
|
-
'.paf': 'minimap2 target.fa query.fa',
|
|
64
|
-
'.pif.gz': 'minimap2 target.fa query.fa',
|
|
65
|
-
'.out': 'mashmap target.fa query.fa',
|
|
66
|
-
'.delta': 'mummer target.fa query.fa',
|
|
67
|
-
'.chain': 'e.g. queryToTarget.chain',
|
|
68
|
-
};
|
|
69
62
|
return (_jsxs(Paper, { style: { padding: 12 }, children: [error ? _jsx(ErrorMessage, { error: error }) : null, _jsx(Typography, { style: { textAlign: 'center' }, children: "Add a .paf (minimap2), .delta (Mummer), .chain (UCSC liftover), .anchors or .anchors.simple (MCScan), or .pif.gz (jbrowse CLI make-pif) file to view. These file types can also be gzipped." }), _jsx(RadioGroup, { value: radioOption, onChange: event => {
|
|
70
63
|
setValue(event.target.value);
|
|
71
64
|
}, children: _jsx(Grid, { container: true, justifyContent: "center", children: [
|
|
@@ -79,46 +72,7 @@ const ImportSyntenyOpenCustomTrack = observer(function ({ model, assembly1, asse
|
|
|
79
72
|
].map(extension => (_jsx(FormControlLabel, { value: extension, control: _jsx(Radio, {}), label: extension }, extension))) }) }), _jsx(Grid, { container: true, justifyContent: "center", children: radioOption === '.paf' ||
|
|
80
73
|
radioOption === '.out' ||
|
|
81
74
|
radioOption === '.delta' ||
|
|
82
|
-
radioOption === '.chain' ||
|
|
83
|
-
radioOption === '.pif.gz' ? (_jsxs("div", { style: {
|
|
84
|
-
display: 'flex',
|
|
85
|
-
flexDirection: 'column',
|
|
86
|
-
gap: 10,
|
|
87
|
-
}, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: loc => {
|
|
88
|
-
setFileLocation(loc);
|
|
89
|
-
} }), _jsxs("div", { children: [_jsxs("div", { children: ["Verify or click swap", _jsx(Tooltip, { title: _jsx("code", { children: helpStrings[radioOption] }), children: _jsx(HelpIcon, {}) })] }), _jsxs("div", { style: {
|
|
90
|
-
display: 'flex',
|
|
91
|
-
gap: 20,
|
|
92
|
-
}, children: [_jsxs("div", { style: {
|
|
93
|
-
display: 'grid',
|
|
94
|
-
gridTemplateColumns: '1fr 1fr',
|
|
95
|
-
gap: 4,
|
|
96
|
-
alignItems: 'center',
|
|
97
|
-
}, children: [_jsx("div", { children: _jsx("i", { children: swap ? assembly2 : assembly1 }) }), _jsx("div", { children: "query assembly" }), _jsx("div", { children: _jsx("i", { children: swap ? assembly1 : assembly2 }) }), _jsx("div", { children: "target assembly" })] }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
98
|
-
setSwap(!swap);
|
|
99
|
-
}, children: "Swap?" })] })] })] })) : value === '.anchors' || value === '.anchors.simple' ? (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", value, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', _jsx("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), _jsxs("div", { children: [_jsx(FileSelector, { inline: true, name: value, location: fileLocation, setLocation: loc => {
|
|
100
|
-
setFileLocation(loc);
|
|
101
|
-
} }), _jsx(FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: loc => {
|
|
102
|
-
setBed1Location(loc);
|
|
103
|
-
} }), _jsx(FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: loc => {
|
|
104
|
-
setBed2Location(loc);
|
|
105
|
-
} })] }), _jsxs("div", { style: {
|
|
106
|
-
margin: 'auto',
|
|
107
|
-
display: 'flex',
|
|
108
|
-
justifyContent: 'center',
|
|
109
|
-
gap: 20,
|
|
110
|
-
}, children: [_jsxs("div", { style: {
|
|
111
|
-
display: 'grid',
|
|
112
|
-
gridTemplateColumns: '1fr 1fr',
|
|
113
|
-
gap: 4,
|
|
114
|
-
alignItems: 'center',
|
|
115
|
-
}, children: [_jsx("div", { children: _jsx("i", { children: swap ? assembly2 : assembly1 }) }), _jsx("div", { children: "bed1 assembly" }), _jsx("div", { children: _jsx("i", { children: swap ? assembly1 : assembly2 }) }), _jsx("div", { children: "bed2 assembly" })] }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
116
|
-
setSwap(!swap);
|
|
117
|
-
}, children: "Swap?" })] })] })) : value === '.pif.gz' ? (_jsxs("div", { style: { display: 'flex' }, children: [_jsx("div", { children: _jsx(FileSelector, { name: `${value} location`, description: "", location: fileLocation, setLocation: loc => {
|
|
118
|
-
setFileLocation(loc);
|
|
119
|
-
} }) }), _jsx("div", { children: _jsx(FileSelector, { name: `${value} index location`, description: "", location: indexFileLocation, setLocation: loc => {
|
|
120
|
-
setIndexFileLocation(loc);
|
|
121
|
-
} }) })] })) : (_jsx(FileSelector, { name: value ? `${value} location` : '', description: "", location: fileLocation, setLocation: loc => {
|
|
75
|
+
radioOption === '.chain' ? (_jsx(StandardFormatSelector, { assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, fileLocation: fileLocation, setFileLocation: setFileLocation, radioOption: radioOption })) : radioOption === '.pif.gz' ? (_jsx(PifGzSelector, { assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, fileLocation: fileLocation, setFileLocation: setFileLocation, indexFileLocation: indexFileLocation, setIndexFileLocation: setIndexFileLocation, radioOption: radioOption })) : value === '.anchors' || value === '.anchors.simple' ? (_jsx(AnchorsSelector, { assembly1: assembly1, assembly2: assembly2, swap: swap, setSwap: setSwap, fileLocation: fileLocation, setFileLocation: setFileLocation, bed1Location: bed1Location, setBed1Location: setBed1Location, bed2Location: bed2Location, setBed2Location: setBed2Location, radioOption: value })) : (_jsx(FileSelector, { name: value ? `${value} location` : '', description: "", location: fileLocation, setLocation: loc => {
|
|
122
76
|
setFileLocation(loc);
|
|
123
77
|
} })) })] }));
|
|
124
78
|
});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SelectorProps } from './SelectorTypes';
|
|
2
|
+
declare const AnchorsSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location, setBed1Location, bed2Location, setBed2Location, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default AnchorsSelector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import SwapAssemblies from './SwapAssemblies';
|
|
5
|
+
const AnchorsSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, bed1Location = undefined, setBed1Location = () => { }, bed2Location = undefined, setBed2Location = () => { }, radioOption, }) {
|
|
6
|
+
return (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .bed files for both genome assemblies from the MCScan (Python version) pipeline", ' ', _jsx("a", { href: "https://github.com/tanghaibao/jcvi/wiki/MCscan-(Python-version)", children: "(more info)" })] }), _jsxs("div", { style: { maxWidth: 400, margin: '0 auto' }, children: [_jsx(FileSelector, { inline: true, name: radioOption, location: fileLocation, setLocation: setFileLocation }), _jsx(FileSelector, { inline: true, name: "genome 1 .bed (left column of anchors file)", description: "", location: bed1Location, setLocation: setBed1Location }), _jsx(FileSelector, { inline: true, name: "genome 2 .bed (right column of anchors file)", description: "", location: bed2Location, setLocation: setBed2Location }), _jsx(SwapAssemblies, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "bed 1 assembly", text2: "bed 2 assembly" })] })] }));
|
|
7
|
+
});
|
|
8
|
+
export default AnchorsSelector;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SelectorProps } from './SelectorTypes';
|
|
2
|
+
declare const PifGzSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation, setIndexFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default PifGzSelector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import SwapAssemblies from './SwapAssemblies';
|
|
5
|
+
const PifGzSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, indexFileLocation = undefined, setIndexFileLocation = () => { }, radioOption, }) {
|
|
6
|
+
return (_jsxs("div", { children: [_jsxs("div", { style: { margin: 20 }, children: ["Open the ", radioOption, " and .pif.gz and index file (.pif.gz.tbi or .pif.gz.csi) files for created by `jbrowse make-pif`"] }), _jsxs("div", { style: { maxWidth: 400, margin: '0 auto' }, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: setFileLocation }), _jsx(FileSelector, { name: `${radioOption} index location`, inline: true, description: "", location: indexFileLocation, setLocation: setIndexFileLocation }), _jsx(SwapAssemblies, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "query assembly", text2: "target assembly" })] })] }));
|
|
7
|
+
});
|
|
8
|
+
export default PifGzSelector;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FileLocation } from '@jbrowse/core/util/types';
|
|
2
|
+
export interface SelectorProps {
|
|
3
|
+
assembly1: string;
|
|
4
|
+
assembly2: string;
|
|
5
|
+
swap: boolean;
|
|
6
|
+
setSwap?: (swap: boolean) => void;
|
|
7
|
+
fileLocation: FileLocation | undefined;
|
|
8
|
+
setFileLocation: (location: FileLocation | undefined) => void;
|
|
9
|
+
indexFileLocation?: FileLocation | undefined;
|
|
10
|
+
setIndexFileLocation?: (location: FileLocation | undefined) => void;
|
|
11
|
+
bed1Location?: FileLocation | undefined;
|
|
12
|
+
setBed1Location?: (location: FileLocation | undefined) => void;
|
|
13
|
+
bed2Location?: FileLocation | undefined;
|
|
14
|
+
setBed2Location?: (location: FileLocation | undefined) => void;
|
|
15
|
+
radioOption: string;
|
|
16
|
+
}
|
|
17
|
+
export type SetLocationFunction = (location: FileLocation | undefined) => void;
|
|
18
|
+
export type HelpStrings = Record<string, string>;
|
|
19
|
+
export declare const helpStrings: HelpStrings;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SelectorProps } from './SelectorTypes';
|
|
2
|
+
declare const StandardFormatSelector: ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }: SelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default StandardFormatSelector;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FileSelector } from '@jbrowse/core/ui';
|
|
3
|
+
import HelpIcon from '@mui/icons-material/Help';
|
|
4
|
+
import { Tooltip } from '@mui/material';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { helpStrings } from './SelectorTypes';
|
|
7
|
+
import SwapAssemblies from './SwapAssemblies';
|
|
8
|
+
const StandardFormatSelector = observer(function ({ assembly1, assembly2, swap, setSwap, fileLocation, setFileLocation, radioOption, }) {
|
|
9
|
+
return (_jsxs("div", { style: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
gap: 10,
|
|
13
|
+
}, children: [_jsx(FileSelector, { name: `${radioOption} location`, inline: true, description: "", location: fileLocation, setLocation: setFileLocation }), _jsxs("div", { children: [_jsxs("div", { children: ["Verify or click swap", _jsx(Tooltip, { title: _jsx("code", { children: helpStrings[radioOption] }), children: _jsx(HelpIcon, {}) })] }), _jsx(SwapAssemblies, { swap: swap, radioOption: radioOption, assembly1: assembly1, assembly2: assembly2, setSwap: setSwap, text1: "query assembly", text2: "target assembly" })] })] }));
|
|
14
|
+
});
|
|
15
|
+
export default StandardFormatSelector;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface SwapAssembliesProps {
|
|
3
|
+
assembly1?: string;
|
|
4
|
+
assembly2?: string;
|
|
5
|
+
swap?: boolean;
|
|
6
|
+
setSwap?: (arg: boolean) => void;
|
|
7
|
+
radioOption: string;
|
|
8
|
+
helpContent?: ReactNode;
|
|
9
|
+
text1: string;
|
|
10
|
+
text2: string;
|
|
11
|
+
}
|
|
12
|
+
declare const SwapAssemblies: ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }: SwapAssembliesProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default SwapAssemblies;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import HelpIcon from '@mui/icons-material/Help';
|
|
3
|
+
import { Button, Tooltip } from '@mui/material';
|
|
4
|
+
import { observer } from 'mobx-react';
|
|
5
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
|
+
import { helpStrings } from './SelectorTypes';
|
|
7
|
+
const useStyles = makeStyles()({
|
|
8
|
+
row: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
gap: 20,
|
|
11
|
+
},
|
|
12
|
+
swap: {
|
|
13
|
+
display: 'grid',
|
|
14
|
+
gridTemplateColumns: '1fr 1fr',
|
|
15
|
+
gap: 4,
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const SwapAssemblies = observer(function ({ assembly1, assembly2, swap, setSwap, radioOption, helpContent, text1, text2, }) {
|
|
20
|
+
const { classes } = useStyles();
|
|
21
|
+
return (_jsxs("div", { children: [_jsxs("div", { children: ["Verify or click swap", _jsx(Tooltip, { title: helpContent || _jsx("code", { children: helpStrings[radioOption] }), children: _jsx(HelpIcon, {}) })] }), _jsxs("div", { className: classes.row, children: [_jsxs("div", { className: classes.swap, children: [_jsx("div", { children: _jsx("i", { children: swap ? assembly2 : assembly1 }) }), _jsx("div", { children: text1 }), _jsx("div", { children: _jsx("i", { children: swap ? assembly1 : assembly2 }) }), _jsx("div", { children: text2 })] }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
22
|
+
if (setSwap) {
|
|
23
|
+
setSwap(!swap);
|
|
24
|
+
}
|
|
25
|
+
}, children: "Swap?" })] })] }));
|
|
26
|
+
});
|
|
27
|
+
export default SwapAssemblies;
|
|
@@ -77,6 +77,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
77
77
|
readonly width: number;
|
|
78
78
|
readonly interRegionPaddingWidth: number;
|
|
79
79
|
readonly assemblyNames: string[];
|
|
80
|
+
readonly assemblyDisplayNames: string[];
|
|
80
81
|
readonly isTopLevelView: import("@jbrowse/core/util").AbstractViewModel | undefined;
|
|
81
82
|
readonly stickyViewHeaders: boolean | undefined;
|
|
82
83
|
readonly rubberbandTop: number;
|
|
@@ -462,6 +463,7 @@ export default function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
462
463
|
readonly width: number;
|
|
463
464
|
readonly interRegionPaddingWidth: number;
|
|
464
465
|
readonly assemblyNames: string[];
|
|
466
|
+
readonly assemblyDisplayNames: string[];
|
|
465
467
|
readonly isTopLevelView: import("@jbrowse/core/util").AbstractViewModel | undefined;
|
|
466
468
|
readonly stickyViewHeaders: boolean | undefined;
|
|
467
469
|
readonly rubberbandTop: number;
|
|
@@ -67,7 +67,7 @@ export async function renderToSvg(model, opts) {
|
|
|
67
67
|
const rendering = renderings[i - 1];
|
|
68
68
|
const height = heights[i];
|
|
69
69
|
const levelHeight = level.height || 0;
|
|
70
|
-
RenderList.push(_jsxs("g", { transform: `translate(0 ${currOffset})`, children: [levelHeight ? (_jsx("defs", { children: _jsx("clipPath", { id: `synclip-${i}`, children: _jsx("rect", { x: 0, y: 0, width: width, height: levelHeight }) }) })) : null, _jsx("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})`, children: rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => _jsx(ReactRendering, { rendering: r }, i)) }), _jsx("g", { transform: `translate(0 ${levelHeight})`, children: _jsx(SVGLinearGenomeView, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], view: view, fontSize: fontSize }, view.id) })] }, view.id));
|
|
70
|
+
RenderList.push(_jsxs("g", { transform: `translate(0 ${currOffset})`, children: [levelHeight ? (_jsx("defs", { children: _jsx("clipPath", { id: `synclip-${i}`, children: _jsx("rect", { x: 0, y: 0, width: width, height: levelHeight }) }) })) : null, _jsx("g", { transform: `translate(${shift + trackLabelOffset} ${fontSize})`, clipPath: `url(#synclip-${i})`, children: rendering === null || rendering === void 0 ? void 0 : rendering.map((r, i) => (_jsx(ReactRendering, { rendering: r }, i))) }), _jsx("g", { transform: `translate(0 ${levelHeight})`, children: _jsx(SVGLinearGenomeView, { rulerHeight: rulerHeight, shift: shift, trackLabelOffset: trackLabelOffset, textHeight: textHeight, trackLabels: trackLabels, displayResults: displayResults[i], view: view, fontSize: fontSize }, view.id) })] }, view.id));
|
|
71
71
|
currOffset += height + fontSize + rulerHeight + levelHeight;
|
|
72
72
|
}
|
|
73
73
|
return renderToStaticMarkup(_jsx(ThemeProvider, { theme: theme, children: _jsx(Wrapper, { children: _jsxs("svg", { width: width, height: totalHeightSvg, xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: [0, 0, w + shift * 2, totalHeightSvg].toString(), children: [_jsx(SVGBackground, { width: w, height: totalHeightSvg, shift: shift }), RenderList] }) }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-linear-comparative-view",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "JBrowse 2 linear comparative view",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@jbrowse/core": "^3.
|
|
40
|
-
"@jbrowse/plugin-alignments": "^3.
|
|
41
|
-
"@jbrowse/plugin-linear-genome-view": "^3.
|
|
39
|
+
"@jbrowse/core": "^3.6.0",
|
|
40
|
+
"@jbrowse/plugin-alignments": "^3.6.0",
|
|
41
|
+
"@jbrowse/plugin-linear-genome-view": "^3.6.0",
|
|
42
42
|
"@mui/icons-material": "^7.0.0",
|
|
43
43
|
"@mui/material": "^7.0.0",
|
|
44
44
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "133a68815ab348d156c18d83cffc997356c3cfbb"
|
|
63
63
|
}
|