diff --git a/eva_sub_cli/etc/eva_logo.png b/eva_sub_cli/etc/eva_logo.png index 7e018a7..b731de2 100644 Binary files a/eva_sub_cli/etc/eva_logo.png and b/eva_sub_cli/etc/eva_logo.png differ diff --git a/eva_sub_cli/report.py b/eva_sub_cli/report.py index f546b92..8fdeac9 100644 --- a/eva_sub_cli/report.py +++ b/eva_sub_cli/report.py @@ -1,5 +1,6 @@ import base64 import os.path +import re from jinja2 import Environment, FileSystemLoader @@ -35,10 +36,5 @@ def generate_html_report(validation_results, validation_date, submission_dir, vc vcf_fasta_analysis_mapping=vcf_fasta_analysis_mapping, validation_results=validation_results ) + return re.sub('\s+\n', '\n', rendered_template) - try: - # minify-html is not included in conda installation currently - from minify_html import minify_html - return minify_html.minify(rendered_template, minify_js=True, remove_processing_instructions=True) - except ImportError: - return rendered_template diff --git a/requirements.txt b/requirements.txt index b2a450b..1c20ce8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ ebi_eva_common_pyutils==0.6.10 jinja2 jsonschema -minify_html==0.11.1 openpyxl pyyaml requests diff --git a/tests/resources/validation_reports/expected_report_metadata_json.html b/tests/resources/validation_reports/expected_report_metadata_json.html index 6ef2da7..f5ef23d 100644 --- a/tests/resources/validation_reports/expected_report_metadata_json.html +++ b/tests/resources/validation_reports/expected_report_metadata_json.html @@ -1,22 +1,473 @@ -Validation Report

Validation Report

eva-sub-cli vcligeneratedversion

Project Summary

General details about the project

Project Title: My cool project

Validation Date: 2023-08-31 12:34:56

Submission Directory: /test/submission/dir

Files mapping
VCF FileFasta FileAnalysis
input_fail.vcfinput_fail.faA
input_pass.vcfinput_pass.faB
input_test.vcfinput_test.facould not be linked

Metadata validation results

Ensures that required fields are present and values are formatted correctly. For requirements, please refer to the EVA website.
❌ Metadata validation check
Full report: /path/to/json/metadata/report
JSON PropertyError Description
.filesshould have required property 'files'
/project.titleshould have required property 'title'
/project.descriptionshould have required property 'description'
/project.taxIdshould have required property 'taxId'
/project.centreshould have required property 'centre'
/analysis/0.analysisTitleshould have required property 'analysisTitle'
/analysis/0.descriptionshould have required property 'description'
/analysis/0.experimentTypeshould have required property 'experimentType'
/analysis/0.referenceGenomeshould have required property 'referenceGenome'
/sample/0.bioSampleAccessionshould have required property 'bioSampleAccession'
/sample/0.bioSampleObjectshould have required property 'bioSampleObject'
/sample/0should match exactly one schema in oneOf

VCF validation results

Checks whether each file is compliant with the VCF specification. Also checks whether the variants' reference alleles match against the reference assembly.

input_fail.vcf

❌ Assembly check: 26/36 (72.22%)
First 10 errors per category are below. Full report: /path/to/assembly_failed/report
CategoryError
Parsing ErrorThe assembly checking could not be completed: Contig 'chr23' not found in assembly report
mismatch errorChromosome 1, position 35549, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35595, reference allele 'G' does not match the reference sequence, expected 'a'
mismatch errorChromosome 1, position 35618, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35626, reference allele 'A' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35639, reference allele 'T' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35643, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35717, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a'
mismatch errorChromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c'
❌ VCF check: 1 critical errors, 1 non-critical errors
First 10 errors per category are below. Full report: /path/to/vcf_failed/report
CategoryError
critical errorLine 4: Error in meta-data section.
non-critical errorSample #11, field AD does not match the meta specification Number=R (expected 2 value(s)). AD=..

input_passed.vcf

✔ Assembly check: 247/247 (100.0%)
✔ VCF check: 0 critical errors, 0 non-critical errors

Sample name concordance check

Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names.
Analysis A: Sample names in metadata do not match with those in VCF files
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleA1, SampleA2 , SampleA3, SampleA4, SampleA5Show All Errors For Category
Samples in the VCF files but not described in the metadataA1Sample , A2Sample, A3Sample, A4Sample, A5SampleShow All Errors For Category
All Errors For Category - Samples described in the metadata but not in the VCF files:
  1. •SampleA1
  2. SampleA2•
  3. SampleA3
  4. SampleA4
  5. SampleA5
  6. SampleA6
  7. SampleA7
  8. SampleA8
  9. SampleA9
  10. SampleA10
Hide
All Errors For Category - Samples in the VCF files but not described in the metadata:
  1. A1Sample•
  2. •A2Sample
  3. A3Sample
  4. A4Sample
  5. A5Sample
  6. A6Sample
  7. A7Sample
  8. A8Sample
  9. A9Sample
  10. A10Sample
