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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
1e7a0159
Unverified
Commit
1e7a0159
authored
Feb 19, 2022
by
Alexander Rose
Committed by
GitHub
Feb 19, 2022
Browse files
Options
Downloads
Plain Diff
Merge pull request #377 from JonStargaryen/master
parse contour-level from emdb v3 header files
parents
8cd1c69c
bbf4f1d1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-plugin/behavior/dynamic/volume-streaming/util.ts
+10
-2
10 additions, 2 deletions
src/mol-plugin/behavior/dynamic/volume-streaming/util.ts
with
10 additions
and
2 deletions
src/mol-plugin/behavior/dynamic/volume-streaming/util.ts
+
10
−
2
View file @
1e7a0159
...
@@ -69,8 +69,16 @@ export async function getContourLevel(provider: 'emdb' | 'pdbe', plugin: PluginC
...
@@ -69,8 +69,16 @@ export async function getContourLevel(provider: 'emdb' | 'pdbe', plugin: PluginC
export
async
function
getContourLevelEmdb
(
plugin
:
PluginContext
,
taskCtx
:
RuntimeContext
,
emdbId
:
string
)
{
export
async
function
getContourLevelEmdb
(
plugin
:
PluginContext
,
taskCtx
:
RuntimeContext
,
emdbId
:
string
)
{
const
emdbHeaderServer
=
plugin
.
config
.
get
(
PluginConfig
.
VolumeStreaming
.
EmdbHeaderServer
);
const
emdbHeaderServer
=
plugin
.
config
.
get
(
PluginConfig
.
VolumeStreaming
.
EmdbHeaderServer
);
const
header
=
await
plugin
.
fetch
({
url
:
`
${
emdbHeaderServer
}
/
${
emdbId
.
toUpperCase
()}
/header/
${
emdbId
.
toLowerCase
()}
.xml`
,
type
:
'
xml
'
}).
runInContext
(
taskCtx
);
const
header
=
await
plugin
.
fetch
({
url
:
`
${
emdbHeaderServer
}
/
${
emdbId
.
toUpperCase
()}
/header/
${
emdbId
.
toLowerCase
()}
.xml`
,
type
:
'
xml
'
}).
runInContext
(
taskCtx
);
const
map
=
header
.
getElementsByTagName
(
'
map
'
)[
0
];
const
contours
=
header
.
getElementsByTagName
(
'
contour
'
);
const
contourLevel
=
parseFloat
(
map
.
getElementsByTagName
(
'
contourLevel
'
)[
0
].
textContent
!
);
let
primaryContour
=
contours
[
0
];
for
(
let
i
=
1
;
i
<
contours
.
length
;
i
++
)
{
if
(
contours
[
i
].
getAttribute
(
'
primary
'
)
===
'
true
'
)
{
primaryContour
=
contours
[
i
];
break
;
}
}
const
contourLevel
=
parseFloat
(
primaryContour
.
getElementsByTagName
(
'
level
'
)[
0
].
textContent
!
);
return
contourLevel
;
return
contourLevel
;
}
}
...
...
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