eva-sub-cli 0.4.12__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.12 → 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.12 → eva_sub_cli-0.4.14}/eva_sub_cli/_version.py +16 -3
  4. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/eva_schema.json +1 -12
  5. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/spreadsheet2json_conf.yaml +23 -21
  6. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/cli.py +28 -5
  7. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/xlsx2json.py +12 -1
  8. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/nextflow/validation.nf +31 -0
  9. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/orchestrator.py +5 -2
  10. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/validator.py +4 -6
  11. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/PKG-INFO +1 -1
  12. eva_sub_cli-0.4.14/tests/resources/EVA_Submission_test.xlsx +0 -0
  13. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_check_fasta_insdc.py +1 -1
  14. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_cli.py +10 -3
  15. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_orchestrator.py +1 -1
  16. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_validator.py +44 -1
  17. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_xlsx2json.py +12 -20
  18. eva_sub_cli-0.4.12/docs/installation.md +0 -49
  19. eva_sub_cli-0.4.12/tests/resources/EVA_Submission_test.xlsx +0 -0
  20. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/.github/workflows/publish.yml +0 -0
  21. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/.github/workflows/publish_docs.yml +0 -0
  22. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/.github/workflows/publish_packages.yml +0 -0
  23. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/.github/workflows/tests.yml +0 -0
  24. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/.github/workflows/trigger-eva-sub-cli-integration-tests.yml +0 -0
  25. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/.gitignore +0 -0
  26. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/LICENSE +0 -0
  27. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/README.md +0 -0
  28. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/conda/build.sh +0 -0
  29. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/conda/meta.yaml +0 -0
  30. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/docker/Dockerfile +0 -0
  31. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/docs/README.md +0 -0
  32. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/docs/_config.yml +0 -0
  33. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/docs/how_to_submit.md +0 -0
  34. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/docs/input_file_overview.md +0 -0
  35. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/docs/using_nextflow.md +0 -0
  36. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/docs/validation_overview.md +0 -0
  37. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/__init__.py +0 -0
  38. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/auth.py +0 -0
  39. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/date_utils.py +0 -0
  40. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
  41. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
  42. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/eva-biosamples.json +0 -0
  43. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/etc/eva_logo.png +0 -0
  44. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/__init__.py +0 -0
  45. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/invalid_file_type_exception.py +0 -0
  46. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/metadata_template_version_exception.py +0 -0
  47. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/submission_not_found_exception.py +0 -0
  48. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/exceptions/submission_status_exception.py +0 -0
  49. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/__init__.py +0 -0
  50. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/check_fasta_insdc.py +0 -0
  51. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/check_metadata_semantics.py +0 -0
  52. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/evidence_type_checker.py +0 -0
  53. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/samples_checker.py +0 -0
  54. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/executables/trim_down.py +0 -0
  55. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/file_utils.py +0 -0
  56. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/fasta_check.html +0 -0
  57. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/file_validation.html +0 -0
  58. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/metadata_validation.html +0 -0
  59. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/project_details.html +0 -0
  60. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/report.html +0 -0
  61. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/sample_name_check.html +0 -0
  62. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/html/shallow_validation.html +0 -0
  63. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/fasta_check.txt +0 -0
  64. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/file_validation.txt +0 -0
  65. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/metadata_validation.txt +0 -0
  66. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/project_details.txt +0 -0
  67. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/report.txt +0 -0
  68. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/sample_name_check.txt +0 -0
  69. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/jinja_templates/text/shallow_validation.txt +0 -0
  70. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/metadata.py +0 -0
  71. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/report.py +0 -0
  72. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/semantic_metadata.py +0 -0
  73. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/submission_ws.py +0 -0
  74. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/submit.py +0 -0
  75. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/__init__.py +0 -0
  76. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/docker_validator.py +0 -0
  77. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/native_validator.py +0 -0
  78. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli/validators/validation_results_parsers.py +0 -0
  79. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/SOURCES.txt +0 -0
  80. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/dependency_links.txt +0 -0
  81. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/entry_points.txt +0 -0
  82. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/requires.txt +0 -0
  83. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/eva_sub_cli.egg-info/top_level.txt +0 -0
  84. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/pyproject.toml +0 -0
  85. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/pytest.ini +0 -0
  86. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/requirements.txt +0 -0
  87. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/setup.cfg +0 -0
  88. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/setup.py +0 -0
  89. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/build_and_test_docker_locally.py +0 -0
  90. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/ignore_test_nextflow_validation.yml +0 -0
  91. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_Docker_Test.xlsx +0 -0
  92. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test.json +0 -0
  93. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test_fails.xlsx +0 -0
  94. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test_version_missing.xlsx +0 -0
  95. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/EVA_Submission_test_with_asm_report.json +0 -0
  96. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/assembly_check/invalid.vcf.assembly_check.log +0 -0
  97. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/assembly_check/invalid.vcf.text_assembly_report.txt +0 -0
  98. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/assembly_reports/input_passed.txt +0 -0
  99. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/fasta_files/Saccharomyces_cerevisiae_I.fa +0 -0
  100. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/fasta_files/input_passed.fa +0 -0
  101. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/fasta_files/multi_seq.fa +0 -0
  102. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/metadata_with_filename.json +0 -0
  103. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/example1.vcf.gz +0 -0
  104. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/example2.vcf +0 -0
  105. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/example3.vcf +0 -0
  106. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/sample_checker/metadata.json +0 -0
  107. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_json.html +0 -0
  108. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_json.txt +0 -0
  109. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_xlsx.html +0 -0
  110. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_report_metadata_xlsx.txt +0 -0
  111. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html +0 -0
  112. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt +0 -0
  113. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.assembly_check.log +0 -0
  114. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.text_assembly_report.1680102476700.txt +0 -0
  115. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.valid_assembly_report.1680102476700.txt +0 -0
  116. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/evidence_type_checker.yml +0 -0
  117. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/input_passed.fa_check.yml +0 -0
  118. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/metadata_conversion_errors.yml +0 -0
  119. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/metadata_semantic_check.yml +0 -0
  120. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt +0 -0
  121. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/other_validations/sample_checker.yml +0 -0
  122. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.db +0 -0
  123. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.txt +0 -0
  124. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.vcf_format.log +0 -0
  125. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/vcf_files/example2.vcf.gz +0 -0
  126. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/resources/vcf_files/input_passed.vcf +0 -0
  127. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_auth.py +0 -0
  128. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_docker_validator.py +0 -0
  129. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_evidence_type_checker.py +0 -0
  130. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_file_utils.py +0 -0
  131. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_metadata.py +0 -0
  132. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_report.py +0 -0
  133. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_samples_checker.py +0 -0
  134. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_semantic_metadata.py +0 -0
  135. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_submit.py +0 -0
  136. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_trim_down.py +0 -0
  137. {eva_sub_cli-0.4.12 → eva_sub_cli-0.4.14}/tests/test_utils.py +0 -0
  138. {eva_sub_cli-0.4.12 → 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.12
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.
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '0.4.12'
21
- __version_tuple__ = version_tuple = (0, 4, 12)
31
+ __version__ = version = '0.4.14'
32
+ __version_tuple__ = version_tuple = (0, 4, 14)
33
+
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
  }
