-
Notifications
You must be signed in to change notification settings - Fork 642
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use separate script for long stage/unstage commands (#3851)
Signed-off-by: Ben Sherman <[email protected]> Signed-off-by: Paolo Di Tommaso <[email protected]> Co-authored-by: Paolo Di Tommaso <[email protected]>
- Loading branch information
1 parent
17fcc67
commit 4343e33
Showing
5 changed files
with
139 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
set -e | ||
|
||
# | ||
# run normal mode | ||
# | ||
echo '' | ||
NXF_WRAPPER_STAGE_FILE_THRESHOLD='100' $NXF_RUN | tee stdout | ||
[[ `grep 'INFO' .nextflow.log | grep -c 'Submitted process'` == 2 ]] || false | ||
|
||
TASK_DIR=`$NXF_CMD log last -F "process == 'bar'"` | ||
[[ `cat $TASK_DIR/.command.stage | wc -l` -eq 19 ]] || false | ||
|
||
|
||
# | ||
# RESUME mode | ||
# | ||
echo '' | ||
NXF_WRAPPER_STAGE_FILE_THRESHOLD='100' $NXF_RUN -resume | tee stdout | ||
[[ `grep 'INFO' .nextflow.log | grep -c 'Cached process'` == 2 ]] || false | ||
|
||
TASK_DIR=`$NXF_CMD log last -F "process == 'bar'"` | ||
[[ `cat $TASK_DIR/.command.stage | wc -l` -eq 19 ]] || false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
process foo { | ||
input: | ||
val n_files | ||
|
||
output: | ||
path '*.fastq' | ||
|
||
script: | ||
""" | ||
for i in `seq 1 ${n_files}`; do | ||
touch sample_\${i}.fastq | ||
done | ||
""" | ||
} | ||
|
||
process bar { | ||
input: | ||
path '*.fastq' | ||
|
||
output: | ||
stdout | ||
|
||
script: | ||
""" | ||
for f in `ls *.fastq`; do | ||
echo \$f | ||
cat \$f | ||
done | ||
""" | ||
} | ||
|
||
workflow { | ||
foo(10) | bar | ||
} |