eva-sub-cli 0.5.0__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/.github/workflows/tests.yml +1 -1
  2. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/PKG-INFO +1 -1
  3. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/docs/how_to_submit.md +15 -8
  4. eva_sub_cli-0.5.2/docs/input_file_overview.md +115 -0
  5. eva_sub_cli-0.5.2/docs/validation_overview.md +103 -0
  6. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/_version.py +3 -3
  7. eva_sub_cli-0.5.2/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
  8. eva_sub_cli-0.5.2/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
  9. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/etc/eva_schema.json +4 -1
  10. eva_sub_cli-0.5.2/eva_sub_cli/exceptions/submission_upload_exception.py +5 -0
  11. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/check_fasta_insdc.py +13 -3
  12. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/cli.py +22 -31
  13. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/html/fasta_check.html +8 -2
  14. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/html/file_validation.html +1 -1
  15. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/html/report.html +44 -14
  16. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/html/shallow_validation.html +1 -1
  17. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/text/fasta_check.txt +5 -1
  18. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/text/file_validation.txt +1 -1
  19. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/text/report.txt +31 -7
  20. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/text/shallow_validation.txt +1 -1
  21. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/nextflow/validation.nf +37 -22
  22. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/orchestrator.py +90 -67
  23. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/report.py +5 -1
  24. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/submission_ws.py +9 -4
  25. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/submit.py +2 -0
  26. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/validators/docker_validator.py +25 -25
  27. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/validators/native_validator.py +9 -11
  28. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/validators/validator.py +206 -92
  29. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli.egg-info/PKG-INFO +1 -1
  30. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli.egg-info/SOURCES.txt +13 -5
  31. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test.json +2 -1
  32. eva_sub_cli-0.5.2/tests/resources/EVA_Submission_test_with_non_vcf_files.json +152 -0
  33. eva_sub_cli-0.5.2/tests/resources/EVA_Submission_test_with_non_vcf_files.xlsx +0 -0
  34. eva_sub_cli-0.5.0/tests/resources/validation_reports/expected_report_metadata_json.html → eva_sub_cli-0.5.2/tests/resources/validation_reports/expected_metadata_json_report.html +36 -8
  35. eva_sub_cli-0.5.0/tests/resources/validation_reports/expected_report_metadata_json.txt → eva_sub_cli-0.5.2/tests/resources/validation_reports/expected_metadata_json_report.txt +16 -8
  36. eva_sub_cli-0.5.0/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html → eva_sub_cli-0.5.2/tests/resources/validation_reports/expected_metadata_xlsx_report.html +36 -32
  37. eva_sub_cli-0.5.0/tests/resources/validation_reports/expected_report_metadata_xlsx.txt → eva_sub_cli-0.5.2/tests/resources/validation_reports/expected_metadata_xlsx_report.txt +16 -8
  38. eva_sub_cli-0.5.2/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.html +144 -0
  39. eva_sub_cli-0.5.2/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.txt +44 -0
  40. eva_sub_cli-0.5.0/tests/resources/validation_reports/expected_report_metadata_xlsx.html → eva_sub_cli-0.5.2/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html +60 -8
  41. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt +16 -8
  42. eva_sub_cli-0.5.2/tests/resources/validation_reports/validation_output/metadata.json +1 -0
  43. eva_sub_cli-0.5.2/tests/resources/validation_reports/validation_output/other_validations/file_info.txt +0 -0
  44. eva_sub_cli-0.5.2/tests/resources/validation_reports/validation_output/other_validations/input_passed_trim_down.yml +3 -0
  45. eva_sub_cli-0.5.2/tests/resources/vcf_files/example2.vcf.gz.tbi +0 -0
  46. eva_sub_cli-0.5.2/tests/test_cli.py +109 -0
  47. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_orchestrator.py +88 -75
  48. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_report.py +97 -180
  49. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_submit.py +2 -0
  50. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_validator.py +187 -14
  51. eva_sub_cli-0.5.0/.github/workflows/publish_packages.yml +0 -45
  52. eva_sub_cli-0.5.0/docs/input_file_overview.md +0 -45
  53. eva_sub_cli-0.5.0/docs/validation_overview.md +0 -79
  54. eva_sub_cli-0.5.0/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
  55. eva_sub_cli-0.5.0/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
  56. eva_sub_cli-0.5.0/tests/test_cli.py +0 -67
  57. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/.github/workflows/publish.yml +0 -0
  58. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/.github/workflows/publish_docs.yml +0 -0
  59. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/.github/workflows/trigger-eva-sub-cli-integration-tests.yml +0 -0
  60. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/.gitignore +0 -0
  61. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/LICENSE +0 -0
  62. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/README.md +0 -0
  63. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/conda/build.sh +0 -0
  64. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/conda/meta.yaml +0 -0
  65. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/docker/Dockerfile +0 -0
  66. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/docs/README.md +0 -0
  67. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/docs/_config.yml +0 -0
  68. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/docs/installation.md +0 -0
  69. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/docs/using_nextflow.md +0 -0
  70. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/__init__.py +0 -0
  71. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/auth.py +0 -0
  72. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/date_utils.py +0 -0
  73. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/etc/eva-biosamples.json +0 -0
  74. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/etc/eva_logo.png +0 -0
  75. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/etc/spreadsheet2json_conf.yaml +0 -0
  76. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/etc/spreadsheet2json_conf_V2.yaml +0 -0
  77. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/exceptions/__init__.py +0 -0
  78. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/exceptions/invalid_file_type_exception.py +0 -0
  79. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/exceptions/metadata_template_version_exception.py +0 -0
  80. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/exceptions/submission_not_found_exception.py +0 -0
  81. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/exceptions/submission_status_exception.py +0 -0
  82. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/__init__.py +0 -0
  83. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/check_metadata_semantics.py +0 -0
  84. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/evidence_type_checker.py +0 -0
  85. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/samples_checker.py +0 -0
  86. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/trim_down.py +0 -0
  87. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/executables/xlsx2json.py +0 -0
  88. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/file_utils.py +0 -0
  89. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/html/metadata_validation.html +0 -0
  90. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/html/project_details.html +0 -0
  91. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/html/sample_name_check.html +0 -0
  92. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/text/metadata_validation.txt +0 -0
  93. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/text/project_details.txt +0 -0
  94. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/jinja_templates/text/sample_name_check.txt +0 -0
  95. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/metadata.py +0 -0
  96. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/semantic_metadata.py +0 -0
  97. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/utils.py +0 -0
  98. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/validators/__init__.py +0 -0
  99. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli/validators/validation_results_parsers.py +0 -0
  100. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli.egg-info/dependency_links.txt +0 -0
  101. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli.egg-info/entry_points.txt +0 -0
  102. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli.egg-info/requires.txt +0 -0
  103. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/eva_sub_cli.egg-info/top_level.txt +0 -0
  104. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/pyproject.toml +0 -0
  105. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/pytest.ini +0 -0
  106. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/requirements.txt +0 -0
  107. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/setup.cfg +0 -0
  108. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/setup.py +0 -0
  109. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/build_and_test_docker_locally.py +0 -0
  110. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/ignore_test_nextflow_validation.yml +0 -0
  111. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_Docker_Test.xlsx +0 -0
  112. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test.xlsx +0 -0
  113. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test_V2.xlsx +0 -0
  114. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test_fails.xlsx +0 -0
  115. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test_version_missing.xlsx +0 -0
  116. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test_with_asm_report.json +0 -0
  117. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test_with_project_accession.json +0 -0
  118. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/EVA_Submission_test_with_project_accession.xlsx +0 -0
  119. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/assembly_check/invalid.vcf.assembly_check.log +0 -0
  120. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/assembly_check/invalid.vcf.text_assembly_report.txt +0 -0
  121. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/assembly_reports/input_passed.txt +0 -0
  122. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/fasta_files/Saccharomyces_cerevisiae_I.fa +0 -0
  123. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/fasta_files/input_passed.fa +0 -0
  124. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/fasta_files/multi_seq.fa +0 -0
  125. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/metadata_with_filename.json +0 -0
  126. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/sample_checker/example1.vcf.gz +0 -0
  127. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/sample_checker/example2.vcf +0 -0
  128. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/sample_checker/example3.vcf +0 -0
  129. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/sample_checker/metadata.json +0 -0
  130. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.assembly_check.log +0 -0
  131. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.text_assembly_report.1680102476700.txt +0 -0
  132. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.valid_assembly_report.1680102476700.txt +0 -0
  133. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/other_validations/evidence_type_checker.yml +0 -0
  134. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/other_validations/input_passed.fa_check.yml +0 -0
  135. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/other_validations/metadata_conversion_errors.yml +0 -0
  136. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/other_validations/metadata_semantic_check.yml +0 -0
  137. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt +0 -0
  138. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/other_validations/sample_checker.yml +0 -0
  139. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.db +0 -0
  140. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.txt +0 -0
  141. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.vcf_format.log +0 -0
  142. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/vcf_files/example2.vcf.gz +0 -0
  143. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/resources/vcf_files/input_passed.vcf +0 -0
  144. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_auth.py +0 -0
  145. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_check_fasta_insdc.py +0 -0
  146. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_docker_validator.py +0 -0
  147. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_evidence_type_checker.py +0 -0
  148. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_file_utils.py +0 -0
  149. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_metadata.py +0 -0
  150. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_samples_checker.py +0 -0
  151. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_semantic_metadata.py +0 -0
  152. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_trim_down.py +0 -0
  153. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_utils.py +0 -0
  154. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_validaton_results_parsers.py +0 -0
  155. {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.2}/tests/test_xlsx2json.py +0 -0
