Skip to content

Commit 919bd88

Browse files
committed
Merge branch 'master' of https://github.com/biocore/qiita into disable-make-processed-data-public
2 parents ed7bab8 + 5ff115e commit 919bd88

File tree

4 files changed

+55
-27
lines changed

4 files changed

+55
-27
lines changed

INSTALL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,7 @@ As a general rule of thumb you will want to have an updated version of Python
113113
H5PY is known to cause a few problems, however their [installation
114114
instructions](http://docs.h5py.org/en/latest/build.html) are a great resource
115115
to troubleshoot your system in case any of the steps above fail.
116+
117+
## Troubleshooting installation issues with matplotlib
118+
119+
In the event that you get `_tkinter.TclError: no display name and no $DISPLAY environment variable` error while trying to generate figures that rely on matplotlib, you should create a matplotlib rc file. This configuration file should have `backend : agg`. For more information you should visit the [matplotlib configuration](http://matplotlib.org/users/customizing.html) and [troubleshooting](http://matplotlib.org/faq/troubleshooting_faq.html#locating-matplotlib-config-dir) page.

qiita_db/test/test_study.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,11 @@ def test_create_unknown_db_col(self):
441441

442442
def test_delete(self):
443443
title = "Fried chicken microbiome"
444-
study = Study.create(User('test@foo.bar'), title, [1], self.info)
444+
# the study is assigned to investigation 1
445+
study = Study.create(User('test@foo.bar'), title, [1], self.info,
446+
Investigation(1))
447+
# sharing with other user
448+
study.share(User("shared@foo.bar"))
445449
study.delete(study.id)
446450
self.assertFalse(study.exists(title))
447451

qiita_pet/handlers/analysis_handlers.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
check_access_to_analysis_result,
3131
filepath_ids_to_rel_paths)
3232
from qiita_db.exceptions import QiitaDBUnknownIDError
33+
from qiita_db.study import Study
3334

3435
SELECT_SAMPLES = 2
3536
SELECT_COMMANDS = 3
@@ -141,14 +142,17 @@ def get(self, analysis_id):
141142
jobres[jobject.datatype].append((jobject.command[0],
142143
jobject.results))
143144

144-
dropped = {}
145145
dropped_samples = analysis.dropped_samples
146+
dropped = defaultdict(list)
146147
if dropped_samples:
147148
for proc_data_id, samples in viewitems(dropped_samples):
149+
if not samples:
150+
continue
148151
proc_data = ProcessedData(proc_data_id)
149-
key = "Data type %s, Study: %s" % (proc_data.data_type(),
150-
proc_data.study)
151-
dropped[key] = samples
152+
data_type = proc_data.data_type()
153+
study = proc_data.study
154+
dropped[data_type].append((Study(study).title, len(samples),
155+
', '.join(samples)))
152156

153157
self.render("analysis_results.html",
154158
jobres=jobres, aname=analysis.name, dropped=dropped,

qiita_pet/templates/analysis_results.html

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,60 @@
1111

1212

1313
<div class="row">
14-
<h1>Analysis {{aname}}</h1>
15-
16-
{% if dropped %}
17-
<h3>Dropped Samples</h3>
18-
These samples were dropped during processing due to rarefaction:
19-
<table width="100%">
20-
{% for study, samples in viewitems(dropped) %}
21-
<tr>
22-
<td width="5%">For {{study}}:</td>
23-
<td width="80%"><small>{{', '.join(samples)}}</small></td>
24-
</tr>
25-
{% end %}
26-
</table>
27-
<br/>
28-
{% end %}
14+
<h1>&nbsp;Analysis: <u>{{aname}}</u></h1>
2915
</div>
3016

3117

18+
<div class="row" width='100%'>
19+
<div class="col-md-12">
20+
<div class="panel-group" id="accordion">
21+
{% if dropped %}
22+
<div class="panel panel-default">
23+
<div class="panel-heading">
24+
<h3 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#dropped-samples">Dropped Samples</a></h3>
25+
</div>
26+
<div id="dropped-samples" class="panel-collapse collapse">
27+
<div class="panel-body">
28+
{% for data_type, studies in viewitems(dropped) %}
29+
<b><u>{{data_type}}</u></b>
30+
<br/><br/>
31+
{% for title, num_samples, samples in studies %}
32+
<b>{{title}}:</b>
33+
<br/>
34+
Total dropped: {{num_samples}}
35+
<br/>
36+
{{samples}}<br/>
37+
{% end %}
38+
<hr>
39+
{% end %}
40+
</div>
41+
</div>
42+
</div>
43+
{% end %}
44+
</div>
45+
</div>
46+
</div>
47+
3248
<div class="row" width='100%'>
3349
<div class="col-md-2">
3450
<div class="panel-group" id="accordion">
35-
{% for data_type, jobs in jobres.items() %}
51+
{% for data_type, jobs in jobres.items() %}
3652
<div class="panel panel-default">
3753
<div class="panel-heading">
3854
<h3 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#{{data_type}}">{{data_type}}</a></h3>
3955
</div>
4056
<div id="{{data_type}}" class="panel-collapse collapse">
41-
{% for job, results in jobs%}
57+
{% for job, results in jobs%}
4258
<div class="panel-body">
4359
{{job}}<br />
44-
{% if len(results) == 0 %}
60+
{% if len(results) == 0 %}
4561
<h3 style="color:red">ERROR</h3>
46-
{% end %}
47-
{%for result in results%}
62+
{% end %}
63+
{%for result in results%}
4864
<a href='{{"/results/%s" % result}}' target="resframe">{{basename(result)}}</a><br />
49-
{% end %}
65+
{% end %}
5066
</div>
51-
{% end %}
67+
{% end %}
5268
</div>
5369
</div>
5470
{% end %}

0 commit comments

Comments
 (0)