diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fd67f09..29543936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 1. Fail the pipeline when the sex determination failed. This will now prompt the user to add the sex to the samplesheet so the pipeline doesn't do any wrong assumptions 2. Fixed the Jasmine module output VCFs being empty when no variants have been merged. This file now contains the header of one of the input VCFs +3. AnnotSV VCF files are now sorted before trying to combine it with the VEP output. ## v0.2.0 - [19 July 2024] - Mighty Manneken Pis diff --git a/conf/modules.config b/conf/modules.config index 782f805f..ed24085e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -221,10 +221,15 @@ process { } withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV:BCFTOOLS_CONCAT\$" { - ext.prefix = "annotsv_annotated" + ext.prefix = "annotsv_annotated_unsorted" ext.args = "--output-type z --naive-force" } + withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV:BCFTOOLS_SORT\$" { + ext.prefix = "annotsv_annotated" + ext.args = "--output-type z --write-index=tbi" + } + withName: "^.*VCF_ANNOTATE_VEP_ANNOTSV:ENSEMBLVEP_VEP\$" { ext.prefix = {"${meta.id}.vep"} ext.args = {[ diff --git a/modules/local/bcftools/consensus_reheader/main.nf b/modules/local/bcftools/consensus_reheader/main.nf index 636f58f5..2483c1d3 100644 --- a/modules/local/bcftools/consensus_reheader/main.nf +++ b/modules/local/bcftools/consensus_reheader/main.nf @@ -23,7 +23,7 @@ process BCFTOOLS_CONSENSUS_REHEADER { def add_additional = additional_headers ? """ cat <<-EOF >> ${prefix}.temp.txt - ${additional_headers.join("\t\n")} + ${additional_headers.join("\n ")} EOF """ : "" diff --git a/subworkflows/local/vcf_annotate_vep_annotsv/main.nf b/subworkflows/local/vcf_annotate_vep_annotsv/main.nf index cc24bd79..724e09ec 100644 --- a/subworkflows/local/vcf_annotate_vep_annotsv/main.nf +++ b/subworkflows/local/vcf_annotate_vep_annotsv/main.nf @@ -11,6 +11,7 @@ include { TABIX_TABIX as TABIX_ANNOTSV } from '../../../modules/nf- include { TABIX_TABIX as TABIX_VEP } from '../../../modules/nf-core/tabix/tabix/main' include { BCFTOOLS_FILTER } from '../../../modules/nf-core/bcftools/filter/main' include { BCFTOOLS_CONCAT } from '../../../modules/nf-core/bcftools/concat/main' +include { BCFTOOLS_SORT } from '../../../modules/nf-core/bcftools/sort/main' workflow VCF_ANNOTATE_VEP_ANNOTSV { take: @@ -79,7 +80,8 @@ workflow VCF_ANNOTATE_VEP_ANNOTSV { } def val_additional_headers = [ - '##INFO=' ] BCFTOOLS_CONSENSUS_REHEADER( @@ -104,13 +106,13 @@ workflow VCF_ANNOTATE_VEP_ANNOTSV { ) ch_versions = ch_versions.mix(BCFTOOLS_CONCAT.out.versions.first()) - TABIX_ANNOTSV( + BCFTOOLS_SORT( BCFTOOLS_CONCAT.out.vcf ) - ch_versions = ch_versions.mix(TABIX_ANNOTSV.out.versions.first()) + ch_versions = ch_versions.mix(BCFTOOLS_SORT.out.versions.first()) - def ch_annotsv_output = BCFTOOLS_CONCAT.out.vcf - .join(TABIX_ANNOTSV.out.tbi, failOnDuplicate:true, failOnMismatch:true) + def ch_annotsv_output = BCFTOOLS_SORT.out.vcf + .join(BCFTOOLS_SORT.out.tbi, failOnDuplicate:true, failOnMismatch:true) ENSEMBLVEP_VEP( ch_vcfs,