unravel.allen_institute.mapmysections.soma_ratio module#
Use mms_soma_ratio or mms_sr from UNRAVEL to compute the proportion of somata voxels in specified atlas regions.
Note
We used this to compute the proportion of voxels in the anterior commissure containing somata.
This was used to label samples as preferentially having oligodendrocytes.
For each seg file, the count of of non-zero voxels in a specified atlas label is divided by the total voxels of that atlas label.
If the ratio is > 0.004, the sample is predicted to be oligodendrocyte-enriched.
- Prereqs:
warp_to_atlasto warp segmentation volumes to atlas space (e.g., CCFv3 2020 30um).
- Output:
soma_ratio/<input stem>_soma_ratio.csv
Columns: label, count, total_label, proportion.
label = atlas label (e.g., 890 for anterior commissure)
count = count of nonzero voxels in that label
total_label = total voxels of that label in the atlas
proportion = count / total voxels of that label in the atlas
- Next steps:
Use
mms_concat_with_sourceto concatenate multiple CSVs into one file.
Usage:#
mms_soma_ratio -a path/atlas_CCFv3_2020_30um.nii.gz [-i ‘<asterisk>_seg_1.nii.gz’] [-l 890] [-o output_dir] [-f] [-v]