This repository is a place to explore Nextflow and nf-core functions in the Gitpod environment.
This Gitpod environment (a docker container) comes installed with:
- Git
- Docker
- Apptainer
- Conda
- Pixi
- Nextflow
- nf-core
- nf-test
The Dockerfile for this environment lives on nf-core/tools.
Explore shell commands in a process:
workflow {
TASK( Channel.of( 1..3 ) )
.view()
}
process TASK {
input:
val num
script:
"""
echo "Num: $num"
"""
output:
stdout
}
Explore channel operator output:
workflow {
Channel.of( 'A' )
// Convert channel entry to Map
.map { it -> [ letter: it ] }
.view()
// TASK()
}
// process TASK {
// input:
// script:
// """
// """
// output:
// }
Explore configuration settings:
workflow {
TASK()
}
process TASK {
input:
script:
"""
touch versions.{txt,yml}
"""
output:
path "versions.txt"
path "versions.yml"
}
// Try excluding versions.yml from output - Failed
process.publishDir = [ path: "results", pattern: "{!versions.yml}" ]
Explore using Groovy in Nextflow:
// Can I use subMap on a key not present - yes
println ( [ id: 'test' ].subMap( ['id','sample'] ) )
// workflow {
// TASK()
// }
// process TASK {
// input:
// script:
// """
// """
// output:
// }