Fux tests

This commit is contained in:
James Fellows Yates 2022-06-02 20:32:00 +02:00
parent 28101149b6
commit c469a2b35e
2 changed files with 11 additions and 14 deletions

View file

@ -9,7 +9,7 @@ process GATK_REALIGNERTARGETCREATOR {
input: input:
tuple val(meta), path(input), path(index) tuple val(meta), path(input), path(index)
path path(fasta) path(fasta)
path(fai) path(fai)
path(dict) path(dict)
path(known_vcf) path(known_vcf)
@ -25,7 +25,7 @@ process GATK_REALIGNERTARGETCREATOR {
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
def known = known_vcf ? "-known ${known_vcf}" : "" 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 def avail_mem = 3
if (!task.memory) { if (!task.memory) {
@ -39,7 +39,7 @@ process GATK_REALIGNERTARGETCREATOR {
-Xmx${avail_mem}g \\ -Xmx${avail_mem}g \\
-T RealignerTargetCreator \\ -T RealignerTargetCreator \\
-nt ${task.cpus} \\ -nt ${task.cpus} \\
-I ${bam} \\ -I ${input} \\
-R ${fasta} \\ -R ${fasta} \\
-o ${prefix}.intervals \\ -o ${prefix}.intervals \\
${known} \\ ${known} \\

View file

@ -6,16 +6,13 @@ include { GATK_REALIGNERTARGETCREATOR } from '../../../../modules/gatk/realigner
workflow test_gatk_realignertargetcreator { workflow test_gatk_realignertargetcreator {
input = [ input = [ [ id:'test' ], // meta map
[ 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'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], 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)
reference = [ fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true),
file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true),
]
GATK_REALIGNERTARGETCREATOR ( input, reference, [] ) GATK_REALIGNERTARGETCREATOR ( input, fasta, fai, dict, [] )
} }