Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

displaying plots #178

Merged
merged 1 commit into from
Jun 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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