Skip to content

Commit

Permalink
fig_reports and replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
Snicker7 committed Sep 13, 2022
1 parent 073f1fe commit 858a751
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 288 deletions.
3 changes: 2 additions & 1 deletion CRISPRessoReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def assemble_figs(run_data, crispresso_folder):
amplicons = []
for amplicon_name in run_data['results']['ref_names']:
amplicons.append(amplicon_name)
amplicon_figures = {'names': [], 'locs': {}, 'titles': {}, 'captions': {}, 'datas': {}}
amplicon_figures = {'names': [], 'locs': {}, 'titles': {}, 'captions': {}, 'datas': {}, 'htmls': {}}

for fig in ['2a', '3a', '3b', '4a', '4b', '4c', '4d', '4e', '4f', '4g', '5', '6', '7', '8', '10a', '10b', '10c',
'11a']:
Expand Down Expand Up @@ -133,6 +133,7 @@ def assemble_figs(run_data, crispresso_folder):
figures['titles'][amplicon_name] = amplicon_figures['titles']
figures['captions'][amplicon_name] = amplicon_figures['captions']
figures['datas'][amplicon_name] = amplicon_figures['datas']
figures['htmls'][amplicon_name] = amplicon_figures['htmls']
data = {'amplicons': amplicons, 'figures': figures}
return data

Expand Down
6 changes: 1 addition & 5 deletions templates/pooledReport.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ <h5>{{report_name}}</h5>
<h5 id="modification_summary_title">{{summary_plot_titles[plot_name]}}</h5>
</div>
<div class='card-body' style='max-height:80vh;overflow-y:auto'>
<a href="{{crispresso_data_path}}{{plot_name}}.pdf"><img src="{{crispresso_data_path}}{{plot_name}}.png" width='70%' height='70%'></a>
<label class="labelpadding">{{summary_plot_labels[plot_name]}}</label>
{% for (data_label,data_path) in summary_plot_datas[plot_name] %}
<p class="m-0"><small>Data: <a href="{{crispresso_data_path}}{{data_path}}">{{data_label}}</a></small></p>
{% endfor %}
{{ render_partials('shared/partials/fig_summaries.html', plot_name=plot_name, summary_plot_htmls=summary_plot_htmls, crispresso_data_path=crispresso_data_path, summary_plot_labels=summary_plot_labels, summary_plot_datas=summary_plot_datas) }}
</div>
</div>
{% endfor %}
Expand Down
Loading

0 comments on commit 858a751

Please sign in to comment.