{% set excluded = ['reagents', 'samples', 'controls', 'extraction_info', 'pcr_info', 'comment', 'barcode', 'platemap', 'export_map', 'equipment'] %}

Submission Details for {{ sub['Plate Number'] }}

   {% if sub['barcode'] %}{% endif %}

{% for key, value in sub.items() if key not in excluded %}     {{ key }}: {% if key=='Cost' %}{% if sub['Cost'] %} {{ "${:,.2f}".format(value) }}{% endif %}{% else %}{{ value }}{% endif %}
{% endfor %}

Reagents:

{% for item in sub['reagents'] %}     {{ item['type'] }}: {{ item['lot'] }} (EXP: {{ item['expiry'] }})
{% endfor %}

{% if sub['equipment'] %}

Equipment:

{% for item in sub['equipment'] %}     {{ item['role'] }}: {{ item['name'] }} ({{ item['asset_number'] }}): {{ item['processes'][0]|replace('\n\t', '
        ') }}
{% endfor %}

{% endif %} {% if sub['samples'] %}

Samples:

{% for item in sub['samples'] %}     {{ item['well'] }}: {% if item['organism'] %} {{ item['name'] }} - ({{ item['organism']|replace('\n\t', '
        ') }}){% else %} {{ item['name']|replace('\n\t', '
        ') }}{% endif %}
{% endfor %}

{% endif %} {% if sub['controls'] %}

Attached Controls:

{% for item in sub['controls'] %}

   {{ item['name'] }}: {{ item['type'] }} (Targets: {{ item['targets'] }})

{% if item['kraken'] %}

   {{ item['name'] }} Top 5 Kraken Results:

{% for genera in item['kraken'] %}         {{ genera['name'] }}: {{ genera['kraken_count'] }} ({{ genera['kraken_percent'] }})
{% endfor %}

{% endif %} {% endfor %} {% endif %} {% if sub['ext_info'] %} {% for entry in sub['ext_info'] %}

Extraction Status:

{% for key, value in entry.items() %} {% if "column" in key %}     {{ key|replace('_', ' ')|title() }}: {{ value }}uL
{% else %}     {{ key|replace('_', ' ')|title() }}: {{ value }}
{% endif %} {% endfor %}

{% endfor %} {% endif %} {% if sub['pcr_info'] %} {% for entry in sub['pcr_info'] %} {% if 'comment' not in entry.keys() %}

qPCR Momentum Status:

{% else %}

qPCR Status:

{% endif %}

{% for key, value in entry.items() if key != 'imported_by'%} {% if "column" in key %}     {{ key|replace('_', ' ')|title() }}: {{ value }}uL
{% else %}     {{ key|replace('_', ' ')|title() }}: {{ value }}
{% endif %} {% endfor %}

{% endfor %} {% endif %} {% if sub['comment'] %}

Comments:

{% for entry in sub['comment'] %}      {{ entry['name'] }}:
{{ entry['text'] }}
- {{ entry['time'] }}
{% endfor %}

{% endif %} {% if sub['platemap'] %}

Plate map:

{{ sub['platemap'] }} {% endif %} {% if sub['export_map'] %}

Plate map:

{% endif %}