Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
53
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Commits
712e7328
Commit
712e7328
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
add option when pdb uniq use a button
parent
bd9a310e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/content/MolstarPdbePlugin.vue
+25
-37
25 additions, 37 deletions
components/content/MolstarPdbePlugin.vue
with
25 additions
and
37 deletions
components/content/MolstarPdbePlugin.vue
+
25
−
37
View file @
712e7328
...
@@ -12,6 +12,7 @@ export interface Props {
...
@@ -12,6 +12,7 @@ export interface Props {
height
?:
number
height
?:
number
dataUrls
?:
string
[]
dataUrls
?:
string
[]
dataUrl
?:
string
dataUrl
?:
string
uniq
?:
boolean
}
}
// const selectedPdb = ref('')
// const selectedPdb = ref('')
const
refinedDataUrls
=
computed
(()
=>
{
const
refinedDataUrls
=
computed
(()
=>
{
...
@@ -44,6 +45,7 @@ const refinedDataUrls = computed(() => {
...
@@ -44,6 +45,7 @@ const refinedDataUrls = computed(() => {
// const selectedPdb = ref(refinedDataUrls.value?.length > 0 ? refinedDataUrls.value[0] : null)
// const selectedPdb = ref(refinedDataUrls.value?.length > 0 ? refinedDataUrls.value[0] : null)
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
height
:
600
,
height
:
600
,
uniq
:
false
})
})
const
{
width
,
height
}
=
useDisplay
()
const
{
width
,
height
}
=
useDisplay
()
...
@@ -95,7 +97,7 @@ useHead({
...
@@ -95,7 +97,7 @@ useHead({
const
pdbeMolstarComponent
=
ref
(
null
)
const
pdbeMolstarComponent
=
ref
(
null
)
// const selectedPdb = ref("/wiki/avs/AVAST_I,AVAST_I__Avs1A,0,V-plddts_85.07081.pdb")
// const selectedPdb = ref("/wiki/avs/AVAST_I,AVAST_I__Avs1A,0,V-plddts_85.07081.pdb")
const
selectedPdb
=
ref
(
null
)
const
selectedPdb
:
Ref
<
string
|
null
>
=
ref
(
null
)
const
selectedPaePath
=
computed
(()
=>
{
const
selectedPaePath
=
computed
(()
=>
{
return
selectedPdb
.
value
?
`
${
selectedPdb
.
value
.
split
(
"
.
"
).
slice
(
0
,
-
1
).
join
(
'
.
'
)}
.tsv`
:
null
return
selectedPdb
.
value
?
`
${
selectedPdb
.
value
.
split
(
"
.
"
).
slice
(
0
,
-
1
).
join
(
'
.
'
)}
.tsv`
:
null
...
@@ -160,23 +162,29 @@ const plotPaeOptions = computed(() => {
...
@@ -160,23 +162,29 @@ const plotPaeOptions = computed(() => {
})
})
watch
(
selectedPdb
,
(
newSelectedPdb
,
prevSelectPdb
)
=>
{
watch
(
selectedPdb
,
(
newSelectedPdb
,
prevSelectPdb
)
=>
{
if
(
newSelectedPdb
!==
null
)
{
viewPdb
(
newSelectedPdb
)
})
function
viewPdb
(
pdbPath
:
string
|
null
)
{
if
(
pdbPath
!==
null
)
{
dialog
.
value
=
true
dialog
.
value
=
true
const
format
=
toValue
(
newSelectedPdb
)?.
split
(
"
.
"
).
slice
(
-
1
)[
0
]?.
toLowerCase
()
??
"
pdb
"
const
format
=
toValue
(
pdbPath
)?.
split
(
"
.
"
).
slice
(
-
1
)[
0
]?.
toLowerCase
()
??
"
pdb
"
moleculeFormat
.
value
=
format
moleculeFormat
.
value
=
format
if
(
pdbeMolstarComponent
.
value
?.
viewerInstance
)
{
if
(
pdbeMolstarComponent
.
value
?.
viewerInstance
)
{
const
viewerInstance
=
pdbeMolstarComponent
.
value
.
viewerInstance
const
viewerInstance
=
pdbeMolstarComponent
.
value
.
viewerInstance
const
customData
=
{
url
:
pdbPath
,
format
:
format
,
binary
:
false
}
// show.value = true
const
customData
=
{
url
:
newSelectedPdb
,
format
:
format
,
binary
:
false
}
viewerInstance
.
visual
.
update
({
customData
})
viewerInstance
.
visual
.
update
({
customData
})
}
}
}
}
function
setSelectedPdbToFirst
()
{
const
urls
=
toValue
(
refinedDataUrls
)
if
(
urls
.
length
>=
1
)
{
selectedPdb
.
value
=
urls
[
0
]
}
}
}
)
}
// const moleculeFormat = computed(() => {
// const moleculeFormat = computed(() => {
// return toValue(selectedPdb)?.split(".")?.[-1]?.toLowerCase() ?? "pdb"
// return toValue(selectedPdb)?.split(".")?.[-1]?.toLowerCase() ?? "pdb"
...
@@ -186,10 +194,13 @@ const moleculeFormat: Ref<string> = ref("pdb")
...
@@ -186,10 +194,13 @@ const moleculeFormat: Ref<string> = ref("pdb")
<
template
>
<
template
>
<v-row><v-col><v-select
v-model=
"selectedPdb"
label=
"Select PDB"
:items=
"refinedDataUrls"
<span
class=
"d-flex flex-wrap align-center justify-center"
>
hide-details=
"auto"
></v-select></v-col></v-row>
<v-col>
<v-btn
v-if=
"uniq"
size=
"x-small"
variant=
"tonal"
icon=
"mdi-molecule"
@
click=
"setSelectedPdbToFirst()"
></v-btn>
<v-select
v-else
v-model=
"selectedPdb"
label=
"Select PDB"
:items=
"refinedDataUrls"
hide-details=
"auto"
>
</v-select>
</v-col>
<v-row
justify=
"center"
>
<v-dialog
v-model=
"dialog"
transition=
"dialog-bottom-transition"
fullscreen
:scrim=
"false"
>
<v-dialog
v-model=
"dialog"
transition=
"dialog-bottom-transition"
fullscreen
:scrim=
"false"
>
<v-card
flat
:rounded=
"false"
>
<v-card
flat
:rounded=
"false"
>
<v-toolbar>
<v-toolbar>
...
@@ -269,35 +280,12 @@ const moleculeFormat: Ref<string> = ref("pdb")
...
@@ -269,35 +280,12 @@ const moleculeFormat: Ref<string> = ref("pdb")
</v-list-item>
</v-list-item>
</v-list>
</v-list>
</v-card>
</v-card>
<!-- <div _ngcontent-ykv-c96="" class="confidenceWrapper">
<div _ngcontent-ykv-c96="" class="column legendRow ng-star-inserted"><span
_ngcontent-ykv-c96="" class="legendColor"
style="background-color: rgb(0, 83, 214);"> </span><span _ngcontent-ykv-c96=""
class="legendlabel">Very high (pLDDT > 90)</span></div>
<div _ngcontent-ykv-c96="" class="column legendRow ng-star-inserted"><span
_ngcontent-ykv-c96="" class="legendColor"
style="background-color: rgb(101, 203, 243);"> </span><span
_ngcontent-ykv-c96="" class="legendlabel">High (90 > pLDDT > 70)</span></div>
<div _ngcontent-ykv-c96="" class="column legendRow ng-star-inserted"><span
_ngcontent-ykv-c96="" class="legendColor"
style="background-color: rgb(255, 219, 19);"> </span><span
_ngcontent-ykv-c96="" class="legendlabel">Low (70 > pLDDT > 50)</span></div>
<div _ngcontent-ykv-c96="" class="column legendRow ng-star-inserted"><span
_ngcontent-ykv-c96="" class="legendColor"
style="background-color: rgb(255, 125, 69);"> </span><span
_ngcontent-ykv-c96="" class="legendlabel">Very low (pLDDT < 50)</span></div> -->
<!---->
<!-- </div> -->
<!-- <div _ngcontent-ykv-c96="" class="column legendDesc"> AlphaFold produces a per-residue model
confidence score (pLDDT) between 0 and 100. Some regions below 50 pLDDT may be unstructured
in isolation. </div> -->
</v-col>
</v-col>
</v-row>
</v-row>
</v-card-text>
</v-card-text>
</v-card>
</v-card>
</v-dialog>
</v-dialog>
</
v-row
>
</
span
>
</template>
</template>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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