From 850d0dc4ee25d34ba43223d5fd58e9f254d72940 Mon Sep 17 00:00:00 2001 From: tcezard Date: Mon, 28 Oct 2024 17:40:20 +0000 Subject: [PATCH 1/2] Use new version of VCF validator --- conda/meta.yaml | 2 +- docker/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index b54c05a..613e562 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -22,7 +22,7 @@ requirements: - nextflow >=21.10.0 - python >=3.8 - nodejs >=10.19.1 - - vcf-validator >=0.9.7 + - vcf-validator >=0.10.0 - ebi-eva-common-pyutils >=0.6.1 - pyyaml - jinja2 diff --git a/docker/Dockerfile b/docker/Dockerfile index fb6093f..272a82c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.10 -ENV vcf_validator_version=0.9.7 +ENV vcf_validator_version=0.10.0 ENV NXF_VER=22.10.6 WORKDIR /opt From 042dacc87bd2a529217ee736e7d401804edc653d Mon Sep 17 00:00:00 2001 From: tcezard Date: Tue, 29 Oct 2024 19:54:50 +0000 Subject: [PATCH 2/2] VCF validator does not output the database anymore --- eva_sub_cli/nextflow/validation.nf | 3 +-- eva_sub_cli/validators/validator.py | 3 +-- tests/test_docker_validator.py | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/eva_sub_cli/nextflow/validation.nf b/eva_sub_cli/nextflow/validation.nf index 3d54489..dab8d6a 100644 --- a/eva_sub_cli/nextflow/validation.nf +++ b/eva_sub_cli/nextflow/validation.nf @@ -137,7 +137,6 @@ process check_vcf_valid { tuple path(vcf), path(fasta), path(report) output: - path "vcf_format/*.errors.*.db", emit: vcf_validation_db path "vcf_format/*.errors.*.txt", emit: vcf_validation_txt path "vcf_format/*.vcf_format.log", emit: vcf_validation_log @@ -145,7 +144,7 @@ process check_vcf_valid { trap 'if [[ \$? == 1 ]]; then exit 0; fi' EXIT mkdir -p vcf_format - $params.executable.vcf_validator -i $vcf -r database,text -o vcf_format --require-evidence > vcf_format/${vcf}.vcf_format.log 2>&1 + $params.executable.vcf_validator -i $vcf -r text -o vcf_format --require-evidence > vcf_format/${vcf}.vcf_format.log 2>&1 """ } diff --git a/eva_sub_cli/validators/validator.py b/eva_sub_cli/validators/validator.py index b5a0729..de1606d 100755 --- a/eva_sub_cli/validators/validator.py +++ b/eva_sub_cli/validators/validator.py @@ -225,9 +225,8 @@ def _collect_vcf_check_results(self,): vcf_check_log = self._vcf_check_log(vcf_name) vcf_check_text_report = self._vcf_check_text_report(vcf_name) - vcf_check_db_report = self._vcf_check_db_report(vcf_name) - if vcf_check_log and vcf_check_text_report and vcf_check_db_report: + if vcf_check_log and vcf_check_text_report: valid, warning_count, error_count, critical_count, error_list, critical_list = parse_vcf_check_report(vcf_check_text_report) else: valid, warning_count, error_count, critical_count, error_list, critical_list = (False, 0, 0, 1, [], ['Process failed']) diff --git a/tests/test_docker_validator.py b/tests/test_docker_validator.py index 25a9274..e2f53e5 100644 --- a/tests/test_docker_validator.py +++ b/tests/test_docker_validator.py @@ -101,9 +101,9 @@ def assert_validation_results(self, validator, expected_sample_checker, expected with open(vcf_format_log_file) as vcf_format_log_file: vcf_format_logs = vcf_format_log_file.readlines() self.assertEqual('[info] According to the VCF specification, the input file is valid\n', - vcf_format_logs[3]) + vcf_format_logs[2]) - text_report = vcf_format_logs[2].split(':')[1].strip() + text_report = vcf_format_logs[1].split(':')[1].strip() with open(os.path.join(validator.output_dir, text_report)) as text_report: text_report_content = text_report.readlines() self.assertEqual('According to the VCF specification, the input file is valid\n',