eva-sub-cli 0.4.9__tar.gz → 0.4.10__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 (136) hide show
  1. eva_sub_cli-0.4.10/.github/workflows/publish_docs.yml +50 -0
  2. eva_sub_cli-0.4.10/PKG-INFO +34 -0
  3. eva_sub_cli-0.4.10/README.md +3 -0
  4. eva_sub_cli-0.4.10/docs/README.md +10 -0
  5. eva_sub_cli-0.4.10/docs/_config.yml +1 -0
  6. eva_sub_cli-0.4.10/docs/how_to_submit.md +89 -0
  7. eva_sub_cli-0.4.10/docs/input_file_overview.md +45 -0
  8. eva_sub_cli-0.4.10/docs/installation.md +49 -0
  9. eva_sub_cli-0.4.10/docs/using_nextflow.md +48 -0
  10. eva_sub_cli-0.4.9/docs/Getting_Started_with_eva_sub_cli.md → eva_sub_cli-0.4.10/docs/validation_overview.md +5 -54
  11. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/_version.py +2 -2
  12. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/semantic_metadata.py +13 -3
  13. eva_sub_cli-0.4.10/eva_sub_cli.egg-info/PKG-INFO +34 -0
  14. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli.egg-info/SOURCES.txt +8 -1
  15. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_semantic_metadata.py +27 -4
  16. eva_sub_cli-0.4.9/PKG-INFO +0 -215
  17. eva_sub_cli-0.4.9/README.md +0 -184
  18. eva_sub_cli-0.4.9/eva_sub_cli.egg-info/PKG-INFO +0 -215
  19. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/.github/workflows/publish.yml +0 -0
  20. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/.github/workflows/publish_packages.yml +0 -0
  21. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/.github/workflows/tests.yml +0 -0
  22. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/.github/workflows/trigger-eva-sub-cli-integration-tests.yml +0 -0
  23. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/.gitignore +0 -0
  24. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/LICENSE +0 -0
  25. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/conda/build.sh +0 -0
  26. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/conda/meta.yaml +0 -0
  27. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/docker/Dockerfile +0 -0
  28. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/__init__.py +0 -0
  29. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/auth.py +0 -0
  30. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/date_utils.py +0 -0
  31. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
  32. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
  33. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/etc/eva-biosamples.json +0 -0
  34. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/etc/eva_logo.png +0 -0
  35. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/etc/eva_schema.json +0 -0
  36. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/etc/spreadsheet2json_conf.yaml +0 -0
  37. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/exceptions/__init__.py +0 -0
  38. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/exceptions/invalid_file_type_exception.py +0 -0
  39. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/exceptions/metadata_template_version_exception.py +0 -0
  40. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/exceptions/submission_not_found_exception.py +0 -0
  41. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/exceptions/submission_status_exception.py +0 -0
  42. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/executables/__init__.py +0 -0
  43. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/executables/check_fasta_insdc.py +0 -0
  44. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/executables/check_metadata_semantics.py +0 -0
  45. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/executables/cli.py +0 -0
  46. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/executables/samples_checker.py +0 -0
  47. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/executables/trim_down.py +0 -0
  48. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/executables/xlsx2json.py +0 -0
  49. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/file_utils.py +0 -0
  50. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/html/fasta_check.html +0 -0
  51. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/html/file_validation.html +0 -0
  52. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/html/metadata_validation.html +0 -0
  53. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/html/project_details.html +0 -0
  54. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/html/report.html +0 -0
  55. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/html/sample_name_check.html +0 -0
  56. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/html/shallow_validation.html +0 -0
  57. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/text/fasta_check.txt +0 -0
  58. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/text/file_validation.txt +0 -0
  59. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/text/metadata_validation.txt +0 -0
  60. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/text/project_details.txt +0 -0
  61. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/text/report.txt +0 -0
  62. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/text/sample_name_check.txt +0 -0
  63. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/jinja_templates/text/shallow_validation.txt +0 -0
  64. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/metadata.py +0 -0
  65. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/nextflow/validation.nf +0 -0
  66. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/orchestrator.py +0 -0
  67. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/report.py +0 -0
  68. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/submission_ws.py +0 -0
  69. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/submit.py +0 -0
  70. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/validators/__init__.py +0 -0
  71. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/validators/docker_validator.py +0 -0
  72. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/validators/native_validator.py +0 -0
  73. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/validators/validation_results_parsers.py +0 -0
  74. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli/validators/validator.py +0 -0
  75. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli.egg-info/dependency_links.txt +0 -0
  76. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli.egg-info/entry_points.txt +0 -0
  77. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli.egg-info/requires.txt +0 -0
  78. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/eva_sub_cli.egg-info/top_level.txt +0 -0
  79. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/pyproject.toml +0 -0
  80. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/pytest.ini +0 -0
  81. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/requirements.txt +0 -0
  82. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/setup.cfg +0 -0
  83. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/setup.py +0 -0
  84. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/build_and_test_docker_locally.py +0 -0
  85. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/ignore_test_nextflow_validation.yml +0 -0
  86. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/EVA_Submission_Docker_Test.xlsx +0 -0
  87. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/EVA_Submission_test.json +0 -0
  88. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/EVA_Submission_test.xlsx +0 -0
  89. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/EVA_Submission_test_fails.xlsx +0 -0
  90. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/EVA_Submission_test_version_missing.xlsx +0 -0
  91. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/EVA_Submission_test_with_asm_report.json +0 -0
  92. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/assembly_check/invalid.vcf.assembly_check.log +0 -0
  93. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/assembly_check/invalid.vcf.text_assembly_report.txt +0 -0
  94. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/assembly_reports/input_passed.txt +0 -0
  95. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/fasta_files/Saccharomyces_cerevisiae_I.fa +0 -0
  96. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/fasta_files/input_passed.fa +0 -0
  97. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/fasta_files/multi_seq.fa +0 -0
  98. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/metadata_with_filename.json +0 -0
  99. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/sample_checker/example1.vcf.gz +0 -0
  100. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/sample_checker/example2.vcf +0 -0
  101. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/sample_checker/example3.vcf +0 -0
  102. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/sample_checker/metadata.json +0 -0
  103. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/expected_report_metadata_json.html +0 -0
  104. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/expected_report_metadata_json.txt +0 -0
  105. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/expected_report_metadata_xlsx.html +0 -0
  106. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/expected_report_metadata_xlsx.txt +0 -0
  107. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html +0 -0
  108. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt +0 -0
  109. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.assembly_check.log +0 -0
  110. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.text_assembly_report.1680102476700.txt +0 -0
  111. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.valid_assembly_report.1680102476700.txt +0 -0
  112. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/other_validations/input_passed.fa_check.yml +0 -0
  113. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/other_validations/metadata_conversion_errors.yml +0 -0
  114. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/other_validations/metadata_semantic_check.yml +0 -0
  115. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt +0 -0
  116. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/other_validations/sample_checker.yml +0 -0
  117. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.db +0 -0
  118. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.txt +0 -0
  119. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.vcf_format.log +0 -0
  120. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/vcf_files/example2.vcf.gz +0 -0
  121. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/resources/vcf_files/input_passed.vcf +0 -0
  122. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_auth.py +0 -0
  123. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_check_fasta_insdc.py +0 -0
  124. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_cli.py +0 -0
  125. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_docker_validator.py +0 -0
  126. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_file_utils.py +0 -0
  127. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_metadata.py +0 -0
  128. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_orchestrator.py +0 -0
  129. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_report.py +0 -0
  130. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_samples_checker.py +0 -0
  131. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_submit.py +0 -0
  132. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_trim_down.py +0 -0
  133. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_utils.py +0 -0
  134. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_validaton_results_parsers.py +0 -0
  135. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_validator.py +0 -0
  136. {eva_sub_cli-0.4.9 → eva_sub_cli-0.4.10}/tests/test_xlsx2json.py +0 -0
