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
c9b6088a
Commit
c9b6088a
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
beforemount as well :(
parent
bf2cbc83
No related branches found
No related tags found
1 merge request
!226
Resolve "Design of the structure section in a system's page"
Pipeline
#126760
waiting for manual action with stages
in 5 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/content/pdockqMatrix.vue
+52
-33
52 additions, 33 deletions
components/content/pdockqMatrix.vue
with
52 additions
and
33 deletions
components/content/pdockqMatrix.vue
+
52
−
33
View file @
c9b6088a
...
@@ -30,6 +30,23 @@ const margin = ref<PlotMargin>({
...
@@ -30,6 +30,23 @@ const margin = ref<PlotMargin>({
marginLeft
:
150
marginLeft
:
150
})
})
const
data
=
ref
()
onBeforeMount
(
async
()
=>
{
const
{
data
:
d
,
error
}
=
await
useAsyncMeiliSearch
({
index
:
toValue
(
dbName
),
query
:
""
,
params
:
{
facets
:
[
"
*
"
],
filter
:
[
`System='
${
toValue
(
computedSystem
)}
'`
,
...
toValue
(
filterBase
)
],
}
})
data
.
value
=
d
.
value
if
(
error
.
value
)
{
throw
createError
(
"
Error while getting structure pdocks
"
)
}
})
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
...
@@ -46,10 +63,10 @@ onMounted(async () => {
...
@@ -46,10 +63,10 @@ onMounted(async () => {
if
(
error
.
value
)
{
if
(
error
.
value
)
{
throw
createError
(
"
Error while getting structure pdocks
"
)
throw
createError
(
"
Error while getting structure pdocks
"
)
}
}
})
})
const
computedSystem
=
computed
(()
=>
{
const
computedSystem
=
computed
(()
=>
{
const
toValPage
=
toValue
(
page
)
const
toValPage
=
toValue
(
page
)
const
toValSystem
=
toValue
(
system
)
const
toValSystem
=
toValue
(
system
)
...
@@ -64,33 +81,35 @@ const computedSystem = computed(() => {
...
@@ -64,33 +81,35 @@ const computedSystem = computed(() => {
const
groupedPdocks
=
computed
(()
=>
{
const
groupedPdocks
=
computed
(()
=>
{
const
toValData
=
toValue
(
data
)
const
toValData
=
toValue
(
data
)
return
d3
.
groups
(
toValData
.
hits
.
flatMap
(({
System_name_ok
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
,
system_genes
})
=>
{
if
(
toValData
?.
hits
)
{
return
d3
.
groups
(
toValData
.
hits
.
flatMap
(({
System_name_ok
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
,
system_genes
})
=>
{
if
(
proteins_in_the_prediction
.
length
===
2
)
{
if
(
proteins_in_the_prediction
.
length
===
2
)
{
const
sanitizedSystemGenes
=
system_genes
.
map
(
d
=>
d
.
split
(
"
__
"
)[
1
])
const
sanitizedSystemGenes
=
system_genes
.
map
(
d
=>
d
.
split
(
"
__
"
)[
1
])
const
sanitizedProteins
=
proteins_in_the_prediction
.
map
(
d
=>
d
.
split
(
"
__
"
)[
1
])
const
sanitizedProteins
=
proteins_in_the_prediction
.
map
(
d
=>
d
.
split
(
"
__
"
)[
1
])
const
setProteins
=
new
Set
(
sanitizedProteins
)
const
setProteins
=
new
Set
(
sanitizedProteins
)
if
(
setProteins
.
size
===
2
)
{
if
(
setProteins
.
size
===
2
)
{
return
sanitizedProteins
.
map
((
prot
,
i
)
=>
{
return
sanitizedProteins
.
map
((
prot
,
i
)
=>
{
if
(
i
===
0
)
{
if
(
i
===
0
)
{
return
{
System_name_ok
,
system_genes
:
sanitizedSystemGenes
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
:
sanitizedProteins
,
protX
:
prot
,
protY
:
sanitizedProteins
[
i
+
1
]
}
return
{
System_name_ok
,
system_genes
:
sanitizedSystemGenes
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
:
sanitizedProteins
,
protX
:
prot
,
protY
:
sanitizedProteins
[
i
+
1
]
}
}
}
else
{
else
{
return
{
System_name_ok
,
system_genes
:
sanitizedSystemGenes
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
:
sanitizedProteins
,
protX
:
prot
,
protY
:
sanitizedProteins
[
i
-
1
]
}
return
{
System_name_ok
,
system_genes
:
sanitizedSystemGenes
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
:
sanitizedProteins
,
protX
:
prot
,
protY
:
sanitizedProteins
[
i
-
1
]
}
}
}
})
})
}
else
{
return
{
System_name_ok
,
system_genes
:
sanitizedSystemGenes
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
:
sanitizedProteins
,
protX
:
sanitizedProteins
[
0
],
protY
:
sanitizedProteins
[
1
]
}
}
}
else
{
}
else
{
return
{
System_name_ok
,
system_genes
:
sanitizedSystemGenes
,
pDockQ
,
pdb
,
nb_sys
,
proteins_in_the_prediction
:
sanitizedProteins
,
protX
:
sanitizedProteins
[
0
],
protY
:
sanitizedProteins
[
1
]
}
throw
createError
(
`More than 2 proteins in a dimer structure for system
${
computedSystem
.
value
}
!`
)
}
}
}
else
{
}),
d
=>
d
.
system_genes
.
sort
().
join
(
"
--
"
))
throw
createError
(
`More than 2 proteins in a dimer structure for system
${
computedSystem
.
value
}
!`
)
}
else
{
return
[]
}
}
}),
d
=>
d
.
system_genes
.
sort
().
join
(
"
--
"
))
})
})
...
@@ -128,19 +147,19 @@ const computedPDocksMatrixPlotOptions = computed(() => {
...
@@ -128,19 +147,19 @@ const computedPDocksMatrixPlotOptions = computed(() => {
})
})
})
})
const
{
data
,
error
}
=
await
useAsyncMeiliSearch
({
//
const { data, error } = await useAsyncMeiliSearch({
index
:
toValue
(
dbName
),
query
:
""
,
params
:
{
//
index: toValue(dbName), query: "", params: {
facets
:
[
"
*
"
],
//
facets: ["*"],
filter
:
[
//
filter: [
`System='
${
toValue
(
computedSystem
)}
'`
,
//
`System='${toValue(computedSystem)}'`,
...
toValue
(
filterBase
)
//
...toValue(filterBase)
],
//
],
}
//
}
})
//
})
if
(
error
.
value
)
{
//
if (error.value) {
throw
createError
(
"
Error while getting structure pdocks
"
)
//
throw createError("Error while getting structure pdocks")
}
//
}
</
script
>
</
script
>
<
template
>
<
template
>
<v-card
flat
color=
"transparent"
>
<v-card
flat
color=
"transparent"
>
...
...
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