From 943cd689f24e4924ad0f7d433ad99d37dcbf9a05 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:06:19 +0200 Subject: [PATCH] Change `echo` output of example 01, to be used in fractal-containers --- .../01_cardio_tiny_dataset/run_example.sh | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/examples/01_cardio_tiny_dataset/run_example.sh b/examples/01_cardio_tiny_dataset/run_example.sh index 923e068..92489a8 100755 --- a/examples/01_cardio_tiny_dataset/run_example.sh +++ b/examples/01_cardio_tiny_dataset/run_example.sh @@ -13,10 +13,10 @@ OUTPUT_PATH=`pwd`/output_${LABEL} cp ../00_user_setup/.fractal.env .fractal.env # Set useful variables -PRJ_NAME="proj-$LABEL" +PROJECT_NAME="proj-$LABEL" DS_IN_NAME="input-ds-$LABEL" DS_OUT_NAME="output-ds-$LABEL" -WF_NAME="Workflow $LABEL" +WORKFLOW_NAME="Workflow $LABEL" # Set cache path and remove any previous file from there export FRACTAL_CACHE_PATH=`pwd`/".cache" @@ -25,26 +25,26 @@ rm -rv ${FRACTAL_CACHE_PATH} 2> /dev/null ############################################################################### # Create project -OUTPUT=`fractal --batch project new $PRJ_NAME` -PRJ_ID=`echo $OUTPUT | cut -d ' ' -f1` +OUTPUT=`fractal --batch project new $PROJECT_NAME` +PROJECT_ID=`echo $OUTPUT | cut -d ' ' -f1` DS_IN_ID=`echo $OUTPUT | cut -d ' ' -f2` -echo "PRJ_ID: $PRJ_ID" -echo "DS_IN_ID: $DS_IN_ID" +echo "PROJECT_ID=$PROJECT_ID" # Do not remove this line, it's used in fractal-containers +echo "DS_IN_ID=$DS_IN_ID" # Update dataset name/type, and add a resource -fractal dataset edit --new-name "$DS_IN_NAME" --new-type image --make-read-only $PRJ_ID $DS_IN_ID -fractal dataset add-resource $PRJ_ID $DS_IN_ID $INPUT_PATH +fractal dataset edit --new-name "$DS_IN_NAME" --new-type image --make-read-only $PROJECT_ID $DS_IN_ID +fractal dataset add-resource $PROJECT_ID $DS_IN_ID $INPUT_PATH # Add output dataset, and add a resource to it -DS_OUT_ID=`fractal --batch project add-dataset $PRJ_ID "$DS_OUT_NAME"` -echo "DS_OUT_ID: $DS_OUT_ID" +DS_OUT_ID=`fractal --batch project add-dataset $PROJECT_ID "$DS_OUT_NAME"` +echo "DS_OUT_ID=$DS_OUT_ID" -fractal dataset edit --new-type zarr --remove-read-only $PRJ_ID $DS_OUT_ID -fractal dataset add-resource $PRJ_ID $DS_OUT_ID $OUTPUT_PATH +fractal dataset edit --new-type zarr --remove-read-only $PROJECT_ID $DS_OUT_ID +fractal dataset add-resource $PROJECT_ID $DS_OUT_ID $OUTPUT_PATH # Create workflow -WF_ID=`fractal --batch workflow new "$WF_NAME" $PRJ_ID` -echo "WF_ID: $WF_ID" +WORKFLOW_ID=`fractal --batch workflow new "$WORKFLOW_NAME" $PROJECT_ID` +echo "WORKFLOW_ID=$WORKFLOW_ID" ############################################################################### @@ -68,12 +68,13 @@ echo "{ ############################################################################### # Add tasks to workflow -fractal --batch workflow add-task $PRJ_ID $WF_ID --task-name "Create OME-Zarr structure" --args-file Parameters/args_create_ome_zarr.json --meta-file Parameters/example_meta.json -fractal --batch workflow add-task $PRJ_ID $WF_ID --task-name "Convert Yokogawa to OME-Zarr" -fractal --batch workflow add-task $PRJ_ID $WF_ID --task-name "Copy OME-Zarr structure" --args-file Parameters/copy_ome_zarr.json -fractal --batch workflow add-task $PRJ_ID $WF_ID --task-name "Maximum Intensity Projection" -fractal --batch workflow add-task $PRJ_ID $WF_ID --task-name "Cellpose Segmentation" --args-file Parameters/args_cellpose_segmentation.json #--meta-file Parameters/cellpose_meta.json -fractal --batch workflow add-task $PRJ_ID $WF_ID --task-name "Napari workflows wrapper" --args-file Parameters/args_measurement.json --meta-file Parameters/example_meta.json +fractal --batch workflow add-task $PROJECT_ID $WORKFLOW_ID --task-name "Create OME-Zarr structure" --args-file Parameters/args_create_ome_zarr.json --meta-file Parameters/example_meta.json +fractal --batch workflow add-task $PROJECT_ID $WORKFLOW_ID --task-name "Convert Yokogawa to OME-Zarr" +fractal --batch workflow add-task $PROJECT_ID $WORKFLOW_ID --task-name "Copy OME-Zarr structure" --args-file Parameters/copy_ome_zarr.json +fractal --batch workflow add-task $PROJECT_ID $WORKFLOW_ID --task-name "Maximum Intensity Projection" +fractal --batch workflow add-task $PROJECT_ID $WORKFLOW_ID --task-name "Cellpose Segmentation" --args-file Parameters/args_cellpose_segmentation.json #--meta-file Parameters/cellpose_meta.json +fractal --batch workflow add-task $PROJECT_ID $WORKFLOW_ID --task-name "Napari workflows wrapper" --args-file Parameters/args_measurement.json --meta-file Parameters/example_meta.json # Apply workflow -fractal --batch workflow apply $PRJ_ID $WF_ID $DS_IN_ID $DS_OUT_ID +JOB_ID=`fractal --batch workflow apply $PROJECT_ID $WORKFLOW_ID $DS_IN_ID $DS_OUT_ID` +echo "JOB_ID=$JOB_ID" # Do not remove this line, it's used in fractal-containers