eva-sub-cli 0.4.13__tar.gz → 0.5.0__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 (148) hide show
  1. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/PKG-INFO +1 -1
  2. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/docker/Dockerfile +1 -1
  3. eva_sub_cli-0.5.0/docs/installation.md +70 -0
  4. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/_version.py +3 -3
  5. eva_sub_cli-0.5.0/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
  6. eva_sub_cli-0.5.0/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
  7. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/etc/eva_schema.json +72 -68
  8. eva_sub_cli-0.5.0/eva_sub_cli/etc/spreadsheet2json_conf.yaml +139 -0
  9. eva_sub_cli-0.4.13/eva_sub_cli/etc/spreadsheet2json_conf.yaml → eva_sub_cli-0.5.0/eva_sub_cli/etc/spreadsheet2json_conf_V2.yaml +5 -3
  10. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/cli.py +31 -5
  11. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/xlsx2json.py +11 -4
  12. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/html/file_validation.html +1 -1
  13. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/text/file_validation.txt +3 -1
  14. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/nextflow/validation.nf +41 -8
  15. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/orchestrator.py +33 -13
  16. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/semantic_metadata.py +11 -7
  17. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/submit.py +3 -2
  18. eva_sub_cli-0.5.0/eva_sub_cli/utils.py +20 -0
  19. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/validators/docker_validator.py +8 -7
  20. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/validators/native_validator.py +5 -4
  21. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/validators/validator.py +22 -12
  22. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli.egg-info/PKG-INFO +1 -1
  23. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli.egg-info/SOURCES.txt +5 -0
  24. eva_sub_cli-0.5.0/tests/resources/EVA_Submission_Docker_Test.xlsx +0 -0
  25. eva_sub_cli-0.5.0/tests/resources/EVA_Submission_test.xlsx +0 -0
  26. eva_sub_cli-0.5.0/tests/resources/EVA_Submission_test_V2.xlsx +0 -0
  27. eva_sub_cli-0.5.0/tests/resources/EVA_Submission_test_fails.xlsx +0 -0
  28. eva_sub_cli-0.5.0/tests/resources/EVA_Submission_test_version_missing.xlsx +0 -0
  29. eva_sub_cli-0.5.0/tests/resources/EVA_Submission_test_with_project_accession.json +151 -0
  30. eva_sub_cli-0.5.0/tests/resources/EVA_Submission_test_with_project_accession.xlsx +0 -0
  31. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/metadata_with_filename.json +7 -1
  32. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_cli.py +10 -3
  33. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_docker_validator.py +5 -1
  34. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_orchestrator.py +83 -13
  35. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_semantic_metadata.py +27 -0
  36. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_validator.py +68 -10
  37. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_xlsx2json.py +68 -16
  38. eva_sub_cli-0.4.13/docs/installation.md +0 -49
  39. eva_sub_cli-0.4.13/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
  40. eva_sub_cli-0.4.13/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
  41. eva_sub_cli-0.4.13/tests/resources/EVA_Submission_Docker_Test.xlsx +0 -0
  42. eva_sub_cli-0.4.13/tests/resources/EVA_Submission_test.xlsx +0 -0
  43. eva_sub_cli-0.4.13/tests/resources/EVA_Submission_test_fails.xlsx +0 -0
  44. eva_sub_cli-0.4.13/tests/resources/EVA_Submission_test_version_missing.xlsx +0 -0
  45. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/.github/workflows/publish.yml +0 -0
  46. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/.github/workflows/publish_docs.yml +0 -0
  47. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/.github/workflows/publish_packages.yml +0 -0
  48. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/.github/workflows/tests.yml +0 -0
  49. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/.github/workflows/trigger-eva-sub-cli-integration-tests.yml +0 -0
  50. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/.gitignore +0 -0
  51. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/LICENSE +0 -0
  52. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/README.md +0 -0
  53. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/conda/build.sh +0 -0
  54. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/conda/meta.yaml +0 -0
  55. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/docs/README.md +0 -0
  56. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/docs/_config.yml +0 -0
  57. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/docs/how_to_submit.md +0 -0
  58. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/docs/input_file_overview.md +0 -0
  59. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/docs/using_nextflow.md +0 -0
  60. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/docs/validation_overview.md +0 -0
  61. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/__init__.py +0 -0
  62. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/auth.py +0 -0
  63. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/date_utils.py +0 -0
  64. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/etc/eva-biosamples.json +0 -0
  65. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/etc/eva_logo.png +0 -0
  66. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/exceptions/__init__.py +0 -0
  67. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/exceptions/invalid_file_type_exception.py +0 -0
  68. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/exceptions/metadata_template_version_exception.py +0 -0
  69. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/exceptions/submission_not_found_exception.py +0 -0
  70. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/exceptions/submission_status_exception.py +0 -0
  71. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/__init__.py +0 -0
  72. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/check_fasta_insdc.py +0 -0
  73. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/check_metadata_semantics.py +0 -0
  74. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/evidence_type_checker.py +0 -0
  75. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/samples_checker.py +0 -0
  76. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/executables/trim_down.py +0 -0
  77. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/file_utils.py +0 -0
  78. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/html/fasta_check.html +0 -0
  79. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/html/metadata_validation.html +0 -0
  80. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/html/project_details.html +0 -0
  81. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/html/report.html +0 -0
  82. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/html/sample_name_check.html +0 -0
  83. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/html/shallow_validation.html +0 -0
  84. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/text/fasta_check.txt +0 -0
  85. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/text/metadata_validation.txt +0 -0
  86. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/text/project_details.txt +0 -0
  87. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/text/report.txt +0 -0
  88. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/text/sample_name_check.txt +0 -0
  89. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/jinja_templates/text/shallow_validation.txt +0 -0
  90. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/metadata.py +0 -0
  91. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/report.py +0 -0
  92. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/submission_ws.py +0 -0
  93. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/validators/__init__.py +0 -0
  94. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli/validators/validation_results_parsers.py +0 -0
  95. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli.egg-info/dependency_links.txt +0 -0
  96. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli.egg-info/entry_points.txt +0 -0
  97. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli.egg-info/requires.txt +0 -0
  98. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/eva_sub_cli.egg-info/top_level.txt +0 -0
  99. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/pyproject.toml +0 -0
  100. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/pytest.ini +0 -0
  101. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/requirements.txt +0 -0
  102. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/setup.cfg +0 -0
  103. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/setup.py +0 -0
  104. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/build_and_test_docker_locally.py +0 -0
  105. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/ignore_test_nextflow_validation.yml +0 -0
  106. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/EVA_Submission_test.json +0 -0
  107. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/EVA_Submission_test_with_asm_report.json +0 -0
  108. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/assembly_check/invalid.vcf.assembly_check.log +0 -0
  109. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/assembly_check/invalid.vcf.text_assembly_report.txt +0 -0
  110. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/assembly_reports/input_passed.txt +0 -0
  111. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/fasta_files/Saccharomyces_cerevisiae_I.fa +0 -0
  112. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/fasta_files/input_passed.fa +0 -0
  113. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/fasta_files/multi_seq.fa +0 -0
  114. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/sample_checker/example1.vcf.gz +0 -0
  115. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/sample_checker/example2.vcf +0 -0
  116. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/sample_checker/example3.vcf +0 -0
  117. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/sample_checker/metadata.json +0 -0
  118. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/expected_report_metadata_json.html +0 -0
  119. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/expected_report_metadata_json.txt +0 -0
  120. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/expected_report_metadata_xlsx.html +0 -0
  121. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/expected_report_metadata_xlsx.txt +0 -0
  122. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html +0 -0
  123. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt +0 -0
  124. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.assembly_check.log +0 -0
  125. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.text_assembly_report.1680102476700.txt +0 -0
  126. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.valid_assembly_report.1680102476700.txt +0 -0
  127. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/other_validations/evidence_type_checker.yml +0 -0
  128. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/other_validations/input_passed.fa_check.yml +0 -0
  129. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/other_validations/metadata_conversion_errors.yml +0 -0
  130. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/other_validations/metadata_semantic_check.yml +0 -0
  131. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt +0 -0
  132. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/other_validations/sample_checker.yml +0 -0
  133. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.db +0 -0
  134. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.txt +0 -0
  135. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.vcf_format.log +0 -0
  136. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/vcf_files/example2.vcf.gz +0 -0
  137. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/resources/vcf_files/input_passed.vcf +0 -0
  138. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_auth.py +0 -0
  139. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_check_fasta_insdc.py +0 -0
  140. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_evidence_type_checker.py +0 -0
  141. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_file_utils.py +0 -0
  142. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_metadata.py +0 -0
  143. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_report.py +0 -0
  144. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_samples_checker.py +0 -0
  145. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_submit.py +0 -0
  146. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_trim_down.py +0 -0
  147. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/tests/test_utils.py +0 -0
  148. {eva_sub_cli-0.4.13 → eva_sub_cli-0.5.0}/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.5.0
