Skip to content

Commit

Permalink
Merge branch 'nf-core:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrtalbot authored Sep 21, 2023
2 parents 655d729 + 121b2d7 commit 3793e04
Show file tree
Hide file tree
Showing 251 changed files with 2,846 additions and 515 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ jobs:
tags: merquryfk/merquryfk
- profile: "conda"
tags: merquryfk/ploidyplot
- profile: "conda"
tags: mitohifi/mitohifi
- profile: "conda"
tags: mitohifi/findmitoreference
- profile: "conda"
Expand Down
52 changes: 43 additions & 9 deletions modules/nf-core/bamcmp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,37 @@ process BAMCMP {
'biocontainers/bamcmp:2.2--h05f6578_0' }"

input:
tuple val(meta), path(sample), path(contaminant)
tuple val(meta), path(primary_aligned_bam), path(contaminant_aligned_bam)

output:
tuple val(meta), path("*primary.bam") , emit: bam
tuple val(meta), path("*contamination.bam"), emit: contamination_bam
path "versions.yml" , emit: versions
tuple val(meta), path("${prefix}.bam") , emit: primary_filtered_bam
tuple val(meta), path("${prefix2}.bam"), emit: contamination_bam
path "versions.yml" , emit: versions

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

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

if ("$primary_aligned_bam" == "${prefix}.bam" | "$contaminant_aligned_bam" == "${prefix}.bam" )
error "Input and output names for the primary-genome bam file are the same, use \"task.ext.prefix\" to disambiguate!"
if ("$primary_aligned_bam" == "${prefix2}.bam" | "$contaminant_aligned_bam" == "${prefix2}.bam" )
error "Input and output names for the contaminant-genome bam file are the same, use \"task.ext.prefix2\" to disambiguate!"
if ("primary_aligned_bam" == "contaminant_aligned_bam" )
error "Input file names for the two bam files are the same, ensure they are renamed upstream."
if ("${prefix}.bam" == "${prefix2}.bam" )
error "Output names for the two bam files are identical, use \"task.ext.prefix\" and \"task.ext.prefix2\" to disambiguate!"

def VERSION = '2.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
bamcmp \\
-1 $sample \\
-2 $contaminant \\
-A ${prefix}_primary.bam \\
-B ${prefix}_contamination.bam \\
-1 $primary_aligned_bam \\
-2 $contaminant_aligned_bam \\
-A ${prefix}.bam \\
-B ${prefix2}.bam \\
$args
cat <<-END_VERSIONS > versions.yml
Expand All @@ -36,4 +47,27 @@ process BAMCMP {
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}_primary"
prefix2 = task.ext.prefix2 ?: "${meta.id}_contaminant"

