Update main.nf

This commit is contained in:
2026-09-01 00:11:12 +02:00
parent 052711c13e
commit a6523bfb2e

15
main.nf
View File

@@ -1,12 +1,9 @@
nextflow.enable.dsl = 2
// Default parameter input
params.str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
// split process
process split {
publishDir "results/lower"
// Renamed from 'split' to 'split_text' to avoid Groovy method name conflict
process split_text {
input:
val x
@@ -19,7 +16,6 @@ process split {
"""
}
// convert_to_upper process
process convert_to_upper {
tag "$y"
@@ -35,12 +31,11 @@ process convert_to_upper {
"""
}
// Workflow block
workflow {
main:
ch_str = channel.of(params.str) // Create a channel using parameter input
ch_chunks = split(ch_str) // Split string into chunks and create a named channel
ch_upper = convert_to_upper(ch_chunks.flatten()) // Convert lowercase letters to uppercase letters
ch_str = channel.of(params.str)
ch_chunks = split_text(ch_str)
ch_upper = convert_to_upper(ch_chunks.flatten())
publish:
lower = ch_chunks.flatten()