{% macro table(rows, has_column_header=false, has_row_header=false) -%}
{% for row in rows %} {% set outer_loop = loop %} {% for item in row %} {% if (outer_loop.first and has_column_header) or (loop.first and has_row_header) %} {% else %} {% endif %} {% endfor %} {% endfor %}
{{ item }}{{ item }}
{%- endmacro %} {% macro modal(header, content, id) -%} {%- endmacro %} {% macro plotly_graph(div_id, json_data, style=None) -%}
{% if style != None %}
{% else %}
{% endif %}
{% if "help" in json_data %}
{{ modal(json_data["layout"]["title"], json_data["help"], div_id+"_help")}}
{% endif %}
{%- endmacro %} {% macro plotly_graphs(graphs, styles=None) -%} {% for div_id, json_data in graphs.items() %} {% if "img" in json_data %} {% elif styles != None %} {{ plotly_graph(div_id, json_data, style=styles.get(div_id)) }} {% else %} {{ plotly_graph(div_id, json_data) }} {% endif %} {% endfor %} {%- endmacro %} {% macro panel(panel_title, panel_id, graphs, styles=None, tables=None, show=False) -%}
{{ plotly_graphs(graphs, styles=styles) }}
{% if tables %}
{% for item in tables %} {{ table(item) }} {% endfor %}
{% endif %}
{%- endmacro %} {% macro merging_statistics(scaling_tables, xtriage_output, id) -%}

Merging statistics

{{ table(scaling_tables['overall'], has_column_header=true, has_row_header=true) }}
{{ table(scaling_tables['resolution_binned'], has_column_header=true) }} *significant at p={{ scaling_tables['cc_half_significance_level'] }}
{% if xtriage_output %} {{ xtriage_results( xtriage_output['xtriage_success'], xtriage_output['xtriage_warnings'], xtriage_output['xtriage_danger'], suffix=id,) }} {% endif %}
{%- endmacro %} {% macro xtriage_results(success, warning, danger, suffix='') -%} {% if success or warning or danger %}
{% if danger %}
{% for issue in danger %} {{ xtriage_modal(issue.header, issue.summary, "danger"+suffix+loop.index|string)}} {% endfor %}
{% endif %} {% if warning %}
{% for issue in warning %} {{ xtriage_modal(issue.header, issue.summary, "warning"+suffix+loop.index|string)}} {% endfor %}
{% endif %} {% if success %}
{% for issue in success %} {{ xtriage_modal(issue.header, issue.summary, "success"+suffix+loop.index|string)}} {% endfor %}
{% endif %}
Zwart, P. H., Grosse-Kunstleve, R. W. & Adams, P. D. (2005). CCP4 Newsl. 43, contribution 7.
{% endif %} {%- endmacro %} {% macro xtriage_modal(header, content, id) -%} {%- endmacro %}