unravel.cluster_stats.legend module#
Use cstats_legend
(legend
) from UNRAVEL to summarize regional abbreviations from _valid_clusters_table.xlsx files.
- Inputs:
<asterisk>_valid_clusters_table.xlsx files in the working directory output from
cstats_table
- Outputs:
legend.xlsx
Note
CCFv3-2020_info.csv is in UNRAVEL/unravel/core/csvs/
It has columns: structure_id_path,very_general_region,collapsed_region_name,abbreviation,collapsed_region,other_abbreviation,other_abbreviation_defined,layer,sunburst
Alternatively, use CCFv3-2017_info.csv or provide a custom CSV with the same columns.
Usage:#
cstats_legend [-p path/dir/with/xlsx_files] [-csv CCFv3-2020_info.csv] [-v]
- unravel.cluster_stats.legend.apply_rgb_to_cell(ws, df_w_rgb, col_w_labels, col_num)[source]#
Apply RGB values to cells in the worksheet.
Parameters: ws (openpyxl worksheet), df_w_rgb (DataFrame with RGB values), col_w_labels (column with region labels), region (region name), col_num (column number to apply the RGB values starting from 0)