Hide
Analysis B: Sample names in metadata match with those in VCF files
Analysis C: Sample names in metadata do not match with those in VCF files
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleC1 , SampleC2, SampleC3, SampleC4Show All Errors For Category
Samples in the VCF files but not described in the metadataC1Sample , C2Sample, C3Sample, C4SampleShow All Errors For Category
All Errors For Category - Samples described in the metadata but not in the VCF files:
  1. SampleC1•
  2. •SampleC2
  3. SampleC3
  4. SampleC4
Hide
All Errors For Category - Samples in the VCF files but not described in the metadata:
  1. C1Sample•
  2. •C2Sample
  3. C3Sample
  4. C4Sample
Hide

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.

metadata_asm_match.fa

✔ All sequences are INSDC accessioned
✔ Analysis A: Assembly accession in metadata is compatible

metadata_asm_not_found.fa

✔ All sequences are INSDC accessioned
❌ No assembly accession found in metadata
Full report: /path/to/metadata_asm_not_found.yml
CategoryAccessions
Assembly accession found in metadataNot found
Assembly accession(s) compatible with FASTAGCA_1

metadata_asm_not_match.fa

✔ All sequences are INSDC accessioned
❌ Analysis B: Assembly accession in metadata is not compatible
Full report: /path/to/metadata_asm_not_match.yml
CategoryAccessions
Assembly accession found in metadataGCA_2
Assembly accession(s) compatible with FASTAGCA_1

metadata_error.fa

Warning: The following results may be incomplete due to problems with external services. Please try again later for complete results.
Error message: 500 Server Error: Internal Server Error for url: https://www.ebi.ac.uk/eva/webservices/contig-alias/v1/chromosomes/md5checksum/hjfdoijsfc47hfg0gh9qwjrve
✔ All sequences are INSDC accessioned
✔ Analysis C: Assembly accession in metadata is compatible

not_all_insdc.fa

❌ Some sequences are not INSDC accessioned
First 10 sequences not in INSDC. Full report: /path/to/not_all_insdc_check.yml
Sequence nameRefget md5
2hjfdoijsfc47hfg0gh9qwjrve
✔ Analysis A: Assembly accession in metadata is compatible
\ No newline at end of file + .error-list, .no-show { display: none; } + + + +
+ +
+

Validation Report

+
eva-sub-cli vcligeneratedversion
+
+
+
+

Project Summary

+
+ General details about the project +
+
+

Project Title: My cool project

+

Validation Date: 2023-08-31 12:34:56

+

Submission Directory: /test/submission/dir

+
+
Files mapping
+
+ + + + + + + + + + + + + + + + + + + + + +
VCF FileFasta FileAnalysis
input_fail.vcfinput_fail.faA
input_pass.vcfinput_pass.faB
input_test.vcfinput_test.facould not be linked
+
+ +
+
+

Metadata validation results

+
+ Ensures that required fields are present and values are formatted correctly. + For requirements, please refer to the EVA website. +
+
❌ Metadata validation check
+
+
Full report: /path/to/json/metadata/report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
JSON PropertyError Description
.files should have required property 'files'
/project.title should have required property 'title'
/project.description should have required property 'description'
/project.taxId should have required property 'taxId'
/project.centre should have required property 'centre'
/analysis/0.analysisTitle should have required property 'analysisTitle'
/analysis/0.description should have required property 'description'
/analysis/0.experimentType should have required property 'experimentType'
/analysis/0.referenceGenome should have required property 'referenceGenome'
/sample/0.bioSampleAccession should have required property 'bioSampleAccession'
/sample/0.bioSampleObject should have required property 'bioSampleObject'
/sample/0 should match exactly one schema in oneOf
+
+
+
+

VCF validation results

+
+ Checks whether each file is compliant with the VCF specification. + Also checks whether the variants' reference alleles match against the reference assembly. +
+

input_fail.vcf

+
❌ Assembly check: 26/36 (72.22%)
+
+
First 10 errors per category are below. Full report: /path/to/assembly_failed/report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryError
Parsing Error The assembly checking could not be completed: Contig 'chr23' not found in assembly report
mismatch error Chromosome 1, position 35549, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35595, reference allele 'G' does not match the reference sequence, expected 'a'
mismatch error Chromosome 1, position 35618, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35626, reference allele 'A' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35639, reference allele 'T' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35643, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35717, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a'
mismatch error Chromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c'
+
+
❌ VCF check: 1 critical errors, 1 non-critical errors
+
+
First 10 errors per category are below. Full report: /path/to/vcf_failed/report
+ + + + + + + + + + +
CategoryError
critical error Line 4: Error in meta-data section.
non-critical error Sample #11, field AD does not match the meta specification Number=R (expected 2 value(s)). AD=..
+
+

input_passed.vcf

+
✔ Assembly check: 247/247 (100.0%)
+
✔ VCF check: 0 critical errors, 0 non-critical errors
+
+
+

Sample name concordance check