@@ -81,6 +81,8 @@ Sample:
81
81
  required:
82
82
  Analysis Alias: analysisAlias
83
83
  Sample Name in VCF: sampleInVCF
84
+ # Sample property names taken from ERC000011 where present
85
+ # See https://www.ebi.ac.uk/biosamples/schema-store/registry/schemas/ERC000011
84
86
  optional:
85
87
  Sample Accession: bioSampleAccession
86
88
  BioSample Name: bioSampleName
@@ -91,37 +93,37 @@ Sample:
91
93
  Subject: subject
92
94
  Derived From: derivedFrom
93
95
  Taxonomy ID: taxId
94
- Scientific Name: scientificName
96
+ Scientific Name: scientific name
95
97
  Common Name: commonName
96
- mating_type: matingType
98
+ mating_type: mating_type
97
99
  sex: sex
98
100
  population: population
99
- cell_type: cellType
100
- dev_stage: devStage
101
+ cell_type: cell_type
102
+ dev_stage: dev_stage
101
103
  germline: germline
102
- tissue_lib: tissueLib
103
- tissue_type: tissueType
104
- bio_material: BioMaterial
105
- culture_collection: cultureCollection
106
- specimen_voucher: specimenVoucher
107
- collected_by: collectedBy
108
- collection_date: collectionDate
109
- geographic location (country and/or sea): geographicLocationCountrySea
110
- geographic location (region and locality): geographicLocationRegion
104
+ tissue_lib: tissue_lib
105
+ tissue_type: tissue_type
106
+ bio_material: bio_material
107
+ culture_collection: culture_collection
108
+ specimen_voucher: specimen_voucher
109
+ collected_by: collected_by
110
+ collection_date: collection date
111
+ geographic location (country and/or sea): geographic location (country and/or sea)
112
+ geographic location (region and locality): geographic location (region and locality)
111
113
  host: host
