eva-sub-cli 0.5.0__tar.gz → 0.5.1__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.
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/.github/workflows/tests.yml +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/PKG-INFO +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docs/how_to_submit.md +15 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docs/input_file_overview.md +9 -9
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docs/validation_overview.md +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/_version.py +3 -3
- eva_sub_cli-0.5.1/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
- eva_sub_cli-0.5.1/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
- eva_sub_cli-0.5.1/eva_sub_cli/exceptions/submission_upload_exception.py +5 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/cli.py +22 -9
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/file_validation.html +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/report.html +42 -14
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/shallow_validation.html +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/file_validation.txt +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/report.txt +31 -7
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/shallow_validation.txt +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/nextflow/validation.nf +35 -21
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/orchestrator.py +8 -7
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/report.py +5 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/submission_ws.py +9 -4
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/submit.py +2 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/validators/docker_validator.py +8 -5
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/validators/native_validator.py +6 -3
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/validators/validator.py +169 -83
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli.egg-info/PKG-INFO +1 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli.egg-info/SOURCES.txt +4 -1
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/expected_report_metadata_json.html +7 -7
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/expected_report_metadata_json.txt +7 -7
- eva_sub_cli-0.5.1/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.html +142 -0
- eva_sub_cli-0.5.1/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.txt +44 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/expected_report_metadata_xlsx.html +7 -7
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/expected_report_metadata_xlsx.txt +7 -7
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.html +7 -7
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt +7 -7
- eva_sub_cli-0.5.1/tests/resources/validation_reports/validation_output/other_validations/input_passed_trim_down.yml +3 -0
- eva_sub_cli-0.5.1/tests/test_cli.py +116 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_orchestrator.py +15 -11
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_report.py +67 -6
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_submit.py +2 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_validator.py +182 -12
- eva_sub_cli-0.5.0/.github/workflows/publish_packages.yml +0 -45
- eva_sub_cli-0.5.0/eva_sub_cli/etc/EVA_Submission_Example.xlsx +0 -0
- eva_sub_cli-0.5.0/eva_sub_cli/etc/EVA_Submission_template.xlsx +0 -0
- eva_sub_cli-0.5.0/tests/test_cli.py +0 -67
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/.github/workflows/publish.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/.github/workflows/publish_docs.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/.github/workflows/trigger-eva-sub-cli-integration-tests.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/.gitignore +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/LICENSE +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/README.md +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/conda/build.sh +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/conda/meta.yaml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docker/Dockerfile +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docs/README.md +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docs/_config.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docs/installation.md +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/docs/using_nextflow.md +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/__init__.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/auth.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/date_utils.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/etc/eva-biosamples.json +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/etc/eva_logo.png +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/etc/eva_schema.json +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/etc/spreadsheet2json_conf.yaml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/etc/spreadsheet2json_conf_V2.yaml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/exceptions/__init__.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/exceptions/invalid_file_type_exception.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/exceptions/metadata_template_version_exception.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/exceptions/submission_not_found_exception.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/exceptions/submission_status_exception.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/__init__.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/check_fasta_insdc.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/check_metadata_semantics.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/evidence_type_checker.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/samples_checker.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/trim_down.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/executables/xlsx2json.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/file_utils.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/fasta_check.html +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/metadata_validation.html +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/project_details.html +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/sample_name_check.html +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/fasta_check.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/metadata_validation.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/project_details.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/sample_name_check.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/metadata.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/semantic_metadata.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/utils.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/validators/__init__.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/validators/validation_results_parsers.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli.egg-info/dependency_links.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli.egg-info/entry_points.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli.egg-info/requires.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli.egg-info/top_level.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/pyproject.toml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/pytest.ini +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/requirements.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/setup.cfg +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/setup.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/build_and_test_docker_locally.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/ignore_test_nextflow_validation.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_Docker_Test.xlsx +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test.json +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test.xlsx +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test_V2.xlsx +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test_fails.xlsx +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test_version_missing.xlsx +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test_with_asm_report.json +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test_with_project_accession.json +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/EVA_Submission_test_with_project_accession.xlsx +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/assembly_check/invalid.vcf.assembly_check.log +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/assembly_check/invalid.vcf.text_assembly_report.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/assembly_reports/input_passed.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/fasta_files/Saccharomyces_cerevisiae_I.fa +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/fasta_files/input_passed.fa +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/fasta_files/multi_seq.fa +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/metadata_with_filename.json +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/sample_checker/example1.vcf.gz +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/sample_checker/example2.vcf +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/sample_checker/example3.vcf +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/sample_checker/metadata.json +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.assembly_check.log +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.text_assembly_report.1680102476700.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/assembly_check/input_passed.vcf.valid_assembly_report.1680102476700.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/other_validations/evidence_type_checker.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/other_validations/input_passed.fa_check.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/other_validations/metadata_conversion_errors.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/other_validations/metadata_semantic_check.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/other_validations/sample_checker.yml +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.db +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.errors.1680102476854.txt +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/validation_reports/validation_output/vcf_format/input_passed.vcf.vcf_format.log +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/vcf_files/example2.vcf.gz +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/resources/vcf_files/input_passed.vcf +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_auth.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_check_fasta_insdc.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_docker_validator.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_evidence_type_checker.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_file_utils.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_metadata.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_samples_checker.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_semantic_metadata.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_trim_down.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_utils.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_validaton_results_parsers.py +0 -0
- {eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/tests/test_xlsx2json.py +0 -0
|
@@ -65,6 +65,21 @@ If you are working with large VCF files and find that validation takes a very lo
|
|
|
65
65
|
argument `--shallow` to the command, which will validate only the first 10,000 lines in each VCF. Note that running
|
|
66
66
|
shallow validation will **not** be sufficient for actual submission but will allow you to identify most validation concerns without long run time.
|
|
67
67
|
|
|
68
|
+
### Validation tasks
|
|
69
|
+
To run only a subset of the validation steps, you can use the `--validation_tasks` argument.
|
|
70
|
+
This can be useful if you want to avoid re-running long-running validations that have already passed.
|
|
71
|
+
Note that all validation tasks must pass in order to submit. The report will aggregate the results of previous runs and new ones.
|
|
72
|
+
The possible tasks are:
|
|
73
|
+
* `vcf_check` - includes syntax validation and other checks on VCF files
|
|
74
|
+
* `assembly_check` - includes all checks involving the FASTA file
|
|
75
|
+
* `metadata_check` - includes syntactic and semantic checks on metadata
|
|
76
|
+
* `sample_check` - includes sample coherence checks between VCF files and metadata
|
|
77
|
+
|
|
78
|
+
For example, to run only `vcf_check` and `sample_check`:
|
|
79
|
+
```shell
|
|
80
|
+
eva-sub-cli.py --metadata_xlsx <metadata file> --submission_dir <submission directory> --validation_tasks vcf_check sample_check
|
|
81
|
+
```
|
|
82
|
+
|
|
68
83
|
### VCF files and reference FASTA
|
|
69
84
|
These can be provided either in the metadata file directly, or on the command line using the `--vcf_files` and
|
|
70
85
|
`--reference_fasta` options. Note that if you are using more than one reference FASTA, you **cannot** use the command
|
|
@@ -34,12 +34,12 @@ Body: The body of the VCF file contains the actual variant data, with each row r
|
|
|
34
34
|
# Metadata Spreadsheet
|
|
35
35
|
|
|
36
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
|
|
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.
|
|
37
|
+
The spreadsheet is organized into editable tabs, designed for metadata entry, and non-editable helper tabs, which offer detailed explanations and guidance for each column. Users are required to complete all relevant sections within the editable tabs. Mandatory fields in each section are indicated in bold to highlight essential information that must be provided for a valid submission. However, users are strongly encouraged to provide as much additional information as possible to enhance the completeness and usefulness of the metadata.
|
|
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. If you are submitting to an existing project, you can skip the other details and just provide the project accession and analyses will be linked to that project. In case of a new project, please provide the relevant details 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. |
|
|
@@ -17,7 +17,7 @@ Key points to note before validating your metadata spreadsheet with the eva-sub-
|
|
|
17
17
|
|
|
18
18
|
- Please do not change the existing structure of the spreadsheet
|
|
19
19
|
- Ensure all mandatory columns (marked in bold) are filled.
|
|
20
|
-
- Pre-registered samples must be released and not kept in private status
|
|
20
|
+
- Pre-registered project and samples must be released and not kept in private status
|
|
21
21
|
- Sample names in the spreadsheet must match those in the VCF file.
|
|
22
22
|
- Analysis aliases must match across the sheets (Analysis, Sample, and File sheets).
|
|
23
23
|
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.5.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 5,
|
|
31
|
+
__version__ = version = '0.5.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 5, 1)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g8a5f488cb'
|
|
Binary file
|
|
Binary file
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
from eva_sub_cli.exceptions.submission_not_found_exception import SubmissionNotFoundException
|
|
7
|
-
from eva_sub_cli.exceptions.submission_status_exception import SubmissionStatusException
|
|
3
|
+
from requests import HTTPError
|
|
4
|
+
|
|
5
|
+
from eva_sub_cli.exceptions.submission_upload_exception import SubmissionUploadException
|
|
8
6
|
|
|
9
7
|
if not sys.warnoptions:
|
|
10
8
|
import warnings
|
|
11
|
-
|
|
12
9
|
warnings.simplefilter("ignore")
|
|
13
10
|
|
|
14
11
|
import logging
|
|
@@ -16,9 +13,15 @@ import os
|
|
|
16
13
|
from argparse import ArgumentParser
|
|
17
14
|
from ebi_eva_common_pyutils.logger import logging_config
|
|
18
15
|
|
|
16
|
+
import eva_sub_cli
|
|
19
17
|
from eva_sub_cli import orchestrator
|
|
20
|
-
from eva_sub_cli.
|
|
18
|
+
from eva_sub_cli.exceptions.metadata_template_version_exception import MetadataTemplateVersionException, \
|
|
19
|
+
MetadataTemplateVersionNotFoundException
|
|
20
|
+
from eva_sub_cli.exceptions.submission_status_exception import SubmissionStatusException
|
|
21
|
+
from eva_sub_cli.exceptions.submission_not_found_exception import SubmissionNotFoundException
|
|
21
22
|
from eva_sub_cli.file_utils import is_submission_dir_writable, DirLockError, DirLock
|
|
23
|
+
from eva_sub_cli.orchestrator import VALIDATE, SUBMIT, DOCKER, NATIVE
|
|
24
|
+
from eva_sub_cli.validators.validator import ALL_VALIDATION_TASKS
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
def validate_command_line_arguments(args, argparser):
|
|
@@ -93,6 +96,9 @@ def parse_args(cmd_line_args):
|
|
|
93
96
|
help='Select a task to perform (default SUBMIT). VALIDATE will run the validation'
|
|
94
97
|
' regardless of the outcome of previous runs. SUBMIT will run validate only if'
|
|
95
98
|
' the validation was not performed successfully before and then run the submission.')
|
|
99
|
+
argparser.add_argument('--validation_tasks', nargs='+', choices=ALL_VALIDATION_TASKS, default=ALL_VALIDATION_TASKS,
|
|
100
|
+
type=str.lower, help='Select only a subset of the validation tasks to run. Note that all '
|
|
101
|
+
'tasks need to be successful for the validation to pass')
|
|
96
102
|
argparser.add_argument('--executor', choices=[DOCKER, NATIVE], default=NATIVE, type=str.lower,
|
|
97
103
|
help='Select the execution type for running validation (default native)')
|
|
98
104
|
credential_group = argparser.add_argument_group('Credentials', 'Specify the ENA Webin credentials you want to use '
|
|
@@ -125,7 +131,6 @@ def main():
|
|
|
125
131
|
|
|
126
132
|
try:
|
|
127
133
|
# lock the submission directory
|
|
128
|
-
|
|
129
134
|
with DirLock(os.path.join(args.submission_dir)) as lock:
|
|
130
135
|
# Create the log file
|
|
131
136
|
logging_config.add_file_handler(os.path.join(args.submission_dir, 'eva_submission.log'), logging.DEBUG)
|
|
@@ -151,7 +156,15 @@ def main():
|
|
|
151
156
|
except MetadataTemplateVersionNotFoundException as mte:
|
|
152
157
|
print(mte)
|
|
153
158
|
exit_status = 70
|
|
159
|
+
except SubmissionUploadException as sue:
|
|
160
|
+
print(sue)
|
|
161
|
+
exit_status = 71
|
|
162
|
+
except HTTPError as http_err:
|
|
163
|
+
print(http_err)
|
|
164
|
+
if http_err.response is not None and http_err.response.text:
|
|
165
|
+
print(http_err.response.text)
|
|
166
|
+
exit_status = 72
|
|
154
167
|
except Exception as ex:
|
|
155
168
|
print(ex)
|
|
156
|
-
exit_status =
|
|
169
|
+
exit_status = 73
|
|
157
170
|
return exit_status
|
{eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/file_validation.html
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
{% macro file_validation_report(validation_results, file_name) -%}
|
|
3
|
-
{% for check_type, check_per_file in validation_results.items() %}
|
|
3
|
+
{% for check_type, check_per_file in validation_results.items() if check_type not in ["trim_down", "version"] %}
|
|
4
4
|
{% set result = check_per_file.get(file_name, {}) %}
|
|
5
5
|
{% if check_type == "assembly_check" %}
|
|
6
6
|
{{ assembly_check(result) }}
|
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
{% from 'metadata_validation.html' import metadata_validation_report %}
|
|
7
7
|
{% from 'shallow_validation.html' import optional_shallow_validation_report %}
|
|
8
8
|
|
|
9
|
+
{% macro validation_not_run_yet_message(text="Process not run yet") %}
|
|
10
|
+
{% set icon = "⏸" %} {# pause symbol ⏸ #}
|
|
11
|
+
{% set row_class = "report-section info" %}
|
|
12
|
+
{% set expand_icon = "" %}
|
|
13
|
+
<div class='{{ row_class }}'><span class="expand_icon">{{ expand_icon }}</span> {{ icon }} {{ text }}</div>
|
|
14
|
+
{% endmacro %}
|
|
15
|
+
|
|
9
16
|
<html lang="EN">
|
|
10
17
|
<head>
|
|
11
18
|
<meta charset="UTF-8">
|
|
@@ -63,7 +70,12 @@
|
|
|
63
70
|
Ensures that required fields are present and values are formatted correctly.
|
|
64
71
|
For requirements, please refer to the <a href="https://www.ebi.ac.uk/eva/?Submit-Data" target=”_blank”>EVA website</a>.
|
|
65
72
|
</div>
|
|
66
|
-
{
|
|
73
|
+
{% set run_status = validation_results.get('metadata_check', {}).get('run_status', '') %}
|
|
74
|
+
{% if run_status %}
|
|
75
|
+
{{ metadata_validation_report(validation_results) }}
|
|
76
|
+
{% else %}
|
|
77
|
+
{{ validation_not_run_yet_message() }}
|
|
78
|
+
{% endif %}
|
|
67
79
|
</section>
|
|
68
80
|
|
|
69
81
|
<section>
|
|
@@ -72,12 +84,17 @@
|
|
|
72
84
|
Checks whether each file is compliant with the <a href="http://samtools.github.io/hts-specs/VCFv4.4.pdf" target=”_blank”>VCF specification</a>.
|
|
73
85
|
Also checks whether the variants' reference alleles match against the reference assembly.
|
|
74
86
|
</div>
|
|
75
|
-
{%
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
{% set run_status = validation_results.get('vcf_check', {}).get('run_status', '') %}
|
|
88
|
+
{% if run_status %}
|
|
89
|
+
{% for file_name in vcf_files %}
|
|
90
|
+
{% if file_name != "pass"%}
|
|
91
|
+
<h3>{{ file_name }}</h3>
|
|
92
|
+
{{ file_validation_report(validation_results, file_name) }}
|
|
93
|
+
{% endif %}
|
|
94
|
+
{% endfor %}
|
|
95
|
+
{% else %}
|
|
96
|
+
{{ validation_not_run_yet_message() }}
|
|
97
|
+
{% endif %}
|
|
81
98
|
</section>
|
|
82
99
|
|
|
83
100
|
<section>
|
|
@@ -85,7 +102,13 @@
|
|
|
85
102
|
<div class="description">
|
|
86
103
|
Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names.
|
|
87
104
|
</div>
|
|
88
|
-
{
|
|
105
|
+
{% set run_status = validation_results.get('sample_check', {}).get('run_status', '') %}
|
|
106
|
+
{% if run_status %}
|
|
107
|
+
{{ sample_name_check_report(validation_results)}}
|
|
108
|
+
{% else %}
|
|
109
|
+
{{ validation_not_run_yet_message() }}
|
|
110
|
+
|
|
111
|
+
{% endif %}
|
|
89
112
|
</section>
|
|
90
113
|
|
|
91
114
|
<section>
|
|
@@ -94,12 +117,17 @@
|
|
|
94
117
|
Checks that the reference sequences in the FASTA file used to call the variants are accessioned in INSDC.
|
|
95
118
|
Also checks if the reference assembly accession in the metadata matches the one determined from the FASTA file.
|
|
96
119
|
</div>
|
|
97
|
-
{%
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
120
|
+
{% set run_status = validation_results.get('fasta_check', {}).get('run_status', '') %}
|
|
121
|
+
{% if run_status %}
|
|
122
|
+
{% for file_name in fasta_files %}
|
|
123
|
+
{% if file_name != "pass"%}
|
|
124
|
+
<h3>{{ file_name }}</h3>
|
|
125
|
+
{{ fasta_check_report(validation_results, file_name) }}
|
|
126
|
+
{% endif %}
|
|
127
|
+
{% endfor %}
|
|
128
|
+
{% else %}
|
|
129
|
+
{{ validation_not_run_yet_message() }}
|
|
130
|
+
{% endif %}
|
|
103
131
|
</section>
|
|
104
132
|
|
|
105
133
|
<script>
|
{eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/html/shallow_validation.html
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{% macro optional_shallow_validation_report(validation_results) -%}
|
|
3
3
|
{% set results = validation_results.get('shallow_validation', {}) %}
|
|
4
4
|
|
|
5
|
-
{% if
|
|
5
|
+
{% if validation_results.get('trim_down') %}
|
|
6
6
|
<section>
|
|
7
7
|
<div class="report-section fail collapsible"> <span class="expand_icon">▶</span>
|
|
8
8
|
❌ <b>You requested to run the shallow validation, please run full validation before submitting the data</b>
|
{eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/file_validation.txt
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
{% macro file_validation_report(validation_results, file_name) -%}
|
|
3
|
-
{% for check_type, check_per_file in validation_results.items() %}
|
|
3
|
+
{% for check_type, check_per_file in validation_results.items() if check_type not in ["trim_down", "version"] %}
|
|
4
4
|
{% set result = check_per_file.get(file_name, {}) %}
|
|
5
5
|
{% if check_type == "assembly_check" %}
|
|
6
6
|
{{ assembly_check(result) }}
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
{% from 'metadata_validation.txt' import metadata_validation_report %}
|
|
6
6
|
{% from 'shallow_validation.txt' import optional_shallow_validation_report %}
|
|
7
7
|
|
|
8
|
+
{% macro validation_not_run_yet_message(text="Process not run yet") -%}
|
|
9
|
+
{% set icon = "\u23F8" %}
|
|
10
|
+
{{ icon }} {{ text }}
|
|
11
|
+
{%- endmacro %}
|
|
12
|
+
|
|
8
13
|
VALIDATION REPORT
|
|
9
14
|
eva-sub-cli v{{cli_version}}
|
|
10
15
|
|
|
@@ -23,27 +28,41 @@ METADATA VALIDATION RESULTS
|
|
|
23
28
|
Ensures that required fields are present and values are formatted correctly.
|
|
24
29
|
For requirements, please refer to the EVA website (https://www.ebi.ac.uk/eva/?Submit-Data).
|
|
25
30
|
|
|
26
|
-
{
|
|
27
|
-
|
|
31
|
+
{% set run_status = validation_results.get('metadata_check', {}).get('run_status', '') %}
|
|
32
|
+
{% if run_status %}
|
|
33
|
+
{{ metadata_validation_report(validation_results) }}
|
|
34
|
+
{% else %}
|
|
35
|
+
{{ validation_not_run_yet_message() }}
|
|
36
|
+
{% endif %}
|
|
28
37
|
-
|
|
29
38
|
|
|
30
39
|
VCF VALIDATION RESULTS
|
|
31
40
|
Checks whether each file is compliant with the VCF specification (http://samtools.github.io/hts-specs/VCFv4.4.pdf).
|
|
32
41
|
Also checks whether the variants' reference alleles match against the reference assembly.
|
|
33
42
|
|
|
43
|
+
{% set run_status = validation_results.get('vcf_check', {}).get('run_status', '') %}
|
|
44
|
+
{% if run_status %}
|
|
34
45
|
{% for file_name in vcf_files %}
|
|
35
46
|
{% if file_name != "pass"%}
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
{{ file_name }}
|
|
48
|
+
{{ file_validation_report(validation_results, file_name) }}
|
|
38
49
|
{% endif %}
|
|
39
50
|
{% endfor %}
|
|
51
|
+
{% else %}
|
|
52
|
+
{{ validation_not_run_yet_message() }}
|
|
53
|
+
{% endif %}
|
|
40
54
|
|
|
41
55
|
-
|
|
42
56
|
|
|
43
57
|
SAMPLE NAME CONCORDANCE CHECK
|
|
44
58
|
Checks whether information in the metadata is concordant with that contained in the VCF files, in particular sample names.
|
|
45
59
|
|
|
46
|
-
{
|
|
60
|
+
{% set run_status = validation_results.get('sample_check', {}).get('run_status', '') %}
|
|
61
|
+
{% if run_status %}
|
|
62
|
+
{{ sample_name_check_report(validation_results) }}
|
|
63
|
+
{% else %}
|
|
64
|
+
{{ validation_not_run_yet_message() }}
|
|
65
|
+
{% endif %}
|
|
47
66
|
|
|
48
67
|
-
|
|
49
68
|
|
|
@@ -51,9 +70,14 @@ REFERENCE GENOME INSDC CHECK
|
|
|
51
70
|
Checks that the reference sequences in the FASTA file used to call the variants are accessioned in INSDC.
|
|
52
71
|
Also checks if the reference assembly accession in the metadata matches the one determined from the FASTA file.
|
|
53
72
|
|
|
73
|
+
{% set run_status = validation_results.get('fasta_check', {}).get('run_status', '') %}
|
|
74
|
+
{% if run_status %}
|
|
54
75
|
{% for file_name in fasta_files %}
|
|
55
76
|
{% if file_name != "pass"%}
|
|
56
|
-
|
|
57
|
-
|
|
77
|
+
{{ file_name }}
|
|
78
|
+
{{ fasta_check_report(validation_results, file_name) }}
|
|
58
79
|
{% endif %}
|
|
59
80
|
{% endfor %}
|
|
81
|
+
{% else %}
|
|
82
|
+
{{ validation_not_run_yet_message() }}
|
|
83
|
+
{% endif %}
|
{eva_sub_cli-0.5.0 → eva_sub_cli-0.5.1}/eva_sub_cli/jinja_templates/text/shallow_validation.txt
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% macro optional_shallow_validation_report(validation_results) -%}
|
|
2
2
|
|
|
3
3
|
{% set results = validation_results.get('shallow_validation', {}) %}
|
|
4
|
-
{% if
|
|
4
|
+
{% if validation_results.get('trim_down') %}
|
|
5
5
|
|
|
6
6
|
{{ "\u274C" }} You requested to run the shallow validation, please run full validation before submitting the data
|
|
7
7
|
{% for vcf_file in results.get('metrics') %}
|
|
@@ -7,6 +7,7 @@ def helpMessage() {
|
|
|
7
7
|
Validate a set of VCF files and metadata to check if they are valid to be submitted to EVA.
|
|
8
8
|
|
|
9
9
|
Inputs:
|
|
10
|
+
--tasks Which validation tasks to run
|
|
10
11
|
--vcf_files_mapping csv file with the mappings for vcf files, fasta and assembly report
|
|
11
12
|
--output_dir output_directory where the reports will be output
|
|
12
13
|
--metadata_json Json file describing the project, analysis, samples and files
|
|
@@ -15,6 +16,14 @@ def helpMessage() {
|
|
|
15
16
|
"""
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
// Values from validators.validator.ALL_VALIDATION_TASKS
|
|
20
|
+
VCF_CHECK = 'vcf_check'
|
|
21
|
+
ASSEMBLY_CHECK = 'assembly_check'
|
|
22
|
+
METADATA_CHECK = 'metadata_check'
|
|
23
|
+
SAMPLE_CHECK = 'sample_check'
|
|
24
|
+
|
|
25
|
+
// Default to running all tasks
|
|
26
|
+
params.tasks = [VCF_CHECK, ASSEMBLY_CHECK, METADATA_CHECK, SAMPLE_CHECK]
|
|
18
27
|
params.vcf_files_mapping = null
|
|
19
28
|
params.output_dir = null
|
|
20
29
|
params.metadata_json = null
|
|
@@ -59,7 +68,7 @@ conversion_configuration = "${schema_dir}/$params.conversion_configuration_name"
|
|
|
59
68
|
|
|
60
69
|
|
|
61
70
|
def joinBasePath(path) {
|
|
62
|
-
if (path){
|
|
71
|
+
if (path) {
|
|
63
72
|
return params.base_dir + '/' + path
|
|
64
73
|
}
|
|
65
74
|
return 'NO_FILE'
|
|
@@ -76,36 +85,41 @@ workflow {
|
|
|
76
85
|
file(joinBasePath(row.fasta)),
|
|
77
86
|
file(joinBasePath(row.report))
|
|
78
87
|
)}
|
|
79
|
-
if (params.shallow_validation){
|
|
88
|
+
if (params.shallow_validation) {
|
|
80
89
|
// create a smaller vcf and fasta then replace the channel
|
|
81
90
|
trim_down_vcf(vcf_and_ref_ch)
|
|
82
91
|
vcf_and_ref_ch = trim_down_vcf.out.vcf_and_ref
|
|
83
92
|
}
|
|
84
93
|
vcf_files = vcf_and_ref_ch.map{row -> row[0]}
|
|
85
94
|
fasta_to_vcfs = vcf_and_ref_ch.map{row -> tuple(row[1], row[0])}.groupTuple(by:0)
|
|
86
|
-
// VCF checks
|
|
87
|
-
check_vcf_valid(vcf_and_ref_ch)
|
|
88
|
-
check_vcf_reference(vcf_and_ref_ch)
|
|
89
|
-
|
|
90
|
-
generate_file_size_and_md5_digests(vcf_files)
|
|
91
|
-
collect_file_size_and_md5(generate_file_size_and_md5_digests.out.file_size_and_digest_info.collect())
|
|
92
|
-
|
|
93
95
|
|
|
94
96
|
// Metadata conversion
|
|
95
97
|
if (params.metadata_xlsx && !params.metadata_json){
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
convert_xlsx_2_json(joinBasePath(params.metadata_xlsx))
|
|
99
|
+
metadata_json = convert_xlsx_2_json.out.metadata_json
|
|
100
|
+
} else {
|
|
101
|
+
metadata_json = joinBasePath(params.metadata_json)
|
|
102
|
+
}
|
|
103
|
+
// File size and MD5
|
|
104
|
+
generate_file_size_and_md5_digests(vcf_files)
|
|
105
|
+
collect_file_size_and_md5(generate_file_size_and_md5_digests.out.file_size_and_digest_info.collect())
|
|
106
|
+
|
|
107
|
+
// Task-specific processing
|
|
108
|
+
if (params.tasks.contains(VCF_CHECK)) {
|
|
109
|
+
check_vcf_valid(vcf_and_ref_ch)
|
|
106
110
|
evidence_type_check(metadata_json, vcf_files.collect())
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
}
|
|
112
|
+
if (params.tasks.contains(ASSEMBLY_CHECK)) {
|
|
113
|
+
check_vcf_reference(vcf_and_ref_ch)
|
|
114
|
+
insdc_checker(metadata_json, fasta_to_vcfs)
|
|
115
|
+
}
|
|
116
|
+
if (params.tasks.contains(METADATA_CHECK)) {
|
|
117
|
+
metadata_json_validation(metadata_json)
|
|
118
|
+
metadata_semantic_check(metadata_json)
|
|
119
|
+
}
|
|
120
|
+
if (params.tasks.contains(SAMPLE_CHECK)) {
|
|
121
|
+
sample_name_concordance(metadata_json, vcf_files.collect())
|
|
122
|
+
}
|
|
109
123
|
}
|
|
110
124
|
|
|
111
125
|
|
|
@@ -28,7 +28,7 @@ from eva_sub_cli.submit import StudySubmitter, SUB_CLI_CONFIG_KEY_SUBMISSION_ID,
|
|
|
28
28
|
from eva_sub_cli.utils import get_project_title_from_ena
|
|
29
29
|
from eva_sub_cli.validators.docker_validator import DockerValidator
|
|
30
30
|
from eva_sub_cli.validators.native_validator import NativeValidator
|
|
31
|
-
from eva_sub_cli.validators.validator import READY_FOR_SUBMISSION_TO_EVA
|
|
31
|
+
from eva_sub_cli.validators.validator import READY_FOR_SUBMISSION_TO_EVA, ALL_VALIDATION_TASKS
|
|
32
32
|
|
|
33
33
|
VALIDATE = 'validate'
|
|
34
34
|
SUBMIT = 'submit'
|
|
@@ -279,8 +279,8 @@ def check_validation_required(tasks, sub_config, username=None, password=None):
|
|
|
279
279
|
|
|
280
280
|
|
|
281
281
|
def orchestrate_process(submission_dir, vcf_files, reference_fasta, metadata_json, metadata_xlsx,
|
|
282
|
-
tasks, executor,
|
|
283
|
-
**kwargs):
|
|
282
|
+
tasks, executor, validation_tasks=ALL_VALIDATION_TASKS, username=None, password=None,
|
|
283
|
+
shallow_validation=False, nextflow_config=None, **kwargs):
|
|
284
284
|
# load config
|
|
285
285
|
config_file_path = os.path.join(submission_dir, SUB_CLI_CONFIG_FILE)
|
|
286
286
|
sub_config = WritableConfig(config_file_path, version=__version__)
|
|
@@ -309,13 +309,14 @@ def orchestrate_process(submission_dir, vcf_files, reference_fasta, metadata_jso
|
|
|
309
309
|
if VALIDATE in tasks:
|
|
310
310
|
if executor == DOCKER:
|
|
311
311
|
validator = DockerValidator(vcf_files_mapping, submission_dir, project_title, metadata_json, metadata_xlsx,
|
|
312
|
-
metadata_xlsx_version,
|
|
313
|
-
submission_config=sub_config)
|
|
312
|
+
metadata_xlsx_version, validation_tasks=validation_tasks,
|
|
313
|
+
shallow_validation=shallow_validation, submission_config=sub_config)
|
|
314
314
|
# default to native execution
|
|
315
315
|
else:
|
|
316
316
|
validator = NativeValidator(vcf_files_mapping, submission_dir, project_title, metadata_json, metadata_xlsx,
|
|
317
|
-
metadata_xlsx_version,
|
|
318
|
-
submission_config=sub_config,
|
|
317
|
+
metadata_xlsx_version, validation_tasks=validation_tasks,
|
|
318
|
+
shallow_validation=shallow_validation, submission_config=sub_config,
|
|
319
|
+
nextflow_config=nextflow_config)
|
|
319
320
|
with validator:
|
|
320
321
|
validator.validate_and_report()
|
|
321
322
|
if not metadata_json:
|
|
@@ -17,12 +17,16 @@ def get_logo_data():
|
|
|
17
17
|
|
|
18
18
|
def generate_report(validation_results, validation_date, submission_dir, vcf_fasta_analysis_mapping, project_title,
|
|
19
19
|
consent_statement_required, subdir, template_file):
|
|
20
|
+
|
|
21
|
+
from eva_sub_cli.validators.validator import RUN_STATUS_KEY, PASS
|
|
22
|
+
|
|
20
23
|
results_for_report = {k: v for k, v in validation_results.items() if k != 'ready_for_submission_to_eva'}
|
|
21
24
|
vcf_files = sorted(set([file_name
|
|
22
25
|
for check in results_for_report if check in ["vcf_check", "assembly_check"]
|
|
23
26
|
for file_name in results_for_report[check]
|
|
27
|
+
if file_name not in {RUN_STATUS_KEY, PASS}
|
|
24
28
|
]))
|
|
25
|
-
fasta_files = sorted([file_name for file_name in results_for_report['fasta_check']])
|
|
29
|
+
fasta_files = sorted([file_name for file_name in results_for_report['fasta_check'] if file_name not in {RUN_STATUS_KEY, PASS}])
|
|
26
30
|
template = Environment(
|
|
27
31
|
loader=FileSystemLoader(os.path.join(current_dir, 'jinja_templates', subdir))
|
|
28
32
|
).get_template(template_file)
|
|
@@ -7,6 +7,7 @@ from retry import retry
|
|
|
7
7
|
|
|
8
8
|
from eva_sub_cli import SUBMISSION_WS_VAR
|
|
9
9
|
from eva_sub_cli.auth import get_auth
|
|
10
|
+
from eva_sub_cli.exceptions.submission_upload_exception import SubmissionUploadException
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class SubmissionWSClient(AppLogger):
|
|
@@ -43,10 +44,14 @@ class SubmissionWSClient(AppLogger):
|
|
|
43
44
|
|
|
44
45
|
def mark_submission_uploaded(self, submission_id, metadata_json):
|
|
45
46
|
response = requests.put(self._submission_uploaded_url(submission_id),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
response.
|
|
49
|
-
|
|
47
|
+
headers={'Accept': 'application/json', 'Authorization': 'Bearer ' + self.auth.token},
|
|
48
|
+
json=metadata_json)
|
|
49
|
+
if 400 <= response.status_code < 500:
|
|
50
|
+
raise SubmissionUploadException(f"There was an error in uploading the submission {submission_id}."
|
|
51
|
+
f"Status: {response.status_code}. Error: {response.text}")
|
|
52
|
+
else:
|
|
53
|
+
response.raise_for_status()
|
|
54
|
+
return response.json()
|
|
50
55
|
|
|
51
56
|
def initiate_submission(self):
|
|
52
57
|
response = requests.post(self._submission_initiate_url(), headers={'Accept': 'application/json',
|
|
@@ -57,6 +57,8 @@ class StudySubmitter(AppLogger):
|
|
|
57
57
|
|
|
58
58
|
submission_upload_url = self.sub_config[SUB_CLI_CONFIG_KEY_SUBMISSION_UPLOAD_URL]
|
|
59
59
|
|
|
60
|
+
self._upload_file(submission_upload_url, self.metadata_json_file)
|
|
61
|
+
|
|
60
62
|
for f in self.vcf_files:
|
|
61
63
|
self._upload_file(submission_upload_url, f)
|
|
62
64
|
|
|
@@ -7,12 +7,12 @@ import time
|
|
|
7
7
|
from ebi_eva_common_pyutils.logger import logging_config
|
|
8
8
|
from retry import retry
|
|
9
9
|
|
|
10
|
-
from eva_sub_cli.validators.validator import Validator
|
|
10
|
+
from eva_sub_cli.validators.validator import Validator, ALL_VALIDATION_TASKS
|
|
11
11
|
|
|
12
12
|
logger = logging_config.get_logger(__name__)
|
|
13
13
|
|
|
14
14
|
default_container_image = 'ebivariation/eva-sub-cli'
|
|
15
|
-
default_container_tag = 'v0.0.
|
|
15
|
+
default_container_tag = 'v0.0.8'
|
|
16
16
|
container_validation_dir = '/opt/vcf_validation'
|
|
17
17
|
container_validation_output_dir = 'vcf_validation_output'
|
|
18
18
|
|
|
@@ -20,11 +20,13 @@ container_validation_output_dir = 'vcf_validation_output'
|
|
|
20
20
|
class DockerValidator(Validator):
|
|
21
21
|
|
|
22
22
|
def __init__(self, mapping_file, submission_dir, project_title, metadata_json=None,
|
|
23
|
-
metadata_xlsx=None, metadata_xlsx_version=None,
|
|
24
|
-
|
|
23
|
+
metadata_xlsx=None, metadata_xlsx_version=None, validation_tasks=ALL_VALIDATION_TASKS,
|
|
24
|
+
shallow_validation=False, docker_path='docker', submission_config=None, container_image=None,
|
|
25
|
+
container_tag=None, container_name=None):
|
|
25
26
|
super().__init__(mapping_file, submission_dir, project_title, metadata_json=metadata_json,
|
|
26
27
|
metadata_xlsx=metadata_xlsx, metadata_xlsx_version=metadata_xlsx_version,
|
|
27
|
-
shallow_validation=shallow_validation,
|
|
28
|
+
validation_tasks=validation_tasks, shallow_validation=shallow_validation,
|
|
29
|
+
submission_config=submission_config)
|
|
28
30
|
self.docker_path = docker_path
|
|
29
31
|
submission_basename = re.sub('[^a-zA-Z0-9]', '', os.path.basename(submission_dir))
|
|
30
32
|
self.container_image = container_image or default_container_image
|
|
@@ -42,6 +44,7 @@ class DockerValidator(Validator):
|
|
|
42
44
|
docker_cmd = ''.join([
|
|
43
45
|
f"{self.docker_path} exec {self.container_name} nextflow run eva_sub_cli/nextflow/validation.nf ",
|
|
44
46
|
f"--base_dir {container_validation_dir} ",
|
|
47
|
+
f"--tasks {','.join(self.tasks)} "
|
|
45
48
|
f"--vcf_files_mapping {self.mapping_file} ",
|
|
46
49
|
f"--metadata_xlsx {self.metadata_xlsx} ",
|
|
47
50
|
f"--conversion_configuration_name {self._get_xlsx_conversion_configuration_name()} "
|