4
4
  Summary: EBI EVA - validation and submission command line tool
5
5
  Classifier: Development Status :: 5 - Production/Stable
6
6
  Classifier: Environment :: Console
@@ -1,7 +1,7 @@
1
1
  FROM python:3.10
2
2
 
3
3
  ENV vcf_validator_version=0.10.2
4
- ENV NXF_VER=22.10.6
4
+ ENV NXF_VER=23.10.0
5
5
 
6
6
  WORKDIR /opt
7
7
 
@@ -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.5.0'
32
+ __version_tuple__ = version_tuple = (0, 5, 0)
33
33
 
34
- __commit_id__ = commit_id = 'gc6e52eaa9'
34
+ __commit_id__ = commit_id = 'g1b663fd41'
@@ -64,66 +64,81 @@
64
64
  }
65
65
  },
66
66
  "project": {
67
- "type": "object",
68
- "description": "General information about the Project",
69
- "required": [
70
- "title",
71
- "description",
72
- "taxId",
73
- "centre"
74
- ],
75
- "properties": {
76
- "title": {
77
- "type": "string",
78
- "description": "Title of the project",
79
- "maxLength": 500
80
- },
81
- "description": {
82
- "type": "string",
83
- "description": "Description of the project",
84
- "maxLength": 5000
85
- },
86
- "centre": {
87
- "type": "string",
88
- "description": "Centre, institute or company submitting the project"
89
- },
90
- "taxId": {
91
- "type": "number",
92
- "description": "Taxonomy ID of the species associated with the project (found here: http://www.ncbi.nlm.nih.gov/taxonomy)"
93
- },
94
- "publications": {
95
- "type": "array",
96
- "items": true
97
- },
98
- "parentProject": {
99
- "$ref": "#/definitions/projectAccession"
100
- },
101
- "childProjects": {
102
- "type": "array",
103
- "items": {
104
- "$ref": "#/definitions/projectAccession"
105
- }
106
- },
107
- "peerProjects": {
108
- "type": "array",
109
- "items": {
110
- "$ref": "#/definitions/projectAccession"
67
+ "oneOf": [
68
+ {
69
+ "type": "object",
70
+ "required": [
71
+ "projectAccession"
72
+ ],
73
+ "properties": {
74
+ "projectAccession": {
75
+ "$ref": "#/definitions/projectAccession"
76
+ }
111
77
  }
112
78
  },
113
- "links": {
114
- "type": "array",
115
- "items": {
116
- "type": "string"
79
+ {
80
+ "type": "object",
81
+ "description": "General information about the Project",
82
+ "required": [
83
+ "title",
84
+ "description",
85
+ "taxId",
86
+ "centre"
87
+ ],
88
+ "properties": {
89
+ "title": {
90
+ "type": "string",
91
+ "description": "Title of the project",
92
+ "maxLength": 500
93
+ },
94
+ "description": {
95
+ "type": "string",
96
+ "description": "Description of the project",
97
+ "maxLength": 5000
98
+ },
99
+ "centre": {
100
+ "type": "string",
101
+ "description": "Centre, institute or company submitting the project"
102
+ },
103
+ "taxId": {
104
+ "type": "number",
105
+ "description": "Taxonomy ID of the species associated with the project (found here: http://www.ncbi.nlm.nih.gov/taxonomy)"
106
+ },
107
+ "publications": {
108
+ "type": "array",
109
+ "items": true
110
+ },
111
+ "parentProject": {
112
+ "$ref": "#/definitions/projectAccession"
113
+ },
114
+ "childProjects": {
115
+ "type": "array",
116
+ "items": {
117
+ "$ref": "#/definitions/projectAccession"
118
+ }
119
+ },
120
+ "peerProjects": {
121
+ "type": "array",
122
+ "items": {
123
+ "$ref": "#/definitions/projectAccession"
124
+ }
125
+ },
126
+ "links": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "string"
130
+ }
131
+ },
132
+ "holdDate": {
133
+ "type": "string",
134
+ "format": "date",
135
+ "examples": [
136
+ "2018-11-13"
137
+ ]
138
+ }
117
139
  }
118
- },
119
- "holdDate": {
120
- "type": "string",
121
- "format": "date",
122
- "examples": [
123
- "2018-11-13"
124
- ]
125
140
  }
126
- }
141
+ ]
127
142
  },
128
143
  "analysis": {
129
144
  "type": "array",
@@ -324,18 +339,7 @@
324
339
  "description": "BioSample accession of pre-existing sample. Only use for preregistered samples"
325
340
  },
326
341
  "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
- ]
342
+ "$ref": "https://www.ebi.ac.uk/biosamples/schema-store/registry/schemas/ERC000011"
339
343
  }
