seq 1 5 | parallel 'echo $RANDOM > {}.txt'
ls *.txt > files.list
md5sum *.txt > files.md5sumFinally, for both of these issues, I realize that I may be doing things the hard way since I'm new to both Nextflow and Groovy, so if there is a more idomatic way of processing a bunch of files from a list that makes my problems moot, I'd love to hear that more general advice.
#!/usr/bin/env nextflow
// Usage: nextflow run validate_new_files.nf --list files.txt
file_list = Channel.from(file(params.list).readLines().each{file(it)})
//Also tried: file_list = Channel.from(file(params.list).readLines())
process parallel_md5sum {
input:
file('data_file') from file_list
output:
file('data_file.md5sum') into md5sum_files
"""
md5sum data_file > data_file.md5sum
"""
}
process collect_md5sum {
input:
file('data_file??.md5sum') from md5sum_files.toList()
output:
file('primary_data.md5sum')
"""
cat data_file??.md5sum > primary_data.md5sum
"""
}--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/nextflow.
For more options, visit https://groups.google.com/d/optout.
Channel.fromPath(params.list)
.splitText()
.map { file(it.replaceFirst(/\n/,'')) }
.set { file_list }
Hi Barry,Have a try to this:The main problem is your script is that `each` does not return any value, so it cannot work in that way.Then, to stage input files with their original name, use a variable reference instead of a file name.Finally NF is creating that file because the `parallel_md5sum` process is getting a input a string value not a file object, thus it creates a file for you having the string value as a content.Hope it helps.Cheers,Paolo
To unsubscribe from this group and stop receiving emails from it, send an email to next...@googlegroups.com.