112
- identified_by: identifiedBy
113
- isolation_source: isolationSource
114
- lat_lon: latLon
115
- lab_host: LabHost
116
- environmental_sample: environmentalSample
114
+ identified_by: identified_by
115
+ isolation_source: isolation_source
116
+ lat_lon: lat_lon
117
+ lab_host: lab_host
118
+ environmental_sample: environmental_sample
117
119
  cultivar: cultivar
118
120
  ecotype: ecotype
119
121
  isolate: isolate
120
122
  strain: strain
121
- sub_species: subSpecies
123
+ sub_species: sub_species
122
124
  variety: variety
123
- sub_strain: subStrain
124
- cell_line: cellType
125
+ sub_strain: sub_strain
126
+ cell_line: cell_line
125
127
  serotype: serotype
126
128
  serovar: serovar
127
129
  cast:
@@ -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
 
@@ -9,6 +9,8 @@ from ebi_eva_common_pyutils.logger import logging_config
9
9
  from openpyxl.reader.excel import load_workbook
10
10
  from openpyxl.workbook import Workbook
11
11
 
12
+ from eva_sub_cli.orchestrator import get_sub_cli_version, get_sub_cli_github_tags
13
+
12
14
  WORKSHEETS_KEY_NAME = 'worksheets'
13
15
  REQUIRED_HEADERS_KEY_NAME = 'required'
14
16
  OPTIONAL_HEADERS_KEY_NAME = 'optional'
@@ -249,7 +251,8 @@ class XlsxParser:
249
251
  # If the file could not be loaded at all, return without generating JSON.
250
252
  if not self.file_loaded:
251
253
  return
252
- json_data = {}
254
+ # Include which version of the EVA schema we are using
255
+ json_data = {'$schema': self.get_json_schema_link()}
253
256
  for title in self.xlsx_conf[WORKSHEETS_KEY_NAME]:
254
257
  self.active_worksheet = title
255
258
  if title == PROJECT:
@@ -270,6 +273,14 @@ class XlsxParser:
270
273
  with open(output_json_file, 'w') as open_file:
271
274
  json.dump(json_data, open_file, cls=DateTimeEncoder)
272
275
 
276
+ def get_json_schema_link(self):
277
+ sub_cli_version = get_sub_cli_version()
278
+ sub_cli_tags = get_sub_cli_github_tags()
279
+ if sub_cli_version in sub_cli_tags:
280
+ return f'https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/refs/tags/v{sub_cli_version}/eva_sub_cli/etc/eva_schema.json'
281
+ else:
282
+ return 'https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/main/eva_sub_cli/etc/eva_schema.json'
283
+
273
284
  def translate_header(self, title, header):
