diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index c721948..7aaeb19 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -50,7 +50,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + pip install nf-core - name: Run nf-core lint env: diff --git a/conf/modules.config b/conf/modules.config index e5725aa..f26b933 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -97,6 +97,15 @@ process { mode: params.publish_dir_mode ] } + withName: BCFTOOLS_VIEW_SUBSET { + ext.prefix = { vcf.baseName } + ext.args = {"--output-type z --samples 'QUERY'" } + publishDir = [ + path: {"${params.outdir}/${meta.id}/test"}, + pattern: "*{.test}", + mode: params.publish_dir_mode + ] + } withName: SURVIVOR_STATS { ext.prefix = {"${meta.id}.${meta.vartype}"} publishDir = [ @@ -149,7 +158,6 @@ process { } withName: "RTGTOOLS_VCFEVAL" { ext.prefix = {"${meta.id}.${params.sample}.${meta.vartype}"} - ext.args = {params.preprocess.contains("prepy") ? "--sample 'truthHG002,QUERY'" : "" } //ext.args = {"--ref-overlap --all-record --output-mode ga4gh"} ext.when = { params.method.split(',').contains('rtgtools') } publishDir = [ diff --git a/subworkflows/local/small_germline_benchmark.nf b/subworkflows/local/small_germline_benchmark.nf index 19ebee9..9114aac 100644 --- a/subworkflows/local/small_germline_benchmark.nf +++ b/subworkflows/local/small_germline_benchmark.nf @@ -7,6 +7,7 @@ params.options = [:] include { RTGTOOLS_FORMAT } from '../../modules/nf-core/rtgtools/format/main' addParams( options: params.options ) include { RTGTOOLS_VCFEVAL } from '../../modules/nf-core/rtgtools/vcfeval/main' addParams( options: params.options ) include { HAPPY_HAPPY } from '../../modules/nf-core/happy/happy/main' addParams( options: params.options ) +include { BCFTOOLS_VIEW as BCFTOOLS_VIEW_SUBSET } from '../../modules/nf-core/bcftools/view/main' addParams( options: params.options ) workflow SMALL_GERMLINE_BENCHMARK { take: @@ -33,11 +34,27 @@ workflow SMALL_GERMLINE_BENCHMARK { versions = versions.mix(RTGTOOLS_FORMAT.out.versions) sdf = RTGTOOLS_FORMAT.out.sdf } + test_ch = input_ch.map { it -> tuple(it[0], it[1], [2]) } + if (params.preprocess.contains("prepy")){ + // + // MODULE: BCFTOOLS_VIEW + // + BCFTOOLS_VIEW_SUBSET( + input_ch.map { it -> tuple(it[0], it[1], it[2]) }, + [],[],[] + ) + versions = versions.mix(BCFTOOLS_VIEW_SUBSET.out.versions) + + BCFTOOLS_VIEW_SUBSET.out.vcf.map{it -> tuple(it[0], it[1], [])}.set{test_ch} + } + + truth_ch = input_ch.map { it -> tuple(it[0], it[3], it[4], it[5], []) } + // // MODULE: RTGTOOLS_VCFEVAL // RTGTOOLS_VCFEVAL( - input_ch.map { it -> tuple(it[0], it[1], it[2], it[3], it[4], it[5], []) }, + test_ch.join(truth_ch), sdf ) versions = versions.mix(RTGTOOLS_VCFEVAL.out.versions) diff --git a/subworkflows/local/sv_germline_benchmark.nf b/subworkflows/local/sv_germline_benchmark.nf index 39806b4..ef2c711 100644 --- a/subworkflows/local/sv_germline_benchmark.nf +++ b/subworkflows/local/sv_germline_benchmark.nf @@ -36,6 +36,7 @@ workflow SV_GERMLINE_BENCHMARK { fasta, fai ) + versions = versions.mix(TRUVARI_PHAB.out.versions) } // // MODULE: TRUVARI_BENCH @@ -112,9 +113,12 @@ workflow SV_GERMLINE_BENCHMARK { TABIX_BGZIP_QUERY( input_ch.map{it -> tuple(it[0], it[1])} ) + versions = versions.mix(TABIX_BGZIP_QUERY.out.versions) + TABIX_BGZIP_TRUTH( input_ch.map{it -> tuple(it[0], it[3])} ) + versions = versions.mix(TABIX_BGZIP_TRUTH.out.versions) bed = input_ch.map{it -> tuple(it[0], it[5])} // diff --git a/subworkflows/local/vcf_variant_deduplication.nf b/subworkflows/local/vcf_variant_deduplication.nf index b7a93b2..b921b92 100644 --- a/subworkflows/local/vcf_variant_deduplication.nf +++ b/subworkflows/local/vcf_variant_deduplication.nf @@ -31,10 +31,12 @@ workflow VCF_VARIANT_DEDUPLICATION { BCFTOOLS_SORT( BCFTOOLS_DEDUP.out.vcf ) + versions = versions.mix(BCFTOOLS_SORT.out.versions) TABIX_TABIX( BCFTOOLS_SORT.out.vcf ) + versions = versions.mix(TABIX_TABIX.out.versions) BCFTOOLS_SORT.out.vcf.join(TABIX_TABIX.out.tbi, by:0) .set{ch_vcf}