+
+ Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names. +
+
Analysis A: Sample names in metadata do not match with those in VCF files
+
+ + + + + + + + + + + + + + +
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF files SampleA1, SampleA2 , SampleA3, SampleA4, SampleA5 Show All Errors For Category
Samples in the VCF files but not described in the metadataA1Sample , A2Sample, A3Sample, A4Sample, A5Sample Show All Errors For Category
+
+
All Errors For Category - Samples described in the metadata but not in the VCF files:
+
    +
  1. + •SampleA1 +
  2. +
  3. + SampleA2• +
  4. +
  5. + SampleA3 +
  6. +
  7. + SampleA4 +
  8. +
  9. + SampleA5 +
  10. +
  11. + SampleA6 +
  12. +
  13. + SampleA7 +
  14. +
  15. + SampleA8 +
  16. +
  17. + SampleA9 +
  18. +
  19. + SampleA10 +
  20. +
+ Hide +
+
+
All Errors For Category - Samples in the VCF files but not described in the metadata:
+
    +
  1. + A1Sample• +
  2. +
  3. + •A2Sample +
  4. +
  5. + A3Sample +
  6. +
  7. + A4Sample +
  8. +
  9. + A5Sample +
  10. +
  11. + A6Sample +
  12. +
  13. + A7Sample +
  14. +
  15. + A8Sample +
  16. +
  17. + A9Sample +
  18. +
  19. + A10Sample +
  20. +
+ Hide +
+
+
Analysis B: Sample names in metadata match with those in VCF files
+
Analysis C: Sample names in metadata do not match with those in VCF files
+
+ + + + + + + + + + + + + + +
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleC1 , SampleC2, SampleC3, SampleC4 Show All Errors For Category
Samples in the VCF files but not described in the metadataC1Sample , C2Sample, C3Sample, C4Sample Show All Errors For Category
+
+
All Errors For Category - Samples described in the metadata but not in the VCF files:
+
    +
  1. + SampleC1• +
  2. +
  3. + •SampleC2 +
  4. +
  5. + SampleC3 +
  6. +
  7. + SampleC4 +
  8. +
+ Hide +
+
+
All Errors For Category - Samples in the VCF files but not described in the metadata:
+
    +
  1. + C1Sample• +
  2. +
  3. + •C2Sample +
  4. +
  5. + C3Sample +
  6. +
  7. + C4Sample +
  8. +
+ Hide +
+
+
+
+

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. +
+

metadata_asm_match.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
✔ Analysis A: Assembly accession in metadata is compatible
+

metadata_asm_not_found.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
❌ No assembly accession found in metadata
+
+
Full report: /path/to/metadata_asm_not_found.yml
+ + + + + + + + + + + + +
CategoryAccessions
Assembly accession found in metadataNot found
Assembly accession(s) compatible with FASTAGCA_1
+
+

metadata_asm_not_match.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
❌ Analysis B: Assembly accession in metadata is not compatible
+
+
Full report: /path/to/metadata_asm_not_match.yml
+ + + + + + + + + + + + +
CategoryAccessions
Assembly accession found in metadataGCA_2
Assembly accession(s) compatible with FASTAGCA_1
+
+

metadata_error.fa

+
+ Warning: The following results may be incomplete due to problems with external services. Please try again later for + complete results. +
Error message: 500 Server Error: Internal Server Error for url: https://www.ebi.ac.uk/eva/webservices/contig-alias/v1/chromosomes/md5checksum/hjfdoijsfc47hfg0gh9qwjrve +
+ +
✔ All sequences are INSDC accessioned
+ + +
✔ Analysis C: Assembly accession in metadata is compatible
+

not_all_insdc.fa

+ +
❌ Some sequences are not INSDC accessioned
+
+
First 10 sequences not in INSDC. Full report: /path/to/not_all_insdc_check.yml
+ + + + + + + +
Sequence nameRefget md5
2 hjfdoijsfc47hfg0gh9qwjrve
+
+ + +
✔ Analysis A: Assembly accession in metadata is compatible
+
+ + + \ No newline at end of file diff --git a/tests/resources/validation_reports/expected_report_metadata_xlsx.html b/tests/resources/validation_reports/expected_report_metadata_xlsx.html index fa9e51d..5b84d29 100644 --- a/tests/resources/validation_reports/expected_report_metadata_xlsx.html +++ b/tests/resources/validation_reports/expected_report_metadata_xlsx.html @@ -1,22 +1,485 @@ -Validation Report

Validation Report

eva-sub-cli vcligeneratedversion

Project Summary

General details about the project

Project Title: My cool project

Validation Date: 2023-08-31 12:34:56

Submission Directory: /test/submission/dir

Files mapping
VCF FileFasta FileAnalysis
input_fail.vcfinput_fail.faA
input_pass.vcfinput_pass.faB
input_test.vcfinput_test.facould not be linked

Metadata validation results