340
344
  }
341
345
  }
@@ -0,0 +1,139 @@
1
+ #Configuration for defining which fields in which worksheets to be parsed in an Excel file
2
+ #
3
+ #At the top level, "worksheets" defines a list of worksheets (titles) to be parsed.
4
+ #Then for each worksheet, you define which fields to be parsed from this worksheet.
5
+ #These fields are either "required", "optional" and/or header_row. "required" fields must be found
6
+ #in the worksheet so that this worksheet is valid. Otherwise this worksheet is not
7
+ #valid. The field names must match those values in the header row in the worksheet.
8
+ #
9
+ #This is a YAML file
10
+
11
+ # List of worksheets to be parsed.
12
+ worksheets:
13
+ Submitter Details: submitterDetails
14
+ Project: project
15
+ Analysis: analysis
16
+ Sample: sample
17
+ Files: files
18
+
19
+ Submitter Details:
20
+ required:
21
+ Last Name: lastName
22
+ First Name: firstName
23
+ Email Address: email
24
+ Laboratory: laboratory
25
+ Center: centre
26
+ optional:
27
+ Address: address
28
+
29
+ # List of field for Projects
30
+ Project:
31
+ header_row: 3
32
+ optional:
33
+ Project Accession: projectAccession
34
+ Project Title: title
35
+ Description: description
36
+ Center: centre
37
+ Taxonomy ID: taxId
38
+ Publication(s): publications
39
+ Parent Project: parentProject
40
+ Child Project(s): childProjects
41
+ Peer Project(s): peerProjects
42
+ Link(s): links
43
+ Hold Date: holdDate
44
+ Collaborator(s): collaborators
45
+ Strain: strain
46
+ Breed: breed
47
+ Broker: broker
48
+ cast:
49
+ Publication(s): list
50
+ Child Project(s): list
51
+ Peer Project(s): list
52
+ Link(s): list
53
+ Hold Date: date
54
+ Taxonomy ID: integer
55
+
56
+ Analysis:
57
+ required:
58
+ Analysis Title: analysisTitle
59
+ Analysis Alias: analysisAlias
60
+ Description: description
61
+ Experiment Type: experimentType
62
+ Reference: referenceGenome
63
+ optional:
64
+ Reference Fasta Path: referenceFasta
65
+ Platform: platform
66
+ Software: software
67
+ Pipeline Description: pipelineDescriptions
68
+ Imputation: imputation
69
+ Phasing: phasing
70
+ Centre: centre
71
+ Date: date
72
+ Link(s): links
73
+ Run Accession(s): runAccessions
74
+ cast:
75
+ Run Accession(s): list
76
+ Imputation: boolean
77
+ Phasing: boolean
78
+ Date: date
79
+ Software: list
80
+
81
+ Sample:
82
+ header_row: 3
83
+ required:
84
+ Analysis Alias: analysisAlias
85
+ Sample Name in VCF: sampleInVCF
86
+ # Sample property names taken from ERC000011 where present
87
+ # See https://www.ebi.ac.uk/biosamples/schema-store/registry/schemas/ERC000011
88
+ optional:
89
+ Sample Accession: bioSampleAccession
90
+ BioSample Name: bioSampleName
91
+ Title: title
92
+ Description: description
93
+ Unique Name: uniqueName
94
+ Prefix: prefix
95
+ Subject: subject
96
+ Derived From: derivedFrom
97
+ Taxonomy ID: taxId
98
+ Scientific Name: scientific name
99
+ Common Name: commonName
100
+ mating_type: mating_type
101
+ sex: sex
102
+ population: population
103
+ cell_type: cell_type
104
+ dev_stage: dev_stage
105
+ germline: germline
106
+ tissue_lib: tissue_lib
107
+ tissue_type: tissue_type
108
+ bio_material: bio_material
109
+ culture_collection: culture_collection
110
+ specimen_voucher: specimen_voucher
111
+ collected_by: collected_by
112
+ collection_date: collection date
113
+ geographic location (country and/or sea): geographic location (country and/or sea)
114
+ geographic location (region and locality): geographic location (region and locality)
115
+ host: host
116
+ identified_by: identified_by
117
+ isolation_source: isolation_source
118
+ lat_lon: lat_lon
119
+ lab_host: lab_host
120
+ environmental_sample: environmental_sample
121
+ cultivar: cultivar
122
+ ecotype: ecotype
123
+ isolate: isolate
124
+ strain: strain
125
+ sub_species: sub_species
126
+ variety: variety
127
+ sub_strain: sub_strain
128
+ cell_line: cell_line
129
+ serotype: serotype
130
+ serovar: serovar
131
+ cast:
132
+ collection_date: date
133
+ Taxonomy ID: integer
134
+
135
+
136
+ Files:
137
+ required:
138
+ Analysis Alias: analysisAlias
139
+ File Name: fileName
@@ -50,6 +50,8 @@ Project:
50
50
  Peer Project(s): list
