jbrowse-plugin-protein3d 0.8.1 → 0.8.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/dist/LaunchProteinView/components/LaunchProteinViewDialog.js +1 -1
- package/dist/LaunchProteinView/components/ProteinViewActions.js +2 -2
- package/dist/ProteinView/components/ProteinAlignment.js +1 -1
- package/dist/ProteinView/components/ProteinView.js +1 -1
- package/dist/ProteinView/model.d.ts +9 -3
- package/dist/ProteinView/structureFormat.js +1 -3
- package/dist/ProteinView/structureModel.js +1 -1
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js +16 -16
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js.map +4 -4
- package/dist/{molstar-chunk-Z2FKPQGY.js → molstar-chunk-UJIWPKE3.js} +1 -1
- package/dist/{molstar-chunk-Z2FKPQGY.js.map → molstar-chunk-UJIWPKE3.js.map} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +14 -13
- package/src/LaunchProteinView/components/LaunchProteinViewDialog.tsx +1 -0
- package/src/LaunchProteinView/components/ProteinViewActions.tsx +9 -1
- package/src/LaunchProteinView/utils/structureUrls.test.ts +3 -1
- package/src/ProteinView/components/ProteinAlignment.tsx +1 -4
- package/src/ProteinView/components/ProteinView.tsx +4 -0
- package/src/ProteinView/extractStructureSequences.test.ts +3 -1
- package/src/ProteinView/molstarSelectionQuery.test.ts +3 -1
- package/src/ProteinView/structureFormat.ts +1 -3
- package/src/ProteinView/structureModel.ts +7 -8
- package/src/version.ts +1 -1
|
@@ -14,7 +14,7 @@ export default function LaunchProteinViewDialog({ handleClose, feature, model, }
|
|
|
14
14
|
const [alignmentAlgorithm, setAlignmentAlgorithm] = useLocalStorage('jbrowse-protein3d-alignment-algorithm', DEFAULT_ALIGNMENT_ALGORITHM);
|
|
15
15
|
const session = getSession(model);
|
|
16
16
|
const view = getContainingView(model);
|
|
17
|
-
return (React.createElement(Dialog, { maxWidth: "xl", title: "Launch protein view", titleNode: React.createElement(React.Fragment, null,
|
|
17
|
+
return (React.createElement(Dialog, { "data-testid": "launch-protein-view-dialog", maxWidth: "xl", title: "Launch protein view", titleNode: React.createElement(React.Fragment, null,
|
|
18
18
|
"Launch protein view ",
|
|
19
19
|
React.createElement(HelpButton, null)), open: true, onClose: handleClose },
|
|
20
20
|
React.createElement(Tabs, { value: choice, onChange: (_, val) => {
|
|
@@ -95,8 +95,8 @@ export default function ProteinViewActions({ handleClose, uniprotId, userSelecte
|
|
|
95
95
|
} }, "Cancel"),
|
|
96
96
|
showMissingReasons ? (React.createElement(Typography, { variant: "body2", color: "error", sx: { mr: 2 } }, missingReasons.join('. '))) : null,
|
|
97
97
|
React.createElement(ButtonGroup, { variant: "contained", color: "primary", size: "small" },
|
|
98
|
-
React.createElement(Button, { disabled: !canLaunch, onClick: handleLaunch3DView }, "Launch"),
|
|
99
|
-
React.createElement(Button, { disabled: !canLaunch, onClick: () => {
|
|
98
|
+
React.createElement(Button, { "data-testid": "protein-launch-button", disabled: !canLaunch, onClick: handleLaunch3DView }, "Launch"),
|
|
99
|
+
React.createElement(Button, { "data-testid": "protein-launch-options-button", disabled: !canLaunch, onClick: () => {
|
|
100
100
|
setDialogOpen(true);
|
|
101
101
|
}, "aria-label": "More launch options" },
|
|
102
102
|
React.createElement(ArrowDropDownIcon, null))),
|
|
@@ -10,7 +10,7 @@ import ResidueValueTrack from './ResidueValueTrack';
|
|
|
10
10
|
import SplitString, { AlignmentHighlights } from './SplitString';
|
|
11
11
|
import { uniprotEntryUrl } from '../../LaunchProteinView/utils/structureUrls';
|
|
12
12
|
import ExternalLink from '../../components/ExternalLink';
|
|
13
|
-
import { structureAlignedSeq, transcriptAlignedSeq
|
|
13
|
+
import { structureAlignedSeq, transcriptAlignedSeq } from '../../mappings';
|
|
14
14
|
import { largeJumpScrollTarget, offScreenCenterTarget } from '../autoScroll';
|
|
15
15
|
import { CHAR_WIDTH, LABEL_WIDTH, ROW_HEIGHT } from '../constants';
|
|
16
16
|
import useProteinFeatureTrackData from '../hooks/useProteinFeatureTrackData';
|
|
@@ -29,7 +29,7 @@ const ProteinViewContainer = observer(function ProteinViewContainer({ model, par
|
|
|
29
29
|
return (React.createElement("div", { style: { background: '#ccc' }, "data-testid": ready ? 'protein-view-ready' : 'protein-view-loading' },
|
|
30
30
|
error ? React.createElement(ErrorMessage, { error: error }) : null,
|
|
31
31
|
loading ? (React.createElement(LoadingEllipses, { message: "Loading protein viewer" })) : (React.createElement(ProteinViewHeader, { model: model })),
|
|
32
|
-
React.createElement("div", { ref: parentRef, style: {
|
|
32
|
+
React.createElement("div", { ref: parentRef, "data-testid": "protein-view-molstar", style: {
|
|
33
33
|
position: 'relative',
|
|
34
34
|
width,
|
|
35
35
|
height,
|
|
@@ -38,7 +38,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
38
38
|
end: number;
|
|
39
39
|
} | undefined;
|
|
40
40
|
hoverPosition: {
|
|
41
|
-
structureSeqPos
|
|
41
|
+
structureSeqPos? /**
|
|
42
|
+
* #action
|
|
43
|
+
*/: number;
|
|
42
44
|
code?: string;
|
|
43
45
|
chain?: string;
|
|
44
46
|
source: "structure" | "genome";
|
|
@@ -780,7 +782,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
780
782
|
end: number;
|
|
781
783
|
} | undefined;
|
|
782
784
|
hoverPosition: {
|
|
783
|
-
structureSeqPos
|
|
785
|
+
structureSeqPos? /**
|
|
786
|
+
* #action
|
|
787
|
+
*/: number;
|
|
784
788
|
code?: string;
|
|
785
789
|
chain?: string;
|
|
786
790
|
source: "structure" | "genome";
|
|
@@ -1414,7 +1418,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1414
1418
|
end: number;
|
|
1415
1419
|
} | undefined;
|
|
1416
1420
|
hoverPosition: {
|
|
1417
|
-
structureSeqPos
|
|
1421
|
+
structureSeqPos? /**
|
|
1422
|
+
* #action
|
|
1423
|
+
*/: number;
|
|
1418
1424
|
code?: string;
|
|
1419
1425
|
chain?: string;
|
|
1420
1426
|
source: "structure" | "genome";
|
|
@@ -31,9 +31,7 @@ export function structureFileExtension(nameOrUrl) {
|
|
|
31
31
|
* hand out `.cif`).
|
|
32
32
|
*/
|
|
33
33
|
export function structureFormatFromName(nameOrUrl) {
|
|
34
|
-
return PDB_EXTENSIONS.has(structureFileExtension(nameOrUrl))
|
|
35
|
-
? 'pdb'
|
|
36
|
-
: 'mmcif';
|
|
34
|
+
return PDB_EXTENSIONS.has(structureFileExtension(nameOrUrl)) ? 'pdb' : 'mmcif';
|
|
37
35
|
}
|
|
38
36
|
/** Whether a URL points at a binary-encoded structure, which molstar must be
|
|
39
37
|
* told to download as bytes rather than text. */
|
|
@@ -13,7 +13,7 @@ import subscribeMolstarInteraction from './subscribeMolstarInteraction';
|
|
|
13
13
|
import { genomeHoverToTranscriptPos } from './util';
|
|
14
14
|
import { getUniprotIdFromAlphaFoldTarget, resolveStructureUrl, } from '../LaunchProteinView/utils/structureUrls';
|
|
15
15
|
import { stripStopCodon } from '../LaunchProteinView/utils/util';
|
|
16
|
-
import { alignmentLength, genomeToTranscriptSeqMapping
|
|
16
|
+
import { alignmentLength, genomeToTranscriptSeqMapping } from '../mappings';
|
|
17
17
|
import { makeLabelSeqIdIndex, rangeToLabelSeqIds, toLabelSeqIds, } from './extractStructureSequences';
|
|
18
18
|
const Structure = types
|
|
19
19
|
.model({
|