Skip to content

Commit

Permalink
VCF validator does not output the database anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
tcezard committed Oct 29, 2024
1 parent 850d0dc commit 042dacc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions eva_sub_cli/nextflow/validation.nf
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,14 @@ 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

"""
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
"""
}

Expand Down
3 changes: 1 addition & 2 deletions eva_sub_cli/validators/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
4 changes: 2 additions & 2 deletions tests/test_docker_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 042dacc

Please sign in to comment.