Ensures that required fields are present and values are formatted correctly. For requirements, please refer to the EVA website.
❌ Metadata validation check
Full report: /path/to/metadata/metadata_spreadsheet_validation.txt
SheetRowColumnDescription
FilesSheet "Files" is missing
Project2Project TitleColumn "Project Title" is not populated
Project2DescriptionColumn "Description" is not populated
Project2Tax IDColumn "Tax ID" is not populated
Project2CenterColumn "Center" is not populated
Analysis2Analysis TitleColumn "Analysis Title" is not populated
Analysis2DescriptionColumn "Description" is not populated
Analysis2Experiment TypeColumn "Experiment Type" is not populated
Analysis2ReferenceColumn "Reference" is not populated
Sample3Sample AccessionColumn "Sample Accession" is not populated

VCF validation results

Checks whether each file is compliant with the VCF specification. Also checks whether the variants' reference alleles match against the reference assembly.

input_fail.vcf

❌ Assembly check: 26/36 (72.22%)
First 10 errors per category are below. Full report: /path/to/assembly_failed/report
CategoryError
Parsing ErrorThe assembly checking could not be completed: Contig 'chr23' not found in assembly report
mismatch errorChromosome 1, position 35549, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35595, reference allele 'G' does not match the reference sequence, expected 'a'
mismatch errorChromosome 1, position 35618, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35626, reference allele 'A' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35639, reference allele 'T' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35643, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35717, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a'
mismatch errorChromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c'
❌ VCF check: 1 critical errors, 1 non-critical errors
First 10 errors per category are below. Full report: /path/to/vcf_failed/report
CategoryError
critical errorLine 4: Error in meta-data section.
non-critical errorSample #11, field AD does not match the meta specification Number=R (expected 2 value(s)). AD=..

input_passed.vcf

✔ Assembly check: 247/247 (100.0%)
✔ VCF check: 0 critical errors, 0 non-critical errors

Sample name concordance check

Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names.
Analysis A: Sample names in metadata do not match with those in VCF files
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleA1, SampleA2 , SampleA3, SampleA4, SampleA5Show All Errors For Category
Samples in the VCF files but not described in the metadataA1Sample , A2Sample, A3Sample, A4Sample, A5SampleShow All Errors For Category
All Errors For Category - Samples described in the metadata but not in the VCF files:
  1. •SampleA1
  2. SampleA2•
  3. SampleA3
  4. SampleA4
  5. SampleA5
  6. SampleA6
  7. SampleA7
  8. SampleA8
  9. SampleA9
  10. SampleA10
Hide
All Errors For Category - Samples in the VCF files but not described in the metadata:
  1. A1Sample•
  2. •A2Sample
  3. A3Sample
  4. A4Sample
  5. A5Sample
  6. A6Sample
  7. A7Sample
  8. A8Sample
  9. A9Sample
  10. A10Sample
Hide
Analysis B: Sample names in metadata match with those in VCF files
Analysis C: Sample names in metadata do not match with those in VCF files
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleC1 , SampleC2, SampleC3, SampleC4Show All Errors For Category
Samples in the VCF files but not described in the metadataC1Sample , C2Sample, C3Sample, C4SampleShow All Errors For Category
All Errors For Category - Samples described in the metadata but not in the VCF files:
  1. SampleC1•
  2. •SampleC2
  3. SampleC3
  4. SampleC4
Hide
All Errors For Category - Samples in the VCF files but not described in the metadata:
  1. C1Sample•
  2. •C2Sample
  3. C3Sample
  4. C4Sample
Hide

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.

metadata_asm_match.fa

✔ All sequences are INSDC accessioned
✔ Analysis A: Assembly accession in metadata is compatible

metadata_asm_not_found.fa

✔ All sequences are INSDC accessioned
❌ No assembly accession found in metadata
Full report: /path/to/metadata_asm_not_found.yml
CategoryAccessions
Assembly accession found in metadataNot found
Assembly accession(s) compatible with FASTAGCA_1

metadata_asm_not_match.fa

✔ All sequences are INSDC accessioned
❌ Analysis B: Assembly accession in metadata is not compatible
Full report: /path/to/metadata_asm_not_match.yml
CategoryAccessions
Assembly accession found in metadataGCA_2
Assembly accession(s) compatible with FASTAGCA_1

metadata_error.fa

Warning: The following results may be incomplete due to problems with external services. Please try again later for complete results.
Error message: 500 Server Error: Internal Server Error for url: https://www.ebi.ac.uk/eva/webservices/contig-alias/v1/chromosomes/md5checksum/hjfdoijsfc47hfg0gh9qwjrve
✔ All sequences are INSDC accessioned
✔ Analysis C: Assembly accession in metadata is compatible

not_all_insdc.fa

❌ Some sequences are not INSDC accessioned
First 10 sequences not in INSDC. Full report: /path/to/not_all_insdc_check.yml
Sequence nameRefget md5
2hjfdoijsfc47hfg0gh9qwjrve
✔ Analysis A: Assembly accession in metadata is compatible
\ No newline at end of file + .error-list, .no-show { display: none; } + + + +
+ +
+

