-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dorien-er
authored and
dorien-er
committed
Jun 18, 2024
1 parent
2e4eec4
commit ee70d55
Showing
3 changed files
with
130 additions
and
24 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
56 changes: 56 additions & 0 deletions
56
scripts/run_tw-code_remote-input_s3-output_s3-work_s3_nxf23101_vsh086.sh
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,56 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_name=$(basename "$0") | ||
BUCKET="" # REPLACE | ||
TMPOUT=$BUCKET/test-nextflow-wave-fusion/output/${script_name%.sh} | ||
OUT=output/${script_name%.sh} | ||
RES=$BUCKET/test-nextflow-wave-fusion | ||
WORK=$BUCKET/test-nextflow-wave-fusion/work/${script_name%.sh} | ||
NXF_CONFIG=/tmp/${script_name%.sh}.config | ||
PARAMS=/tmp/${script_name%.sh}.yaml | ||
WORKSPACE="" # REPLACE | ||
COMPUTE_ENV="" # REPLACE | ||
TOWER_API_ENDPOINT="" # REPLACE | ||
|
||
export TOWER_ACCESS_TOKEN="" # REPLACE | ||
export TOWER_API_ENDPOINT="" # REPLACE | ||
|
||
# clear output dir | ||
echo "Clearing output directory" | ||
aws s3 rm $TMPOUT --recursive | ||
[ -d "$OUT" ] && rm -r "$OUT" | ||
|
||
# run component | ||
echo "Running component" | ||
cat > $NXF_CONFIG <<EOF | ||
tower { | ||
enabled = true | ||
endpoint = '$TOWER_API_ENDPOINT' | ||
} | ||
EOF | ||
|
||
cat > $PARAMS <<EOF | ||
input: $RES/input1.txt | ||
multiple_input: "$RES/input1.txt;$RES/input2.txt" | ||
publish_dir: "$TMPOUT" | ||
EOF | ||
|
||
tw launch \ | ||
test-nextflow-wave-fusion \ | ||
--revision build_0_8_6 \ | ||
--main-script target/nextflow/method/main.nf \ | ||
--work-dir $WORK \ | ||
--workspace $WORKSPACE \ | ||
--compute-env $COMPUTE_ENV \ | ||
--config $NXF_CONFIG \ | ||
--params-file $PARAMS | ||
|
||
# sync output | ||
echo "Syncing output" | ||
echo "aws s3 sync $TMPOUT $OUT" | ||
|
||
# check if output is correct | ||
echo "Checking output" | ||
echo "scripts/verify_output.sh $OUT" |
56 changes: 56 additions & 0 deletions
56
scripts/run_tw-code_remote-input_s3-output_s3-work_s3_nxf23101_vsh090rc6.sh
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,56 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_name=$(basename "$0") | ||
BUCKET="" # REPLACE | ||
TMPOUT=$BUCKET/test-nextflow-wave-fusion/output/${script_name%.sh} | ||
OUT=output/${script_name%.sh} | ||
RES=$BUCKET/test-nextflow-wave-fusion | ||
WORK=$BUCKET/test-nextflow-wave-fusion/work/${script_name%.sh} | ||
NXF_CONFIG=/tmp/${script_name%.sh}.config | ||
PARAMS=/tmp/${script_name%.sh}.yaml | ||
WORKSPACE="" # REPLACE | ||
COMPUTE_ENV="" # REPLACE | ||
TOWER_API_ENDPOINT="" # REPLACE | ||
|
||
export TOWER_ACCESS_TOKEN="" # REPLACE | ||
export TOWER_API_ENDPOINT="" # REPLACE | ||
|
||
# clear output dir | ||
echo "Clearing output directory" | ||
aws s3 rm $TMPOUT --recursive | ||
[ -d "$OUT" ] && rm -r "$OUT" | ||
|
||
# run component | ||
echo "Running component" | ||
cat > $NXF_CONFIG <<EOF | ||
tower { | ||
enabled = true | ||
endpoint = '$TOWER_API_ENDPOINT' | ||
} | ||
EOF | ||
|
||
cat > $PARAMS <<EOF | ||
input: $RES/input1.txt | ||
multiple_input: "$RES/input1.txt;$RES/input2.txt" | ||
publish_dir: "$TMPOUT" | ||
EOF | ||
|
||
tw launch \ | ||
test-nextflow-wave-fusion \ | ||
--revision build_0_9_0_RC6 \ | ||
--main-script target/nextflow/method/main.nf \ | ||
--work-dir $WORK \ | ||
--workspace $WORKSPACE \ | ||
--compute-env $COMPUTE_ENV \ | ||
--config $NXF_CONFIG \ | ||
--params-file $PARAMS | ||
|
||
# sync output | ||
echo "Syncing output" | ||
echo "aws s3 sync $TMPOUT $OUT" | ||
|
||
# check if output is correct | ||
echo "Checking output" | ||
echo "scripts/verify_output.sh $OUT" |