Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ Several processing steps can be submitted as a chain of Slurm jobs:

```bash
python scripts/deploy_process.py -p cochlea-net/mobie -j <params.json> --deploy # add image data to MoBIE, transfer to S3
python scripts/deploy_process.py -p cochlea-net/sgn -j <params.json> --deploy # mean_std, apply, segment SGN
python scripts/deploy_process.py -p cochlea-net/ihc -j <params.json> --deploy # mean_std, apply, segment IHC
python scripts/deploy_process.py -p cochlea-net/synapses -j <params.json> --deploy # mean_std, apply, detect synapses
python scripts/deploy_process.py -p cochlea-net/sgn -j <params.json> --deploy # mask, apply, segment SGN
python scripts/deploy_process.py -p cochlea-net/ihc -j <params.json> --deploy # mask, apply, segment IHC
python scripts/deploy_process.py -p cochlea-net/synapses -j <params.json> --deploy # mask, apply, detect synapses
```

The whole chain is submitted at once.
Expand Down
4 changes: 2 additions & 2 deletions pipelines/cochlea-net/ihc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "Compute the normalization, apply the IHC model and segment the prediction.",
"description": "Mask the volume, apply the IHC model and segment the prediction.",
"group": "IHC",
"steps": [
"mean_std_IHC",
"mask_IHC",
"apply_IHC",
"segment_IHC"
],
Expand Down
4 changes: 2 additions & 2 deletions pipelines/cochlea-net/sgn.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "Compute the normalization, apply the SGN model and segment the prediction.",
"description": "Mask the volume, apply the SGN model and segment the prediction.",
"group": "SGN",
"steps": [
"mean_std_SGN",
"mask_SGN",
"apply_SGN",
"segment_SGN"
],
Expand Down
2 changes: 1 addition & 1 deletion pipelines/cochlea-net/synapses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Detect ribbon synapses around an existing IHC segmentation and match them to it.",
"group": "synapses",
"steps": [
"mean_std_synapses",
"mask_synapses",
"apply_synapses",
"detect_synapses"
],
Expand Down
2 changes: 1 addition & 1 deletion templates/cochlea-net/apply_IHC.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo "Output directory: ${OUTPUT_FOLDER}"
echo "Model: ${MODEL}"

# Verify the input of the job. A missing input stops the rest of the pipeline.
for path in "$INPUT" "$OUTPUT_FOLDER"/mean_std.json "$OUTPUT_FOLDER"/mask.zarr ; do
for path in "$INPUT" "$OUTPUT_FOLDER"/mask.zarr ; do
if [ ! -e "$path" ] ; then
echo "Missing input of the job: $path"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion templates/cochlea-net/apply_SGN.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo "Output directory: ${OUTPUT_FOLDER}"
echo "Model: ${MODEL}"

# Verify the input of the job. A missing input stops the rest of the pipeline.
for path in "$INPUT" "$OUTPUT_FOLDER"/mean_std.json "$OUTPUT_FOLDER"/mask.zarr ; do
for path in "$INPUT" "$OUTPUT_FOLDER"/mask.zarr ; do
if [ ! -e "$path" ] ; then
echo "Missing input of the job: $path"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions templates/cochlea-net/apply_synapses.template
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ echo "Output directory: ${OUTPUT_FOLDER}"
echo "Model: ${MODEL}"

# Verify the input of the job. A missing input stops the rest of the pipeline.
# The mask of 'mean_std_synapses' is read by the prediction itself, not passed to it.
for path in "$INPUT" "$OUTPUT_FOLDER"/mean_std.json "$OUTPUT_FOLDER"/mask.zarr ; do
# The mask of 'mask_synapses' is read by the prediction itself, not passed to it.
for path in "$INPUT" "$OUTPUT_FOLDER"/mask.zarr ; do
if [ ! -e "$path" ] ; then
echo "Missing input of the job: $path"
exit 1
Expand Down
6 changes: 3 additions & 3 deletions templates/cochlea-net/detect_synapses.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export SCRIPT_DIR=$SCRIPT_REPO/scripts
export OUTPUT_FOLDER=<data_dir>/predictions/<cochlea>/<prediction_dir>

# IHC segmentation on the S3 bucket, used to match the detections and to filter them by
# MAX_DISTANCE. MASK_KEY is the full resolution, unlike the MASK_INPUT_KEY of 'mean_std_synapses':
# MAX_DISTANCE. MASK_KEY is the full resolution, unlike the MASK_INPUT_KEY of 'mask_synapses':
# the matching needs the highest resolution available.
export MASK_PATH=<cochlea>/images/ome-zarr/<ihc_prediction>.ome.zarr
export S3_MASK=1
Expand All @@ -39,11 +39,11 @@ export MASK_KEY="s0"
export VOXEL_SIZE="0.38 0.38 0.38"
export THRESHOLD=0.5

# Keep MAX_DISTANCE equal to the one of 'mean_std_synapses', which checks the dilation of the mask
# Keep MAX_DISTANCE equal to the one of 'mask_synapses', which checks the dilation of the mask
# against it. A larger distance here matches detections the mask never covered.
export MAX_DISTANCE=3.0

# See 'mean_std_synapses' for why the MoBIE table is the local proxy of the segmentation.
# See 'mask_synapses' for why the MoBIE table is the local proxy of the segmentation.
export EXTERNAL_INPUT=<mobie_project>/<cochlea>/tables/<ihc_prediction>/default.tsv

echo "Output directory: ${OUTPUT_FOLDER}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#SBATCH --job-name=mean-std-IHC_<cochlea_job_name>
#SBATCH --job-name=mask-IHC_<cochlea_job_name>
#SBATCH -t 00:30:00 # estimated time, adapt to your needs
#SBATCH --mail-user=<user_address> # change this to your mailaddress
#SBATCH --mail-type=FAIL # send mail when job begins and ends
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#SBATCH --job-name=mean-std-SGN_<cochlea_job_name>
#SBATCH --job-name=mask-SGN_<cochlea_job_name>
#SBATCH -t 00:40:00 # estimated time, adapt to your needs
#SBATCH --mail-user=<user_address> # change this to your mailaddress
#SBATCH --mail-type=FAIL # send mail when job begins and ends
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#SBATCH --job-name=mean-std-synapses_<cochlea_job_name>
#SBATCH --job-name=mask-synapses_<cochlea_job_name>
#SBATCH -t 00:20:00 # estimated time, adapt to your needs
#SBATCH --mail-user=<user_address> # change this to your mailaddress
#SBATCH --mail-type=FAIL # send mail when job begins and ends
Expand Down
Loading