From c469a2b35ed2e2948c9d3cbde5672143086b7e35 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Thu, 2 Jun 2022 20:32:00 +0200 Subject: [PATCH] Fux tests --- modules/gatk/realignertargetcreator/main.nf | 6 +++--- .../gatk/realignertargetcreator/main.nf | 19 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/modules/gatk/realignertargetcreator/main.nf b/modules/gatk/realignertargetcreator/main.nf index 866ff8a5..e356c826 100644 --- a/modules/gatk/realignertargetcreator/main.nf +++ b/modules/gatk/realignertargetcreator/main.nf @@ -9,7 +9,7 @@ process GATK_REALIGNERTARGETCREATOR { input: tuple val(meta), path(input), path(index) - path path(fasta) + path(fasta) path(fai) path(dict) path(known_vcf) @@ -25,7 +25,7 @@ process GATK_REALIGNERTARGETCREATOR { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def known = known_vcf ? "-known ${known_vcf}" : "" - if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + if ("$input" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!" def avail_mem = 3 if (!task.memory) { @@ -39,7 +39,7 @@ process GATK_REALIGNERTARGETCREATOR { -Xmx${avail_mem}g \\ -T RealignerTargetCreator \\ -nt ${task.cpus} \\ - -I ${bam} \\ + -I ${input} \\ -R ${fasta} \\ -o ${prefix}.intervals \\ ${known} \\ diff --git a/tests/modules/gatk/realignertargetcreator/main.nf b/tests/modules/gatk/realignertargetcreator/main.nf index 02e62d93..4b9f8eff 100644 --- a/tests/modules/gatk/realignertargetcreator/main.nf +++ b/tests/modules/gatk/realignertargetcreator/main.nf @@ -6,16 +6,13 @@ include { GATK_REALIGNERTARGETCREATOR } from '../../../../modules/gatk/realigner workflow test_gatk_realignertargetcreator { - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) - ] - reference = [ - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true), - file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true), - ] + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) - GATK_REALIGNERTARGETCREATOR ( input, reference, [] ) + GATK_REALIGNERTARGETCREATOR ( input, fasta, fai, dict, [] ) }