{% macro sample_name_check_report(validation_results) -%} {% set results = validation_results.get('sample_check', {}) %} {% macro format_error(error) %} {{ error | replace(' ', '•') }} {% endmacro %} {% for analysis, results_for_analysis in results.get('results_per_analysis', {}).items() %} {% if results_for_analysis.get('difference') %} {% set expand_icon = "▶" %} {% set icon = "❌" %} {% set row_class = "report-section fail collapsible" %} {% set text = "Sample names in metadata do not match with those in VCF files" %} {% else %} {% set icon = "✔" %} {% set row_class = "report-section pass" %} {% set text = "Sample names in metadata match with those in VCF files" %} {% endif %}
{{ expand_icon }} {{ icon }} {{ analysis }}: {{ text }}
{% if results_for_analysis.get('difference') %}
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF files {{ results_for_analysis.get('more_metadata_submitted_files')[:5]|join(", ") }} Show All Errors For Category
Samples in the VCF files but not described in the metadata {{ results_for_analysis.get('more_submitted_files_metadata')[:5]|join(", ") }} Show All Errors For Category
All Errors For Category - Samples described in the metadata but not in the VCF files:
    {% for error in results_for_analysis.get('more_metadata_submitted_files') %}
  1. {{ format_error(error) }}
  2. {% endfor %}
Hide
All Errors For Category - Samples in the VCF files but not described in the metadata:
    {% for error in results_for_analysis.get('more_submitted_files_metadata') %}
  1. {{ format_error(error) }}
  2. {% endfor %}
Hide
{% endif %} {% endfor %} {%- endmacro %}