Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
8ea23e69
Commit
8ea23e69
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into seq
parents
f9d89428
5ed17ce4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/examples/proteopedia-wrapper/index.html
+2
-1
2 additions, 1 deletion
src/examples/proteopedia-wrapper/index.html
src/examples/proteopedia-wrapper/index.ts
+13
-5
13 additions, 5 deletions
src/examples/proteopedia-wrapper/index.ts
with
15 additions
and
6 deletions
src/examples/proteopedia-wrapper/index.html
+
2
−
1
View file @
8ea23e69
...
@@ -149,7 +149,8 @@
...
@@ -149,7 +149,8 @@
addSeparator
();
addSeparator
();
addHeader
(
'
Misc
'
);
addHeader
(
'
Misc
'
);
addControl
(
'
Apply Evo Cons
'
,
()
=>
PluginWrapper
.
coloring
.
evolutionaryConservation
());
addControl
(
'
Apply Evo Cons Style
'
,
()
=>
PluginWrapper
.
coloring
.
evolutionaryConservation
());
addControl
(
'
Apply Evo Cons Colors
'
,
()
=>
PluginWrapper
.
coloring
.
evolutionaryConservation
({
sequence
:
true
,
het
:
false
,
keepStyle
:
true
}));
addControl
(
'
Default Visuals
'
,
()
=>
PluginWrapper
.
updateStyle
());
addControl
(
'
Default Visuals
'
,
()
=>
PluginWrapper
.
updateStyle
());
addSeparator
();
addSeparator
();
...
...
This diff is collapsed.
Click to expand it.
src/examples/proteopedia-wrapper/index.ts
+
13
−
5
View file @
8ea23e69
...
@@ -253,18 +253,26 @@ class MolStarProteopediaWrapper {
...
@@ -253,18 +253,26 @@ class MolStarProteopediaWrapper {
}
}
coloring
=
{
coloring
=
{
evolutionaryConservation
:
async
()
=>
{
evolutionaryConservation
:
async
(
params
?:
{
sequence
?:
boolean
,
het
?:
boolean
,
keepStyle
?:
boolean
})
=>
{
await
this
.
updateStyle
({
sequence
:
{
kind
:
'
spacefill
'
}
},
true
);
if
(
!
params
||
!
params
.
keepStyle
)
{
await
this
.
updateStyle
({
sequence
:
{
kind
:
'
spacefill
'
}
},
true
);
}
const
state
=
this
.
state
;
const
state
=
this
.
state
;
// const visuals = state.selectQ(q => q.ofType(PluginStateObject.Molecule.Structure.Representation3D).filter(c => c.transform.transformer === StateTransforms.Representation.StructureRepresentation3D));
// const visuals = state.selectQ(q => q.ofType(PluginStateObject.Molecule.Structure.Representation3D).filter(c => c.transform.transformer === StateTransforms.Representation.StructureRepresentation3D));
// for (const v of visuals) {
// }
const
tree
=
state
.
build
();
const
tree
=
state
.
build
();
const
colorTheme
=
{
name
:
EvolutionaryConservation
.
Descriptor
.
name
,
params
:
this
.
plugin
.
structureRepresentation
.
themeCtx
.
colorThemeRegistry
.
get
(
EvolutionaryConservation
.
Descriptor
.
name
).
defaultValues
};
const
colorTheme
=
{
name
:
EvolutionaryConservation
.
Descriptor
.
name
,
params
:
this
.
plugin
.
structureRepresentation
.
themeCtx
.
colorThemeRegistry
.
get
(
EvolutionaryConservation
.
Descriptor
.
name
).
defaultValues
};
tree
.
to
(
StateElements
.
SequenceVisual
).
update
(
StateTransforms
.
Representation
.
StructureRepresentation3D
,
old
=>
({
...
old
,
colorTheme
}));
if
(
!
params
||
!!
params
.
sequence
)
{
// for (const v of visuals) {
tree
.
to
(
StateElements
.
SequenceVisual
).
update
(
StateTransforms
.
Representation
.
StructureRepresentation3D
,
old
=>
({
...
old
,
colorTheme
}));
// }
}
if
(
params
&&
!!
params
.
het
)
{
tree
.
to
(
StateElements
.
HetVisual
).
update
(
StateTransforms
.
Representation
.
StructureRepresentation3D
,
old
=>
({
...
old
,
colorTheme
}));
}
await
PluginCommands
.
State
.
Update
.
dispatch
(
this
.
plugin
,
{
state
,
tree
});
await
PluginCommands
.
State
.
Update
.
dispatch
(
this
.
plugin
,
{
state
,
tree
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment