{% from 'project_details.txt' import project_details_report %}
{% from 'file_validation.txt' import file_validation_report %}
{% from 'sample_name_check.txt' import sample_name_check_report %}
{% from 'fasta_check.txt' import fasta_check_report %}
{% from 'metadata_validation.txt' import metadata_validation_report %}
{% from 'shallow_validation.txt' import optional_shallow_validation_report %}

VALIDATION REPORT
eva-sub-cli v{{cli_version}}

{{ optional_shallow_validation_report(validation_results) }}

-

PROJECT SUMMARY
General details about the project

{{ project_details_report(project_title, validation_date, submission_dir, vcf_fasta_analysis_mapping) }}

-

METADATA VALIDATION RESULTS
Ensures that required fields are present and values are formatted correctly.
For requirements, please refer to the EVA website (https://www.ebi.ac.uk/eva/?Submit-Data).

{{ metadata_validation_report(validation_results) }}

-

VCF VALIDATION RESULTS
Checks whether each file is compliant with the VCF specification (http://samtools.github.io/hts-specs/VCFv4.4.pdf).
Also checks whether the variants' reference alleles match against the reference assembly.

{% for file_name in vcf_files %}
{% if file_name != "pass"%}
	{{ file_name }}
	{{ file_validation_report(validation_results, file_name) }}
{% endif %}
{% endfor %}

-

SAMPLE NAME CONCORDANCE CHECK
Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names.

{{ sample_name_check_report(validation_results)}}

-

REFERENCE GENOME INSDC CHECK
Checks that the reference sequences in the FASTA file used to call the variants are accessioned in INSDC.
Also checks if the reference assembly accession in the metadata matches the one determined from the FASTA file.

{% for file_name in fasta_files %}
{% if file_name != "pass"%}
	{{ file_name }}
	{{ fasta_check_report(validation_results, file_name) }}
{% endif %}
{% endfor %}
