unravel.region_stats.rstats_summary module#
Use rstats_summary
(rss
) from UNRAVEL to plot cell densensities for each region and summarize results.
- Inputs:
CSVs with cell densities for each region (e.g., regional_stats/<condition>_sample??_cell_densities.csv)
Input CSV columns: Region_ID, Side, ID_Path, Region, Abbr, <OneWordCondition>_sample??
The <OneWordCondition>_sample?? column has the cell densities for each region.
- Outputs:
Saved to ./<args.test_type>_plots_<side>
Plots for each region with cell densities for each group (e.g., Saline, MDMA, Meth)
Summary of significant differences between groups
regional_cell_densities_all.csv (Columns: columns: Region_ID,Side,Name,Abbr,Saline_sample06,Saline_sample07,…,MDMA_sample01,…,Meth_sample23,…)
Note
Example hex code list (flank arg w/ double quotes): [‘#2D67C8’, ‘#27AF2E’, ‘#D32525’, ‘#7F25D3’]
Default csv: UNRAVEL/unravel/core/csvs/CCFv3-2020_regional_summary.csv
It has columns: Region_ID, ID_Path, Region, Abbr, General_Region, R, G, B
Alternatively, use CCFv3-2017_regional_summary.csv or provide a custom CSV with the same columns.
Usage for Tukey tests:#
rstats_summary –groups Saline MDMA Meth -hemi both [-div 10000] [-y cell_density] [-csv CCFv3-2020_regional_summary.csv] [-b ABA] [-s light:white] [-o tukey_plots] [-e pdf] [-v]
Usage for t-tests:#
rstats_summary –groups Saline MDMA -hemi both -t t-test -c Saline [-alt two-sided] [-div 10000] [-y cell_density] [-csv CCFv3-2020_regional_summary.csv] [-b ABA] [-s light:white] [-o t-test_plots] [-e pdf] [-v]
- unravel.region_stats.rstats_summary.parse_color_argument(color_arg, num_groups, region_id, csv_path)[source]#
- unravel.region_stats.rstats_summary.summarize_significance(test_df, id)[source]#
Summarize the results of the statistical tests.
- Parameters:
test_df (-) – the DataFrame containing the test results (w/ columns: group1, group2, p-value, meandiff)
id (-) – the region or cluster ID
- Returns:
the DataFrame containing the summarized results
- Return type:
summary_df (DataFrame)