@@ -4,7 +4,7 @@ on:
4
4
  push:
5
5
  branches: [ main ]
6
6
  pull_request:
7
- branches: [ main ]
7
+ branches: [ main, add-validation-tasks ]
8
8
 
9
9
  jobs:
10
10
  build:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eva_sub_cli
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Summary: EBI EVA - validation and submission command line tool
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Environment :: Console
@@ -65,14 +65,21 @@ If you are working with large VCF files and find that validation takes a very lo
65
65
  argument `--shallow` to the command, which will validate only the first 10,000 lines in each VCF. Note that running
66
66
  shallow validation will **not** be sufficient for actual submission but will allow you to identify most validation concerns without long run time.
67
67
 
68
- ### VCF files and reference FASTA
69
- These can be provided either in the metadata file directly, or on the command line using the `--vcf_files` and
70
- `--reference_fasta` options. Note that if you are using more than one reference FASTA, you **cannot** use the command
71
- line options; you must specify which VCF files use which FASTA files in the metadata.
72
-
73
- VCF files can be either uncompressed or compressed using bgzip.
74
- Other types of compression are not allowed and will result in errors during validation.
75
- FASTA files must be uncompressed.
68
+ ### Validation tasks
69
+ To run only a subset of the validation steps, you can use the `--validation_tasks` argument.
70
+ This can be useful if you want to avoid re-running long-running validations that have already passed.
71
+ Note that all validation tasks must pass in order to submit. The report will aggregate the results of previous runs and new ones.
72
+ The possible tasks are:
73
+ * [`vcf_check`](validation_overview.md#vcf-checks) - includes syntax validation and other checks on VCF files
74
+ ${CODE_ROOT}/env/bin/upload_to_gcloud.py --input-file evidence.json.gz --destination-folder pharmacogenomics
75
+ * [`assembly_check`](validation_overview.md#assembly-checks) - includes all checks involving the FASTA file
76
+ * [`metadata_check`](validation_overview.md#metadata-check) - includes syntactic and semantic checks on metadata
77
+ * [`sample_check`](validation_overview.md#sample-name-concordance-check) - includes sample coherence checks between VCF files and metadata
78
+
79
+ For example, to run only `vcf_check` and `sample_check`:
80
+ ```shell
81
+ eva-sub-cli.py --metadata_xlsx <metadata file> --submission_dir <submission directory> --validation_tasks vcf_check sample_check
82
+ ```
76
83
 
77
84
  ### Metadata JSON
78
85
  Frequent submitters may be interested in using our [metadata JSON schema](https://github.com/EBIvariation/eva-sub-cli/blob/main/eva_sub_cli/etc/eva_schema.json)
@@ -0,0 +1,115 @@
1
+ # Overview of Input Files
2
+
3
+ View our [video tutorial on input files](https://embl-ebi.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=9284869a-9f57-43c6-8222-b3aa0158941e).
4
+
5
+ The eva-sub-cli tool requires the following inputs:
6
+
7
+ - One or several valid VCF files
8
+ - Reference genome in FASTA format
9
+ - Completed metadata spreadsheet
10
+
11
+ Only the metadata file is passed directly to the CLI tool. The VCF and FASTA files should be referenced from the
12
+ metadata file.
13
+
14
+ In the following sections, we will examine each of these inputs in detail.
15
+
16
+ ## VCF File
17
+
18
+ A VCF (Variant Call Format) file is a type of file used in bioinformatics to store information about genetic variants.
19
+ The EVA requires data files to conform to the official VCF specifications, so that the data can be interpreted
20
+ consistently by other databases and researchers looking to reuse the data. Many tools can be used to generate VCF files,
21
+ including [BCFtools](https://samtools.github.io/bcftools/), [PLINK](https://www.cog-genomics.org/plink/2.0/), and
22
+ [GATK](https://gatk.broadinstitute.org).
23
+
24
+ Besides being compliant with the VCF specification, we also require that each VCF file contains the necessary
25
+ evidence linking the variant to its biological source. This evidence can be in the form of sample genotypes or allele frequencies.
26
+
27
+ Here is an example of how sample genotypes might look like in a VCF file:
28
+ ```
29
+ ##fileformat=VCFv4.2
30
+ ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
31
+ #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE1 SAMPLE2
32
+ 1 10583 rs58108140 G A 100 PASS . GT 0/1 1/1
33
+ ```
34
+
35
+ And here is how allele frequencies would look:
36
+ ```
37
+ ##fileformat=VCFv4.2
38
+ ##INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency">
39
+ #CHROM POS ID REF ALT QUAL FILTER INFO
40
+ 1 10583 rs58108140 G A 100 PASS AF=0.25
41
+ ```
42
+
43
+ When using the eva-sub-cli tool, VCF files can be either uncompressed or compressed using bgzip or gzip.
44
+
45
+ ## FASTA File
46
+
47
+ This is the reference genome that your variants were called against, in uncompressed FASTA format. The EVA uses this to
48
+ check that the reference alleles are set correctly in the VCF files.
49
+
50
+ The sequences of the reference genome must be INSDC-registered, which means they are publicly available in one of the archives within the
51
+ INSDC consortium: [Genbank](https://www.ncbi.nlm.nih.gov/genbank/), [ENA](https://www.ebi.ac.uk/ena/browser/home), or
52
+ [DDBJ](https://www.ddbj.nig.ac.jp/index-e.html). This ensures the long-term availability of the genome and the
53
+ reusability of your variation data.
54
+
55
+ ## Metadata Spreadsheet
56
+
57
+ The metadata spreadsheet provides comprehensive contextual information about the dataset, ensuring that each submission
58
+ is accompanied by detailed descriptions that facilitate proper understanding and use of the data. Key elements included
59
+ in the metadata spreadsheet are analysis and project information, sample information, sequencing methodologies, and
60
+ experimental details. While not all fields are required, users are strongly encouraged to provide as much information
61
+ as possible to enhance the completeness and usefulness of the metadata.
62
+
63
+ The spreadsheet is organized into editable tabs, designed for metadata entry, and non-editable helper tabs, which offer
64
+ detailed explanations and guidance for each column. Users are required to complete all relevant sections within the
65
+ editable tabs. Mandatory fields in each section are indicated in bold to highlight essential information that must be
66
+ provided for a valid submission. Fields highlighted in green indicate an either/or choice. This means you should fill
67
+ in the choice most relevant for your submission, but not both.
68
+
69
+ Below we go through some important details for each of the tabs.
70
+
71
+ ### Submitter Details
72
+
73
+ This sheet captures basic information about the person or team submitting the data. This includes the lab name and
74
+ center, which is the name of the submitting institution or organization and is the name that will be visible once the
75
+ project is live on the EVA website.
76
+
77
+ ### Project
78
+
79
+ The objective of this sheet is to gather general information about the Project. If you are submitting to an existing
80
+ project, you can skip the other details and just provide the project accession; the data in this submission will be
81
+ added as analyses linked to that project. In case of a new project, please provide the relevant details including
82
+ submitter, submitting center, collaborators, project title, description and publications.
83
+
84
+ One important column to note is the Hold Date, which is the date until which the data should be kept private. EVA will
85
+ release the data automatically after this date. If it is missing, the default value is three days after the date of
86
+ submission.
87
+
88
+ ### Analysis
89
+
90
+ For EVA, an analysis is a grouping of samples and data files. This sheet allows us to link VCF files to a project and
91
+ to other EVA analyses. Additionally, this worksheet contains experimental metadata detailing the methodology of each
92
+ analysis. This includes a local path to your reference FASTA file, as described [above](#FASTA-file).
93
+
94
+ One project can have multiple associated analyses. EVA links analyses to samples and VCF files through the analysis
95
+ alias, which is a shortened identifier you must provide for each analysis.
96
+
97
+ ### Sample
98
+
99
+ This is where you describe the biological samples used for your analyses. Each row describes one sample and must include
100
+ the Analysis Alias to indicate which analysis it belongs to, and "Sample Name in VCF" which is the exact name of the
101
+ sample as it appears in the VCF file.
102
+
103
+ We accept preregistered samples, which should be provided using BioSamples sample or sampleset accessions. Please
104
+ ensure these are publicly accessible, as otherwise EVA will not be able to validate them.
105
+
106
+ If your samples are not yet accessioned, and are therefore novel, please use the "Novel sample(s)" sections of the
107
+ Sample worksheet to have them registered at BioSamples. Make sure to fill in the required fields in bold, including the
108
+ BioSample name, title, taxonomy ID, geographic location (chosen from the controlled vocabulary in the drop-down menu),
109
+ and collection date (in YYYY-MM-DD format).
110
+
111
+ ### Files
112
+
113
+ This sheet lists the VCF files in your submission. These should be provided as local paths within your system, so that
114
+ the CLI tool can locate them, along with the Analysis Alias which should be associated with each file. Each file should
115
+ be linked to exactly one analysis.
@@ -0,0 +1,103 @@
1
+ # Overview of Validation Checks
2
+
3
+ The CLI tool performs the following validation checks and generates corresponding reports:
4
+
5
+ - Metadata check to ensure that the metadata fields have been correctly filled in
6
+ - VCF check to ensure that the VCF file follows the VCF format specification
7
+ - Assembly check to ensure that the genome and the VCF match
8
+ - Sample name check to ensure that the samples in the metadata can be associated with the samples in the VCF
9
+
10
+ In the following sections, we will examine each of these checks in detail.
11
+
12
+ ## Metadata Check
13
+
14
+ Once the user passes the metadata spreadsheet for validation checks, the eva-sub-cli tool verifies that all mandatory columns, marked in bold in the spreadsheet, are filled in.
15
+ This data is crucial for further validation processes, such as retrieving the INDSC accession of the reference genome used to call the variants, and for sample and project metadata.
16
+
17
+ Each tab in the spreadsheet has an associated help tab, which provides detailed instructions on how to fill in your metadata correctly.
18
+ If any mandatory columns or sheets are missing, the CLI tool will raise errors.
19
+
20
+ Key points to note before validating your metadata spreadsheet with the eva-sub-cli tool:
21
+
22
+ - Please do not change the existing structure of the spreadsheet.
23
+ - Ensure all mandatory columns (marked in bold) are filled.
24
+ - Columns marked in green indicate an either/or requirement, so only one of the sections should be filled in.
25
+ - Any pre-registered projects and samples must be released and not kept in private status.
26
+ - Sample names in the spreadsheet must match those in the VCF file.
27
+ - Analysis aliases must match across the sheets (Analysis, Sample, and File sheets).
28
+ - Use the Hold Date field in the Project sheet for data that needs to be kept under embargo.
29
+
30
+ Common errors seen with metadata checks:
31
+
32
+ - Analysis alias is not filled in for the respective samples in the Sample tab.
33
+ - Reference field in the Analysis tab is not filled with an INSDC accession. Submitters should not use a non-GCA accession or generic assembly name as their reference genome.
34
+ - Taxonomy ID and the scientific name of the organism do not match for novel samples.
35
+ - Collection date and geographic location of the samples are not filled in for novel samples.
36
+ - Date fields do not follow the YYYY-MM-DD format.
37
+ - Custom values are used for controlled vocabulary fields (indicated with a drop-down menu). Submitters should select from the values provided or contact us if the required value is not present.
38
+
39
+ Most issues around metadata will be reported in the "Metadata validation results" section of the validation report.
40
+ However, note that other validation failures may also require you to modify your metadata file.
41
+
42
+ ## VCF Checks
43
+
44
+ Ensuring data consistency upon submission is crucial for interoperability and supporting cross-study comparative genomics.
45
+ Before accepting a VCF submission, the CLI tool verifies that the submitted information adheres to the official VCF specifications.
46
+ Additionally, submitted variants must be supported by either experimentally determined sample genotypes or population allele frequencies.
47
+
48
+ Key points to note before validating your VCF file with the eva-sub-cli tool:
49
+
50
+ - File Format Version: Always start the header with the VCF version number (versions 4.1-4 are accepted).
51
+ - Header Metadata: Should include the reference genome, information fields (INFO), filters (FILTER), AF and genotype metadata
52
+ - Variant Information: VCF files must provide either sample genotypes and/or aggregated sample summary-level allele frequencies.
53
+ - Unique Variants: Variant lines should be unique and not specify duplicate loci.
54
+ - Reference Genome: All variants must be submitted with positions on a reference genome accessioned by a member of the INSDC consortium: [Genbank](https://www.ncbi.nlm.nih.gov/genbank/), [ENA](https://www.ebi.ac.uk/ena/browser/home), or [DDBJ](https://www.ddbj.nig.ac.jp/index-e.html).
55
+
56
+ Common errors seen with VCF checks:
57
+
58
+ - The VCF version is not one of 4.1, 4.2, 4.3, or 4.4.
59
+ - The VCF file contains extra spaces, blanks, or extra quotations causing validation to fail. Tools like bcftools can help verify the header before validating the file.
60
+ - GT and AF fields are not defined in the header section.
61
+ - The fields used do not conform to the official VCF specifications.
62
+
63
+ Issues in VCF format validation will be reported in the "VCF validation results" section of the validation report.
64
+ Issues in determining evidence type (genotypes or allele frequencies) are reported per analysis at the top of the report.
65
+
66
+ ## Assembly Checks
67
+
68
+ The EVA requires that all variants be submitted with an asserted position on an INSDC sequence.
69
+ This means that the reference allele for every variant must match a position in a sequence that has been accessioned in the GenBank, ENA, or DDBJ databases.
70
+ Aligning all submitted data with INSDC sequences enables integration with other EMBL-EBI resources, including Ensembl, and is crucial for maintaining standardisation at the EVA.
71
+ This also means that all sequence identifiers in your VCF must match those in the reference FASTA file.
72
+
73
+ Key points to note before validating your data with the eva-sub-cli tool:
74
+
75
+ - Ensure that the reference sequences in the FASTA file used to call the variants are accessioned in INSDC.
76
+ - Verify that the contig names in the VCF file match those in the FASTA file.
77
+
78
+ Common errors seen with assembly checks:
79
+
80
+ - VCF file uses contig name not found in the FASTA file, causing the assembly check to fail.
81
+ - Major Allele Used as REF Allele: This typically occurs when a specific version of Plink or Tassel is used to create VCF files, causing the tool to use the major allele as the reference allele. In such cases, submitters should use the GCA FASTA sequence to create corrected files.
82
+
83
+ Issues around reference allele matching in VCF files will be reported in the "VCF validation results" section of the validation report,
84
+ while issues around INSDC accessioning of the assembly will be reported in the "Reference genome INSDC check" section.
85
+
86
+ ## Sample Name Concordance Check
87
+
88
+ The sample name concordance check ensures that the sample names in the metadata spreadsheet match those in the VCF file.
89
+ This is achieved by cross-checking the "Sample name in VCF" column in the spreadsheet with the sample names registered in the VCF file.
90
+ Any discrepancies must be addressed by the submitter when the CLI tool generates a report of the mismatches found.
91
+
92
+ Key points to note before validating your data with the eva-sub-cli tool:
93
+
94
+ - Ensure that sample names between the VCF file and the metadata spreadsheet match. This comparison is case-sensitive.
95
+ - Ensure there are no extra spaces in the sample names.
96
+
97
+ Common errors seen with sample concordance checks:
98
+
99
+ - Link between "Sample" and "File" provided via the Analysis alias is not correctly defined in the metadata which causes the sample name concordance check to fail.
100
+ - Extra white spaces in the sample names can lead to mismatches.
101
+ - Case sensitivity issues between the sample names in the VCF file and the metadata spreadsheet.
102
+
103
+ Issues in sample name concordance will be reported in the "Sample name concordance check" section of the validation report.
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.5.0'
32
- __version_tuple__ = version_tuple = (0, 5, 0)
31
+ __version__ = version = '0.5.2'
32
+ __version_tuple__ = version_tuple = (0, 5, 2)
33
33
 
34
- __commit_id__ = commit_id = 'g1b663fd41'
34
+ __commit_id__ = commit_id = 'g31e734672'
@@ -106,7 +106,10 @@
106
106
  },
107
107
  "publications": {
108
108
  "type": "array",
109
- "items": true
109
+ "items": {
110
+ "type": "string",
111
+ "pattern": "^[^:,]+?:[^:,]+?$"
112
+ }
110
113
  },
111
114
  "parentProject": {
112
115
  "$ref": "#/definitions/projectAccession"
@@ -0,0 +1,5 @@
1
+
2
+ class SubmissionUploadException(Exception):
3
+ def __init__(self, message):
4
+ self.message = message
5
+ super().__init__(self.message)
@@ -54,6 +54,11 @@ def _get_containing_assemblies_paged(url):
54
54
 
55
55
 
56
56
  def get_containing_assemblies(md5_digest):
57
+ """
58
+ Return the INSDC accessions of assemblies in contig alias containing the sequence with the provided md5 digest.
59
+ :param md5_digest: md5 digest of the sequence to query
60
+ :return: set of INSDC accessions
61
+ """
57
62
  # Wrapper method to handle pagination
58
63
  url = f'{CONTIG_ALIAS_SERVER}/{md5_digest}'
59
64
  return _get_containing_assemblies_paged(url)
@@ -89,7 +94,7 @@ def assess_fasta(input_fasta, analyses, assembly_in_metadata):
89
94
  elif len(possible_assemblies) == 0:
90
95
  possible_assemblies = containing_assemblies
91
96
  else:
92
- possible_assemblies &= containing_assemblies
97
+ possible_assemblies = possible_assemblies.intersection(containing_assemblies)
93
98
  except Exception as e:
94
99
  # Server errors from either ENA refget or EVA contig alias will halt the check prematurely.
95
100
  # Report the error but do not return from the method, so that incomplete results can be reported
@@ -134,6 +139,10 @@ def get_analyses_and_reference_genome_from_metadata(vcf_files_for_fasta, json_fi
134
139
  return all_analyses, assemblies[0]
135
140
 
136
141
 
142
+ def check_assembly_in_metadata(assembly_in_metadata):
143
+ return assembly_in_metadata and assembly_in_metadata.upper().startswith('GCA')
144
+
145
+
137
146
  def main():
138
147
  arg_parser = argparse.ArgumentParser(
139
148
  description="Calculate each sequence's Refget MD5 digest and compare these against INSDC Refget server.")
@@ -147,6 +156,7 @@ def main():
147
156
  help='Path to the location of the results')
148
157
  args = arg_parser.parse_args()
149
158
  logging_config.add_stdout_handler()
150
- analyses, metadata_insdc = get_analyses_and_reference_genome_from_metadata(args.vcf_files, args.metadata_json)
151
- results = assess_fasta(args.input_fasta, analyses, metadata_insdc)
159
+ analyses, assembly_in_metadata = get_analyses_and_reference_genome_from_metadata(args.vcf_files, args.metadata_json)
160
+ results = assess_fasta(args.input_fasta, analyses, assembly_in_metadata)
161
+ results['metadata_assembly_gca'] = check_assembly_in_metadata(assembly_in_metadata)
152
162
  write_result_yaml(args.output_yaml, results)
@@ -1,14 +1,11 @@
1
1
  import sys
2
2
 
3
- import eva_sub_cli
4
- from eva_sub_cli.exceptions.metadata_template_version_exception import MetadataTemplateVersionException, \
5
- MetadataTemplateVersionNotFoundException
6
- from eva_sub_cli.exceptions.submission_not_found_exception import SubmissionNotFoundException
7
- from eva_sub_cli.exceptions.submission_status_exception import SubmissionStatusException
3
+ from requests import HTTPError
4
+
5
+ from eva_sub_cli.exceptions.submission_upload_exception import SubmissionUploadException
8
6
 
9
7
  if not sys.warnoptions:
10
8
  import warnings
11
-
12
9
  warnings.simplefilter("ignore")
13
10
 
14
11
  import logging
@@ -16,27 +13,19 @@ import os
16
13
  from argparse import ArgumentParser
17
14
  from ebi_eva_common_pyutils.logger import logging_config
18
15
 
16
+ import eva_sub_cli
19
17
  from eva_sub_cli import orchestrator
20
- from eva_sub_cli.orchestrator import VALIDATE, SUBMIT, DOCKER, NATIVE
18
+ from eva_sub_cli.exceptions.metadata_template_version_exception import MetadataTemplateVersionException, \
19
+ MetadataTemplateVersionNotFoundException
20
+ from eva_sub_cli.exceptions.submission_status_exception import SubmissionStatusException
21
+ from eva_sub_cli.exceptions.submission_not_found_exception import SubmissionNotFoundException
21
22
  from eva_sub_cli.file_utils import is_submission_dir_writable, DirLockError, DirLock
23
+ from eva_sub_cli.orchestrator import VALIDATE, SUBMIT, DOCKER, NATIVE
24
+ from eva_sub_cli.validators.validator import ALL_VALIDATION_TASKS
22
25
 
23
26
 
24
27
  def validate_command_line_arguments(args, argparser):
25
28
  fail = False
26
- if (args.vcf_files and not args.reference_fasta) or (not args.vcf_files and args.reference_fasta):
27
- print("When using --vcf_files and --reference_fasta, both need to be specified")
28
- fail = True
29
-
30
- if args.vcf_files:
31
- for vcf_file in args.vcf_files:
32
- if not os.path.isfile(vcf_file):
33
- print(f"VCF file {vcf_file} is not a file")
34
- fail = True
35
-
36
- if args.reference_fasta:
37
- if not os.path.isfile(args.reference_fasta):
38
- print(f"Fasta file {args.reference_fasta} is not a file")
39
- fail = True
40
29
 
41
30
  if args.metadata_xlsx:
42
31
  if not os.path.isfile(args.metadata_xlsx):
@@ -74,14 +63,6 @@ def parse_args(cmd_line_args):
74
63
  argparser.add_argument('--version', action='version', version=f'%(prog)s {eva_sub_cli.__version__}')
75
64
  argparser.add_argument('--submission_dir', required=True, type=str,
76
65
  help='Path to the directory where all processing is done and submission info is stored')
77
- vcf_group = argparser.add_argument_group(
78
- 'Input VCF and assembly',
79
- "Specify the VCF files and associated assembly with the following options. If you used different assemblies "
80
- "for different VCF files, then you must include these in the metadata file rather than specifying them here."
81
- )
82
- vcf_group.add_argument('--vcf_files', nargs='+', help="One or more VCF files to validate")
83
- vcf_group.add_argument('--reference_fasta',
84
- help="The FASTA file containing the reference genome from which the variants were derived")
85
66
 
86
67
  metadata_group = argparser.add_argument_group('Metadata', 'Specify the metadata in a spreadsheet or in a JSON file')
87
68
  metadata_group = metadata_group.add_mutually_exclusive_group(required=True)
@@ -93,6 +74,9 @@ def parse_args(cmd_line_args):
93
74
  help='Select a task to perform (default SUBMIT). VALIDATE will run the validation'
94
75
  ' regardless of the outcome of previous runs. SUBMIT will run validate only if'
95
76
  ' the validation was not performed successfully before and then run the submission.')
77
+ argparser.add_argument('--validation_tasks', nargs='+', choices=ALL_VALIDATION_TASKS, default=ALL_VALIDATION_TASKS,
78
+ type=str.lower, help='Select only a subset of the validation tasks to run. Note that all '
79
+ 'tasks need to be successful for the validation to pass')
96
80
  argparser.add_argument('--executor', choices=[DOCKER, NATIVE], default=NATIVE, type=str.lower,
97
81
  help='Select the execution type for running validation (default native)')
98
82
  credential_group = argparser.add_argument_group('Credentials', 'Specify the ENA Webin credentials you want to use '
@@ -125,7 +109,6 @@ def main():
125
109
 
126
110
  try:
127
111
  # lock the submission directory
128
-
129
112
  with DirLock(os.path.join(args.submission_dir)) as lock:
130
113
  # Create the log file
131
114
  logging_config.add_file_handler(os.path.join(args.submission_dir, 'eva_submission.log'), logging.DEBUG)
@@ -151,7 +134,15 @@ def main():
151
134
  except MetadataTemplateVersionNotFoundException as mte:
152
135
  print(mte)
153
136
  exit_status = 70
137
+ except SubmissionUploadException as sue:
138
+ print(sue)
139
+ exit_status = 71
140
+ except HTTPError as http_err:
141
+ print(http_err)
142
+ if http_err.response is not None and http_err.response.text:
143
+ print(http_err.response.text)
144
+ exit_status = 72
154
145
  except Exception as ex:
155
146
  print(ex)
156
- exit_status = 71
147
+ exit_status = 73
157
148
  return exit_status
@@ -9,6 +9,12 @@
9
9
  <br><strong>Error message:</strong> {{ results_for_fasta.get('connection_error') }}
10
10
  </div>
11
11
  {% endif %}
12
+ {% if 'metadata_assembly_compatible' in results_for_fasta and not results_for_fasta.get('metadata_assembly_gca') %}
13
+ <div class="report-section fail">
14
+ <strong>Warning:</strong> Non-GCA reference found in metadata. Please provide the INSDC accession for your reference assembly.
15
+ If you would like to submit using a non-GCA reference sequence, contact <a href="mailto:eva-helpdesk@ebi.ac.uk">eva-helpdesk@ebi.ac.uk</a>.
16
+ </div>
17
+ {% endif %}
12
18
 
13
19
  <!-- All INSDC check results -->
14
20
  {% set expand_icon = "" %}
@@ -52,8 +58,8 @@
52
58
  {% set text = analysis_text + ": Assembly accession in metadata is compatible" %}
53
59
  {% else %}
54
60
  {% set expand_icon = "&#9654;" %}
55
- {% set icon = "&#10060;" %}
56
- {% set row_class = "report-section fail collapsible" %}
61
+ {% set icon = "&#10071;" %}
62
+ {% set row_class = "report-section warn collapsible" %}
57
63
  {% set text = analysis_text + ": Assembly accession in metadata is not compatible" %}
58
64
  {% endif %}
59
65
  {% else %}
@@ -1,6 +1,6 @@
1
1
 
2
2
  {% macro file_validation_report(validation_results, file_name) -%}
3
- {% for check_type, check_per_file in validation_results.items() %}
3
+ {% for check_type, check_per_file in validation_results.items() if check_type not in ["trim_down", "version"] %}
4
4
  {% set result = check_per_file.get(file_name, {}) %}
5
5
  {% if check_type == "assembly_check" %}
6
6
  {{ assembly_check(result) }}
@@ -6,6 +6,13 @@
6
6
  {% from 'metadata_validation.html' import metadata_validation_report %}
7
7
  {% from 'shallow_validation.html' import optional_shallow_validation_report %}
8
8
 
9
+ {% macro validation_not_run_yet_message(text="Process not run yet") %}
10
+ {% set icon = "&#9208;" %} {# pause symbol ⏸ #}
11
+ {% set row_class = "report-section info" %}
12
+ {% set expand_icon = "" %}
13
+ <div class='{{ row_class }}'><span class="expand_icon">{{ expand_icon }}</span> {{ icon }} {{ text }}</div>
14
+ {% endmacro %}
15
+
9
16
  <html lang="EN">
10
17
  <head>
11
18
  <meta charset="UTF-8">
@@ -24,12 +31,14 @@
24
31
 
25
32
  .report-section { padding: 12px; border: 1px solid white; margin-bottom: 5px}
26
33
  .active, .collapsible:hover.fail { background-color: #e6a3ae; }
34
+ .active, .collapsible:hover.warn { background-color: #e6de7c; }
27
35
  .active, .collapsible:hover.info { background-color: #c0c0c0; }
28
36
 
29
37
  table { border-collapse: collapse; padding: 10px; margin-bottom: 20px}
30
38
  th, td { border: 1px solid black; padding: 8px; text-align: left; }
31
39
  th { background-color: lightgrey; }
32
40
  .fail { background-color: #FFB6C1; }
41
+ .warn { background-color: #f5ed7f; }
33
42
  .pass { background-color: #90EE90; }
34
43
  .info { background-color: #dadada; }
35
44
  .error-list, .no-show { display: none; }
@@ -63,7 +72,12 @@
63
72
  Ensures that required fields are present and values are formatted correctly.
64
73
  For requirements, please refer to the <a href="https://www.ebi.ac.uk/eva/?Submit-Data" target=”_blank”>EVA website</a>.
65
74
  </div>
66
- {{ metadata_validation_report(validation_results) }}
75
+ {% set run_status = validation_results.get('metadata_check', {}).get('run_status', '') %}
76
+ {% if run_status %}
77
+ {{ metadata_validation_report(validation_results) }}
78
+ {% else %}
79
+ {{ validation_not_run_yet_message() }}
80
+ {% endif %}
67
81
  </section>
68
82
 
69
83
  <section>
@@ -72,12 +86,17 @@
72
86
  Checks whether each file is compliant with the <a href="http://samtools.github.io/hts-specs/VCFv4.4.pdf" target=”_blank”>VCF specification</a>.
73
87
  Also checks whether the variants' reference alleles match against the reference assembly.
74
88
  </div>
75
- {% for file_name in vcf_files %}
76
- {% if file_name != "pass"%}
77
- <h3>{{ file_name }}</h3>
78
- {{ file_validation_report(validation_results, file_name) }}
79
- {% endif %}
80
- {% endfor %}
89
+ {% set run_status = validation_results.get('vcf_check', {}).get('run_status', '') %}
90
+ {% if run_status %}
91
+ {% for file_name in vcf_files %}
92
+ {% if file_name != "pass"%}
93
+ <h3>{{ file_name }}</h3>
94
+ {{ file_validation_report(validation_results, file_name) }}
95
+ {% endif %}
96
+ {% endfor %}
97
+ {% else %}
98
+ {{ validation_not_run_yet_message() }}
99
+ {% endif %}
81
100
  </section>
82
101
 
83
102
  <section>
@@ -85,7 +104,13 @@
85
104
  <div class="description">
86
105
  Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names.
87
106
  </div>
88
- {{ sample_name_check_report(validation_results)}}
107
+ {% set run_status = validation_results.get('sample_check', {}).get('run_status', '') %}
108
+ {% if run_status %}
109
+ {{ sample_name_check_report(validation_results)}}
110
+ {% else %}
111
+ {{ validation_not_run_yet_message() }}
112
+
113
+ {% endif %}
89
114
  </section>
90
115
 
91
116
  <section>
@@ -94,12 +119,17 @@
94
119
  Checks that the reference sequences in the FASTA file used to call the variants are accessioned in INSDC.
95
120
  Also checks if the reference assembly accession in the metadata matches the one determined from the FASTA file.
96
121
  </div>
97
- {% for file_name in fasta_files %}
98
- {% if file_name != "pass"%}
99
- <h3>{{ file_name }}</h3>
100
- {{ fasta_check_report(validation_results, file_name) }}
101
- {% endif %}
102
- {% endfor %}
122
+ {% set run_status = validation_results.get('fasta_check', {}).get('run_status', '') %}
123
+ {% if run_status %}
124
+ {% for file_name in fasta_files %}
125
+ {% if file_name != "pass"%}
126
+ <h3>{{ file_name }}</h3>
127
+ {{ fasta_check_report(validation_results, file_name) }}
128
+ {% endif %}
129
+ {% endfor %}
130
+ {% else %}
131
+ {{ validation_not_run_yet_message() }}
132
+ {% endif %}
103
133
  </section>
104
134
 
105
135
  <script>
@@ -2,7 +2,7 @@
2
2
  {% macro optional_shallow_validation_report(validation_results) -%}
3
3
  {% set results = validation_results.get('shallow_validation', {}) %}
4
4
 
5
- {% if results.get('required') %}
5
+ {% if validation_results.get('trim_down') %}
6
6
  <section>
7
7
  <div class="report-section fail collapsible"> <span class="expand_icon">&#9654;</span>
8
8
  &#10060; <b>You requested to run the shallow validation, please run full validation before submitting the data</b>
@@ -7,6 +7,10 @@
7
7
  Please try again later for complete results.
8
8
  Error message: {{ results_for_fasta.get('connection_error') }}
9
9
  {% endif %}
10
+ {% if 'metadata_assembly_compatible' in results_for_fasta and not results_for_fasta.get('metadata_assembly_gca') %}
11
+ Warning: Non-GCA reference found in metadata. Please provide the INSDC accession for your reference assembly.
12
+ If you would like to submit using a non-GCA reference sequence, contact eva-helpdesk@ebi.ac.uk.
13
+ {% endif %}
10
14
 
11
15
  {% if results_for_fasta.get('all_insdc') %}
12
16
  {{ "\u2714" }} All sequences are INSDC accessioned.
@@ -28,7 +32,7 @@
28
32
  {% set icon = "\u2714" %}
29
33
  {% set text = analysis_text + ": Assembly accession in metadata is compatible" %}
30
34
  {% else %}
31
- {% set icon = "\u274C" %}
35
+ {% set icon = "\u2757" %}
32
36
  {% set text = analysis_text + ": Assembly accession in metadata is not compatible" %}
33
37
  {% endif %}
34
38
  {% else %}
@@ -1,6 +1,6 @@
1
1
 
2
2
  {% macro file_validation_report(validation_results, file_name) -%}
3
- {% for check_type, check_per_file in validation_results.items() %}
3
+ {% for check_type, check_per_file in validation_results.items() if check_type not in ["trim_down", "version"] %}
4
4
  {% set result = check_per_file.get(file_name, {}) %}
5
5
  {% if check_type == "assembly_check" %}
6
6
  {{ assembly_check(result) }}