51
51
  Link(s): list
52
52
  Hold Date: date
53
+ Taxonomy ID: integer
54
+
53
55
 
54
56
  Analysis:
55
57
  required:
@@ -127,12 +129,12 @@ Sample:
127
129
  serotype: serotype
128
130
  serovar: serovar
129
131
  cast:
130
- Sample ID: string
131
- BioSample Name: string
132
132
  collection_date: date
133
+ Taxonomy ID: integer
134
+
133
135
 
134
136
 
135
137
  Files:
136
138
  required:
137
139
  Analysis Alias: analysisAlias
138
- File Name: fileName
140
+ File Name: fileName
@@ -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
 
@@ -128,4 +151,7 @@ def main():
128
151
  except MetadataTemplateVersionNotFoundException as mte:
129
152
  print(mte)
130
153
  exit_status = 70
154
+ except Exception as ex:
155
+ print(ex)
156
+ exit_status = 71
131
157
  return exit_status
@@ -103,9 +103,7 @@ class XlsxParser:
103
103
  @staticmethod
104
104
  def cast_value(value, type_name):
105
105
  # Do not cast None values
106
- if type_name and value is not None:
107
- if type_name == 'string':
108
- return str(value)
106
+ if value is not None:
109
107
  if type_name == 'boolean':
