... | ... | @@ -55,7 +55,7 @@ The notebooks have been developed with calcium imaging movies acquired with Scan |
|
|
For the purpose of the notebooks, we will be using only 3 movies Image_Registration_4_an197522_2013_03_08_main_001.tif - Image_Registration_4_an197522_2013_03_08_main_003.tif. Each movie contains data from two channels (GCamP, td-Tomato) interleaved.
|
|
|
|
|
|
### 01_SIMA_DataImport
|
|
|
The first notebook imports raw imaging files into a SIMA dataset. The dataset is saved and, optionally, motion correction is performed. Details are described in the relevant comment sections of the notebook. To adjust this notebook for other imaging data, it should be sufficient to change the parameters in the second code cell (Specify file paths and names). This step will create a new dataset folder, relative to the input data, called analysis.sima (the name can be changed, but it should always end with .sima). Note that the dataset folder only **links** to the original image files. **Therefore, the image files must always reside in the same location relative to the analysis folder!** If motion correction is also performed, a second output folder analysis_hmm.sima will also be created.
|
|
|
The first notebook imports raw imaging files into a SIMA dataset. The dataset is saved and, optionally, motion correction is performed. Details are described in the relevant comment sections of the notebook. To adjust this notebook for other imaging data, it should be sufficient to change the parameters in the second code cell (Specify file paths and names). The notebook will create a new dataset folder, relative to the input data, called analysis.sima (the name can be changed, but it should always end with .sima). Note that the dataset folder only **links** to the original image files. **Therefore, the image files must always reside in the same location relative to the analysis folder!** If motion correction is also performed, a second output folder analysis_hmm.sima will also be created. Each output folder also contains a file with metadata (meta.json) which provides information about the experiment. Metadata is automatically extracted from the TIFF header.
|
|
|
|
|
|
### 02_SIMA_ImageDisplay
|
|
|
After importing the data, it might be useful to visualise the imported datasets (e.g. to sanity check if everything worked as expected). Example code for loading and displaying datasets are provided in the notebook 02_SIMA_ImageDisplay.ipynb.
|
... | ... | @@ -64,15 +64,26 @@ After importing the data, it might be useful to visualise the imported datasets |
|
|
The next step is the creation of regions-of-interest in the movies. SIMA provides automatic tools for ROI segmentation (see http://www.losonczylab.org/sima/1.3.2/tutorial.html#segmentation-and-rois). However, these approaches are very data specific and require a lot of fine-tuning for specific data sets. Therefore, the current setup relies on manual creation of ROIs with ImageJ or roibuddy GUI. For ImageJ, simply load the relevant image into ImageJ and use the ROI Manager to create an RoiSet file (e.g. RoiSet.zip). For roibuddy, start the program from the command prompt (`python -m roibuddy`) and then load the dataset created previously. When using roibuddy, the ROIs are saved directly with the dataset. For a detailed tutorial of the roibuddy GUI see http://www.losonczylab.org/sima/1.3.2/roi_buddy.html.
|
|
|
|
|
|
### 03_SIMA_ExtractTraces
|
|
|
After defining ROIs, we can proceed with extraction of the corresponding calcium traces. This is demonstrated in the notebook 03_SIMA_ExtractTraces.ipynb (both ImageJ and roibuddy ROIs are supported). The extracted traces are then normalized (DFF or DRR) and plotted. Finally, traces are stored in HDF5 format, allowing further processing in different environments (e.g. Matlab, Python). **Todo: define structure of HDF5 file!**
|
|
|
|
|
|
After defining ROIs, we can proceed with extraction of the corresponding calcium traces. This is demonstrated in the notebook 03_SIMA_ExtractTraces.ipynb (both ImageJ and roibuddy ROIs are supported). The extracted traces are then normalized (DFF or DRR) and plotted. Finally, traces are stored in HDF5 format, allowing further processing in different environments (e.g. Matlab, Python). The structure of the output HDF5 file is as follows:
|
|
|
dff_traces.h5
|
|
|
- data
|
|
|
- trial_0 ... array of no. neurons x time
|
|
|
- trial_1
|
|
|
...
|
|
|
- mean_frame ... mean image intensity array (Channel 1)
|
|
|
- rois
|
|
|
- 01 ... a group for each ROI, containing ROI-specific information
|
|
|
- 02
|
|
|
...
|
|
|
|
|
|
A useful program for viewing HDF5 files is [HDFView](https://support.hdfgroup.org/products/java/hdfview/).
|
|
|
|
|
|
## Remaining issues
|
|
|
The current notebook collection only deals with the most basic preprocessing analysis steps for calcium imaging data. Based on the structure of the final data, these steps may be further refined. Some aspects to consider:
|
|
|
- (Semi-)automated ROI creation
|
|
|
- Proper parametrisation and evaluation of motion correction algorithms
|
|
|
- Testing with datasets containing one or more than two channels
|
|
|
- Parallel processing of compute intensive steps
|
|
|
- Parallel processing of compute intensive steps on a cluster
|
|
|
|
|
|
|
|
|
|