eva-sub-cli 0.4.13__tar.gz → 0.4.14__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 (138) hide show
  1. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/PKG-INFO +1 -1
  2. eva_sub_cli-0.4.14/docs/installation.md +70 -0
  3. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/_version.py +3 -3
  4. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/eva_schema.json +1 -12
  5. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/cli.py +28 -5
  6. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/nextflow/validation.nf +31 -0
  7. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/validator.py +4 -6
  8. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/PKG-INFO +1 -1
  9. eva_sub_cli-0.4.14/tests/resources/EVA_Submission_test.xlsx +0 -0
  10. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_cli.py +10 -3
  11. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_validator.py +44 -1
  12. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_xlsx2json.py +6 -15
  13. eva_sub_cli-0.4.13/docs/installation.md +0 -49
  14. eva_sub_cli-0.4.13/tests/resources/EVA_Submission_test.xlsx +0 -0
  15. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/.github/workflows/publish.yml +0 -0
  16. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/.github/workflows/publish_docs.yml +0 -0
  17. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/.github/workflows/publish_packages.yml +0 -0
  18. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/.github/workflows/tests.yml +0 -0
  19. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/.github/workflows/trigger-eva-sub-cli-integration-tests.yml +0 -0
  20. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/.gitignore +0 -0
  21. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/LICENSE +0 -0
  22. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/README.md +0 -0
  23. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/conda/build.sh +0 -0
  24. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/conda/meta.yaml +0 -0
  25. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/docker/Dockerfile +0 -0
  26. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/docs/README.md +0 -0
  27. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/docs/_config.yml +0 -0
  28. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/docs/how_to_submit.md +0 -0
  29. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/docs/input_file_overview.md +0 -0
  30. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/docs/using_nextflow.md +0 -0
  31. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/docs/validation_overview.md +0 -0
  32. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/__init__.py +0 -0
  33. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/auth.py +0 -0
  34. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/date_utils.py +0 -0
  35. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
  36. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
  37. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/eva-biosamples.json +0 -0
  38. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/eva_logo.png +0 -0
  39. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/spreadsheet2json_conf.yaml +0 -0
  40. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/__init__.py +0 -0
  41. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/invalid_file_type_exception.py +0 -0
  42. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/metadata_template_version_exception.py +0 -0
  43. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/submission_not_found_exception.py +0 -0
  44. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/submission_status_exception.py +0 -0
  45. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/__init__.py +0 -0
  46. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/check_fasta_insdc.py +0 -0
  47. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/check_metadata_semantics.py +0 -0
  48. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/evidence_type_checker.py +0 -0
  49. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/samples_checker.py +0 -0
  50. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/trim_down.py +0 -0
  51. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/xlsx2json.py +0 -0
  52. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/file_utils.py +0 -0
  53. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/fasta_check.html +0 -0
  54. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/file_validation.html +0 -0
  55. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/metadata_validation.html +0 -0
  56. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/project_details.html +0 -0
  57. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/report.html +0 -0
  58. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/sample_name_check.html +0 -0
  59. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/shallow_validation.html +0 -0
  60. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/fasta_check.txt +0 -0
  61. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/file_validation.txt +0 -0
  62. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/metadata_validation.txt +0 -0
  63. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/project_details.txt +0 -0
  64. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/report.txt +0 -0
  65. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/sample_name_check.txt +0 -0
  66. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/shallow_validation.txt +0 -0
  67. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/metadata.py +0 -0
  68. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/orchestrator.py +0 -0
  69. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/report.py +0 -0
  70. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/semantic_metadata.py +0 -0
  71. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/submission_ws.py +0 -0
  72. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/submit.py +0 -0
  73. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/__init__.py +0 -0
  74. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/docker_validator.py +0 -0
  75. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/native_validator.py +0 -0
  76. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/validation_results_parsers.py +0 -0
  77. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/SOURCES.txt +0 -0
  78. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/dependency_links.txt +0 -0
  79. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/entry_points.txt +0 -0
  80. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/requires.txt +0 -0
  81. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/top_level.txt +0 -0
  82. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/pyproject.toml +0 -0
  83. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/pytest.ini +0 -0
  84. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/requirements.txt +0 -0
  85. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/setup.cfg +0 -0
  86. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/setup.py +0 -0
  87. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/build_and_test_docker_locally.py +0 -0
  88. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/ignore_test_nextflow_validation.yml +0 -0
  89. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_Docker_Test.xlsx +0 -0
  90. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test.json +0 -0
  91. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test_fails.xlsx +0 -0
  92. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test_version_missing.xlsx +0 -0
  93. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test_with_asm_report.json +0 -0
  94. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/assembly_check/invalid.vcf.assembly_check.log +0 -0
  95. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/assembly_check/invalid.vcf.text_assembly_report.txt +0 -0
  96. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/assembly_reports/input_passed.txt +0 -0
  97. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/fasta_files/Saccharomyces_cerevisiae_I.fa +0 -0
  98. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/fasta_files/input_passed.fa +0 -0
  99. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/fasta_files/multi_seq.fa +0 -0
  100. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/metadata_with_filename.json +0 -0
  101. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/example1.vcf.gz +0 -0
  102. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/example2.vcf +0 -0
  103. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/example3.vcf +0 -0
  104. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/metadata.json +0 -0
  105. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_json.html +0 -0
  106. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_json.txt +0 -0
  107. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_xlsx.html +0 -0
  108. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_xlsx.txt +0 -0
  109. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html +0 -0
  110. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt +0 -0
  111. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.assembly_check.log +0 -0
  112. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.text_assembly_report.1680102476700.txt +0 -0
  113. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.valid_assembly_report.1680102476700.txt +0 -0
  114. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/evidence_type_checker.yml +0 -0
  115. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/input_passed.fa_check.yml +0 -0
  116. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/metadata_conversion_errors.yml +0 -0
  117. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/metadata_semantic_check.yml +0 -0
  118. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt +0 -0
  119. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/sample_checker.yml +0 -0
  120. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.db +0 -0
  121. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.txt +0 -0
  122. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.vcf_format.log +0 -0
  123. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/vcf_files/example2.vcf.gz +0 -0
  124. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/resources/vcf_files/input_passed.vcf +0 -0
  125. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_auth.py +0 -0
  126. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_check_fasta_insdc.py +0 -0
  127. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_docker_validator.py +0 -0
  128. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_evidence_type_checker.py +0 -0
  129. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_file_utils.py +0 -0
  130. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_metadata.py +0 -0
  131. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_orchestrator.py +0 -0
  132. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_report.py +0 -0
  133. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_samples_checker.py +0 -0
  134. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_semantic_metadata.py +0 -0
  135. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_submit.py +0 -0
  136. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_trim_down.py +0 -0
  137. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_utils.py +0 -0
  138. {eva_sub_cli-0.4.13 → eva_sub_cli-0.4.14}/tests/test_validaton_results_parsers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eva_sub_cli
