jbrowse-plugin-protein3d 0.4.13 → 0.5.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/LaunchProteinView/components/FoldseekActionMenu.js +15 -14
- package/dist/LaunchProteinView/components/ProteinViewActions.js +27 -15
- package/dist/LaunchProteinView/components/UserProvidedStructure.js +1 -2
- package/dist/LaunchProteinView/hooks/useSafeLaunch.d.ts +9 -0
- package/dist/LaunchProteinView/hooks/useSafeLaunch.js +15 -0
- package/dist/LaunchProteinView/utils/launchViewUtils.d.ts +9 -11
- package/dist/LaunchProteinView/utils/launchViewUtils.js +6 -8
- package/dist/LaunchProteinView/utils/sideBySide.d.ts +5 -0
- package/dist/LaunchProteinView/utils/sideBySide.js +9 -0
- package/dist/LaunchProteinViewExtensionPoint/index.js +7 -4
- package/dist/ProteinView/applyLociInteractivity.d.ts +23 -17
- package/dist/ProteinView/applyLociInteractivity.js +33 -61
- package/dist/ProteinView/components/FeatureBar.d.ts +1 -1
- package/dist/ProteinView/components/FeatureBar.js +36 -34
- package/dist/ProteinView/components/FeatureTypeLabel.js +5 -9
- package/dist/ProteinView/components/ProteinFeatureTrack.js +7 -15
- package/dist/ProteinView/components/ProteinViewHeader.js +9 -1
- package/dist/ProteinView/components/ResidueValueTrack.js +26 -15
- package/dist/ProteinView/hooks/useProteinFeatureTrackData.d.ts +1 -0
- package/dist/ProteinView/hooks/useProteinFeatureTrackData.js +3 -2
- package/dist/ProteinView/model.d.ts +12 -0
- package/dist/ProteinView/structureModel.d.ts +14 -5
- package/dist/ProteinView/structureModel.js +69 -92
- package/dist/ProteinView/subscribeMolstarInteraction.d.ts +8 -0
- package/dist/ProteinView/subscribeMolstarInteraction.js +1 -1
- package/dist/ProteinView/util.d.ts +0 -5
- package/dist/ProteinView/util.js +0 -11
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js +15 -15
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js.map +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/LaunchProteinView/components/FoldseekActionMenu.tsx +22 -17
- package/src/LaunchProteinView/components/ProteinViewActions.tsx +32 -17
- package/src/LaunchProteinView/components/UserProvidedStructure.tsx +1 -6
- package/src/LaunchProteinView/hooks/useSafeLaunch.ts +17 -0
- package/src/LaunchProteinView/utils/launchViewUtils.ts +30 -29
- package/src/LaunchProteinView/utils/sideBySide.ts +14 -0
- package/src/LaunchProteinViewExtensionPoint/index.ts +8 -9
- package/src/ProteinView/applyLociInteractivity.ts +62 -114
- package/src/ProteinView/components/FeatureBar.tsx +40 -44
- package/src/ProteinView/components/FeatureTypeLabel.tsx +6 -11
- package/src/ProteinView/components/ProteinFeatureTrack.tsx +5 -17
- package/src/ProteinView/components/ProteinViewHeader.tsx +15 -0
- package/src/ProteinView/components/ResidueValueTrack.tsx +40 -23
- package/src/ProteinView/hooks/useProteinFeatureTrackData.ts +6 -2
- package/src/ProteinView/structureModel.ts +90 -108
- package/src/ProteinView/subscribeMolstarInteraction.ts +9 -1
- package/src/ProteinView/util.ts +0 -25
- package/src/version.ts +1 -1
- package/dist/ProteinView/highlightResidueRange.d.ts +0 -14
- package/dist/ProteinView/highlightResidueRange.js +0 -19
- package/src/ProteinView/highlightResidueRange.ts +0 -44
package/src/ProteinView/util.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import loadMolstar from './loadMolstar'
|
|
2
|
-
|
|
3
|
-
import type { Structure } from 'molstar/lib/mol-model/structure'
|
|
4
|
-
|
|
5
1
|
interface HoveredState {
|
|
6
2
|
hoverPosition: {
|
|
7
3
|
coord: number
|
|
@@ -21,27 +17,6 @@ export function checkHovered(hovered: unknown): hovered is HoveredState {
|
|
|
21
17
|
)
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
export async function getMolstarStructureSelection({
|
|
25
|
-
structure,
|
|
26
|
-
selectedResidue,
|
|
27
|
-
}: {
|
|
28
|
-
structure: Structure
|
|
29
|
-
selectedResidue: number
|
|
30
|
-
}) {
|
|
31
|
-
const { Script } = await loadMolstar()
|
|
32
|
-
return Script.getStructureSelection(
|
|
33
|
-
Q =>
|
|
34
|
-
Q.struct.generator.atomGroups({
|
|
35
|
-
'residue-test': Q.core.rel.eq([
|
|
36
|
-
Q.struct.atomProperty.macromolecular.label_seq_id(),
|
|
37
|
-
selectedResidue,
|
|
38
|
-
]),
|
|
39
|
-
'group-by': Q.struct.atomProperty.macromolecular.residueKey(),
|
|
40
|
-
}),
|
|
41
|
-
structure,
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
20
|
export function invertMap(arg: Record<number, number>): Record<number, number> {
|
|
46
21
|
return Object.fromEntries(Object.entries(arg).map(([a, b]) => [b, +a]))
|
|
47
22
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.
|
|
1
|
+
export const version = '0.5.0'
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Structure } from 'molstar/lib/mol-model/structure';
|
|
2
|
-
import type { PluginContext } from 'molstar/lib/mol-plugin/context';
|
|
3
|
-
export default function highlightResidueRange({ structure, startResidue, endResidue, plugin, }: {
|
|
4
|
-
structure: Structure;
|
|
5
|
-
startResidue: number;
|
|
6
|
-
endResidue: number;
|
|
7
|
-
plugin: PluginContext;
|
|
8
|
-
}): Promise<void>;
|
|
9
|
-
export declare function selectResidueRange({ structure, startResidue, endResidue, plugin, }: {
|
|
10
|
-
structure: Structure;
|
|
11
|
-
startResidue: number;
|
|
12
|
-
endResidue: number;
|
|
13
|
-
plugin: PluginContext;
|
|
14
|
-
}): Promise<void>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { applyLociInteractivity } from './applyLociInteractivity';
|
|
2
|
-
export default async function highlightResidueRange({ structure, startResidue, endResidue, plugin, }) {
|
|
3
|
-
await applyLociInteractivity({
|
|
4
|
-
structure,
|
|
5
|
-
startResidue,
|
|
6
|
-
endResidue,
|
|
7
|
-
plugin,
|
|
8
|
-
mode: 'highlight',
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
export async function selectResidueRange({ structure, startResidue, endResidue, plugin, }) {
|
|
12
|
-
await applyLociInteractivity({
|
|
13
|
-
structure,
|
|
14
|
-
startResidue,
|
|
15
|
-
endResidue,
|
|
16
|
-
plugin,
|
|
17
|
-
mode: 'select',
|
|
18
|
-
});
|
|
19
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { applyLociInteractivity } from './applyLociInteractivity'
|
|
2
|
-
|
|
3
|
-
import type { Structure } from 'molstar/lib/mol-model/structure'
|
|
4
|
-
import type { PluginContext } from 'molstar/lib/mol-plugin/context'
|
|
5
|
-
|
|
6
|
-
export default async function highlightResidueRange({
|
|
7
|
-
structure,
|
|
8
|
-
startResidue,
|
|
9
|
-
endResidue,
|
|
10
|
-
plugin,
|
|
11
|
-
}: {
|
|
12
|
-
structure: Structure
|
|
13
|
-
startResidue: number
|
|
14
|
-
endResidue: number
|
|
15
|
-
plugin: PluginContext
|
|
16
|
-
}) {
|
|
17
|
-
await applyLociInteractivity({
|
|
18
|
-
structure,
|
|
19
|
-
startResidue,
|
|
20
|
-
endResidue,
|
|
21
|
-
plugin,
|
|
22
|
-
mode: 'highlight',
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export async function selectResidueRange({
|
|
27
|
-
structure,
|
|
28
|
-
startResidue,
|
|
29
|
-
endResidue,
|
|
30
|
-
plugin,
|
|
31
|
-
}: {
|
|
32
|
-
structure: Structure
|
|
33
|
-
startResidue: number
|
|
34
|
-
endResidue: number
|
|
35
|
-
plugin: PluginContext
|
|
36
|
-
}) {
|
|
37
|
-
await applyLociInteractivity({
|
|
38
|
-
structure,
|
|
39
|
-
startResidue,
|
|
40
|
-
endResidue,
|
|
41
|
-
plugin,
|
|
42
|
-
mode: 'select',
|
|
43
|
-
})
|
|
44
|
-
}
|