Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Carlos GO
vernal_server
Commits
5d12f54e
Commit
5d12f54e
authored
Aug 15, 2020
by
Carlos GO
Browse files
motif path fix
parent
a634cae3
Changes
1
Hide whitespace changes
Inline
Side-by-side
app.py
View file @
5d12f54e
...
...
@@ -21,8 +21,6 @@ import numpy as np
app
=
Flask
(
__name__
)
motifs_id
=
"motifs_bb"
MOTIF_PATH
=
os
.
path
.
join
(
"static"
,
motifs_id
)
def
get_parents
(
motif_type
,
this_motif
):
this_motif
=
ms
.
Multiset
(
map
(
int
,
this_motif
.
split
(
"-"
)))
...
...
@@ -72,7 +70,7 @@ def motif_json(motif_id):
@
app
.
route
(
'/motif_page/<motif_type>/<motif_id>'
)
def
motif_page
(
motif_type
,
motif_id
):
parents
=
get_parents
(
motif_type
,
motif_id
)
motif_path
=
os
.
path
.
join
(
MOTIF_PATH
,
motif_id
)
motif_path
=
os
.
path
.
join
(
"static"
,
motif_type
,
motif_id
)
instance_paths
=
[
os
.
path
.
join
(
motif_type
,
motif_id
,
inst
)
for
inst
in
os
.
listdir
(
motif_path
)]
return
render_template
(
"motif_page.html"
,
instance_paths
=
instance_paths
,
...
...
Write
Preview
Markdown
is supported
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