274
285
  if header in self.xlsx_conf[title].get(REQUIRED_HEADERS_KEY_NAME, {}):
275
286
  return self.xlsx_conf[title][REQUIRED_HEADERS_KEY_NAME][header]
@@ -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"
@@ -130,7 +130,10 @@ def get_project_and_vcf_fasta_mapping_from_metadata_json(metadata_json, mapping_
130
130
 
131
131
  def get_sub_cli_version():
132
132
  if version.parse(eva_sub_cli.__version__).is_devrelease:
133
- major, minor, patch = map(int, version.parse(eva_sub_cli.__version__).base_version.split('.'))
133
+ version_values = [int(v) for v in version.parse(eva_sub_cli.__version__).base_version.split('.')]
134
+ major = version_values[0]
135
+ minor = version_values[1] if len(version_values) > 1 else 0
136
+ patch = version_values[2] if len(version_values) > 2 else 0
134
137
  if patch > 0:
135
138
  patch -= 1
136
139
  elif minor > 0:
@@ -160,7 +163,7 @@ def get_metadata_xlsx_template_link():
160
163
  sub_cli_version = get_sub_cli_version()
161
164
  sub_cli_tags = get_sub_cli_github_tags()
162
165
  if sub_cli_version in sub_cli_tags:
163
- return f'https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/v{sub_cli_version}/eva-sub-cli/eva_sub_cli/etc/EVA_Submission_template.xlsx'
166
+ return f'https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/refs/tags/v{sub_cli_version}/eva_sub_cli/etc/EVA_Submission_template.xlsx'
164
167
  else:
165
168
  return 'https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/main/eva_sub_cli/etc/EVA_Submission_template.xlsx'
166
169
 
@@ -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.12
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
@@ -132,5 +132,5 @@ class TestFastaChecker(TestCase):
132
132
  @pytest.mark.integration
133
133
  def test_get_containing_assemblies(self):
134
134
  results = get_containing_assemblies('6ac8f815bf8e845bb3031b73f812c012')
135
- assert len(results) == 14
135
+ assert len(results) == 15
136
136
  assert 'GCA_000001405.29' in results
@@ -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'
@@ -306,7 +306,7 @@ class TestOrchestrator(unittest.TestCase):
306
306
  patch('eva_sub_cli.orchestrator.get_sub_cli_github_tags') as sub_cli_tags:
307
307
  sub_cli_version.return_value = '1.1.6'
308
308
  sub_cli_tags.return_value = ['1.1.6']
309
- assert get_metadata_xlsx_template_link() == 'https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/v1.1.6/eva-sub-cli/eva_sub_cli/etc/EVA_Submission_template.xlsx'
309
+ assert get_metadata_xlsx_template_link() == 'https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/refs/tags/v1.1.6/eva_sub_cli/etc/EVA_Submission_template.xlsx'
310
310
 
311
311
  sub_cli_version.return_value = '1.1.5'
312
312
  sub_cli_tags.return_value = ['1.1.6']
@@ -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 = [
@@ -55,22 +54,16 @@ class TestXlsReader(TestCase):
55
54
  with open(output_json) as open_file:
56
55
  json_data = json.load(open_file)
57
56
  # assert json file is created with expected data
58
- assert sorted(json_data.keys()) == ['analysis', 'files', 'project', 'sample', 'submitterDetails']
57
+ assert sorted(json_data.keys()) == ['$schema', 'analysis', 'files', 'project', 'sample', 'submitterDetails']
58
+ json_data.pop('$schema', None)
59
59
  self.assertEqual(self.get_expected_json(), json_data)
60
60
 
61
61
  # assert json schema
62
62
  with open(self.eva_schema) as eva_schema_file:
63
63
  eva_json_schema = json.load(eva_schema_file)
64
- with open(self.biosample_schema) as biosample_schema_file:
65
- biosample_json_schema = json.load(biosample_schema_file)
66
-
67
- # assert created json file sample field conforms to eva-biosamples schema
68
- jsonschema.validate(json_data['sample'][3]['bioSampleObject'], biosample_json_schema)
69
64
 
70
65
  # assert created json file conform to eva_schema
71
- resolver = jsonschema.RefResolver.from_schema(eva_json_schema)
72
- resolver.store['eva-biosamples.json'] = biosample_json_schema
73
- jsonschema.validate(json_data, eva_json_schema, resolver=resolver)
66
+ jsonschema.validate(json_data, eva_json_schema)
74
67
 
75
68
  def test_create_xls_template(self):
76
69
  metadata_file = os.path.join(self.resource_dir, 'metadata_not_existing.xlsx')
@@ -94,7 +87,7 @@ class TestXlsReader(TestCase):
94
87
  assert os.path.exists(output_json)
95
88
  with open(output_json) as open_file:
96
89
  json_data = json.load(open_file)
97
- assert sorted(json_data.keys()) == ['analysis', 'files', 'project', 'sample', 'submitterDetails']
90
+ assert sorted(json_data.keys()) == ['$schema', 'analysis', 'files', 'project', 'sample', 'submitterDetails']
98
91
  # required field taxId is missing
99
92
  assert 'taxId' not in json_data['project']
100
93
  # novel sample is missing scientific name in characteristics and sample name
@@ -105,10 +98,6 @@ class TestXlsReader(TestCase):
105
98
  def test_json_validation_fails_for_large_project_title_and_project_description(self) -> None:
106
99
  with open(self.eva_schema) as eva_schema_file:
107
100
  eva_json_schema = json.load(eva_schema_file)
108
- with open(self.biosample_schema) as biosample_schema_file:
109
- biosample_json_schema = json.load(biosample_schema_file)
110
- resolver = jsonschema.RefResolver.from_schema(eva_json_schema)
111
- resolver.store['eva-biosamples.json'] = biosample_json_schema
112
101
 
113
102
  # test fails for title
114
103
  json_data = self.get_expected_json()
@@ -116,7 +105,7 @@ class TestXlsReader(TestCase):
116
105
 
117
106
  assert len(json_data['project']['title']) == 600
118
107
  with self.assertRaises(jsonschema.ValidationError):
119
- jsonschema.validate(json_data, eva_json_schema, resolver=resolver)
108
+ jsonschema.validate(json_data, eva_json_schema)
120
109
 
121
110
  # test fails for description
122
111
  json_data = self.get_expected_json()
@@ -124,7 +113,7 @@ class TestXlsReader(TestCase):
124
113
 
125
114
  assert len(json_data['project']['description']) == 6000
126
115
  with self.assertRaises(jsonschema.ValidationError):
127
- jsonschema.validate(json_data, eva_json_schema, resolver=resolver)
116
+ jsonschema.validate(json_data, eva_json_schema)
128
117
 
129
118
  def build_large_string_of_length(self, length):
130
119
  return "A" * length
@@ -220,20 +209,23 @@ class TestXlsReader(TestCase):
220
209
  "taxId": [
221
210
  {"text": "9447"}
222
211
  ],
223
- "scientificName": [
212
+ "scientific name": [
224
213
  {"text": "Lemur catta"}
225
214
  ],
226
215
  "sex": [
227
216
  {"text": "Female"}
228
217
  ],
229
- "tissueType": [
218
+ "tissue_type": [
230
219
  {"text": "skin"}
231
220
  ],
232
221
  "species": [
233
222
  {"text": "Lemur catta"}
234
223
  ],
235
- 'collectionDate': [
224
+ 'collection date': [
236
225
  {'text': '2021-03-12'}
226
+ ],
227
+ 'geographic location (country and/or sea)': [
228
+ {'text': 'Afghanistan'}
237
229
  ]
238
230
  }
239
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