This guide addresses common issues you might encounter when running the Lizard Wizard pipeline and provides solutions to help get your analysis back on track.
- Installation Issues
- Pipeline Execution Issues
- Masking Problems
- Calcium Signal Detection Issues
- Processing Performance Issues
- Results Interpretation Issues
- Common Error Messages
- Getting Help
- Singularity-specific Issues
Problem: Errors when creating conda environments during first pipeline run.
Solutions:
- Ensure you're using mamba instead of conda (much faster and more reliable)
- Try updating conda:
conda update -n base conda - Clear the conda cache:
conda clean --all - Check for conflicting environments:
conda env list
Problem: Nextflow not found or not executable.
Solutions:
- Verify Nextflow is installed:
nextflow -version - Ensure Nextflow environment is activated:
mamba activate nextflow_env - Check for Java installation (required by Nextflow):
java -version - Re-install Nextflow:
mamba install -c bioconda nextflow
Problem: Unable to clone the repository or access errors.
Solutions:
- Verify your SSH key is set up correctly with GitHub
- Try HTTPS instead:
git clone https://github.com/ArcInstitute/Lizard-Wizard.git - Check GitHub access:
ssh -T git@github.com
Problem: Pipeline doesn't start or errors immediately.
Solutions:
- Check that input paths exist and are accessible
- Verify output directory is writable
- Ensure correct syntax for parameters:
-profile(not--profile) - Make sure Nextflow environment is activated
- Run with verbose logging:
nextflow run main.nf -log execution.log [your params]
Problem: Pipeline starts but fails during execution.
Solutions:
- Check error messages in
.nextflow.logand in terminal output - Look at process-specific logs in the work directory
- Make sure you have sufficient disk space for temporary files
- Use the
-resumeflag to continue from the point of failure - Increase resource allocations if processes are running out of memory
Problem: Errors related to work directory or permissions.
Solutions:
- Specify an explicit work directory:
-work-dir /path/to/work - Ensure the work directory has sufficient space (100GB+ recommended)
- Check permissions:
ls -la /path/to/work - Clear the work directory if it's corrupted:
rm -rf /path/to/work/*
Problem: The pipeline fails to generate masks or creates empty mask files.
Solutions:
- Adjust masking parameters:
- Increase
--start_diameter(try 400-600) - Reduce
--min_object_size(try 300) - Increase
--max_segment_retries(try 5)
- Increase
- Check your images for contrast issues
- Try preprocessing your images to enhance contrast
- For 2D data, set
--use_2d true
Problem: Masks are generated but don't properly capture the cells/organoids.
Solutions:
- Adjust
--start_diameterto match your typical sample size - Try increasing
--diameter_stepfor more thorough parameter exploration - Examine
*_masked-plot.tifto see what went wrong - For complex samples, consider pre-segmenting your images with other tools
Problem: Masks capture too much background or non-cellular regions.
Solutions:
- Increase
--min_object_sizeto filter out small artifacts - Check sample preparation and imaging settings
- Try manual preprocessing to enhance contrast before running the pipeline
Problem: CaImAn doesn't identify any neurons or very few.
Solutions:
- Adjust neuron detection parameters:
- Decrease
--min_corr(try 0.6-0.7) - Decrease
--min_pnr(try 3-4) - Ensure
--gSigmatches your neuron size
- Decrease
- Check the correlation and PNR images to see if signals are visible
- Verify that masking worked correctly
- Make sure calcium signals are present in your data
Problem: CaImAn identifies too many components that aren't real neurons.
Solutions:
- Make detection more stringent:
- Increase
--min_corr(try 0.85-0.95) - Increase
--min_pnr(try 6-8) - Increase
--min_SNR(try 4-5) - Increase
--r_values_min(try 0.9-0.95)
- Increase
- Examine the spatial components to identify patterns in false positives
- Check for motion artifacts or fluctuating background
Problem: Multiple neurons are detected as single components.
Solutions:
- Adjust component separation:
- Increase
--ring_size_factor(try 1.6-2.0) - Decrease
--gSigif neurons are smaller than expected
- Increase
- Check imaging resolution (may need higher resolution)
- Consider reducing cell density in future experiments
Problem: Known calcium events aren't detected in the output.
Solutions:
- Adjust event detection thresholds:
- Decrease
--min_SNR(try 2-2.5) - Adjust
--decay_timeto match your calcium indicator - Decrease
--zscore_threshold(try 2)
- Decrease
- Check ΔF/F₀ calculation parameters:
- Adjust
--f_baseline_perc(try 5-15) - Increase
--win_szfor smoother baselines
- Adjust
- Verify events are visible in raw data plots
Problem: Analysis takes much longer than expected.
Solutions:
- Optimize processing parameters:
- Increase
--tsuband--ssubfor faster downsampling (trade-off with resolution) - Reduce the FOV size if possible
- Process fewer images at once
- Increase
- Adjust resource allocation:
- Increase
-cpusparameter - Run on a more powerful compute node
- Increase
- Check for disk I/O bottlenecks
Problem: Processes fail with out-of-memory errors.
Solutions:
- Process smaller batches of images
- Increase downsampling factors (
--tsuband--ssub) - For large datasets, try processing in chunks and merging results later
Problem: Pipeline fails due to insufficient disk space.
Solutions:
- Clear the work directory regularly
- Use
-profilesettings that clean up intermediate files - Specify a work directory on a volume with more space
- Run with
-resumeto avoid recomputing completed steps
Problem: Calcium traces show excessive noise or artifacts.
Solutions:
- Check raw data quality
- Adjust signal extraction parameters:
- Increase
--min_SNRand--min_pnr - Try different
--decay_timevalues
- Increase
- Look for mechanical or optical artifacts in original data
- Consider preprocessing for motion correction
Problem: Clustering results don't show clear patterns or are inconsistent.
Solutions:
- Adjust clustering parameters:
- Modify
--min_clustersand--max_clusters - Try processing with different random seeds
- Modify
- Filter data to include only high-quality signals
- Look for batch effects or artifacts affecting clustering
- Try alternative clustering methods on exported data
Problem: Expected metric files are missing or incomplete.
Solutions:
- Check logs for specific errors
- Verify that upstream processes completed successfully
- Make sure relevant parameters were set
- Run with debug flag to get more information:
--debug true
Solutions:
- Verify the path to your input directory
- Check file extensions and format
- Make sure you have the correct
--file_typeset - Look for permission issues on the input files
Solutions:
- Check CaImAn logs for specific error messages
- Look for memory issues or parameter conflicts
- Verify that input data formats are as expected
- Try running with different CaImAn parameters
Solutions:
- Adjust masking parameters as suggested in the Masking Problems section
- Check your images for contrast and quality issues
- Verify that your cells/organoids are visible in the minimum projections
- Consider manual pre-segmentation for challenging samples
Solutions:
- Check for other running Nextflow processes:
ps aux | grep nextflow - Remove the lock file:
rm -f /path/to/work/.nextflow.pid - Specify a different work directory
- Wait for the other process to complete
Problem: pip git+ssh install fails during singularity build.
Solutions:
- Ensure network egress from build node;
gitandopenssh-clientare installed in the definition (wizards_staff.def). - Prefer HTTPS with a read token: replace
git+ssh://git@github.com/...withgit+https://<TOKEN>@github.com/...inenvs/wizards_staff.yml, or vendor a released tarball.
Problem: Processes cannot access /large_storage or /scratch.
Solutions:
- Use
-profile singularity,chimerawhich setssingularity.autoMounts = true. - If needed, add explicit binds:
singularity.runOptions = "-B /large_storage -B /scratch"in a profile.
Problem: CUDA/GPU libraries not visible.
Solutions:
- Run with
--nv: setprocess.containerOptions = '--nv'for GPU-enabled processes or in a GPU profile. - Ensure host nodes have compatible NVIDIA drivers and CUDA runtime.
Problem: micromamba create fails with conflicts.
Solutions:
- Inspect
debug_*.jsonartifacts generated by./debug_dependencies.sh. - Align core pins (Python, numpy, scipy, tensorflow, opencv). For CaImAn, consider Python 3.10 and compatible numpy/scipy.
- Move
openaitopipsection inenvs/summary.yml(conda often lacks this package/version).
If you're still experiencing issues after trying the solutions in this guide:
-
Check the logs: Most problems can be diagnosed from the detailed logs in the output directory.
-
Search GitHub Issues: Check if someone has reported a similar problem: https://github.com/ArcInstitute/Lizard-Wizard/issues
-
Create a new issue: If your problem is not resolved, create a new issue with:
- A clear description of the problem
- The command you ran
- Relevant error messages
- Information about your computing environment
- Any error messages included in the terminal output
- A copy of the relevent log error files