Skip to content
Snippets Groups Projects
Commit 7432e93c authored by Peng Lian's avatar Peng Lian
Browse files

Optimized trace

parent 469dcd80
Branches master
No related merge requests found
......@@ -497,6 +497,7 @@ update_trace() {
if [[ -f $from_trace ]] && [[ -f $to_trace ]]; then
# from to_trace
grep -v "CUTANDRUN:" $to_trace > ./.trace.tmp
echo -e "\n\n" >> ./.trace.tmp
# from from_trace
grep "CUTANDRUN:" $from_trace | awk -F"\t" 'BEGIN {OFS="\t"}; {if ($19) print $1,$2,$3,$4,$5,$6,$7,$10,$11,$15,$16,$17,$18,$19}' | sort -un | sed s"/NFCORE_CUTANDRUN://g" >> ./.trace.tmp
# update to_trace
......@@ -519,9 +520,10 @@ while sleep 2; do
# workflow finished
if grep "Completed at:" .nextflow.cutandrun.log &> /dev/null; then
kill -9 $nextflowPID &> /dev/null
sleep 2
sleep 5
# update the trace file before leaving
update_trace $from_trace $to_trace
sleep 5
exit 0
# nextflow is NOT running
elif ! ps -p $nextflowPID &> /dev/null; then
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment