diff --git a/modules/motus/profile/main.nf b/modules/motus/profile/main.nf index 8310e048..d2ae1264 100644 --- a/modules/motus/profile/main.nf +++ b/modules/motus/profile/main.nf @@ -22,7 +22,7 @@ process MOTUS_PROFILE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def inputs = "$reads[0]".toLowerCase().endsWith('.bam') ? + def inputs = "$reads[0]".getExtension == ('.bam') ? "-i ${reads}" : meta.single_end ? "-s $reads" : "-f ${reads[0]} -r ${reads[1]}"