3
- Version: 0.4.13
3
+ Version: 0.4.14
4
4
  Summary: EBI EVA - validation and submission command line tool
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Environment :: Console
@@ -0,0 +1,70 @@
1
+ # Installation
2
+
3
+ There are two main ways to install eva-sub-cli, either through [conda](#1-conda) or [pip](#2-pip).
4
+ Conda is the most straightforward and recommended method, as it will install all dependencies for you.
5
+
6
+ Otherwise you can install using pip, in which case you will need to handle non-Python dependencies separately.
7
+ You can do this either using Docker or natively (i.e. installing by yourself).
8
+ Note that pip using Docker is currently the only installation method available for Windows users.
9
+
10
+ We encourage users to install the most recent version, as we are constantly improving the tool. You can check that you
11
+ have the latest version installed by running `eva-sub-cli.py --version` and comparing against the
12
+ [release page](https://github.com/EBIvariation/eva-sub-cli/releases).
13
+
14
+ All installation methods require Python 3.8 or above.
15
+
16
+ ## 1. Conda
17
+
18
+ View our [video tutorial on conda installation](https://embl-ebi.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=aa82710e-4401-4074-b6b0-b346016bb14e).
19
+
20
+ The most straightforward way to install eva-sub-cli and its dependencies is through conda.
21
+ For instance, the following commands install eva-sub-cli in a new environment called `eva`, activate the environment, and print
22
+ the help message:
23
+ ```bash
24
+ conda create -n eva -c conda-forge -c bioconda eva-sub-cli
25
+ conda activate eva
26
+ eva-sub-cli.py --help
27
+ ````
28
+
29
+ To upgrade to the newest version, run `conda update eva-sub-cli`.
30
+
31
+ ## 2. Pip
32
+
33
+ View our [video tutorial on pip installation](https://embl-ebi.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=2e6828ed-31c2-4621-8eb5-b34701484aae).
34
+
35
+ You can also install eva-sub-cli using pip.
36
+ The following commands will create a new virtual environment called `eva`, activate the environment, and install eva-sub-cli:
37
+ ```bash
38
+ python3 -m venv eva
39
+ source ./eva/bin/activate
40
+ pip install eva-sub-cli
41
+ ```
42
+
43
+ You can verify the installation by printing the help message:
44
+ ```bash
45
+ eva-sub-cli.py --help
46
+ ```
47
+
48
+ For external (non-Python) dependencies, you will need to install them either [via Docker](#docker) or [natively](#native).
49
+ These methods are described below.
50
+
51
+ To upgrade to the newest version of the tool, run `pip install --upgrade eva-sub-cli`.
52
+
53
+ ### Docker
54
+
55
+ Docker provides an easy way to run eva-sub-cli without installing dependencies separately.
56
+ For this method, all you need is for [Docker](https://docs.docker.com/engine/install/) to be installed and running in the background.
57
+
58
+ When you run eva-sub-cli, you will need to [specify execution using Docker](how_to_submit.md#running-using-docker).
59
+ The tool will then automatically run using a Docker container with all dependencies pre-installed.
60
+
61
+ ### Native
62
+
63
+ For those requiring more flexibility or working on systems where Docker is not available, you can also install the
64
+ external dependencies on your own. These are:
65
+ * [Nextflow](https://www.nextflow.io/docs/latest/getstarted.html) 21.10+
66
+ * [biovalidator](https://github.com/elixir-europe/biovalidator) 2.1.0+
67
+ * [vcf-validator](https://github.com/EBIvariation/vcf-validator) 0.9.7+
68
+
69
+ Install each of these and ensure they are included in your PATH.
70
+ This will allow eva-sub-cli to be executed natively, i.e. directly on your machine.
@@ -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.4.13'
32
- __version_tuple__ = version_tuple = (0, 4, 13)
31
+ __version__ = version = '0.4.14'
32
+ __version_tuple__ = version_tuple = (0, 4, 14)
33
33
 
34
- __commit_id__ = commit_id = 'gc6e52eaa9'
34
+ __commit_id__ = commit_id = 'g1808b05b1'
@@ -324,18 +324,7 @@
324
324
  "description": "BioSample accession of pre-existing sample. Only use for preregistered samples"
325
325
  },
326
326
  "bioSampleObject": {
327
- "type": "object",
328
- "anyOf": [
329
- {
330
- "$ref": "eva-biosamples.json"
331
- },
332
- {
333
- "$ref": "https://www.ebi.ac.uk/biosamples/schema-store/registry/schemas/ERC000011"
334
- },
335
- {
336
- "$ref": "https://www.ebi.ac.uk/biosamples/schemas/certification/plant-miappe.json"
337
- }
338
- ]
327
+ "$ref": "https://www.ebi.ac.uk/biosamples/schema-store/registry/schemas/ERC000011"
339
328
  }
340
329
  }
341
330
  }
@@ -22,24 +22,47 @@ from eva_sub_cli.file_utils import is_submission_dir_writable, DirLockError, Dir
22
22
 
23
23
 
24
24
  def validate_command_line_arguments(args, argparser):
25
+ fail = False
25
26
  if (args.vcf_files and not args.reference_fasta) or (not args.vcf_files and args.reference_fasta):
26
27
  print("When using --vcf_files and --reference_fasta, both need to be specified")
27
- argparser.print_usage()
28
- sys.exit(1)
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
+
41
+ if args.metadata_xlsx:
42
+ if not os.path.isfile(args.metadata_xlsx):
43
+ print(f"Spreadsheet file {args.metadata_xlsx} is not a file")
44
+ fail = True
45
+
46
+ if args.metadata_json:
47
+ if not os.path.isfile(args.metadata_json):
48
+ print(f"JSON file {args.metadata_json} is not a file")
49
+ fail = True
29
50
 
30
51
  if SUBMIT in args.tasks and (
31
52
  not (args.username or os.environ.get('ENAWEBINACCOUNT')) or
32
53
  not (args.password or os.environ.get('ENAWEBINPASSWORD'))):
33
54
  print("To submit your data, you need to provide a Webin username and password")
34
- argparser.print_usage()
35
- sys.exit(1)
55
+ fail = True
36
56
 
37
57
  if not is_submission_dir_writable(args.submission_dir):
38
58
  print(f"'{args.submission_dir}' does not have write permissions or is not a directory.")
39
- sys.exit(1)
59
+ fail = True
40
60
 
41
61
  if args.nextflow_config and not os.path.isfile(args.nextflow_config):
42
62
  print(f"'{args.nextflow_config}' is not a file or does not exist.")
63
+ fail = True
64
+
65
+ if fail:
43
66
  argparser.print_usage()
44
67
  sys.exit(1)
45
68
 
@@ -132,6 +132,9 @@ process trim_down_vcf {
132
132
  * Validate the VCF file format
133
133
  */
134
134
  process check_vcf_valid {
135
+
136
+ label 'long_time', 'med_mem'
137
+
135
138
  publishDir output_dir,
136
139
  overwrite: false,
137
140
  mode: "copy"
@@ -155,6 +158,9 @@ process check_vcf_valid {
155
158
  * Validate the VCF reference allele
156
159
  */
157
160
  process check_vcf_reference {
161
+
162
+ label 'long_time', 'med_mem'
163
+
158
164
  publishDir output_dir,
159
165
  overwrite: true,
160
166
  mode: "copy"
@@ -178,6 +184,9 @@ process check_vcf_reference {
178
184
  }
179
185
 
180
186
  process generate_file_size_and_md5_digests {
187
+
188
+ label 'med_time', 'med_mem'
189
+
181
190
  input:
182
191
  path(vcf_file)
183
192
 
@@ -192,6 +201,9 @@ process generate_file_size_and_md5_digests {
192
201
  }
193
202
 
194
203
  process collect_file_size_and_md5 {
204
+
205
+ label 'med_time', 'med_mem'
206
+
195
207
  publishDir output_dir,
196
208
  overwrite: true,
197
209
  mode: "copy"
@@ -210,6 +222,10 @@ process collect_file_size_and_md5 {
210
222
 
211
223
 
212
224
  process convert_xlsx_2_json {
225
+
226
+ label 'short_time', 'small_mem'
227
+
228
+
213
229
  publishDir output_dir,
214
230
  overwrite: true,
215
231
  mode: "copy"
@@ -231,6 +247,9 @@ process convert_xlsx_2_json {
231
247
  }
232
248
 
233
249
  process metadata_json_validation {
250
+
251
+ label 'short_time', 'small_mem'
252
+
234
253
  publishDir output_dir,
235
254
  overwrite: true,
236
255
  mode: "copy"
@@ -248,6 +267,9 @@ process metadata_json_validation {
248
267
  }
249
268
 
250
269
  process sample_name_concordance {
270
+
271
+ label 'default_time', 'default_mem'
272
+
251
273
  publishDir output_dir,
252
274
  overwrite: true,
253
275
  mode: "copy"
@@ -268,6 +290,9 @@ process sample_name_concordance {
268
290
 
269
291
 
270
292
  process evidence_type_check {
293
+
294
+ label 'default_time', 'default_mem'
295
+
271
296
  publishDir output_dir,
272
297
  overwrite: true,
273
298
  mode: "copy"
@@ -288,6 +313,9 @@ process evidence_type_check {
288
313
 
289
314
 
290
315
  process insdc_checker {
316
+
317
+ label 'long_time', 'default_mem'
318
+
291
319
  publishDir output_dir,
292
320
  overwrite: true,
293
321
  mode: "copy"
@@ -308,6 +336,9 @@ process insdc_checker {
308
336
 
309
337
 
310
338
  process metadata_semantic_check {
339
+
340
+ label 'default_time', 'default_mem'
341
+
311
342
  publishDir output_dir,
312
343
  overwrite: true,
313
344
  mode: "copy"
@@ -335,11 +335,8 @@ class Validator(AppLogger):
335
335
  with open(self._evidence_type_check_yaml) as open_yaml:
336
336
  self.results['evidence_type_check'] = yaml.safe_load(open_yaml)
337
337
  self.results['evidence_type_check']['report_path'] = self._evidence_type_check_yaml
338
-
339
338
  self._update_metadata_with_evidence_type()
340
339
 
341
-
342
-
343
340
  def _collect_metadata_results(self):
344
341
  self.results['metadata_check'] = {}
345
342
  self._load_spreadsheet_conversion_errors()
@@ -478,7 +475,6 @@ class Validator(AppLogger):
478
475
  else:
479
476
  self.error(f'Cannot locate the metadata in JSON format in {os.path.join(self.output_dir, "metadata.json")}')
480
477
 
481
-
482
478
  def _update_metadata_with_evidence_type(self):
483
479
  if self.metadata_json_post_validation:
484
480
  metadata = EvaMetadataJson(self.metadata_json_post_validation)
@@ -487,8 +483,10 @@ class Validator(AppLogger):
487
483
  if metadata.analyses:
488
484
  for analysis in metadata.analyses:
489
485
  analysis_alias = analysis['analysisAlias']
490
- analysis['evidenceType'] = self.results['evidence_type_check'][analysis_alias][
491
- 'evidence_type'] if analysis_alias in self.results['evidence_type_check'] else None
486
+ if (analysis_alias in self.results['evidence_type_check']
487
+ and self.results['evidence_type_check'][analysis_alias]['evidence_type'] is not None):
488
+ analysis['evidenceType'] = self.results['evidence_type_check'][analysis_alias][
489
+ 'evidence_type']
492
490
  analysis_data.append(analysis)
493
491
  else:
494
492
  self.error('No analyses found in metadata')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eva_sub_cli
3
- Version: 0.4.13
3
+ Version: 0.4.14
4
4
  Summary: EBI EVA - validation and submission command line tool
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Environment :: Console
@@ -9,6 +9,7 @@ from unittest.mock import patch, Mock
9
9
 
10
10
  from eva_sub_cli import orchestrator
11
11
  from eva_sub_cli.executables import cli
12
+ from tests.test_utils import touch
12
13
 
13
14
 
14
15
  class TestCli(TestCase):
@@ -41,11 +42,17 @@ class TestCli(TestCase):
41
42
  all_lines[0].endswith('[eva_sub_cli.orchestrator][DEBUG] test\n')
42
43
 
43
44
  def test_validate_args(self):
45
+ vcf_file = os.path.join(self.submission_dir,'test.vcf')
46
+ fasta_file = os.path.join(self.submission_dir, 'test.fasta')
47
+ json_file = os.path.join(self.submission_dir, 'test.json')
48
+ touch(vcf_file)
49
+ touch(fasta_file)
50
+ touch(json_file)
44
51
  cmd_args = [
45
52
  '--submission_dir', self.submission_dir,
46
- '--vcf_files', 'test.vcf',
47
- '--reference_fasta', 'test.fasta',
48
- '--metadata_json', 'test.json',
53
+ '--vcf_files', vcf_file,
54
+ '--reference_fasta', fasta_file,
55
+ '--metadata_json', json_file,
49
56
  '--tasks', 'validate',
50
57
  '--executor', 'native',
51
58
  '--debug'
@@ -1,4 +1,5 @@
1
1
  import os.path
2
+ import shutil
2
3
  from copy import deepcopy
3
4
  from unittest import TestCase
4
5
 
@@ -93,6 +94,7 @@ class TestValidator(TestCase):
93
94
  output_dir = os.path.join(resource_dir, 'validation_reports')
94
95
  mapping_file = os.path.join(output_dir, 'vcf_files_mapping.csv')
95
96
  metadata_xlsx_file = os.path.join(resource_dir, 'EVA_Submission_test.xlsx')
97
+ metadata_json_file = os.path.join(resource_dir, 'metadata_with_filename.json')
96
98
 
97
99
  def setUp(self) -> None:
98
100
  # create vcf mapping file
@@ -102,7 +104,10 @@ class TestValidator(TestCase):
102
104
  [os.path.join(self.fasta_files, 'input_passed.fa')],
103
105
  [os.path.join(self.assembly_reports, 'input_passed.txt')])
104
106
  self.validator = Validator(self.mapping_file, self.output_dir, metadata_xlsx=self.metadata_xlsx_file)
105
- self.validator_json = Validator(self.mapping_file, self.output_dir)
107
+ self.validator_json = Validator(self.mapping_file, self.output_dir, metadata_json=self.metadata_json_file)
108
+ # Backup metadata json file so can restore after tests
109
+ self.backup_metadata_json = f'{self.metadata_json_file}.backup'
110
+ shutil.copy(self.metadata_json_file, self.backup_metadata_json)
106
111
 
107
112
  def tearDown(self) -> None:
108
113
  files_from_tests = [
@@ -115,6 +120,8 @@ class TestValidator(TestCase):
115
120
  for f in files_from_tests:
116
121
  if os.path.exists(f):
117
122
  os.remove(f)
123
+ # Restore metadata json file
124
+ shutil.move(self.backup_metadata_json, self.metadata_json_file)
118
125
 
119
126
  def format_data_structure(self, source):
120
127
  if isinstance(source, dict):
@@ -329,3 +336,39 @@ class TestValidator(TestCase):
329
336
  os.remove(updated_metadata)
330
337
  # Reset metadata_json in case other tests need it
331
338
  self.validator_json.metadata_json = prev_metadata_json_value
339
+
340
+ def test__update_metadata_with_evidence_type_success(self):
341
+ self.validator_json.results['evidence_type_check'] = {
342
+ 'AA': {
343
+ 'errors': None,
344
+ 'evidence_type': 'allele_frequency'
345
+ },
346
+ 'report_path': '{resource_dir}/validation_reports/validation_output/other_validations/evidence_type_checker.yml'
347
+ }
348
+ self.validator_json._update_metadata_with_evidence_type()
349
+
350
+ # Analysis updated with evidence type
351
+ updated_metadata = EvaMetadataJson(self.validator_json.metadata_json_post_validation)
352
+ assert updated_metadata.analyses[0]['evidenceType'] == 'allele_frequency'
353
+
354
+ def test__update_metadata_with_evidence_type_failure(self):
355
+ self.validator_json.results['evidence_type_check'] = {
356
+ 'AA': {
357
+ 'errors': ['VCF file evidence type could not be determined'],
358
+ 'evidence_type': None
359
+ },
360
+ 'report_path': '{resource_dir}/validation_reports/validation_output/other_validations/evidence_type_checker.yml'
361
+ }
362
+ self.validator_json._update_metadata_with_evidence_type()
363
+
364
+ # Nothing added to analysis
365
+ updated_metadata = EvaMetadataJson(self.validator_json.metadata_json_post_validation)
366
+ assert 'evidenceType' not in updated_metadata.analyses[0]
367
+
368
+ def test__update_metadata_with_evidence_type_did_not_run(self):
369
+ self.validator_json.results['evidence_type_check'] = {}
370
+ self.validator_json._update_metadata_with_evidence_type()
371
+
372
+ # Nothing added to analysis
373
+ updated_metadata = EvaMetadataJson(self.validator_json.metadata_json_post_validation)
374
+ assert 'evidenceType' not in updated_metadata.analyses[0]
@@ -14,7 +14,6 @@ class TestXlsReader(TestCase):
14
14
  resource_dir = os.path.join(os.path.dirname(__file__), 'resources')
15
15
  conf_filename = os.path.join(ETC_DIR, 'spreadsheet2json_conf.yaml')
16
16
  eva_schema = os.path.abspath(os.path.join(__file__, "../../eva_sub_cli/etc/eva_schema.json", ))
17
- biosample_schema = os.path.abspath(os.path.join(__file__, "../../eva_sub_cli/etc/eva-biosamples.json", ))
18
17
 
19
18
  def tearDown(self):
20
19
  files_from_tests = [
@@ -62,16 +61,9 @@ class TestXlsReader(TestCase):
62
61
  # assert json schema
63
62
  with open(self.eva_schema) as eva_schema_file:
64
63
  eva_json_schema = json.load(eva_schema_file)
65
- with open(self.biosample_schema) as biosample_schema_file:
66
- biosample_json_schema = json.load(biosample_schema_file)
67
-
68
- # assert created json file sample field conforms to eva-biosamples schema
69
- jsonschema.validate(json_data['sample'][3]['bioSampleObject'], biosample_json_schema)
70
64
 
71
65
  # assert created json file conform to eva_schema
72
- resolver = jsonschema.RefResolver.from_schema(eva_json_schema)
73
- resolver.store['eva-biosamples.json'] = biosample_json_schema
74
- jsonschema.validate(json_data, eva_json_schema, resolver=resolver)
66
+ jsonschema.validate(json_data, eva_json_schema)
75
67
 
76
68
  def test_create_xls_template(self):
77
69
  metadata_file = os.path.join(self.resource_dir, 'metadata_not_existing.xlsx')
@@ -106,10 +98,6 @@ class TestXlsReader(TestCase):
106
98
  def test_json_validation_fails_for_large_project_title_and_project_description(self) -> None:
107
99
  with open(self.eva_schema) as eva_schema_file:
108
100
  eva_json_schema = json.load(eva_schema_file)
109
- with open(self.biosample_schema) as biosample_schema_file:
110
- biosample_json_schema = json.load(biosample_schema_file)
111
- resolver = jsonschema.RefResolver.from_schema(eva_json_schema)
112
- resolver.store['eva-biosamples.json'] = biosample_json_schema
113
101
 
114
102
  # test fails for title
115
103
  json_data = self.get_expected_json()
@@ -117,7 +105,7 @@ class TestXlsReader(TestCase):
117
105
 
118
106
  assert len(json_data['project']['title']) == 600
119
107
  with self.assertRaises(jsonschema.ValidationError):
120
- jsonschema.validate(json_data, eva_json_schema, resolver=resolver)
108
+ jsonschema.validate(json_data, eva_json_schema)
121
109
 
122
110
  # test fails for description
123
111
  json_data = self.get_expected_json()
@@ -125,7 +113,7 @@ class TestXlsReader(TestCase):
125
113
 
126
114
  assert len(json_data['project']['description']) == 6000
127
115
  with self.assertRaises(jsonschema.ValidationError):
128
- jsonschema.validate(json_data, eva_json_schema, resolver=resolver)
116
+ jsonschema.validate(json_data, eva_json_schema)
129
117
 
130
118
  def build_large_string_of_length(self, length):
131
119
  return "A" * length
@@ -235,6 +223,9 @@ class TestXlsReader(TestCase):
235
223
  ],
236
224
  'collection date': [
237
225
  {'text': '2021-03-12'}
226
+ ],
227
+ 'geographic location (country and/or sea)': [
228
+ {'text': 'Afghanistan'}
238
229
  ]
239
230
  }
240
231
  }
@@ -1,49 +0,0 @@
1
- # Installation
2
-
3
- There are currently three ways to install and run eva-sub-cli:
4
- - Using conda
5
- - From source using Docker
6
- - From source natively (i.e. installing dependencies yourself)
7
-
8
- We encourage users to install the most recent version, as we are constantly improving the tool. You can check that you
9
- have the latest version installed by running `eva-sub-cli.py --version` and comparing against the
10
- [release page](https://github.com/EBIvariation/eva-sub-cli/releases).
11
-
12
- ## 1. Conda
13
-
14
- The most straightforward way to install eva-sub-cli and its dependencies is through conda.
15
- For instance, the following commands install eva-sub-cli in a new environment called `eva`, activate the environment, and print
16
- the help message:
17
- ```bash
18
- conda create -n eva -c conda-forge -c bioconda eva-sub-cli
19
- conda activate eva
20
- eva-sub-cli.py --help
21
- ````
22
-
23
- To upgrade to the newest version, run `conda update eva-sub-cli`.
24
-
25
- ## 2. From source using Docker
26
-
27
- Docker provides an easy way to run eva-sub-cli without installing dependencies separately.
28
- This method requires just Python 3.8+ and [Docker](https://docs.docker.com/engine/install/) to be installed.
29
- Then you can install the most recent version from [PyPI](https://pypi.org/project/eva-sub-cli/) in a virtual environment:
30
- ```bash
31
- pip install eva-sub-cli
32
- ```
33
-
34
- To verify that the cli tool is installed correctly, run the following command, and you should see the help message displayed:
35
- ```bash
36
- eva-sub-cli.py --help
37
- ```
38
-
39
- To upgrade to the newest version, run `pip install --upgrade eva-sub-cli`.
40
-
41
- ## 3. From source natively
42
-
43
- This installation method requires the following:
44
- * Python 3.8+
45
- * [Nextflow](https://www.nextflow.io/docs/latest/getstarted.html) 21.10+
46
- * [biovalidator](https://github.com/elixir-europe/biovalidator) 2.1.0+
47
- * [vcf-validator](https://github.com/EBIvariation/vcf-validator) 0.9.7+
48
-
49
- Install each of these and ensure they are included in your PATH. Then install the latest eva-sub-cli release as previously described.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes