Skip to content
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
runs-on: ${{ github.event.inputs.runners || github.run_number > 1 && 'ubuntu-latest' || 'self-hosted' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: nf-core/setup-nextflow@v2
- name: Run prek
uses: j178/prek-action@0bb87d7f00b0c99306c8bcb8b8beba1eb581c037 # v1

Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,11 @@ repos:
hooks:
- id: hadolint-docker
args: ["--failure-threshold", "error"]

- repo: https://github.com/seqeralabs/nf-lint-pre-commit
rev: v0.2.0
hooks:
- id: nextflow-lint
files: '\.nf$|nextflow\.config$'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the almost the same as the default for the pre-commit hook: https://github.com/seqeralabs/nf-lint-pre-commit/blob/58b2431ebcdf99a0c024c9c7f695bfa30c01555c/.pre-commit-hooks.yaml#L6

Shall we add *.nextflow files upstream? I've never seen one in the wild!

# TODO add formating at a later stage
# args: ["-format", "-sort-declarations", "-spaces", "4", "-harshil-alignment", "-output", "concise"]
2 changes: 1 addition & 1 deletion modules/nf-core/abricate/summary/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ process ABRICATE_SUMMARY {
"""
abricate \\
--summary \\
${reports} > ${prefix}.txt
$reports > ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/agrvate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ process AGRVATE {
def args = task.ext.args ?: ''
"""
agrvate \\
${args} \\
-i ${fasta}
$args \\
-i $fasta

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/allelecounter/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ process ALLELECOUNTER {
def reference_options = fasta ? "-r $fasta": ""
"""
alleleCounter \\
${args} \\
-l ${loci} \\
-b ${input} \\
${reference_options} \\
$args \\
-l $loci \\
-b $input \\
$reference_options \\
-o ${prefix}.alleleCount

cat <<-END_VERSIONS > versions.yml
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/ampcombi2/cluster/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ process AMPCOMBI2_CLUSTER {
"""
ampcombi cluster \\
--ampcombi_summary ${summary_file} \\
${args} \\
$args \\
--threads ${task.cpus}

cat <<-END_VERSIONS > versions.yml
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/amplify/predict/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ process AMPLIFY_PREDICT {
def custom_model_dir = model_dir ? "-md ${model_dir}" : ""
"""
AMPlify \\
${args} \\
$args \\
${custom_model_dir} \\
-s '${faa}'

Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/angsd/contamination/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ process {
withName: ANGSD_DOCOUNTS {
ext.args = "-iCounts 1 -doDepth -dumpCounts 2"
}
}
}
4 changes: 2 additions & 2 deletions modules/nf-core/aria2/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ process ARIA2 {
"""
aria2c \\
--check-certificate=false \\
${args} \\
${source_url}
$args \\
$source_url

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/artic/guppyplex/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ process ARTIC_GUPPYPLEX {
"""
artic \\
guppyplex \\
${args} \\
--directory ${fastq_dir} \\
$args \\
--directory $fastq_dir \\
--output ${prefix}.fastq

pigz -p ${task.cpus} *.fastq
pigz -p $task.cpus *.fastq
cat <<-END_VERSIONS > versions.yml
"${task.process}":
artic: \$(artic -v 2>&1 | sed 's/^.*artic //; s/ .*\$//')
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/ataqv/mkarv/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ process ATAQV_MKARV {
def args = task.ext.args ?: ''
"""
mkarv \\
${args} \\
--concurrency ${task.cpus} \\
$args \\
--concurrency $task.cpus \\
--force \\
./html/ \\
jsons/*
Expand Down
14 changes: 7 additions & 7 deletions modules/nf-core/atlas/recal/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ process ATLAS_RECAL {
"""
atlas \\
task=recal \\
bam=${bam} \\
${PMD} \\
${READGROUPS} \\
${ALLELES} \\
${INVARIANTS} \\
out=${prefix} \\
${args}
bam=$bam \\
$PMD \\
$READGROUPS \\
$ALLELES \\
$INVARIANTS \\
out=$prefix \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/authentict/deam2cont/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ process AUTHENTICT_DEAM2CONT {
def positions_file = positions ? "-p ${positions}" : ""

"""
samtools view ${args} ${bam} | AuthentiCT \\
samtools view $args $bam | AuthentiCT \\
deam2cont \\
${args2} \\
${config_file} \\
${positions_file} \\
$args2 \\
$config_file \\
$positions_file \\
- \\
> ${prefix}.txt

Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/bcftools/call/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
process {
ext.args = "--no-version"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/bcftools/mpileup/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process {
ext.args2 = '--no-version --ploidy 1 --multiallelic-caller'
ext.args3 = '--no-version'
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/bcftools/query/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
process {
ext.args = "-f '%CHROM %POS %REF %ALT[%SAMPLE=%GT]'"
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/blat/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ process {
withName: SEQTK_SEQ {
ext.args = '-A'
}
}
}
7 changes: 4 additions & 3 deletions modules/nf-core/bowtie/build/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process BOWTIE_BUILD {
tuple val(meta), path(fasta)

output:
tuple val(meta), path('bowtie'), emit: index
path "versions.yml", emit: versions
tuple val(meta), path('bowtie') , emit: index
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -21,7 +21,7 @@ process BOWTIE_BUILD {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p bowtie
bowtie-build --threads ${task.cpus} ${fasta} bowtie/${prefix}
bowtie-build --threads $task.cpus $fasta bowtie/${prefix}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -45,4 +45,5 @@ process BOWTIE_BUILD {
bowtie: \$(echo \$(bowtie --version 2>&1) | sed 's/^.*bowtie-align-s version //; s/ .*\$//')
END_VERSIONS
"""

}
2 changes: 1 addition & 1 deletion modules/nf-core/calder2/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
process {
ext.args = '--genome hg38'
}
}
1 change: 1 addition & 0 deletions modules/nf-core/cellranger/mkref/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ process {
publishDir = [ path: { "output" } ]
}
}

2 changes: 1 addition & 1 deletion modules/nf-core/checkm2/predict/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ process {
withName: "CHECKM2_PREDICT" {
ext.args = "--lowmem"
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/clame/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ process {
withName: CLAME {
ext.args = '-b 100 -print'
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/cnvkit/export/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ process {
withName: 'CNVKIT_EXPORT' {
ext.args = { params.cnvkit_export_args }
}
}
}
20 changes: 9 additions & 11 deletions modules/nf-core/controlfreec/assesssignificance/main.nf
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
process CONTROLFREEC_ASSESSSIGNIFICANCE {
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/control-freec:11.6b--hdbdd923_0'
: 'biocontainers/control-freec:11.6b--hdbdd923_0'}"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'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)

output:
tuple val(meta), path("*.p.value.txt"), emit: p_value_txt
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 VERSION = '11.6b'
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
cat \$(which assess_significance.R) | R --slave --args ${cnvs} ${ratio}

mv *.p.value.txt ${prefix}.p.value.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: ${VERSION}
controlfreec: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '11.6b'
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
touch ${prefix}.p.value.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: ${VERSION}
controlfreec: $VERSION
END_VERSIONS
"""
}
20 changes: 9 additions & 11 deletions modules/nf-core/controlfreec/freec2bed/main.nf
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
process CONTROLFREEC_FREEC2BED {
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/control-freec:11.6b--hdbdd923_0'
: 'biocontainers/control-freec:11.6b--hdbdd923_0'}"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' :
'biocontainers/control-freec:11.6b--hdbdd923_0' }"

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

output:
tuple val(meta), path("*.bed"), emit: bed
path "versions.yml", emit: versions
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}"
def VERSION = '11.6b'
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
freec2bed.pl -f ${ratio} ${args} > ${prefix}.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: ${VERSION}
controlfreec: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '11.6b'
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def VERSION = '11.6b' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
touch ${prefix}.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
controlfreec: ${VERSION}
controlfreec: $VERSION
END_VERSIONS
"""
}
Loading
Loading