Rename FASTQ files and check sample ids#145
Conversation
5093a86 to
b8b1912
Compare
| [ -f "${name}_R1.fastq.gz" ] || ln -s "${reads[0]}" "${name}_R1.fastq.gz" | ||
| [ -f "${name}_R2.fastq.gz" ] || ln -s "${reads[1]}" "${name}_R2.fastq.gz" |
There was a problem hiding this comment.
To me this is not readable. What does this do?
Guessing: If file "${name}_R1.fastq.gz" doesnt exist than link reads[0} to "${name}_R1.fastq.gz"
If yes, could you write that in an easier understandable way? With an in if such? Like this its short but hard to read, in my opinion.
How does this interact with includeInputs: true, havent seen that one before, I guess it is important if the above link isnt created. But what happens is the link is actually created? Isnt than reads[0] also added to the output channel, provided it follows *.fastq.gz as well?
There was a problem hiding this comment.
Oh true, I forgot to add the corresponding glob pattern, thanks for reviewing!
includeInputs is important, because by default input files will not be used for the output (https://www.nextflow.io/docs/latest/process.html#output-path), even if the name matches.
I didn't want to rename the input files, that's why I did it this way.
PR checklist
CHANGELOG.mdis updateddocsis updated