Validation Report

+
eva-sub-cli vcligeneratedversion
+
+
+
+

Project Summary

+
+ General details about the project +
+
+

Project Title: My cool project

+

Validation Date: 2023-08-31 12:34:56

+

Submission Directory: /test/submission/dir

+
+
Files mapping
+
+ + + + + + + + + + + + + + + + + + + + + +
VCF FileFasta FileAnalysis
input_fail.vcfinput_fail.faA
input_pass.vcfinput_pass.faB
input_test.vcfinput_test.facould not be linked
+
+ +
+
+

Metadata validation results

+
+ Ensures that required fields are present and values are formatted correctly. + For requirements, please refer to the EVA website. +
+
❌ Metadata validation check
+
+
Full report: /path/to/metadata/metadata_spreadsheet_validation.txt
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SheetRowColumnDescription
Files Sheet "Files" is missing
Project2Project Title Column "Project Title" is not populated
Project2Description Column "Description" is not populated
Project2Tax ID Column "Tax ID" is not populated
Project2Center Column "Center" is not populated
Analysis2Analysis Title Column "Analysis Title" is not populated
Analysis2Description Column "Description" is not populated
Analysis2Experiment Type Column "Experiment Type" is not populated
Analysis2Reference Column "Reference" is not populated
Sample3Sample Accession Column "Sample Accession" is not populated
+
+
+
+

VCF validation results

+
+ Checks whether each file is compliant with the VCF specification. + Also checks whether the variants' reference alleles match against the reference assembly. +
+

input_fail.vcf

+
❌ Assembly check: 26/36 (72.22%)
+
+
First 10 errors per category are below. Full report: /path/to/assembly_failed/report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryError
Parsing Error The assembly checking could not be completed: Contig 'chr23' not found in assembly report
mismatch error Chromosome 1, position 35549, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35595, reference allele 'G' does not match the reference sequence, expected 'a'
mismatch error Chromosome 1, position 35618, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35626, reference allele 'A' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35639, reference allele 'T' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35643, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35717, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a'
mismatch error Chromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c'
+
+
❌ VCF check: 1 critical errors, 1 non-critical errors
+
+
First 10 errors per category are below. Full report: /path/to/vcf_failed/report
+ + + + + + + + + + +
CategoryError
critical error Line 4: Error in meta-data section.
non-critical error Sample #11, field AD does not match the meta specification Number=R (expected 2 value(s)). AD=..
+
+

input_passed.vcf

+
✔ Assembly check: 247/247 (100.0%)
+
✔ VCF check: 0 critical errors, 0 non-critical errors
+
+
+

Sample name concordance check

+
+ Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names. +
+
Analysis A: Sample names in metadata do not match with those in VCF files
+
+ + + + + + + + + + + + + + +
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF files SampleA1, SampleA2 , SampleA3, SampleA4, SampleA5 Show All Errors For Category
Samples in the VCF files but not described in the metadataA1Sample , A2Sample, A3Sample, A4Sample, A5Sample Show All Errors For Category
+
+
All Errors For Category - Samples described in the metadata but not in the VCF files:
+
    +
  1. + •SampleA1 +
  2. +
  3. + SampleA2• +
  4. +
  5. + SampleA3 +
  6. +
  7. + SampleA4 +
  8. +
  9. + SampleA5 +
  10. +
  11. + SampleA6 +
  12. +
  13. + SampleA7 +
  14. +
  15. + SampleA8 +
  16. +
  17. + SampleA9 +
  18. +
  19. + SampleA10 +
  20. +
+ Hide +
+
+
All Errors For Category - Samples in the VCF files but not described in the metadata:
+
    +
  1. + A1Sample• +
  2. +
  3. + •A2Sample +
  4. +
  5. + A3Sample +
  6. +
  7. + A4Sample +
  8. +
  9. + A5Sample +
  10. +
  11. + A6Sample +
  12. +
  13. + A7Sample +
  14. +
  15. + A8Sample +
  16. +
  17. + A9Sample +
  18. +
  19. + A10Sample +
  20. +
+ Hide +
+
+
Analysis B: Sample names in metadata match with those in VCF files
+
Analysis C: Sample names in metadata do not match with those in VCF files
+
+ + + + + + + + + + + + + + +
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleC1 , SampleC2, SampleC3, SampleC4 Show All Errors For Category
Samples in the VCF files but not described in the metadataC1Sample , C2Sample, C3Sample, C4Sample Show All Errors For Category
+
+
All Errors For Category - Samples described in the metadata but not in the VCF files:
+
    +
  1. + SampleC1• +
  2. +
  3. + •SampleC2 +
  4. +
  5. + SampleC3 +
  6. +
  7. + SampleC4 +
  8. +
+ Hide +
+
+
All Errors For Category - Samples in the VCF files but not described in the metadata:
+
    +
  1. + C1Sample• +
  2. +
  3. + •C2Sample +
  4. +
  5. + C3Sample +
  6. +
  7. + C4Sample +
  8. +
