Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dsl2 syntax errors #128

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env nextflow

// enable dsl2
nextflow.preview.dsl = 2
nextflow.enable.dsl=2

// include modules
include {printHelp} from './modules/help.nf'
Expand Down
20 changes: 10 additions & 10 deletions modules/artic.nf
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ process articMinIONMedaka {
output:
file("${sampleName}*")

tuple sampleName, file("${sampleName}.primertrimmed.rg.sorted.bam"), emit: ptrim
tuple sampleName, file("${sampleName}.sorted.bam"), emit: mapped
tuple sampleName, file("${sampleName}.consensus.fasta"), emit: consensus_fasta
tuple sampleName, file("${sampleName}.pass.vcf.gz"), emit: vcf
tuple val(sampleName), file("${sampleName}.primertrimmed.rg.sorted.bam"), emit: ptrim
tuple val(sampleName), file("${sampleName}.sorted.bam"), emit: mapped
tuple val(sampleName), file("${sampleName}.consensus.fasta"), emit: consensus_fasta
tuple val(sampleName), file("${sampleName}.pass.vcf.gz"), emit: vcf

script:
// Make an identifier from the fastq filename
Expand Down Expand Up @@ -102,10 +102,10 @@ process articMinIONNanopolish {
output:
file("${sampleName}*")

tuple sampleName, file("${sampleName}.primertrimmed.rg.sorted.bam"), emit: ptrim
tuple sampleName, file("${sampleName}.sorted.bam"), emit: mapped
tuple sampleName, file("${sampleName}.consensus.fasta"), emit: consensus_fasta
tuple sampleName, file("${sampleName}.pass.vcf.gz"), emit: vcf
tuple val(sampleName), file("${sampleName}.primertrimmed.rg.sorted.bam"), emit: ptrim
tuple val(sampleName), file("${sampleName}.sorted.bam"), emit: mapped
tuple val(sampleName), file("${sampleName}.consensus.fasta"), emit: consensus_fasta
tuple val(sampleName), file("${sampleName}.pass.vcf.gz"), emit: vcf

script:
// Make an identifier from the fastq filename
Expand Down Expand Up @@ -144,10 +144,10 @@ process articRemoveUnmappedReads {
cpus 1

input:
tuple(sampleName, path(bamfile))
tuple(val(sampleName), path(bamfile))

output:
tuple( sampleName, file("${sampleName}.mapped.sorted.bam"))
tuple( val(sampleName), file("${sampleName}.mapped.sorted.bam"))

script:
"""
Expand Down
30 changes: 15 additions & 15 deletions modules/illumina.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
process readTrimming {
/**
* Trims paired fastq using trim_galore (https://github.com/FelixKrueger/TrimGalore)
* @input tuple(sampleName, path(forward), path(reverse))
* @output trimgalore_out tuple(sampleName, path("*_val_1.fq.gz"), path("*_val_2.fq.gz"))
* @input tuple(val(sampleName), path(forward), path(reverse))
* @output trimgalore_out tuple(val(sampleName), path("*_val_1.fq.gz"), path("*_val_2.fq.gz"))
*/

tag { sampleName }
Expand All @@ -12,10 +12,10 @@ process readTrimming {
cpus 2

input:
tuple(sampleName, path(forward), path(reverse))
tuple(val(sampleName), path(forward), path(reverse))

output:
tuple(sampleName, path("*_val_1.fq.gz"), path("*_val_2.fq.gz")) optional true
tuple(val(sampleName), path("*_val_1.fq.gz"), path("*_val_2.fq.gz")) optional true

script:
"""
Expand Down Expand Up @@ -62,10 +62,10 @@ process readMapping {
publishDir "${params.outdir}/${task.process.replaceAll(":","_")}", pattern: "${sampleName}.sorted.bam", mode: 'copy'

input:
tuple sampleName, path(forward), path(reverse), path(ref), path("*")
tuple val(sampleName), path(forward), path(reverse), path(ref), path("*")

output:
tuple(sampleName, path("${sampleName}.sorted.bam"))
tuple(val(sampleName), path("${sampleName}.sorted.bam"))

script:
"""
Expand All @@ -82,11 +82,11 @@ process trimPrimerSequences {
publishDir "${params.outdir}/${task.process.replaceAll(":","_")}", pattern: "${sampleName}.mapped.primertrimmed.sorted.bam", mode: 'copy'

input:
tuple sampleName, path(bam), path(bedfile)
tuple val(sampleName), path(bam), path(bedfile)

output:
tuple sampleName, path("${sampleName}.mapped.bam"), emit: mapped
tuple sampleName, path("${sampleName}.mapped.primertrimmed.sorted.bam" ), emit: ptrim
tuple val(sampleName), path("${sampleName}.mapped.bam"), emit: mapped
tuple val(sampleName), path("${sampleName}.mapped.primertrimmed.sorted.bam" ), emit: ptrim

script:
if (params.allowNoprimer){
Expand Down Expand Up @@ -128,10 +128,10 @@ process callVariants {
publishDir "${params.outdir}/${task.process.replaceAll(":","_")}", pattern: "${sampleName}.variants.tsv", mode: 'copy'

input:
tuple(sampleName, path(bam), path(ref))
tuple(val(sampleName), path(bam), path(ref))

output:
tuple sampleName, path("${sampleName}.variants.tsv"), emit: variants
tuple val(sampleName), path("${sampleName}.variants.tsv"), emit: variants

script:
"""
Expand All @@ -147,10 +147,10 @@ process makeConsensus {
publishDir "${params.outdir}/${task.process.replaceAll(":","_")}", pattern: "${sampleName}.primertrimmed.consensus.fa", mode: 'copy'

input:
tuple(sampleName, path(bam))
tuple(val(sampleName), path(bam))

output:
tuple(sampleName, path("${sampleName}.primertrimmed.consensus.fa"))
tuple(val(sampleName), path("${sampleName}.primertrimmed.consensus.fa"))

script:
"""
Expand All @@ -169,10 +169,10 @@ process cramToFastq {
*/

input:
tuple sampleName, file(cram)
tuple val(sampleName), file(cram)

output:
tuple sampleName, path("${sampleName}_1.fastq.gz"), path("${sampleName}_2.fastq.gz")
tuple val(sampleName), path("${sampleName}_1.fastq.gz"), path("${sampleName}_2.fastq.gz")

script:
"""
Expand Down
6 changes: 3 additions & 3 deletions modules/out.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ process bamToCram {
publishDir "${params.outdir}/${task.process.replaceAll(":","_")}", pattern: "${bam.baseName}.cram.crai", mode: 'copy'

input:
tuple(sampleName, path(bam), path(ref))
tuple(val(sampleName), path(bam), path(ref))

output:
tuple sampleName, path("${bam.baseName}.cram"), emit: cramed
tuple sampleName, path("${bam.baseName}.cram.crai"), emit: cramedidx
tuple val(sampleName), path("${bam.baseName}.cram"), emit: cramed
tuple val(sampleName), path("${bam.baseName}.cram.crai"), emit: cramedidx

script:
"""
Expand Down
2 changes: 1 addition & 1 deletion modules/qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process makeQCCSV {
publishDir "${params.outdir}/qc_plots", pattern: "${sampleName}.depth.png", mode: 'copy'

input:
tuple sampleName, path(bam), path(fasta), path(ref)
tuple val(sampleName), path(bam), path(fasta), path(ref)

output:
path "${params.prefix}.${sampleName}.qc.csv", emit: csv
Expand Down
2 changes: 1 addition & 1 deletion modules/upload.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process collateSamples {
publishDir "${params.outdir}/qc_pass_climb_upload/${params.prefix}", pattern: "${sampleName}", mode: 'copy'

input:
tuple(sampleName, path(bam), path(fasta))
tuple(val(sampleName), path(bam), path(fasta))

output:
path("${sampleName}")
Expand Down
2 changes: 1 addition & 1 deletion workflows/articNcovNanopore.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ARTIC ncov workflow

// enable dsl2
nextflow.preview.dsl = 2
nextflow.enable.dsl=2

// import modules
include {articDownloadScheme} from '../modules/artic.nf'
Expand Down
2 changes: 1 addition & 1 deletion workflows/illuminaNcov.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env nextflow

// enable dsl2
nextflow.preview.dsl = 2
nextflow.enable.dsl=2

// import modules
include {articDownloadScheme } from '../modules/artic.nf'
Expand Down