Hi, I am very new to Nextflow and still looking at the training materials and workshops (sorry if this seems like a really straight forward problem to solve!). I have found this page with some really useful explanations Nextflow Processes . I have recently installed the nextflow extension in VScode to try and replicate these scripts and implement them into my own pipeline.
However, I wanted to ask about a particular part of tutorial in the “input values” section:
//process_input_value.nf
nextflow.enable.dsl=2
process PRINTCHR {
input:
val chr
script:
"""
echo processing chromosome ${chr}
"""
}
chr_ch = Channel.of( 1..22,'X','Y' )
workflow {
PRINTCHR( chr_ch )
}
When I copy this into my vscode .nf file it comes up with an error message for the line: chr_ch = Channel.of( 1..22,‘X’,‘Y’ )
“Statements cannot be mixed with script declarations – move statements into a process or workflow”
I wanted to ask if this was previously part of DSL1 and doesn’t work in DSL2? (although I see nextflow.enable.dsl=2 at the top) I was wondering where the best place would be to move this line and avoid this error? Thank you!!