+ Hide +
+
+
+
+

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. +
+

metadata_asm_match.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
✔ Analysis A: Assembly accession in metadata is compatible
+

metadata_asm_not_found.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
❌ No assembly accession found in metadata
+
+
Full report: /path/to/metadata_asm_not_found.yml
+ + + + + + + + + + + + +
CategoryAccessions
Assembly accession found in metadataNot found
Assembly accession(s) compatible with FASTAGCA_1
+
+

metadata_asm_not_match.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
❌ Analysis B: Assembly accession in metadata is not compatible
+
+
Full report: /path/to/metadata_asm_not_match.yml
+ + + + + + + + + + + + +
CategoryAccessions
Assembly accession found in metadataGCA_2
Assembly accession(s) compatible with FASTAGCA_1
+
+

metadata_error.fa

+
+ Warning: The following results may be incomplete due to problems with external services. Please try again later for + complete results. +
Error message: 500 Server Error: Internal Server Error for url: https://www.ebi.ac.uk/eva/webservices/contig-alias/v1/chromosomes/md5checksum/hjfdoijsfc47hfg0gh9qwjrve +
+ +
✔ All sequences are INSDC accessioned
+ + +
✔ Analysis C: Assembly accession in metadata is compatible
+

not_all_insdc.fa

+ +
❌ Some sequences are not INSDC accessioned
+
+
First 10 sequences not in INSDC. Full report: /path/to/not_all_insdc_check.yml
+ + + + + + + +
Sequence nameRefget md5
2 hjfdoijsfc47hfg0gh9qwjrve
+
+ + +
✔ Analysis A: Assembly accession in metadata is compatible
+
+ + + \ No newline at end of file diff --git a/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html b/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html index 5fc4e3a..fd81a86 100644 --- a/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html +++ b/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html @@ -1,22 +1,509 @@ -Validation Report

Validation Report

eva-sub-cli vcligeneratedversion
You requested to run the shallow validation, please run full validation before submitting the data
VCF FileVariant lines validated in VCFEntries used in Fasta
input_fail.vcf1000024
input_passed.vcf1000024

Project Summary

General details about the project

Project Title: My cool project

Validation Date: 2023-08-31 12:34:56

Submission Directory: /test/submission/dir

Files mapping
VCF FileFasta FileAnalysis
input_fail.vcfinput_fail.faA
input_pass.vcfinput_pass.faB
input_test.vcfinput_test.facould not be linked

Metadata validation results

Ensures that required fields are present and values are formatted correctly. For requirements, please refer to the EVA website.
❌ Metadata validation check
Full report: /path/to/metadata/metadata_spreadsheet_validation.txt
SheetRowColumnDescription
FilesSheet "Files" is missing
Project2Project TitleColumn "Project Title" is not populated
Project2DescriptionColumn "Description" is not populated
Project2Tax IDColumn "Tax ID" is not populated
Project2CenterColumn "Center" is not populated
Analysis2Analysis TitleColumn "Analysis Title" is not populated
Analysis2DescriptionColumn "Description" is not populated
Analysis2Experiment TypeColumn "Experiment Type" is not populated
Analysis2ReferenceColumn "Reference" is not populated
Sample3Sample AccessionColumn "Sample Accession" is not populated

VCF validation results

Checks whether each file is compliant with the VCF specification. Also checks whether the variants' reference alleles match against the reference assembly.

input_fail.vcf

❌ Assembly check: 26/36 (72.22%)
First 10 errors per category are below. Full report: /path/to/assembly_failed/report
CategoryError
Parsing ErrorThe assembly checking could not be completed: Contig 'chr23' not found in assembly report
mismatch errorChromosome 1, position 35549, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35595, reference allele 'G' does not match the reference sequence, expected 'a'
mismatch errorChromosome 1, position 35618, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35626, reference allele 'A' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35639, reference allele 'T' does not match the reference sequence, expected 'c'
mismatch errorChromosome 1, position 35643, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35717, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch errorChromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a'
mismatch errorChromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c'
❌ VCF check: 1 critical errors, 1 non-critical errors
First 10 errors per category are below. Full report: /path/to/vcf_failed/report
CategoryError
critical errorLine 4: Error in meta-data section.
non-critical errorSample #11, field AD does not match the meta specification Number=R (expected 2 value(s)). AD=..

input_passed.vcf

✔ Assembly check: 247/247 (100.0%)
✔ VCF check: 0 critical errors, 0 non-critical errors

Sample name concordance check

Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names.
Analysis A: Sample names in metadata do not match with those in VCF files
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleA1, SampleA2 , SampleA3, SampleA4, SampleA5Show All Errors For Category
Samples in the VCF files but not described in the metadataA1Sample , A2Sample, A3Sample, A4Sample, A5SampleShow All Errors For Category
All Errors For Category - Samples described in the metadata but not in the VCF files:
  1. •SampleA1
  2. SampleA2•
  3. SampleA3
  4. SampleA4
  5. SampleA5
  6. SampleA6
  7. SampleA7
  8. SampleA8
  9. SampleA9
  10. SampleA10
