Commit 60e4c8e8 authored by Carlos's avatar Carlos
Browse files

print n instances

parent 3351a03f
......@@ -72,6 +72,12 @@ def motif_json(motif_id):
def motif_page(motif_type, motif_id):
parents = get_parents(motif_type, motif_id)
motif_path = os.path.join("static", motif_type, motif_id, "graphs")
motif_metadata = os.path.join("static", motif_type, motif_id,
"motif_info.json"
)
with open(motif_metadata, "r") as m:
motif_info = json.load(m)
instance_info= []
for inst in os.listdir(motif_path):
info = {
......@@ -85,7 +91,8 @@ def motif_page(motif_type, motif_id):
return render_template("motif_page.html",
instance_info=instance_info,
parents=parents,
motif_type=motif_type
motif_type=motif_type,
motif_info=motif_info
)
@app.route('/instance_page/<motif_type>/<motif_id>/<instance>')
......
......@@ -6,7 +6,7 @@
<div style="width: 350; float: left" id="instances">
Instances <br>
Instances (n = {{ motif_info.n_instances }}) <br>
{% for instance_info in instance_info %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment