Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions modules/nf-core/gatk4spark/applybqsr/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ process GATK4SPARK_APPLYBQSR {
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/49/498aea9c9bcaf736b9fb2a01366c1b7b38ccc0d38143178afc325d6a93241447/data'
: 'community.wave.seqera.io/library/gatk4-spark:4.6.2.0--8b5cd67ee60a714e'}"

// Spark's native UnixLoginModule fails to resolve a username for the container's UID
// (LoginException "invalid null input" for name), because the container's own /etc/passwd
// has no entry for the host UID that docker.runOptions maps it to. Bind-mounting the
// host's /etc/passwd/group (which do have that entry) fixes the native lookup.
containerOptions { workflow.containerEngine in ['docker', 'podman'] ? '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro' : '' }

input:
tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals)
path fasta
path fai
path dict
val output_suffix

output:
tuple val(meta), path("${prefix}.bam"), emit: bam, optional: true
Expand All @@ -26,7 +33,7 @@ process GATK4SPARK_APPLYBQSR {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
// suffix can only be bam or cram, cram being the sensible default
def suffix = task.ext.suffix && task.ext.suffix == "bam" ? "bam" : "cram"
def suffix = output_suffix == "bam" ? "bam" : "cram"
def interval_command = intervals ? "--intervals ${intervals}" : ""

def avail_mem = 3072
Expand All @@ -51,7 +58,7 @@ process GATK4SPARK_APPLYBQSR {

stub:
prefix = task.ext.prefix ?: "${meta.id}"
def suffix = task.ext.suffix ?: "cram"
def suffix = output_suffix == "bam" ? "bam" : "cram"
"""
touch ${prefix}.${suffix}
if [[ ${suffix} == bam ]]; then
Expand Down
3 changes: 3 additions & 0 deletions modules/nf-core/gatk4spark/applybqsr/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ input:
description: GATK sequence dictionary
pattern: "*.dict"
ontologies: []
- output_suffix:
type: string
description: Output file format, either "bam" or "cram" (cram is the default)
output:
bam:
- - meta:
Expand Down
19 changes: 6 additions & 13 deletions modules/nf-core/gatk4spark/applybqsr/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ nextflow_process {

name "Test Process GATK4SPARK_APPLYBQSR"
script "../main.nf"
config "./nextflow.config"
process "GATK4SPARK_APPLYBQSR"

tag "modules"
Expand All @@ -13,10 +12,6 @@ nextflow_process {
test("sarscov2 - bam") {

when {
params {
module_suffix = "bam"
}

process {
"""
input[0] = [
Expand All @@ -29,6 +24,7 @@ nextflow_process {
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)
input[4] = "bam"
"""
}
}
Expand Down Expand Up @@ -56,6 +52,7 @@ nextflow_process {
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)
input[4] = "cram"
"""
}
}
Expand All @@ -74,10 +71,6 @@ nextflow_process {
test("sarscov2 - bam - intervals") {

when {
params {
module_suffix = "bam"
}

process {
"""
input[0] = [
Expand All @@ -90,6 +83,7 @@ nextflow_process {
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)
input[4] = "bam"
"""
}
}
Expand Down Expand Up @@ -117,6 +111,7 @@ nextflow_process {
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)
input[4] = "cram"
"""
}
}
Expand Down Expand Up @@ -149,6 +144,7 @@ nextflow_process {
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true)
input[4] = "cram"
"""
}
}
Expand All @@ -165,10 +161,6 @@ nextflow_process {

options "-stub"
when {
params {
module_suffix = "bam"
}

process {
"""
input[0] = [
Expand All @@ -181,6 +173,7 @@ nextflow_process {
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)
input[4] = "bam"
"""
}
}
Expand Down
7 changes: 0 additions & 7 deletions modules/nf-core/gatk4spark/applybqsr/tests/nextflow.config

This file was deleted.

6 changes: 6 additions & 0 deletions modules/nf-core/gatk4spark/baserecalibrator/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ process GATK4SPARK_BASERECALIBRATOR {
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/49/498aea9c9bcaf736b9fb2a01366c1b7b38ccc0d38143178afc325d6a93241447/data'
: 'community.wave.seqera.io/library/gatk4-spark:4.6.2.0--8b5cd67ee60a714e'}"

// Spark's native UnixLoginModule fails to resolve a username for the container's UID
// (LoginException "invalid null input" for name), because the container's own /etc/passwd
// has no entry for the host UID that docker.runOptions maps it to. Bind-mounting the
// host's /etc/passwd/group (which do have that entry) fixes the native lookup.
containerOptions { workflow.containerEngine in ['docker', 'podman'] ? '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro' : '' }

input:
tuple val(meta), path(input), path(input_index), path(intervals)
path fasta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ nextflow_process {

name "Test Process GATK4SPARK_BASERECALIBRATOR"
script "../main.nf"
config "./nextflow.config"
process "GATK4SPARK_BASERECALIBRATOR"

tag "modules"
Expand Down

This file was deleted.

6 changes: 6 additions & 0 deletions modules/nf-core/gatk4spark/markduplicates/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ process GATK4SPARK_MARKDUPLICATES {
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/49/498aea9c9bcaf736b9fb2a01366c1b7b38ccc0d38143178afc325d6a93241447/data'
: 'community.wave.seqera.io/library/gatk4-spark:4.6.2.0--8b5cd67ee60a714e'}"

// Spark's native UnixLoginModule fails to resolve a username for the container's UID
// (LoginException "invalid null input" for name), because the container's own /etc/passwd
// has no entry for the host UID that docker.runOptions maps it to. Bind-mounting the
// host's /etc/passwd/group (which do have that entry) fixes the native lookup.
containerOptions { workflow.containerEngine in ['docker', 'podman'] ? '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro' : '' }

input:
tuple val(meta), path(bam)
path fasta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ nextflow_process {

name "Test Process GATK4SPARK_MARKDUPLICATES"
script "../main.nf"
config "./nextflow.config"
process "GATK4SPARK_MARKDUPLICATES"

tag "modules"
Expand Down

This file was deleted.