Hide
All Errors For Category - Samples in the VCF files but not described in the metadata:
  1. A1Sample•
  2. •A2Sample
  3. A3Sample
  4. A4Sample
  5. A5Sample
  6. A6Sample
  7. A7Sample
  8. A8Sample
  9. A9Sample
  10. A10Sample
Hide
Analysis B: Sample names in metadata match with those in VCF files
Analysis C: Sample names in metadata do not match with those in VCF files
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleC1 , SampleC2, SampleC3, SampleC4Show All Errors For Category
Samples in the VCF files but not described in the metadataC1Sample , C2Sample, C3Sample, C4SampleShow All Errors For Category
All Errors For Category - Samples described in the metadata but not in the VCF files:
  1. SampleC1•
  2. •SampleC2
  3. SampleC3
  4. SampleC4
Hide
All Errors For Category - Samples in the VCF files but not described in the metadata:
  1. C1Sample•
  2. •C2Sample
  3. C3Sample
  4. C4Sample
Hide

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.

metadata_asm_match.fa

✔ All sequences are INSDC accessioned
✔ Analysis A: Assembly accession in metadata is compatible

metadata_asm_not_found.fa

✔ All sequences are INSDC accessioned
❌ No assembly accession found in metadata
Full report: /path/to/metadata_asm_not_found.yml
CategoryAccessions
Assembly accession found in metadataNot found
Assembly accession(s) compatible with FASTAGCA_1

metadata_asm_not_match.fa

✔ All sequences are INSDC accessioned
❌ Analysis B: Assembly accession in metadata is not compatible
Full report: /path/to/metadata_asm_not_match.yml
CategoryAccessions
Assembly accession found in metadataGCA_2
Assembly accession(s) compatible with FASTAGCA_1

metadata_error.fa

Warning: The following results may be incomplete due to problems with external services. Please try again later for complete results.
Error message: 500 Server Error: Internal Server Error for url: https://www.ebi.ac.uk/eva/webservices/contig-alias/v1/chromosomes/md5checksum/hjfdoijsfc47hfg0gh9qwjrve
✔ All sequences are INSDC accessioned
✔ Analysis C: Assembly accession in metadata is compatible

not_all_insdc.fa

❌ Some sequences are not INSDC accessioned
First 10 sequences not in INSDC. Full report: /path/to/not_all_insdc_check.yml
Sequence nameRefget md5
2hjfdoijsfc47hfg0gh9qwjrve
✔ Analysis A: Assembly accession in metadata is compatible
\ No newline at end of file + .error-list, .no-show { display: none; } + + + +
+ +
+

Validation Report

+
eva-sub-cli vcligeneratedversion
+
+
+
+
+ ❌ You requested to run the shallow validation, please run full validation before submitting the data +
+
+ + + + + + + + + + + + + + + + +
VCF FileVariant lines validated in VCFEntries used in Fasta
input_fail.vcf1000024
input_passed.vcf1000024
+
+
+
+

Project Summary

+
+ General details about the project +
+
+

Project Title: My cool project

+

Validation Date: 2023-08-31 12:34:56

+

Submission Directory: /test/submission/dir

+
+
Files mapping
+
+ + + + + + + + + + + + + + + + + + + + + +
VCF FileFasta FileAnalysis
input_fail.vcfinput_fail.faA
input_pass.vcfinput_pass.faB
input_test.vcfinput_test.facould not be linked
+
+ +
+
+

Metadata validation results

+
+ Ensures that required fields are present and values are formatted correctly. + For requirements, please refer to the EVA website. +
+
❌ Metadata validation check
+
+
Full report: /path/to/metadata/metadata_spreadsheet_validation.txt
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SheetRowColumnDescription
Files Sheet "Files" is missing
Project2Project Title Column "Project Title" is not populated
Project2Description Column "Description" is not populated
Project2Tax ID Column "Tax ID" is not populated
Project2Center Column "Center" is not populated
Analysis2Analysis Title Column "Analysis Title" is not populated
Analysis2Description Column "Description" is not populated
Analysis2Experiment Type Column "Experiment Type" is not populated
Analysis2Reference Column "Reference" is not populated
Sample3Sample Accession Column "Sample Accession" is not populated
+
+
+
+

VCF validation results

+
+ Checks whether each file is compliant with the VCF specification. + Also checks whether the variants' reference alleles match against the reference assembly. +
+

input_fail.vcf

