Brain registration, segmentation and analysis using a combination of suite2p, stardist, caiman, ANTs and my own algorithms
This code is not open source.
You may view the code in this repository, but you may not copy, reuse, or modify any part of it without obtaining explicit permission from the author.
To request permission, please contact me via GitHub or kbose@live.in.
- Suite2p β motion correction only
- Stardist β 2D segmentation extended to 4D
- Caiman β calcium trace denoising
- ANTs β image registration
- Custom Python scripts for file handling and orchestration
- Convert raw data to
.tiffiles using ImageJ
-
Run the ImageJ macro:
raw1024x416dualchannel_bioformats.ijm -
When prompted, navigate to the directory containing the folders with raw timelapse data.
-
The macro will convert Thorlabs
.rawfiles into dual-channel.tifformat. -
You may delete the raw files after successful conversion.
- Frame size:
1024 Γ 416 - Pixel size:
0.977 Β΅m - Z-step size:
12 Β΅m - Planes:
17 z-planes + 2 flyback
- Organize your data
- Each timelapse should be in a separate folder
- Z-stacks should be in folders containing
"Zstack"in their names
- Prepare the motion correction script
- Copy the file
suite2p_motionCorrection.pyinto the directory containing the folders with timelapse data.
- Run the motion correction script
From the same terminal (inside the directory with your data folders), run:
python -m suite2p_motionCorrectionπ Ensure you're in the same folder where the script and the timelapse folders are located.
- Choose which data to process
-
The script will display all available folders, automatically skipping any that contain
"Zstack"in the name. -
When prompted:
- Enter a number to process a specific fish/timelapse folder, OR
- Simply press Enter to process all folders automatically