Skip to content
Snippets Groups Projects
Verified Commit d671e35f authored by Laurent Modolo's avatar Laurent Modolo
Browse files

split.nf: change detection of file truncation

parent 79b0bfad
No related branches found
No related tags found
No related merge requests found
......@@ -17,11 +17,17 @@ process SPLIT {
zcat ${fastq} | split -l 4000000 - ${fastq.simpleName}_
ls -l ${fastq.simpleName}_* | \\
awk '{system("if [\$(wc -l "\$9") -ne 4000000]; then exit 1; fi")}'
awk '{system("if [\$(wc -l "\$9") -ne 4000000]; then echo "1" > error.txt; fi")}'
ls -l ${fastq.simpleName}_* | \\
awk '{system("gzip -c "\$9" > "\$9".fastq.gz && rm "\$9)}'
if [ -e "error.txt" ]
then
echo "file truncation detected" >&2
exit 1
fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
split: v1.35.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment