unravel.region_stats.rstats_mean_IF_summary module#
Use rstats_mean_IF_summary
(rmis
) from UNRAVEL to output plots of mean IF intensities for each region intensity ID.
- Prereqs:
Generate CSV inputs withs
rstats_IF_mean
orrstats_IF_mean_in_seg
After
rstats_IF_mean_in_seg
, aggregate CSV inputs withutils_agg_files
If needed, add conditions to input CSV file names:
utils_prepend
-sk $SAMPLE_KEY -f
- Inputs:
*.csv in the working dir with these columns: ‘Region_Intensity’, ‘Mean_IF_Intensity’
- Outputs:
rstats_mean_IF_summary/region_<region_id>_<region_abbr>.pdf for each region
If significant differences are found, a prefix ‘_’ is added to the filename to sort the files
Note
The first word of the csv inputs is used for the the group names (e.g. Control from Control_sample01_cFos_rb4_atlas_space_z.csv)
Default csv: UNRAVEL/unravel/core/csvs/CCFv3-2020__regionID_side_IDpath_region_abbr.csv
Alternatively, use CCFv3-2017__regionID_side_IDpath_region_abbr.csv or provide a custom CSV with the same columns.
The look up table (LUT) csv has these columns: ‘Region_ID’, ‘Side’, ‘Name’, ‘Abbr’
Usage for t-tests:#
rstats_mean_IF_summary –order Control Treatment –labels Control Treatment -t ttest [-alt two-sided] [–lut CCFv3-2020__regionID_side_IDpath_region_abbr.csv] [-v]
Usage for Tukey’s tests w/ reordering and renaming of conditions:#
rstats_mean_IF_summary –order group3 group2 group1 –labels Group_3 Group_2 Group_1 [–lut CCFv3-2020__regionID_side_IDpath_region_abbr.csv] [-v]
Usage with a custom atlas:#
atlas=path/custom_atlas.nii.gz ; rstats_mean_IF_summary –region_ids $(img_unique -i $atlas) –order group2 group1 –labels Group_2 Group_1 -t ttest [-alt two-sided] [–lut CCFv3-2020__regionID_side_IDpath_region_abbr.csv] [-v]
- unravel.region_stats.rstats_mean_IF_summary.get_max_region_id_from_csvs()[source]#
Retrieve the maximum Region_Intensity from all input CSVs.
- unravel.region_stats.rstats_mean_IF_summary.get_all_region_ids(csv_path)[source]#
Retrieve all region IDs from the provided CSV.
- unravel.region_stats.rstats_mean_IF_summary.filter_region_ids(region_ids, max_region_id)[source]#
Filter region IDs to be within the maximum region ID from the CSVs.
- unravel.region_stats.rstats_mean_IF_summary.remove_zero_intensity_regions(region_ids)[source]#
Remove regions with Mean_IF_Intensity of 0 across all input CSVs.
- unravel.region_stats.rstats_mean_IF_summary.perform_t_tests(df, order)[source]#
Perform t-tests between groups in the DataFrame.