From 676d5303c00ee01cfa1d5e0ee8a7b3b7790d4bd7 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Mon, 17 Jun 2024 13:00:04 +0200 Subject: [PATCH] add input scripts --- ...ut_s3-output_s3-work_s3_nxf24042_vsh075.sh | 57 +++++++++++++++++++ ...ut_s3-output_s3-work_s3_nxf24042_vsh085.sh | 57 +++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100755 scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh075.sh create mode 100755 scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh085.sh diff --git a/scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh075.sh b/scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh075.sh new file mode 100755 index 0000000..2dcde4b --- /dev/null +++ b/scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh075.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e + +script_name=$(basename "$0") +TMPOUT=s3://data-intuitive-tmp/test-nextflow-wave-fusion/output/${script_name%.sh} +OUT=output/${script_name%.sh} +RES=s3://data-intuitive-tmp/test-nextflow-wave-fusion/resources +WORK=s3://data-intuitive-tmp/test-nextflow-wave-fusion/work/${script_name%.sh} +NXF_CONFIG=/tmp/${script_name%.sh}.config + +# set aws profile +export AWS_PROFILE=di +echo "aws profile: $AWS_PROFILE" + +# clear output dir +echo "Clearing output directory" +aws s3 rm $TMPOUT --recursive +[ -d "$OUT" ] && rm -r "$OUT" + +# create config +cat > $NXF_CONFIG <<'EOF' +fusion { + enabled = true +} + +wave { + enabled = true +} + +docker { + runOptions = '-v $HOME/.aws/credentials:/credentials -e AWS_SHARED_CREDENTIALS_FILE=/credentials -e AWS_PROFILE=$AWS_PROFILE' +} +EOF + + +# run component +echo "Running component" +NXF_VER=24.04.2 nextflow run \ + viash-io/test-nextflow-wave-fusion \ + -r build_0_7_5 \ + -main-script target/nextflow/method/main.nf \ + -profile docker \ + -latest \ + -w $WORK \ + -c $NXF_CONFIG \ + --input $RES/input1.txt \ + --multiple_input "$RES/input2.txt" \ + --publish_dir "$TMPOUT" + +# sync output +echo "Syncing output" +aws s3 sync $TMPOUT $OUT + +# check if output is correct +echo "Checking output" +scripts/verify_output.sh "$OUT" diff --git a/scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh085.sh b/scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh085.sh new file mode 100755 index 0000000..0a2e8bc --- /dev/null +++ b/scripts/run_local-code_remote-input_s3-output_s3-work_s3_nxf24042_vsh085.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e + +script_name=$(basename "$0") +TMPOUT=s3://data-intuitive-tmp/test-nextflow-wave-fusion/output/${script_name%.sh} +OUT=output/${script_name%.sh} +RES=s3://data-intuitive-tmp/test-nextflow-wave-fusion/resources +WORK=s3://data-intuitive-tmp/test-nextflow-wave-fusion/work/${script_name%.sh} +NXF_CONFIG=/tmp/${script_name%.sh}.config + +# set aws profile +export AWS_PROFILE=di +echo "aws profile: $AWS_PROFILE" + +# clear output dir +echo "Clearing output directory" +aws s3 rm $TMPOUT --recursive +[ -d "$OUT" ] && rm -r "$OUT" + +# create config +cat > $NXF_CONFIG <<'EOF' +fusion { + enabled = true +} + +wave { + enabled = true +} + +docker { + runOptions = '-v $HOME/.aws/credentials:/credentials -e AWS_SHARED_CREDENTIALS_FILE=/credentials -e AWS_PROFILE=$AWS_PROFILE' +} +EOF + + +# run component +echo "Running component" +NXF_VER=24.04.2 nextflow run \ + viash-io/test-nextflow-wave-fusion \ + -r build_0_8_5 \ + -main-script target/nextflow/method/main.nf \ + -profile docker \ + -latest \ + -w $WORK \ + -c $NXF_CONFIG \ + --input $RES/input1.txt \ + --multiple_input "$RES/input1.txt;$RES/input2.txt" \ + --publish_dir "$TMPOUT" + +# sync output +echo "Syncing output" +aws s3 sync $TMPOUT $OUT + +# check if output is correct +echo "Checking output" +scripts/verify_output.sh "$OUT"