+
❌ Assembly check: 26/36 (72.22%)
+
+
First 10 errors per category are below. Full report: /path/to/assembly_failed/report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryError
Parsing Error The assembly checking could not be completed: Contig 'chr23' not found in assembly report
mismatch error Chromosome 1, position 35549, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35595, reference allele 'G' does not match the reference sequence, expected 'a'
mismatch error Chromosome 1, position 35618, reference allele 'G' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35626, reference allele 'A' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35639, reference allele 'T' does not match the reference sequence, expected 'c'
mismatch error Chromosome 1, position 35643, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35717, reference allele 'T' does not match the reference sequence, expected 'g'
mismatch error Chromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a'
mismatch error Chromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c'
+
+
❌ VCF check: 1 critical errors, 1 non-critical errors
+
+
First 10 errors per category are below. Full report: /path/to/vcf_failed/report
+ + + + + + + + + + +
CategoryError
critical error Line 4: Error in meta-data section.
non-critical error Sample #11, field AD does not match the meta specification Number=R (expected 2 value(s)). AD=..
+
+

input_passed.vcf

+
✔ Assembly check: 247/247 (100.0%)
+
✔ VCF check: 0 critical errors, 0 non-critical errors
+
+
+

Sample name concordance check

+
+ Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names. +
+
Analysis A: Sample names in metadata do not match with those in VCF files
+
+ + + + + + + + + + + + + + +
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF files SampleA1, SampleA2 , SampleA3, SampleA4, SampleA5 Show All Errors For Category
Samples in the VCF files but not described in the metadataA1Sample , A2Sample, A3Sample, A4Sample, A5Sample Show All Errors For Category
+
+
All Errors For Category - Samples described in the metadata but not in the VCF files:
+
    +
  1. + •SampleA1 +
  2. +
  3. + SampleA2• +
  4. +
  5. + SampleA3 +
  6. +
  7. + SampleA4 +
  8. +
  9. + SampleA5 +
  10. +
  11. + SampleA6 +
  12. +
  13. + SampleA7 +
  14. +
  15. + SampleA8 +
  16. +
  17. + SampleA9 +
  18. +
  19. + SampleA10 +
  20. +
+ Hide +
+
+
All Errors For Category - Samples in the VCF files but not described in the metadata:
+
    +
  1. + A1Sample• +
  2. +
  3. + •A2Sample +
  4. +
  5. + A3Sample +
  6. +
  7. + A4Sample +
  8. +
  9. + A5Sample +
  10. +
  11. + A6Sample +
  12. +
  13. + A7Sample +
  14. +
  15. + A8Sample +
  16. +
  17. + A9Sample +
  18. +
  19. + A10Sample +
  20. +
+ Hide +
+
+
Analysis B: Sample names in metadata match with those in VCF files
+
Analysis C: Sample names in metadata do not match with those in VCF files
+
+ + + + + + + + + + + + + + +
CategoryFirst 5 Errors For CategoryLink To View All Errors
Samples described in the metadata but not in the VCF filesSampleC1 , SampleC2, SampleC3, SampleC4 Show All Errors For Category
Samples in the VCF files but not described in the metadataC1Sample , C2Sample, C3Sample, C4Sample Show All Errors For Category
+
+
All Errors For Category - Samples described in the metadata but not in the VCF files:
+
    +
  1. + SampleC1• +
  2. +
  3. + •SampleC2 +
  4. +
  5. + SampleC3 +
  6. +
  7. + SampleC4 +
  8. +
+ Hide +
+
+
All Errors For Category - Samples in the VCF files but not described in the metadata:
+
    +
  1. + C1Sample• +
  2. +
  3. + •C2Sample +
  4. +
  5. + C3Sample +
  6. +
  7. + C4Sample +
  8. +
+ Hide +
+
+
+
+

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. +
+

metadata_asm_match.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
✔ Analysis A: Assembly accession in metadata is compatible
+

metadata_asm_not_found.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
❌ No assembly accession found in metadata
+
+
Full report: /path/to/metadata_asm_not_found.yml
+ + + + + + + + + + + + +
CategoryAccessions
Assembly accession found in metadataNot found
Assembly accession(s) compatible with FASTAGCA_1
+
+

metadata_asm_not_match.fa

+ +
✔ All sequences are INSDC accessioned
+ + +
❌ Analysis B: Assembly accession in metadata is not compatible
+
+
Full report: /path/to/metadata_asm_not_match.yml
+ + + + + + + + + + + + +
CategoryAccessions
Assembly accession found in metadataGCA_2
Assembly accession(s) compatible with FASTAGCA_1
+
+

metadata_error.fa

+
+ Warning: The following results may be incomplete due to problems with external services. Please try again later for + complete results. +
Error message: 500 Server Error: Internal Server Error for url: https://www.ebi.ac.uk/eva/webservices/contig-alias/v1/chromosomes/md5checksum/hjfdoijsfc47hfg0gh9qwjrve +
+ +
✔ All sequences are INSDC accessioned
+ + +
✔ Analysis C: Assembly accession in metadata is compatible
+

not_all_insdc.fa

+ +
❌ Some sequences are not INSDC accessioned
+
+
First 10 sequences not in INSDC. Full report: /path/to/not_all_insdc_check.yml
+ + + + + + + +
Sequence nameRefget md5
2 hjfdoijsfc47hfg0gh9qwjrve
+
+ + +
✔ Analysis A: Assembly accession in metadata is compatible
+
+ + + \ No newline at end of file