Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Durairaj, Janani
caretta
Commits
14f7603f
Commit
14f7603f
authored
Jan 31, 2020
by
Akdel
Browse files
demo site eta
parent
dc95a27d
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/caretta-app-demo3
View file @
14f7603f
...
...
@@ -380,7 +380,7 @@ def get_time_estimate(clicked, pdb_entries):
if
clicked
and
pdb_entries
:
pdb_entries
=
[
decompress_object
(
x
)
for
x
in
pdb_entries
]
time
=
get_estimated_time
(
pdb_entries
)
return
html
.
P
(
f
"ETA:
{
np
.
round
(
time
,
2
)
}
min"
,
style
=
{
"color"
:
"red"
})
return
f
"ETA:
{
np
.
round
(
time
,
2
)
}
min"
else
:
return
""
...
...
@@ -393,8 +393,7 @@ def get_time_estimate(clicked, pdb_entries):
dash
.
dependencies
.
Output
(
"feature-selection"
,
"options"
),
dash
.
dependencies
.
Output
(
"alignment-data"
,
"children"
),
dash
.
dependencies
.
Output
(
"pfam-class"
,
"children"
),
dash
.
dependencies
.
Output
(
"alignment-done"
,
"children"
),
dash
.
dependencies
.
Output
(
"time-estimate"
,
"style"
)
dash
.
dependencies
.
Output
(
"alignment-done"
,
"children"
)
],
[
dash
.
dependencies
.
Input
(
"align"
,
"n_clicks"
)],
...
...
@@ -425,11 +424,10 @@ def align_structures(clicked, pdb_entries, pfam_class, gap_open, gap_extend):
return
""
,
component
,
dcc
.
Graph
(
figure
=
structure_plot
({
s
.
name
:
s
.
coords
for
s
in
pfam_class
.
msa
.
structures
}),
id
=
"scatter3d"
),
compress_object
(
features
),
[{
"label"
:
x
,
"value"
:
x
}
for
x
in
features
[
list
(
features
.
keys
())[
0
]]],
compress_object
(
alignment
),
compress_object
(
pfam_class
),
[
True
]
,
{
"color"
:
"green"
}
alignment
),
compress_object
(
pfam_class
),
[
True
]
else
:
return
""
,
""
,
""
,
compress_object
(
np
.
zeros
(
0
)),
[
{
"label"
:
"no alignment present"
,
"value"
:
"no alignment"
}],
pdb_entries
,
pfam_class
,
[
False
],
{
"color"
:
"green"
}
{
"label"
:
"no alignment present"
,
"value"
:
"no alignment"
}],
pdb_entries
,
pfam_class
,
[
False
]
@
app
.
callback
([
dash
.
dependencies
.
Output
(
"feature-plot1"
,
"children"
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment