Repository navigation
Open
Description
Hi,
My colleagues (@bpavie and @irelamb) are trying to run your pipeline easifish on our lightsheet dataset using our university HPC within a slurm job.
What we run
nextflow run easifish --input /dodrio/scratch/projects/2024_300/twoller/input_easifish/samplesheet.csv --datadir /dodrio/scratch/projects/2024_300/twoller/input_easifish -profile singularity --outdir test_easifish/ --skip spot_extraction,segmentation,registration,warp_spots,measure_intensities,assign_spots --reg_ch dummy --singularity_cache_dir /dodrio/scratch/projects/2024_300/twoller/.apptainer/cache --resolution 0.93,0.93,4.05The associated error
ERROR ~ Error executing process > 'EASIFISH:STITCHING:BIGSTITCHER:RESAVE (t1)'
Caused by:
Process `EASIFISH:STITCHING:BIGSTITCHER:RESAVE (t1)` terminated with an error exit status (1)
Command executed:
CMD=(
/opt/scripts/runapp.sh
"singularity"
"/dodrio/scratch/projects/2024_300/twoller/work/3605c4db-f7bb-405b-965f-eda05087dad7/stitching/spark/t1"
"spark://10.141.41.10:7077"
/app/app.jar
net.preibisch.bigstitcher.spark.SparkResaveN5
10
1
"15g"
1
"14g"
--spark-conf "spark.driver.extraClassPath=/app/app.jar"
--spark-conf "spark.executor.extraClassPath=/app/app.jar"
--spark-conf "spark.jars.ivy=${SPARK_WORK_DIR}"
--spark-conf "spark.driver.extraJavaOptions=-Dnative.libpath.verbose=true"
-x /dodrio/scratch/projects/2024_300/twoller/test_easifish/stitching/t1/dataset.xml -o /dodrio/scratch/projects/2024_300/twoller/test_easifish/stitching/t1/dataset.zarr
)
echo "CMD: ${CMD[@]}"
(exec "${CMD[@]}")We succeeded to run the stitching part of your easifish pipeline on one of your dataset.
Is the stitching_padding expressed in percentage or in number ([0,1.0])?
Besides the resolution, which parameters would you recommend to specify?
Let us know whether it is easier to answer by issue, by mail or through a short call.
Thank you in advance and kind regards,
Benjamin, Irene and Tatiana
Metadata
Metadata
Assignees
Labels
No labels
Activity
cgoina commentedon Apr 20, 2026
@tatianawoller, @bpavie and @irelamb,
stitching_paddingparameter is used with the old 'SaalfeldStitcher' stitcher and it's the tile padding and the values are in voxels "x-padding,y-padding,z-padding". You used BigStitcher which is the one we recommend because the old one is not supported very well. Also the saalfeld stitcher only generates N5 and lately I haven't done a lot of testing for n5 data. It would help if you could find the actual error somewhere in the logs. Nextflow creates a lot of logs and especially with Spark finding the proper log is not easy.tatianawoller commentedon Apr 20, 2026
Hi @cgoina,
Thank you a lot for the swift and clear answer.
So, here is an overview at which stage the pipeline stopped
and here is the log file associated to the process EASIFISH:STITCHING:BIGSTITCHER:RESAVE (t1).
command.log
Thank you in advance,
cgoina commentedon Apr 23, 2026
@tatianawoller the logs do not have enough information to tell you what happened. Do you have any other way to validate your CZI that is correct? Or can you share it with us somehow?
tatianawoller commentedon Apr 23, 2026
@cgoina I have just shared the file through globus. Let me know if you can access it. Thank you in advance
cgoina commentedon Apr 24, 2026
@tatianawoller I got the CZI and I was able to run the entire stitching. I am attaching here my input parameters. In input.json I disabled all steps except for stitching. You can also see exactly the parameters that I used for Bigstitcher. Make sure you use the latest version of the pipeline because the way the BigStitcher steps are handled have changed recently, mostly in order to support all possible knobs from BigSticher-Spark tools.
bigstitcher_config.yml
input.json
samplesheet.csv
bpavie commentedon Apr 29, 2026
@cgoina , thanks for your fast feedback !
We are still a bit unsure how to run the workflow in order to obtain this result.
We think to submit a slurm job like this:
Which will use the
bigstitcher_config.ymlandsamplesheet.csvfiles hat you provided us.However, we are not sure how to use the
input.jsonthat you added, we didn't see where/when it should be used, could you give us more information on that ?Best,
Benjamin
tatianawoller commentedon Apr 29, 2026
Hi @cgoina,
Thank you for the tips and explanation.
We managed to run the pipeline with the input.json file (where we have modified the paths) within a slurm jobs as follows:
with the error
However, it seems we have a configuration regarding the resources of the spark cluster and our own HPC.
We are using the following partition :
dodrio/cpu_milan_rhel9: phase 2 main partition: 384 workernodes, each with: 2x 64-core AMD Epyc 7763 CPU 2.45 GHz (“Milan” microarchitecture, 128 cores per node) 238 GiB usable RAM (~1.85GB/core), no swap 480 GB SSD local diskHow do you determine the configuration, resources of the spark cluster or do you have any other recommendation?
Thank you in advance and kind regards,
cgoina commentedon Apr 29, 2026
@tatianawoller , @bpavie that input.json contains all command line parameters that I want to provide to the pipeline. My command line looks like this
The command above uses a kubernetes cluster specified by the
-profile kubernetes. In my case the kubernetes profile is defined in the config file conf/kubernetes.config that is checked in. If I run this on the Janelia cluster I use this commandIn this case the cluster configuration and the executor are defined in a configuration uploaded to
https://github.com/nf-core/configsI checked and I haven't seen any configuration for VIB or probably I used a wrong name but if you don't have one uploaded you can always create a local configuration file that configures the slurm executor. If you look under theconffolder from the github repository I mentioned, you can find many configurations that use slurm (crick.config, jax.config,...). You can use that as a template to define the local configuration for your slurm cluster. I don't know why in your case the application timed out - I don't know exactly which container runtime Nextflow tries to use by default. You can try to use-profile singularityor-profile apptainerwhichever is available and see if that works out of the box since you are already on a machine powerful enough to run this pipeline.bpavie commentedon Apr 30, 2026
Hi @cgoina
Thanks for the help, we succeed to obtain the stiched dataset in ome.zarr.
Here is the script we used to submit the SLURM job:
We used the institutional nextflow config from VSC Ugent (vsc_ugent) as we are relying on the regional cluster.
We noticed that the pixel size was correctly set in the output of the ome.zarr for the BigDataViewer (so it seems that it's read directly from the CZI metadata). We will also try to visualize it with Webknossos.
Our next step will be to run then the cellpose segmentation (and skipping the registration).
One last things, we tried to run it locally via WSL on windows but we wee wondering if we would need a profile to run it on a local workstation
Thanks again for the help!
Benjamin
cgoina commentedon Apr 30, 2026
Hi @bpavie - I am glad you were able to run the stitcher. To run locally on WSL if you have apptainer installed just use any of the apptainer, docker or podman profile. I am running this on my mac laptop (with the test dataset) using podman profile for example. You can also run segmentation only using conda and the conda config - which I also use locally to make sure the cellpose can use the MPS device for segmentation.
tatianawoller commentedon May 1, 2026
Hi @cgoina,
Thank you a lot for all your help.
I played a bit the spark configuration parameters so that the jobs would be less in the queue.
How do you adapt the spark and dask configuration parameters as a function of the size of the dataset ?
Thank you in advance and kind regards,
irelamb commentedon May 4, 2026
Hi @cgoina ,
Thank you for all your help regarding the stitching. We are testing it on a whole mouse brain data set. We were wondering if easifish contains a step to register the brain to an ATLAS or not. If I understand well , the registration step with Bigstream is used to register multiple images together, from multiple staining rounds for example. Can it be used to align channels from the same multi-channel image? Could you share an example Bigstream yml configuration file with us?
Thank you in advance and kind regards,
cgoina commentedon May 4, 2026
@irelamb Bigstream can align any moving 3-D volume to any fixed 3-D volume - I never tested it with 2-D - and 2-D might generate errors because of how the data is read always as 3D blocks. I have not tested in the pipeline the case where the fix and moving volume come from the same zarr - just different channels but it might work - I don't know. Also regarding aligning to an ATLAS that probably requires putting the ATLAS in a directory structure that mimics round 0 or the reference round (doesn't have to be round 0 - it can have any name).
irelamb commentedon May 5, 2026
@cgoina thank you very much for the fast reply. It is clear what Bigstream is made for. I am also not sure that it would be suitable for channel alignment or atlas registration.
We were testing the stitching with easifish on a larger data set (320 GB) with 2 channels, but we get an error at the RESAVE step:
ProcessEASIFISH:STITCHING:BIGSTITCHER:RESAVE (r0)terminated with an error exit status (1)Looking more carefully, the error is:
We are unsure about what causes the error. Do you have any suggestion about it?
We get the same error when trying to stitch the same data set that you processed (the organoid) but with 3 channels instead of 2. With respect to your input files, we modified the number of channels and the spark configuration parameters (and the paths).
Let me know if you need further information. Thank you very much in advance.
cgoina commentedon May 5, 2026
@irelamb do you have a stack trace not just the exception? When you process the CZI for the organoid with 3 channels - does your CZI have all 3 channels? BigStitcher converts the CZI to view setups that it registers and fuses together and now the only place where channel is important for BigStitcher is in bigstitcher_config yaml. The points of interest detection detects the points only in one channel and it registers only one channel then copies the transformations to the other channels. Keep in mind channels are 0-based so for 3 channels you have (0,1,2) so if you use 3rd channel make sure you set channelId=2. If you upload your input.json and bigstitcher config I can review it
irelamb commentedon May 6, 2026
.command.log
@cgoina thank you for your reply. I am attaching the log file (trace file is empty) of the resave step.
Yes, the organoid dataset (czi) has all three channels. Yes, we checked that the channel indices are 0-based in the input.json file, and we are using the second channel for stitching : "stitching_channel": "1".
I have attached the config.yml and input.json files. Thanks a lot for your help.
bigstitcher_config.yml
input.json
cgoina commentedon May 6, 2026
@irelamb I got a dataset for which I got the same error so now I have something to work on. This is the stacktrace that I got - is it similar to yours?
irelamb commentedon May 6, 2026
@cgoina thank you for the reply. I think I get the same stack trace as you :
+ exec /usr/bin/tini -s -- /opt/spark/bin/spark-class org.apache.spark.deploy.SparkSubmit --properties-file /dodrio/scratch/projects/2024_300/ilamberti/scripts_slurm/work/d9643e1d-5531-436b-840f-64d6fd7fbd58/stitching/spark/r0/spark-defaults.conf --conf spark.driver.host=10.141.41.23 --conf spark.driver.bindAddress=10.141.41.23 --master spark://10.141.41.23:7077 --class net.preibisch.bigstitcher.spark.SparkResaveN5 --conf spark.files.openCostInBytes=0 --conf spark.default.parallelism=10 --conf spark.driver.extraClassPath=/app/app.jar --conf spark.executor.extraClassPath=/app/app.jar --conf spark.jars.ivy=/opt/spark//work-dir --conf spark.driver.extraJavaOptions=-Dnative.libpath.verbose=true --executor-cores 4 --executor-memory 30g --driver-cores 1 --driver-memory 15g /app/app.jar -x /dodrio/scratch/projects/2024_300/ilamberti/easifish_sample29_organoid_results/stitching/r0/dataset.xml -o /dodrio/scratch/projects/2024_300/ilamberti/easifish_sample29_organoid_results/stitching/r0/dataset.zarr -s ZARR2 java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3 at util.Grid.cropBlockDimensions(Grid.java:79) at util.Grid.create(Grid.java:110) at net.preibisch.mvrecon.process.n5api.N5ApiTools.assembleJobs(N5ApiTools.java:726) at net.preibisch.mvrecon.process.n5api.N5ApiTools.assembleJobs(N5ApiTools.java:694) at net.preibisch.bigstitcher.spark.SparkResaveN5.lambda$call$4(SparkResaveN5.java:361) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at net.preibisch.bigstitcher.spark.SparkResaveN5.call(SparkResaveN5.java:364) at net.preibisch.bigstitcher.spark.SparkResaveN5.call(SparkResaveN5.java:64) at picocli.CommandLine.executeUserObject(CommandLine.java:2031) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469) at picocli.CommandLine$RunLast.handle(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2423) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) at picocli.CommandLine$RunLast.execute(CommandLine.java:2425) at picocli.CommandLine.execute(CommandLine.java:2174) at net.preibisch.bigstitcher.spark.SparkResaveN5.main(SparkResaveN5.java:481) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:958) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1046) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1055) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)irelamb commentedon May 7, 2026
@cgoina We were wondering if you ever run the spark cluster in a multinode configuration. We are limited to 450 GB of RAM per node, and we were wondering if we should consider to use multiple nodes for the largest data sets (1-2 TB).
I have also noticed that the size of the CZI datasets increases considerably once stitched and converted to ome-zarr (~2.3x) with easifish. Since you are also working with CZI, I was wondering if it is something that you also noticed, and if that's due to some compression on the CZI files, rather than the conversion to ome-zarr.
cgoina commentedon May 7, 2026
@irelamb ArrayIndexException has been fixed. You may have to remove the dataset.zarr and if you cached the bigstitcher container you may have to remove that as well.
Regarding the question about running the spark cluster in multinode configuration - if I understand your question correctly - I always run the spark workers on different nodes - I actually don't even know where they end up because the LSF scheduler may put some workers on the same node and some on different nodes depending on cluster usage and the resources requested for the workers.
About the size - I really haven't seen increases in size - on the contrary - the czi is ~500G and the final zarr is 26G but it might be because this dataset is very sparse. Event the temporary dataset.zarr created only for stitching is about half the size of the original czi.
irelamb commentedon May 7, 2026
@cgoina thank you very much for the fast debugging. we were able to run successfully easifish on the organoid data set, without the index exception.
about the data size, thank you for the details on your side. It looks quite different for us, not sure why: the 30 GB czi (organoid, 3 channels), that I input in easifish, generated a 19 GB dataset.zarr (similar to what you report), but a 89 GB final stitched ome-zarr file... Since you already stitched the same data set but with 2 channels, may I ask what was the size of the final stitched data set you got?
cgoina commentedon May 8, 2026
@irelamb you are right - the czi you sent me was 20G and the zarr is 53G. The difference for the numbers I sent before is also the compression level. For the organoid I used the default compression - zstd level 3 - and for the others I used level 5 - but also the organoid is much denser than the other datasets I reported so it's not quite comparing apples with apples. Try to bump up the level in your bigstitcher config:
If you want to redo just rename the stitched.zarr container and only run the last 2 bigstitcher steps: "createContainer,fuse"
irelamb commentedon May 11, 2026
@cgoina thank you for the reply. I did as you suggested (rename dataset.zarr, run only "createContainer,fuse", added "--resume" to the command line) but got a Spark error:
We rerun from scratch the stitching with compression level 5 without errors, however the change in file size is modest (86 GB instead of 87 GB).
cgoina commentedon May 12, 2026
Hi @irelamb I asked around and now I realize the answer was right in front of me. BigStitcher's final zarr uses floats and your czi used uint16. That pretty much doubles your data and the zstd compression for float is not great. So try to set the datatype for the fused container to uint16
For me just running createContainer and fuse works but I have to delete previous container. Also from the stacktrace you sent me I could tell exactly what went wrong.
irelamb commentedon May 14, 2026
Hi @cgoina
That makes a lot of sense ! I tested what you suggested, only createContainer,Fuse on the ~32 GB data set I had stitched, and it worked perfectly, the final zarr being ~29 GB (compression level = 3). We are testing the segmentation as well, we may come back with a few questions about that too. Meanwhile, thank you so much for your help