add nextflow d30e48d
This commit is contained in:
31
nextflow/docs/snippets/test.sh
Executable file
31
nextflow/docs/snippets/test.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
exit_status=0
|
||||
|
||||
NXF_CMD=${NXF_CMD:-nextflow}
|
||||
NXF_FILES=${*:-'*.nf'}
|
||||
|
||||
for pipeline in $NXF_FILES ; do
|
||||
|
||||
echo "> Running test: $pipeline"
|
||||
|
||||
# run the pipeline
|
||||
$NXF_CMD -q run "$pipeline" > .out
|
||||
|
||||
# verify output (if ground truth exists)
|
||||
outfile="$(basename "$pipeline" .nf).out"
|
||||
|
||||
if [[ -f "$outfile" ]] ; then
|
||||
sort "$outfile" > a.out
|
||||
sort .out > b.out
|
||||
diff a.out b.out
|
||||
status=$? ; [ $status -eq 0 ] || exit_status=$status
|
||||
else
|
||||
echo "> $outfile not found, skipping"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
rm -rf .nextflow* work .out a.out b.out
|
||||
|
||||
[ $exit_status -eq 0 ] || false
|
||||
Reference in New Issue
Block a user