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
2 changes: 0 additions & 2 deletions modules/nf-core/bcftools/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ process BCFTOOLS_INDEX {

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
bcftools \\
Expand All @@ -37,7 +36,6 @@ process BCFTOOLS_INDEX {

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def extension = args.contains("--tbi") || args.contains("-t") ? "tbi" :
"csi"
"""
Expand Down
28 changes: 15 additions & 13 deletions modules/nf-core/beagle5/beagle/main.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
process BEAGLE5_BEAGLE {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/beagle:5.5_27Feb25.75f--hdfd78af_0':
'biocontainers/beagle:5.5_27Feb25.75f--hdfd78af_0' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/beagle:5.5_27Feb25.75f--hdfd78af_0'
: 'biocontainers/beagle:5.5_27Feb25.75f--hdfd78af_0'}"

input:
// Including `val(region)` to prevent errors with multi-chromosome VCFs and single-chromosome reference panels.
Expand All @@ -21,26 +21,28 @@ process BEAGLE5_BEAGLE {
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}.bglout"
def ref_command = refpanel ? "ref=$refpanel" : ""
def map_command = genmap ? "map=$genmap" : ""
def region_cmd = region ? "chrom=$region" : ""
def excludesamples_command = exclsamples ? "excludesamples=$exclsamples" : ""
def excludemarkers_command = exclmarkers ? "excludemarkers=$exclmarkers" : ""

def ref_command = refpanel ? "ref=${refpanel}" : ""
def map_command = genmap ? "map=${genmap}" : ""
def region_cmd = region ? "chrom=${region}" : ""

def excludesamples_command = exclsamples ? "excludesamples=${exclsamples}" : ""
def excludemarkers_command = exclmarkers ? "excludemarkers=${exclmarkers}" : ""

def avail_mem = 3072
if (!task.memory) {
log.info '[beagle] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
log.info('[beagle] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.')
} else {
avail_mem = (task.memory.mega*0.8).intValue()
avail_mem = (task.memory.mega * 0.8).intValue()
}

"""
beagle -Xmx${avail_mem}M \\
gt=${vcf} \\
out=${prefix} \\
$args \\
${args} \\
${ref_command} \\
${map_command} \\
${region_cmd} \\
Expand Down
24 changes: 12 additions & 12 deletions modules/nf-core/glimpse/chunk/main.nf
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
process GLIMPSE_CHUNK {
tag "$meta.id"
tag "${meta.id}"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--h2ce4488_2':
'biocontainers/glimpse-bio:1.1.1--hce55b13_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--h2ce4488_2'
: 'biocontainers/glimpse-bio:1.1.1--hce55b13_1'}"

input:
tuple val(meta), path(input), path(input_index), val(region)

output:
tuple val(meta), path("*.txt"), emit: chunk_chr
path "versions.yml" , emit: versions
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ""
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ""

"""
GLIMPSE_chunk \\
$args \\
--input $input \\
--region $region \\
--thread $task.cpus \\
${args} \\
--input ${input} \\
--region ${region} \\
--thread ${task.cpus} \\
--output ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
Expand All @@ -36,7 +36,7 @@ process GLIMPSE_CHUNK {
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def prefix = task.ext.prefix ?: "${meta.id}"

"""
touch ${prefix}.txt
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/glimpse/chunk/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process {
withName: GLIMPSE_CHUNK {
ext.args = { "${params.glimpse_args}" }
ext.args = { "${params.glimpse_args}" }
ext.prefix = { "${meta.id}" }
}
}
29 changes: 15 additions & 14 deletions modules/nf-core/glimpse/concordance/main.nf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
process GLIMPSE_CONCORDANCE {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--h0303221_3':
'biocontainers/glimpse-bio:1.1.1--h0303221_3' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--h0303221_3'
: 'biocontainers/glimpse-bio:1.1.1--h0303221_3'}"

input:
tuple val(meta), path(estimate), path(estimate_index), path(freq), path(freq_index), path(truth), path(truth_index), val(region)
val(min_prob)
val(min_dp)
val(bins)
val min_prob
val min_dp
val bins

output:
tuple val(meta), path("*.error.cal.txt.gz") , emit: errors_cal
Expand All @@ -20,6 +20,7 @@ process GLIMPSE_CONCORDANCE {
tuple val(meta), path("*.rsquare.grp.txt.gz"), emit: rsquare_grp
tuple val(meta), path("*.rsquare.spl.txt.gz"), emit: rsquare_spl
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

Expand All @@ -30,15 +31,15 @@ process GLIMPSE_CONCORDANCE {
def min_dp_cmd = min_dp ? "--minDP ${min_dp}" : "--minDP 8"
def bins_cmd = bins ? "--bins ${bins}" : "--bins 0.00000 0.00100 0.00200 0.00500 0.01000 0.05000 0.10000 0.20000 0.50000"
"""
echo $region $freq $truth $estimate > input.txt
echo ${region} ${freq} ${truth} ${estimate} > input.txt
GLIMPSE_concordance \\
$args \\
${args} \\
--input input.txt \\
--thread $task.cpus \\
--thread ${task.cpus} \\
--output ${prefix} \\
$min_prob_cmd \\
$min_dp_cmd \\
$bins_cmd
${min_prob_cmd} \\
${min_dp_cmd} \\
${bins_cmd}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -47,7 +48,7 @@ process GLIMPSE_CONCORDANCE {
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def prefix = task.ext.prefix ?: "${meta.id}"

"""
echo "" | gzip > ${prefix}.error.cal.txt.gz
Expand Down
14 changes: 7 additions & 7 deletions modules/nf-core/glimpse/ligate/main.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
process GLIMPSE_LIGATE {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--hce55b13_1':
'biocontainers/glimpse-bio:1.1.1--hce55b13_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--hce55b13_1'
: 'biocontainers/glimpse-bio:1.1.1--hce55b13_1'}"

input:
tuple val(meta), path(input_list), path(input_index)
Expand All @@ -22,12 +22,12 @@ process GLIMPSE_LIGATE {
def prefix = task.ext.prefix ?: "${meta.id}"
def suffix = task.ext.suffix ?: "vcf.gz"
"""
printf "%s\\n" $input_list | tr -d '[],' | sort -V > all_files.txt
printf "%s\\n" ${input_list} | tr -d '[],' | sort -V > all_files.txt

GLIMPSE_ligate \\
$args \\
${args} \\
--input all_files.txt \\
--thread $task.cpus \\
--thread ${task.cpus} \\
--output ${prefix}.${suffix}

cat <<-END_VERSIONS > versions.yml
Expand Down
40 changes: 20 additions & 20 deletions modules/nf-core/glimpse/phase/main.nf
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
process GLIMPSE_PHASE {
tag "$meta.id"
tag "${meta.id}"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--hce55b13_1':
'biocontainers/glimpse-bio:1.1.1--hce55b13_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--hce55b13_1'
: 'biocontainers/glimpse-bio:1.1.1--hce55b13_1'}"

input:
tuple val(meta) , path(input), path(input_index), path(samples_file), val(input_region), val(output_region), path(reference), path(reference_index), path(map)
tuple val(meta), path(input), path(input_index), path(samples_file), val(input_region), val(output_region), path(reference), path(reference_index), path(map)

output:
tuple val(meta), path("*.{vcf,bcf,vcf.gz,bcf.gz}"), emit: phased_variants
path "versions.yml" , emit: versions
tuple val(meta), path("*.{vcf,bcf,vcf.gz,bcf.gz}"), emit: phased_variants
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}_${input_region.replace(":","_")}"
def prefix = task.ext.prefix ?: "${meta.id}_${input_region.replace(":", "_")}"
def suffix = task.ext.suffix ?: "vcf.gz"

def map_command = map ? "--map $map" :""
def samples_file_command = samples_file ? "--samples-file $samples_file" :""
def map_command = map ? "--map ${map}" : ""
def samples_file_command = samples_file ? "--samples-file ${samples_file}" : ""

"""
GLIMPSE_phase \\
$args \\
--input $input \\
--reference $reference \\
$map_command \\
$samples_file_command \\
--input-region $input_region \\
--output-region $output_region \\
--thread $task.cpus \\
${args} \\
--input ${input} \\
--reference ${reference} \\
${map_command} \\
${samples_file_command} \\
--input-region ${input_region} \\
--output-region ${output_region} \\
--thread ${task.cpus} \\
--output ${prefix}.${suffix}

cat <<-END_VERSIONS > versions.yml
Expand All @@ -44,7 +44,7 @@ process GLIMPSE_PHASE {
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}_${input_region.replace(":","_")}"
def prefix = task.ext.prefix ?: "${meta.id}_${input_region.replace(":", "_")}"
def suffix = task.ext.suffix ?: "vcf.gz"

"""
Expand Down
14 changes: 7 additions & 7 deletions modules/nf-core/glimpse/sample/main.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
process GLIMPSE_SAMPLE {
tag "$meta.id"
tag "${meta.id}"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--hce55b13_1':
'biocontainers/glimpse-bio:1.1.1--hce55b13_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--hce55b13_1'
: 'biocontainers/glimpse-bio:1.1.1--hce55b13_1'}"

input:
tuple val(meta), path(input), path(index)
Expand All @@ -24,9 +24,9 @@ process GLIMPSE_SAMPLE {

"""
GLIMPSE_sample \\
$args \\
--input $input \\
--thread $task.cpus \\
${args} \\
--input ${input} \\
--thread ${task.cpus} \\
--output ${prefix}.${suffix}

cat <<-END_VERSIONS > versions.yml
Expand Down
30 changes: 15 additions & 15 deletions modules/nf-core/glimpse2/chunk/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
process GLIMPSE2_CHUNK {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

beforeScript """
beforeScript """
if cat /proc/cpuinfo | grep avx2 -q
then
echo "Feature AVX2 present on host"
Expand All @@ -12,13 +12,13 @@ process GLIMPSE2_CHUNK {
fi
"""
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/glimpse-bio:2.0.1--h46b9e50_1':
'biocontainers/glimpse-bio:2.0.1--h46b9e50_1' }"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/glimpse-bio:2.0.1--h46b9e50_1'
: 'biocontainers/glimpse-bio:2.0.1--h46b9e50_1'}"

input:
tuple val(meta), path(input), path(input_index), val(region), path(map)
val(model)
val model

output:
tuple val(meta), path("*.txt"), emit: chunk_chr
Expand All @@ -28,18 +28,18 @@ process GLIMPSE2_CHUNK {
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ""
def map_cmd = map ? "--map ${map}":""
def prefix = task.ext.prefix ?: "${meta.id}"
def args = task.ext.args ?: ""
def map_cmd = map ? "--map ${map}" : ""

"""
GLIMPSE2_chunk \\
$args \\
$map_cmd \\
${args} \\
${map_cmd} \\
--${model} \\
--input $input \\
--region $region \\
--threads $task.cpus \\
--input ${input} \\
--region ${region} \\
--threads ${task.cpus} \\
--output ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
Expand All @@ -49,7 +49,7 @@ process GLIMPSE2_CHUNK {
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def prefix = task.ext.prefix ?: "${meta.id}"

"""
echo "${meta.id}\t${region}\t0\t0\t0\t0\t0\t0" > ${prefix}.txt
Expand Down
Loading
Loading