if ("$primary_aligned_bam" == "${prefix}.bam" | "$contaminant_aligned_bam" == "${prefix}.bam" )
error "Input and output names for the primary-genome bam file are the same, use \"task.ext.prefix\" to disambiguate!"
if ("$primary_aligned_bam" == "${prefix2}.bam" | "$contaminant_aligned_bam" == "${prefix2}.bam" )
error "Input and output names for the contaminant-genome bam file are the same, use \"task.ext.prefix2\" to disambiguate!"
if ("primary_aligned_bam" == "contaminant_aligned_bam" )
error "Input file names for the two bam files are the same, ensure they are renamed upstream."
if ("${prefix}.bam" == "${prefix2}.bam" )
error "Output names for the two bam files are identical, use \"task.ext.prefix\" and \"task.ext.prefix2\" to disambiguate!"
"""
touch ${prefix}.bam
touch ${prefix2}.bam
cat <<-END_VERSIONS > versions.yml
"${task.process}":
ngscheckmate: \$(ncm.py --help | sed "7!d;s/ *Ensuring Sample Identity v//g")
END_VERSIONS
"""

}
2 changes: 1 addition & 1 deletion modules/nf-core/bcftools/mpileup/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ process BCFTOOLS_MPILEUP {

input:
tuple val(meta), path(bam), path(intervals)
path fasta
tuple val(meta2), path(fasta)
val save_mpileup

output:
Expand Down
4 changes: 4 additions & 0 deletions modules/nf-core/bcftools/mpileup/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ input:
- intervals:
type: file
description: Input intervals file. A file (commonly '.bed') containing regions to subset
- meta:
type: map
description: |
Groovy Map containing information about the genome fasta, e.g. [ id: 'sarscov2' ]
- fasta:
type: file
description: FASTA reference file
Expand Down
1 change: 1 addition & 0 deletions modules/nf-core/bcftools/sort/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ process BCFTOOLS_SORT {
bcftools \\
sort \\
--output ${prefix}.${extension} \\
--temp-dir . \\
$args \\
$vcf
Expand Down
16 changes: 9 additions & 7 deletions modules/nf-core/bwa/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ process BWA_INDEX {
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${fasta.baseName}"
def args = task.ext.args ?: ''
"""
mkdir bwa
bwa \\
index \\
$args \\
-p bwa/${fasta.baseName} \\
-p bwa/${prefix} \\
$fasta
cat <<-END_VERSIONS > versions.yml
Expand All @@ -34,14 +35,15 @@ process BWA_INDEX {
"""

stub:
def prefix = task.ext.prefix ?: "${fasta.baseName}"
"""
mkdir bwa
touch bwa/genome.amb
touch bwa/genome.ann
touch bwa/genome.bwt
touch bwa/genome.pac
touch bwa/genome.sa
touch bwa/${prefix}.amb
touch bwa/${prefix}.ann
touch bwa/${prefix}.bwt
touch bwa/${prefix}.pac
touch bwa/${prefix}.sa
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
15 changes: 9 additions & 6 deletions modules/nf-core/bwamem2/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ process BWAMEM2_INDEX {
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${fasta}"
def args = task.ext.args ?: ''
"""
mkdir bwamem2
bwa-mem2 \\
index \\
$args \\
$fasta -p bwamem2/${fasta}
$fasta -p bwamem2/${prefix}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -33,13 +34,15 @@ process BWAMEM2_INDEX {
"""

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

"""
mkdir bwamem2
touch bwamem2/${fasta}.0123
touch bwamem2/${fasta}.ann
touch bwamem2/${fasta}.pac
touch bwamem2/${fasta}.amb
touch bwamem2/${fasta}.bwt.2bit.64
touch bwamem2/${prefix}.0123
touch bwamem2/${prefix}.ann
touch bwamem2/${prefix}.pac
touch bwamem2/${prefix}.amb
touch bwamem2/${prefix}.bwt.2bit.64
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/cnvkit/batch/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ process CNVKIT_BATCH {

input:
tuple val(meta), path(tumor), path(normal)
path fasta
path fasta_fai
path targets
path reference
tuple val(meta2), path(fasta)
tuple val(meta3), path(fasta_fai)
tuple val(meta4), path(targets)
tuple val(meta5), path(reference)
val panel_of_normals

output:
Expand Down
22 changes: 22 additions & 0 deletions modules/nf-core/cnvkit/batch/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,43 @@ input:
type: file
description: |
Input normal sample bam file (or cram)
- meta2:
type: map
description: |
Groovy Map containing reference information
e.g. [ id:'test' ]
- fasta:
type: file
description: |
Input reference genome fasta file (only needed for cram_input and/or when normal_samples are provided)
- meta3:
type: map
description: |
Groovy Map containing reference information
e.g. [ id:'test' ]
- fasta_fai:
type: file
description: |
Input reference genome fasta index (optional, but recommended for cram_input)
- meta4:
type: map
description: |
Groovy Map containing information about target file
e.g. [ id:'test' ]
- targetfile:
type: file
description: |
Input target bed file
- meta5:
type: map
description: |
Groovy Map containing information about reference file
e.g. [ id:'test' ]
- reference:
type: file
description: |
Input reference cnn-file (only for germline and tumor-only running)
output:
- meta:
type: map
Expand Down Expand Up @@ -76,6 +97,7 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@adamrtalbot"
- "@drpatelh"
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/controlfreec/assesssignificance/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process CONTROLFREEC_ASSESSSIGNIFICANCE {
tag "$meta.id"
label 'process_low'

conda "bioconda::control-freec=11.6"
conda "bioconda::control-freec=11.6b"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
'biocontainers/control-freec:11.6--h1b792b2_1' }"
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ':
'biocontainers/control-freec:11.6b--hdbdd923_0 ' }"

input:
tuple val(meta), path(cnvs), path(ratio)
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/controlfreec/freec/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process CONTROLFREEC_FREEC {
tag "$meta.id"
label 'process_low'

conda "bioconda::control-freec=11.6"
conda "bioconda::control-freec=11.6b"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
'biocontainers/control-freec:11.6--h1b792b2_1' }"
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ':
'biocontainers/control-freec:11.6b--hdbdd923_0 ' }"

input:
tuple val(meta), path(mpileup_normal), path(mpileup_tumor), path(cpn_normal), path(cpn_tumor), path(minipileup_normal), path(minipileup_tumor)
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/controlfreec/freec2bed/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process CONTROLFREEC_FREEC2BED {
tag "$meta.id"
label 'process_low'

conda "bioconda::control-freec=11.6"
conda "bioconda::control-freec=11.6b"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
'biocontainers/control-freec:11.6--h1b792b2_1' }"
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ':
'biocontainers/control-freec:11.6b--hdbdd923_0 ' }"

input:
tuple val(meta), path(ratio)
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/controlfreec/freec2circos/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process CONTROLFREEC_FREEC2CIRCOS {
tag "$meta.id"
label 'process_low'

conda "bioconda::control-freec=11.6"
conda "bioconda::control-freec=11.6b"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
'biocontainers/control-freec:11.6--h1b792b2_1' }"
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ':
'biocontainers/control-freec:11.6b--hdbdd923_0 ' }"

input:
tuple val(meta), path(ratio)
Expand Down
7 changes: 3 additions & 4 deletions modules/nf-core/controlfreec/makegraph/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ process CONTROLFREEC_MAKEGRAPH {
tag "$meta.id"
label 'process_low'

conda "bioconda::control-freec=11.6"
conda "bioconda::control-freec=11.6b"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
'biocontainers/control-freec:11.6--h1b792b2_1' }"

'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0 ':
'biocontainers/control-freec:11.6b--hdbdd923_0 ' }"
input:
tuple val(meta), path(ratio), path(baf), val(ploidy)

Expand Down
50 changes: 50 additions & 0 deletions modules/nf-core/csvtk/join/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
process CSVTK_JOIN {
tag "$meta.id"
label 'process_single'

conda "bioconda::csvtk=0.26.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/csvtk:0.26.0--h9ee0642_0':
'biocontainers/csvtk:0.26.0--h9ee0642_0' }"

input:
tuple val(meta), path(csv)

output:
tuple val(meta), path("${prefix}.${out_extension}"), emit: csv
path "versions.yml" , emit: versions

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

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
out_extension = args.contains('--out-delimiter "\t"') || args.contains('-D "\t"') || args.contains("-D \$'\t'") ? "tsv" : "csv"
"""
csvtk \\
join \\
$args \\
--num-cpus $task.cpus \\
--out-file ${prefix}.${out_extension} \\
$csv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" ))
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
out_extension = args.contains('--out-delimiter "\t"') || args.contains('-D "\t"') || args.contains("-D \$'\t'") ? "tsv" : "csv"
"""
touch ${prefix}.${out_extension}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" ))
END_VERSIONS
"""
}
Loading

0 comments on commit 3793e04

Please sign in to comment.