patterns icon indicating copy to clipboard operation
patterns copied to clipboard

Update process-collect.nf

Open meowcat opened this issue 4 years ago • 3 comments

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

meowcat avatar Oct 26 '21 16:10 meowcat

not understanding why ls *.fq is not working for a single file

pditommaso avatar Apr 11 '22 15:04 pditommaso

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:

  1. it would be preferable to always include the numeric, but I understand the possible implications of changing that.
  2. 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
  """
}

keiranmraine avatar Apr 29 '22 15:04 keiranmraine

  1. file 'in_*.fq' from unzipped_ch.collect() a single file is file_.fq
  2. file 'in_?.fq' from unzipped_ch.collect() a single file is file_1.fq

(2) is certainly more consistent and obvious for the example

keiranmraine avatar Apr 29 '22 15:04 keiranmraine