-
Notifications
You must be signed in to change notification settings - Fork 6
statistical pipeline
n.horner edited this page Aug 8, 2019
·
20 revisions
Before running any LAMA scripts, make sure you the LAMA virtual environment
To do the statistical analysis, the wild type specimens and mutant lines need to have previously been run through the registration pipeline
One this has been done, you should have three folders with the following names:
- baseline - containing the baseline registration results
- mutant - containing the mutant line registration results
- target - containing the population average and associated files (label maps, label name files etc)
In each specimen folder of the mutant and baseline folders there will be a CSV that contains the whole embryo volume information named staging_info_volume.csv.
- The staging info from each specimen is collated from the staging CSV files.
The stats config file is in yaml format (http://yaml.org/)
stats_types = [
'organ_volumes',
'intensity',
'jacobians'
]
reg_folder = 'similarity'
jac_folder = 'similarity'
mask = 'mask_tight.nrrd'
label_info = 'label_info.csv'
label_map = 'labels.nrrd'
blur_fwhm = 100
voxel_size = 14.0
invert_stats = true
baseline_ids = 'baselines_ids.csv'
```toml
stats_types: list the analysis types to do (currently three available)
reg_folder: the name of the registration sub-folders to use
This will be the name of the final registration stage (todo: get this automatically)
jac_folder: the name of the jacobian determinant folder name to use
todo (make this optional as generally we produce jacobians from only one registration stage
mask: The name of the mask to use for statistical analysis
This could be a different mask than that used for registration. We have noticed that too tight a mask for registration can call problems. Whereas we might want a tighter mask for removing data points outside of the embryo.
label_info: name of the label info file. See [Input data](/input_data#label-info-file)
label_map: name of the label map. See [Input data(/input_data#label-map)
blur_fwhm: the size of the Gaussian blur kernel (full width half maximum in micrometers)
voxel_size: the voxel size of the input images in micrometers
baseline_ids: (optional) name of a csv file containing baseline ids (one per row) to be included in the analysis. If ommited, all baselines will be used.
#### Running the script
$ lama_stats.py -c -w -m -t -o
## Output
In the output folder (specified with the *-o* argument) There will be a folder for each line processed. In that folder will be subfolders containing the output of each analysis type.
In the following example mutant1 has results fro the jacobian analysis. The nrrd file named line_jacobians.nrrd are the line-level results, and the files with the specimen names in them are the specimen-level results.
![Stats results folder](imgs/stats_output.png)
These images can be analysed using the image viewer [VPV](https://github.com/mpi2/vpv) that we have developed.
There are instructions on how to loo at statistical heatmaps in vpv [here](https://github.com/mpi2/vpv/wiki/Viewing-statistical-parametric-heatmaps).