Skip to content

Commit

Permalink
displaying plots
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza committed Jun 22, 2014
1 parent 62f6059 commit 28a53f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
15 changes: 11 additions & 4 deletions qiita_pet/templates/analysis_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ <h3 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href=
{% for job, results in jobs%}
<div class="panel-body">
{{job}}<br />
{%for num, result in enumerate(results)%}
{% if isdir(join(basefolder, result)) %}
<a href="/results/{{result}}/index.html" target="resframe">Result File {{num+1}}</a><br />
{%for result in results%}
{% if "beta_diversity_through_plots" in result %}
{% if data_type == "16S"%}
<a href="/results/{{result}}/unweighted_unifrac_emperor_pcoa_plot/index.html" target="resframe">Unweighted</a><br />
<a href="/results/{{result}}/weighted_unifrac_emperor_pcoa_plot/index.html" target="resframe">Weighted</a><br />
{%else%}
<a href="/results/{{result}}/bray_curtis_emperor_pcoa_plot/index.html" target="resframe">Bray Curtis</a><br />
<a href="/results/{{result}}/euclidean_emperor_pcoa_plot/index.html" target="resframe">Euclidean</a><br />
{%end%}
{% else %}
<a href="/results/{{result}}" target="resframe">Result File {{num+1}}</a><br />
<a href="/results/{{result}}/taxa_summary_plots/area_charts.html" target="resframe">Area charts</a><br />
<a href="/results/{{result}}/taxa_summary_plots/bar_charts.html" target="resframe">Bar charts</a><br />
{% end %}
{% end %}
</div>
Expand Down
12 changes: 6 additions & 6 deletions qiita_ware/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,27 @@ def run_analysis(user, analysis):
job.status = 'running'
msg["msg"] = "Running"
r_server.rpush(user + ":messages", dumps(msg))
r_server.publish(user, dumps(msg))

# run the command
try:
r_server.publish(user, dumps(msg))
qiita_compute.submit_sync(c_fmt)
except:
except Exception as e:
all_good = False
job.status = 'error'
msg["msg"] = "ERROR"
r_server.rpush(user + ":messages", dumps(msg))
r_server.publish(user, dumps(msg))
print("Failed compute on job id %d: %s" %
(job_id, c_fmt))
print("Failed compute on job id %d: %s\n%s" %
(job_id, e, c_fmt))
continue

msg["msg"] = "Completed"
job.status = 'completed'
r_server.rpush(user + ":messages", dumps(msg))
r_server.publish(user, dumps(msg))
# FIX THIS Should not be hard coded
job.add_results([options["--output_dir"], "directory"])
job.add_results([(options["--output_dir"], "directory")])
job.status = 'completed'

# send websockets message that we are done
msg["msg"] = "allcomplete"
Expand Down

0 comments on commit 28a53f3

Please sign in to comment.