Module connectome.preprocessing.colnames_to_yeo7
simple helper functions to create mappings for the column names of different brain atlases and regions
Functions
def colnames_to_yeo_7(colnames: list, order: bool = True) ‑> list-
takes a list of colnames in the brainnetome format/naming and converts them to yeo_7 regions
Examples:
>>> print(colnames_to_yeo_7(["108_110", "1_2", "200_218", "148_140"])) >>> print(colnames_to_yeo_7(["108_110", "1_2", "200_218", "148_140"], order=False))Args
colnames- list of the brainnetome colnames
order- whether the resulting colnames should be ordered
Returns
list of yeo_7 converted colnames
def get_colnames_df(df: bool = True) ‑> Union[pandas.core.frame.DataFrame, dict]-
generates a DataFrame or Dictionary which maps from the brainnetome (246x246) connectivity column names to the yeo_7 network column names
Examples:
>>> print(get_colnames_df()) >>> print(get_colnames_df(False))Args
df- whether to return the column name mappings as a DataFrame
Returns
a DataFrame or dictionary containing the column name mappings