110
108
  return str(value).lower() in ['true', '1', "'1'", 't', 'y', 'yes']
111
109
  if type_name == 'list':
@@ -114,6 +112,10 @@ class XlsxParser:
114
112
  return [v for v in split_values if v]
115
113
  if type_name == 'date':
116
114
  return XlsxParser.serialize(value)
115
+ if type_name == 'integer':
116
+ return int(value)
117
+ # Default any value is cast to string
118
+ return str(value)
117
119
  return value
118
120
 
119
121
  @staticmethod
@@ -179,15 +181,20 @@ class XlsxParser:
179
181
  return rows
180
182
 
181
183
  def get_project_json_data(self):
184
+ json_key = self.xlsx_conf[WORKSHEETS_KEY_NAME][PROJECT]
185
+
182
186
  project_data = self.get_rows()
183
187
  if len(project_data) > 1:
184
188
  logger.warning(f"{PROJECT} worksheet expects a single row of info but more than one found in the file. "
185
189
  f"Only the first row's data will be taken into consideration")
190
+ elif len(project_data) == 0:
191
+ logger.error(f"{PROJECT} worksheet expects a single row of info but no info is found in the file.")
192
+ self.add_error(f"{PROJECT} worksheet expects a single row of info but no info is found in the file.")
193
+ return {json_key: {}}
186
194
 
187
195
  first_row = project_data[0]
188
196
  first_row.pop('row_num')
189
197
 
190
- json_key = self.xlsx_conf[WORKSHEETS_KEY_NAME][PROJECT]
191
198
  json_value = {self.translate_header(PROJECT, k): v for k, v in first_row.items() if v is not None}
192
199
  return {json_key: json_value}
193
200
 
@@ -20,7 +20,7 @@
20
20
  {% set row_class = "report-section fail collapsible" %}
21
21
  {% elif error_count > 0 %}
22
22
  {% set expand_icon = "▶" %}
23
- {% set icon = "❌" %}
23
+ {% set icon = "❗" %}
24
24
  {% set row_class = "report-section warn collapsible" %}
25
25
  {% else %}
26
26
  {% set icon = "✔" %}
@@ -13,8 +13,10 @@
13
13
  {% macro vcf_check(vcf_check_result) %}
14
14
  {% set critical_count = vcf_check_result.get("critical_count", 0) %}
15
15
  {% set error_count = vcf_check_result.get("error_count", 0) %}
16
- {% if critical_count > 0 or error_count > 0 %}
16
+ {% if critical_count > 0 %}
17
17
  {% set icon = "\u274C" %}
18
+ {% elif error_count > 0 %}
19
+ {% set icon = "\u26A0" %}
18
20
  {% else %}
19
21
  {% set icon = "\u2714" %}
20
22
  {% endif %}