@@ -0,0 +1,50 @@
1
+ name: Deploy documentation with Jekyll / GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '**'
7
+
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch:
10
+
11
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12
+ permissions:
13
+ contents: read
14
+ pages: write
15
+ id-token: write
16
+
17
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19
+ concurrency:
20
+ group: "pages"
21
+ cancel-in-progress: false
22
+
23
+ jobs:
24
+ # Build job
25
+ build:
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v4
30
+ - name: Setup Pages
31
+ uses: actions/configure-pages@v5
32
+ - name: Build with Jekyll
33
+ uses: actions/jekyll-build-pages@v1
34
+ with:
35
+ source: ./docs
36
+ destination: ./_site
37
+ - name: Upload artifact
38
+ uses: actions/upload-pages-artifact@v3
39
+
40
+ # Deployment job
41
+ deploy:
42
+ environment:
43
+ name: github-pages
44
+ url: ${{ steps.deployment.outputs.page_url }}
45
+ runs-on: ubuntu-latest
46
+ needs: build
47
+ steps:
48
+ - name: Deploy to GitHub Pages
49
+ id: deployment
50
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.4
2
+ Name: eva_sub_cli
3
+ Version: 0.4.10
4
+ Summary: EBI EVA - validation and submission command line tool
5
+ Classifier: Development Status :: 5 - Production/Stable
6
+ Classifier: Environment :: Console
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Natural Language :: English
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Classifier: Operating System :: MacOS :: MacOS X
11
+ Classifier: Programming Language :: Python :: 3.6
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
17
+ Classifier: Topic :: Communications :: File Sharing
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Requires-Python: >=3.6
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: ebi_eva_common_pyutils==0.*,>=0.7.3
23
+ Requires-Dist: jinja2==3.*,>=3.0.0
24
+ Requires-Dist: jsonschema==4.*
25
+ Requires-Dist: openpyxl==3.*
26
+ Requires-Dist: pyyaml==6.*
27
+ Requires-Dist: requests==2.*
28
+ Requires-Dist: packaging==24.*
29
+ Requires-Dist: setuptools-scm
30
+ Dynamic: license-file
31
+
32
+ # eva-sub-cli
33
+
34
+ Please view our [documentation website](https://ebivariation.github.io/eva-sub-cli) for help installing and using eva-sub-cli.
@@ -0,0 +1,3 @@
1
+ # eva-sub-cli
2
+
3
+ Please view our [documentation website](https://ebivariation.github.io/eva-sub-cli) for help installing and using eva-sub-cli.
@@ -0,0 +1,10 @@
1
+ # About eva-sub-cli
2
+ The eva-sub-cli tool is a command line interface tool for data validation and upload. The tool enables users to perform
3
+ validation and submission to the EVA directly, without requiring interaction with our helpdesk team.
4
+
5
+ For instructions on how to install eva-sub-cli, see [Installation](installation.md).
6
+
7
+ For instructions on how to use eva-sub-cli to submit data, see [How to Submit](how_to_submit.md).
8
+
9
+ ## Contact us
10
+ For help or feedback, please get in touch with us at [eva-helpdesk@ebi.ac.uk](mailto:eva-helpdesk@ebi.ac.uk).
@@ -0,0 +1 @@
1
+ remote_theme: just-the-docs/just-the-docs
@@ -0,0 +1,89 @@
1
+ # How to Submit
2
+
3
+ ## 1. File preparation
4
+ You should have **one or more VCF files** to submit, as well as a **completed metadata spreadsheet** following [our
5
+ template](https://raw.githubusercontent.com/EBIvariation/eva-sub-cli/main/eva_sub_cli/etc/EVA_Submission_template.xlsx).
6
+ More guidance on these files can be found in the [inputs overview](input_file_overview.md) as well as in the metadata
7
+ template itself.
8
+
9
+ You will also need the **reference sequences in FASTA format** that you used to generate the VCF files. This is required for
10
+ validation, though it will not be submitted.
11
+
12
+ ## 2. Setting up
13
+ First [**install eva-sub-cli**](installation.md), or check that you have the latest version installed.
14
+
15
+ You will need an [**ENA Webin account**](https://www.ebi.ac.uk/ena/submit/webin/login) in order to submit, though you
16
+ can run validation without one.
17
+
18
+ Finally, you need to specify a **submission directory**, which is a specific directory associated with each submission.
19
+ This is where all processing will take place, and where configuration and reports will be saved.
20
+
21
+ Crucially, the eva-sub-cli tool requires that there be **only one submission per directory** and
22
+ that the submission directory not be reused. Running multiple submissions from a single directory can result in data
23
+ loss during validation and submission.
24
+
25
+ ## 3. Running eva-sub-cli
26
+ The basic command to run validation and submission is as follows:
27
+ ```shell
28
+ eva-sub-cli.py --metadata_xlsx <metadata file> --submission_dir <submission directory> --username <webin username> --password <webin password>
29
+ ```
30
+ This will run validation and generate a report with the results. The report can be viewed as HTML or plain text. More
31
+ description of the validation checks being performed can be found in the [validation overview](validation_overview.md).
32
+
33
+ **NOTE:** If the validation is successful, this command will automatically submit your data and metadata to EVA. If you
34
+ don't want this, see [below](#running-only-validation-or-only-submission).
35
+
36
+ If your files are large, we also encourage you to use [shallow validation](#shallow-validation) before running full
37
+ validation and submission.
38
+
39
+ ## 4. Post submission
40
+ Once you've successfully validated and submitted your data, you will receive an automatic email stating that your data
41
+ has been uploaded. If you don't get this email within a short time, we have very likely **not received your data**, so
42
+ you should get in touch with our [helpdesk](mailto:eva-helpdesk@ebi.ac.uk).
43
+
44
+ If your submission contains **human genotype data**, then you will also need to provide a signed copy of our
45
+ [consent statement](https://docs.google.com/document/d/1UaRmimAe919IZYIH55mDXMe-4sHsRVqaP4moqx2IYE4) via email.
46
+ For more information please see our [submission FAQs](https://www.ebi.ac.uk/eva/?Help#submissionPanel&link=consent-statement-for-human-genotype-data).
47
+
48
+ ## Other options
49
+ The above steps are the most common, but there are some other options that you can use to tailor its functionality to
50
+ your needs. A full listing is available by running `eva-sub-cli.py -h`.
51
+
52
+ ### Running only validation or only submission
53
+ If you want to run validation without submitting automatically once the validation passes, you can use the `--tasks`
54
+ option. To run only validation:
55
+ ```shell
56
+ eva-sub-cli.py --metadata_xlsx <metadata file> --submission_dir <submission directory> --tasks VALIDATE
57
+ ```
58
+ To run only submission - note this will **not submit** if you've not yet validated successfully:
59
+ ```shell
60
+ eva-sub-cli.py --metadata_xlsx <metadata file> --submission_dir <submission directory> --tasks SUBMIT --username <webin username> --password <webin password>
61
+ ```
62
+
63
+ ### Shallow validation
64
+ If you are working with large VCF files and find that validation takes a very long time, you can add the
65
+ argument `--shallow` to the command, which will validate only the first 10,000 lines in each VCF. Note that running
66
+ shallow validation will **not** be sufficient for actual submission but will allow you to identify most validation concerns without long run time.
67
+
68
+ ### VCF files and reference FASTA
69
+ These can be provided either in the metadata file directly, or on the command line using the `--vcf_files` and
70
+ `--reference_fasta` options. Note that if you are using more than one reference FASTA, you **cannot** use the command
71
+ line options; you must specify which VCF files use which FASTA files in the metadata.
72
+
73
+ VCF files can be either uncompressed or compressed using bgzip.
74
+ Other types of compression are not allowed and will result in errors during validation.
75
+ FASTA files must be uncompressed.
76
+
77
+ ### Metadata JSON
78
+ Frequent submitters may be interested in using our [metadata JSON schema](https://github.com/EBIvariation/eva-sub-cli/blob/main/eva_sub_cli/etc/eva_schema.json)
79
+ instead of our spreadsheet template. The metadata requirements are the same regardless of which format you use, you will
80
+ just need to use the `--metadata_json` option instead of the `--metadata_xlsx` option.
81
+
82
+ ### Running using Docker
83
+ If you've installed eva-sub-cli using Docker, make sure that Docker is running in the background before running
84
+ eva-sub-cli, e.g. by opening Docker Desktop. Additionally, for each eva-sub-cli command, add the command line option
85
+ `--executor docker`, which will fetch and manage the Docker container for you.
86
+
87
+ ### Using Nextflow
88
+ Under the hood, eva-sub-cli uses Nextflow to run validation, which you can configure on the command line using the
89
+ `--nextflow_config` option. For more information, please see [here](using_nextflow.md).
@@ -0,0 +1,45 @@
1
+ # Overview of Input Files
2
+
3
+ The eva-sub-cli tool requires the following inputs:
4
+
5
+ - One or several valid VCF files
6
+ - Completed metadata spreadsheet
7
+ - Reference genome in fasta format
8
+
9
+ VCF files can be either uncompressed or compressed using bgzip.
10
+ Other types of compression are not allowed and will result in errors during validation.
11
+ FASTA files must be uncompressed.
12
+
13
+ The VCF file must adhere to official VCF specifications, and the metadata spreadsheet provides contextual information about the dataset. In the following sections, we will examine each of these inputs in detail.
14
+
15
+ # VCF File
16
+
17
+ A VCF (Variant Call Format) file is a type of file used in bioinformatics to store information about genetic variants. It includes data about the differences (or variants) between a sample's DNA and a reference genome. Typically, generating a VCF file involves several steps: preparing your sample, sequencing the DNA, aligning it to a reference genome, identifying variants, and finally, formatting this information into a VCF file. The overall goal is to systematically capture and record genetic differences in a standardised format. A VCF file consists of two main parts: the header and the body.
18
+
19
+ Header: The header contains metadata about the file, such as the format version, reference genome information, and descriptions of the data fields. Each line in the header starts with a double ##, except for the last header line which starts with a single #.
20
+
21
+ ```
22
+ ##fileformat=VCFv4.2
23
+ ##INFO=<ID=DP,Number=1,Type=Integer,Description="Total Depth">
24
+ ##FILTER=<ID=PASS,Description="All filters passed">
25
+ ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
26
+ ```
27
+
28
+ Body: The body of the VCF file contains the actual variant data, with each row representing a single variant. The columns in the body are: CHROM, POS, ID, REF, ALT, QUAL, FILTER, INFO, FORMAT, Sample Columns
29
+
30
+ ```
31
+ #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT [SampleIDs...]
32
+ ```
33
+
34
+ # Metadata Spreadsheet
35
+
36
+ The spreadsheet provides comprehensive contextual information about the dataset, ensuring that each submission is accompanied by detailed descriptions that facilitate proper understanding and use of the data. Key elements included in the metadata spreadsheet are analysis and project information, sample information, sequencing methodologies, experimental details.
37
+ The spreadsheet is composed of editable tabs that will receive the metadata and non-editable helper tabs that provide detailed description of each column.
38
+
39
+ | WORKSHEET | EXPLANATION |
40
+ |-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
41
+ | Submitter Details | This sheet captures the details of the submitter |
42
+ | Project | The objective of this sheet is to gather general information about the Project including submitter, submitting centre, collaborators, project title, description and publications. |
43
+ | Sample | Projects consist of analyses that are run on samples. We accept sample information in the form of BioSample, ENA or EGA accession(s). We also accept BioSamples sampleset accessions. If your samples are not yet accessioned, and are therefore novel, please use the "Novel sample(s)" sections of the Sample(s) worksheet to have them registered at BioSample |
44
+ | Analysis | For EVA, each analysis is one vcf file, plus an unlimited number of ancillary files. This sheet allows EVA to link vcf files to a project and to other EVA analyses. Additionally, this worksheet contains experimental meta-data detailing the methodology of each analysis. Important to note; one project can have multiple associated analyses |
45
+ | Files | Filenames and associated checking data associated with this EVA submission should be entered into this worksheet. Each file should be linked to exactly one analysis. |
@@ -0,0 +1,49 @@
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.
@@ -0,0 +1,48 @@
1
+ # Using Nextflow for Parallelization
2
+
3
+ Nextflow is a common workflow management system that helps orchestrate tasks and interface with the execution engine (like HPC or cloud). When running natively (i.e. not using Docker), eva-sub-cli will use Nextflow to run all the validation steps. In this section we'll see how it can be parameterised to work with your compute infrastructure.
4
+
5
+ When no options are provided, Nextflow will run as many tasks as there are available CPUs on the machine executing it. To modify how many tasks can start and how Nextflow will process each one, you can provide a Nextflow configuration file in several ways.
6
+
7
+ From the command line you can use `--nextflow_config <path>` to specify the Nextflow config file you want to apply. The configuration can also be picked up from other places directly by Nextflow. Please refer to [the Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for more details.
8
+
9
+ ## Basic Nextflow configuration
10
+
11
+ There are many options to configure Nextflow so we will not provide them all. Please refer to [the documentation](https://www.nextflow.io/docs/latest/reference/config.html) for advanced features.
12
+ Below is a very basic Nextflow configuration file that will request 2 cpus for each process, essentially limiting the number of process to half the number of available CPUs
13
+ ```
14
+ process {
15
+ executor="local"
16
+ cpus=2
17
+ }
18
+ ```
19
+ In this configuration, all the process will be running on the same machine where eva-sub-cli was started as described in the schema below.
20
+ ```
21
+ (Local machine)
22
+ eva-sub-cli
23
+ |_ nextflow
24
+ |_ task1
25
+ |_ task2
26
+ ```
27
+
28
+ ## Basic Nextflow configuration for HPC use
29
+
30
+ If you have access to High Performance Compute (HPC) environment, Nextflow supports the main resource managers such as [SLURM](https://www.nextflow.io/docs/latest/executor.html#slurm), [SGE](https://www.nextflow.io/docs/latest/executor.html#sge), [LSF](https://www.nextflow.io/docs/latest/executor.html#lsf) and others.
31
+ In the configuration below, we're assuming that you are using SLURM. It would work similarly with other resource managers.
32
+ ```
33
+ process {
34
+ executor="slurm"
35
+ queue="my_production_queue"
36
+ }
37
+ ```
38
+
39
+ In this configuration, the subtasks will be performed in other machines as specified by your SLURM resource manager as described in the schema below.
40
+ ```
41
+ (Local machine)
42
+ eva-sub-cli
43
+ |_ nextflow
44
+ (Other compute node)
45
+ task1
46
+ (Other compute node)
47
+ task2
48
+ ```
@@ -1,51 +1,4 @@
1
- # Comprehensive overview of the required inputs for eva-sub-cli tool
2
-
3
- The eva-sub-cli tool requires the following inputs:
4
-
5
- - One or several valid VCF files
6
- - Completed metadata spreadsheet
7
- - Reference genome in fasta format
8
-
9
- The VCF file must adhere to official VCF specifications, and the metadata spreadsheet provides contextual information about the dataset. In the following sections, we will examine each of these inputs in detail.
10
-
11
- # VCF File
12
-
13
- A VCF (Variant Call Format) file is a type of file used in bioinformatics to store information about genetic variants. It includes data about the differences (or variants) between a sample's DNA and a reference genome. Typically, generating a VCF file involves several steps: preparing your sample, sequencing the DNA, aligning it to a reference genome, identifying variants, and finally, formatting this information into a VCF file. The overall goal is to systematically capture and record genetic differences in a standardised format. A VCF file consists of two main parts: the header and the body.
14
-
15
- Header: The header contains metadata about the file, such as the format version, reference genome information, and descriptions of the data fields. Each line in the header starts with a double ##, except for the last header line which starts with a single #.
16
-
17
- File format version
18
-
19
- ```
20
- ##fileformat=VCFv4.2
21
- ##INFO=<ID=DP,Number=1,Type=Integer,Description="Total Depth">
22
- ##FILTER=<ID=PASS,Description="All filters passed">
23
- ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
24
-
25
- ```
26
-
27
- Body: The body of the VCF file contains the actual variant data, with each row representing a single variant. The columns in the body are : CHROM, POS, ID, REF, ALT, QUAL, FILTER, INFO, FORMAT, Sample Columns
28
-
29
- ```
30
- #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT [SampleIDs...]
31
- ```
32
- Here's a small example to illustrate the structure of a VCF file: Example VCF file archived at EVA to be inserted
33
-
34
- # Metadata Spreadsheet
35
-
36
- The spreadsheet provides comprehensive contextual information about the dataset, ensuring that each submission is accompanied by detailed descriptions that facilitate proper understanding and use of the data. Key elements included in the metadata spreadsheet are analysis and project information, sample information, sequencing methodologies, experimental details.
37
-
38
-
39
- | WORKSHEET | EXPLANATION |
40
- | ----------------- | -------------------- |
41
- | Submitter Details | This sheet captures the details of the submitter|
42
- | Project | The objective of this sheet is to gather general information about the Project including submitter, submitting centre, collaborators, project title, description and publications. |
43
- | Sample | Projects consist of analyses that are run on samples. We accept sample information in the form of BioSample, ENA or EGA accession(s). We also accept BioSamples sampleset accessions. If your samples are not yet accessioned, and are therefore novel, please use the "Novel sample(s)" sections of the Sample(s) worksheet to have them registered at BioSample |
44
- | Analysis | For EVA, each analysis is one vcf file, plus an unlimited number of ancillary files. This sheet allows EVA to link vcf files to a project and to other EVA analyses. Additionally, this worksheet contains experimental meta-data detailing the methodology of each analysis. Important to note; one project can have multiple associated analyses |
45
- | Files | Filenames and associated checking data associated with this EVA submission should be entered into this worksheet. Each file should be linked to exactly one analysis. |
46
-
47
-
48
- # Validation checks
1
+ # Overview of Validation Checks
49
2
 
50
3
  The CLI tool performs the following validation checks and generates corresponding reports:
51
4
 
@@ -56,7 +9,7 @@ The CLI tool performs the following validation checks and generates correspondin
56
9
 
57
10
  In the following sections, we will examine each of these checks in detail, starting with the Metadata check.
58
11
 
59
- # Metadata check
12
+ ## Metadata check
60
13
 
61
14
  Once the user passes the metadata spreadsheet for validation checks, the eva-sub-cli tool verifies that all mandatory columns, marked in bold in the spreadsheet, are filled in. This data is crucial for further validation processes, such as retrieving the INDSC accession of the reference genome used to call the variants, and for sample and project metadata. If any mandatory columns or sheets are missing, the CLI tool will raise errors.
62
15
 
@@ -75,7 +28,7 @@ Common Errors Seen with Metadata Checks:
75
28
  - Tax ID and the scientific name of the organism do not match.
76
29
  - Collection data and geographic location of the samples are not filled if the samples being submitted are novel.
77
30
 
78
- # VCF Checks
31
+ ## VCF Checks
79
32
 
80
33
  Ensuring data consistency upon submission is crucial for interoperability and supporting cross-study comparative genomics. Before accepting a VCF submission, the cli tool verifies that the submitted information adheres to the official VCF specifications. Additionally, submitted variants must be supported by either experimentally determined sample genotypes or population allele frequencies.
81
34
 
@@ -95,7 +48,7 @@ Common Errors Seen with VCF Checks:
95
48
  - VCF uses non-GCA contig alias
96
49
  - The fields used do not conform to the official VCF specifications
97
50
 
98
- # Assembly Check
51
+ ## Assembly Check
99
52
 
100
53
  The EVA requires that all variants be submitted with an asserted position on an INSDC sequence. This means that the reference allele for every variant must match a position in a sequence that has been accessioned in either the GenBank or ENA database. Aligning all submitted data with INSDC sequences enables integration with other EMBL-EBI resources, including Ensembl, and is crucial for maintaining standardisation at the EVA. Therefore, all sequence identifiers in your VCF must match those in the reference FASTA file.
101
54
 
@@ -110,7 +63,7 @@ Key points to note before validating your data with the eva-sub-cli Tool:
110
63
  - Contigs used do not exist in the assembly report of the reference genome
111
64
  - Major Allele Used as REF Allele: This typically occurs when a specific version of Plink or Tassel is used to create VCF files, causing the tool to use the major allele as the reference allele. In such cases, submitters should use the GCA FASTA sequence to create corrected files.
112
65
 
113
- # Sample Name Concordance Check
66
+ ## Sample Name Concordance Check
114
67
 
115
68
  The sample name concordance check ensures that the sample names in the metadata spreadsheet match those in the VCF file. This is achieved by cross-checking the 'Sample name in VCF' column in the spreadsheet with the sample names registered in the VCF file. Any discrepancies must be addressed by the submitter when the CLI tool generates a report of the mismatches found.
116
69
 
@@ -124,5 +77,3 @@ Common errors seen with sample concordance checks:
124
77
  - Link between “Sample” and “File” provided via the Analysis alias is not correctly defined in the metadata which causes the sample name concordance check to fail.
125
78
  - Extra white spaces in the sample names can lead to mismatches.
126
79
  - Case sensitivity issues between the sample names in the VCF file and the metadata spreadsheet.
127
-
128
-
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.4.9'
21
- __version_tuple__ = version_tuple = (0, 4, 9)
20
+ __version__ = version = '0.4.10'
21
+ __version_tuple__ = version_tuple = (0, 4, 10)
@@ -4,6 +4,7 @@ from copy import deepcopy
4
4
  from datetime import datetime
5
5
 
6
6
  import yaml
7
+ from requests import HTTPError
7
8
 
8
9
  from retry import retry
9
10
  from ebi_eva_common_pyutils.biosamples_communicators import NoAuthHALCommunicator
@@ -121,8 +122,14 @@ class SemanticMetadataChecker(AppLogger):
121
122
  def check_accession_in_ena(self, ena_accession, accession_type, json_path):
122
123
  try:
123
124
  res = download_xml_from_ena(f'https://www.ebi.ac.uk/ena/browser/api/xml/{ena_accession}')
124
- except Exception:
125
- self.add_error(json_path, f'{accession_type} {ena_accession} does not exist in ENA or is private')
125
+ except HTTPError as e:
126
+ # We cannot currently differentiate between the service returning an error and the accession not existing
127
+ if e.response.status_code == 500:
128
+ self.add_error(json_path, f'{accession_type} {ena_accession} does not exist in ENA or is private')
129
+ else:
130
+ self.add_error(json_path, f'{accession_type} {ena_accession} does not exist in ENA or is private')
131
+ except Exception as e:
132
+ self.add_error(json_path, f'Unexpected error occurred when checking {accession_type} {ena_accession}')
126
133
 
127
134
  def check_project_accession(self, project_acc, json_path):
128
135
  self.check_accession_in_ena(project_acc, 'Project', json_path)
@@ -216,7 +223,10 @@ class SemanticMetadataChecker(AppLogger):
216
223
 
217
224
  def _should_bypass_error(self, sample_data, error):
218
225
  try:
219
- created_dated = datetime.strptime(sample_data['create'],'%Y-%m-%dT%H:%M:%S.%fZ')
226
+ try:
227
+ created_dated = datetime.strptime(sample_data['create'],'%Y-%m-%dT%H:%M:%S.%fZ')
228
+ except ValueError:
229
+ created_dated = datetime.strptime(sample_data['create'],'%Y-%m-%dT%H:%M:%SZ')
220
230
  if created_dated < threshold_2023 and (
221
231
  'collection date' in error or
222
232
  'geographic location (country and/or sea)' in error
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.4
2
+ Name: eva_sub_cli
3
+ Version: 0.4.10
4
+ Summary: EBI EVA - validation and submission command line tool
5
+ Classifier: Development Status :: 5 - Production/Stable
6
+ Classifier: Environment :: Console
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Natural Language :: English
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Classifier: Operating System :: MacOS :: MacOS X
11
+ Classifier: Programming Language :: Python :: 3.6
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
17
+ Classifier: Topic :: Communications :: File Sharing
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Requires-Python: >=3.6
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: ebi_eva_common_pyutils==0.*,>=0.7.3
23
+ Requires-Dist: jinja2==3.*,>=3.0.0
24
+ Requires-Dist: jsonschema==4.*
25
+ Requires-Dist: openpyxl==3.*
26
+ Requires-Dist: pyyaml==6.*
27
+ Requires-Dist: requests==2.*
28
+ Requires-Dist: packaging==24.*
29
+ Requires-Dist: setuptools-scm
30
+ Dynamic: license-file
31
+
32
+ # eva-sub-cli
33
+
34
+ Please view our [documentation website](https://ebivariation.github.io/eva-sub-cli) for help installing and using eva-sub-cli.
@@ -7,13 +7,20 @@ requirements.txt
7
7
  setup.cfg
8
8
  setup.py
9
9
  .github/workflows/publish.yml
10
+ .github/workflows/publish_docs.yml
10
11
  .github/workflows/publish_packages.yml
11
12
  .github/workflows/tests.yml
12
13
  .github/workflows/trigger-eva-sub-cli-integration-tests.yml
13
14
  conda/build.sh
14
15
  conda/meta.yaml
15
16
  docker/Dockerfile
16
- docs/Getting_Started_with_eva_sub_cli.md
17
+ docs/README.md
18
+ docs/_config.yml
19
+ docs/how_to_submit.md
20
+ docs/input_file_overview.md
21
+ docs/installation.md
22
+ docs/using_nextflow.md
23
+ docs/validation_overview.md
17
24
  eva_sub_cli/__init__.py
18
25
  eva_sub_cli/_version.py
19
26
  eva_sub_cli/auth.py
@@ -1,6 +1,8 @@
1
1
  from unittest import TestCase
2
2
  from unittest.mock import patch
3
+ from requests import HTTPError, Response
3
4
 
5
+ import pytest
4
6
  from ebi_eva_common_pyutils.biosamples_communicators import NoAuthHALCommunicator
5
7
 
6
8
  from eva_sub_cli.semantic_metadata import SemanticMetadataChecker
@@ -11,7 +13,8 @@ metadata = {
11
13
  {"bioSampleAccession": "SAME00002"},
12
14
  {"bioSampleAccession": "SAME00003"},
13
15
  {"bioSampleAccession": "SAME00004"},
14
- {"bioSampleAccession": "SAME00005"}
16
+ {"bioSampleAccession": "SAME00005"},
17
+ {"bioSampleAccession": "SAME00006"}
15
18
  ]
16
19
  }
17
20
  valid_sample = {
@@ -50,6 +53,15 @@ old_invalid_sample = {
50
53
  }
51
54
  }
52
55
 
56
+ old_invalid_sample2 = {
57
+ 'accession': 'SAME00005',
58
+ 'name': 'sample4',
59
+ "create": "2011-10-10T08:45:15Z",
60
+ 'characteristics': {
61
+ 'organism': [{'text': 'Viridiplantae'}]
62
+ }
63
+ }
64
+
53
65
 
54
66
  class TestSemanticMetadata(TestCase):
55
67
 
@@ -62,7 +74,7 @@ class TestSemanticMetadata(TestCase):
62
74
  }
63
75
  checker = SemanticMetadataChecker(metadata)
64
76
  with patch('eva_sub_cli.semantic_metadata.download_xml_from_ena') as m_ena_download:
65
- m_ena_download.side_effect = [True, True, Exception('problem downloading')]
77
+ m_ena_download.side_effect = [True, True, HTTPError('problem downloading', response=Response())]
66
78
  checker.check_all_project_accessions()
67
79
  self.assertEqual(checker.errors, [
68
80
  {'property': '/project/childProjects/1', 'description': 'Project PRJEBNA does not exist in ENA or is private'}
@@ -170,7 +182,7 @@ class TestSemanticMetadata(TestCase):
170
182
  def test_check_existing_biosamples_with_checklist(self):
171
183
  checker = SemanticMetadataChecker(metadata)
172
184
  with patch.object(SemanticMetadataChecker, '_get_biosample',
173
- side_effect=[valid_sample, ValueError, invalid_sample1, invalid_sample2, old_invalid_sample]) as m_get_sample:
185
+ side_effect=[valid_sample, ValueError, invalid_sample1, invalid_sample2, old_invalid_sample, old_invalid_sample2]) as m_get_sample:
174
186
  checker.check_existing_biosamples()
175
187
  self.assertEqual(
176
188
  checker.errors[0],
@@ -196,7 +208,7 @@ class TestSemanticMetadata(TestCase):
196
208
  def test_check_existing_biosamples(self):
197
209
  checker = SemanticMetadataChecker(metadata, sample_checklist=None)
198
210
  with patch.object(NoAuthHALCommunicator, 'follows_link',
199
- side_effect=[valid_sample, ValueError, invalid_sample1, invalid_sample2, old_invalid_sample]) as m_follows_link:
211
+ side_effect=[valid_sample, ValueError, invalid_sample1, invalid_sample2, old_invalid_sample, old_invalid_sample2]) as m_follows_link:
200
212
  checker.check_existing_biosamples()
201
213
  self.assertEqual(checker.errors, [
202
214
  {'description': 'SAME00002 does not exist or is private','property': '/sample/1/bioSampleAccession'},
@@ -204,6 +216,17 @@ class TestSemanticMetadata(TestCase):
204
216
  {'description': 'Existing sample SAME00004 does not have a valid collection date', 'property': '/sample/3/bioSampleAccession'},
205
217
  {'description': 'Existing sample SAME00004 does not have a valid geographic location', 'property': '/sample/3/bioSampleAccession'}])
206
218
 
219
+ @pytest.mark.skip(reason='Contact BioSample API')
220
+ def test_check_existing_real_biosamples(self):
221
+ metadata = {
222
+ "sample": [
223
+ {"bioSampleAccession": "SAMN01894452"}
224
+ ]
225
+ }
226
+ checker = SemanticMetadataChecker(metadata, sample_checklist=None)
227
+ checker.check_existing_biosamples()
228
+ print(checker.errors)
229
+
207
230
  def test_check_analysis_alias_coherence(self):
208
231
  metadata = {
209
232
  "analysis": [