patterns
patterns copied to clipboard
Update process-collect.nf
Fixes cases with a single file. Note that this example with cat would still work with a single file, but ls *.fq would not. https://github.com/nextflow-io/nextflow/issues/2410
not understanding why ls *.fq is not working for a single file
In the example if only a single input is passed the file is linked into the workspace as .fq, a hidden file as far as bash is concerned which is not available via *.fq.
Two issues:
- it would be preferable to always include the numeric, but I understand the possible implications of changing that.
- the example it should include a prefix so that hidden files aren't the default from the example:
process bar {
echo true
input:
file 'in_*.fq' from unzipped_ch.collect()
"""
cat in_*.fq
"""
}
-
file 'in_*.fq' from unzipped_ch.collect()a single file isfile_.fq -
file 'in_?.fq' from unzipped_ch.collect()a single file isfile_1.fq
(2) is certainly more consistent and obvious for the example