siibra.features.connectivity.regional_connectivity

Classes

RegionalConnectivity

Parcellation-averaged connectivity, providing one or more matrices of a

Module Contents

class siibra.features.connectivity.regional_connectivity.RegionalConnectivity(cohort: str, modality: str, regions: list, connector: siibra.retrieval.repositories.RepositoryConnector, decode_func: Callable, files: Dict[str, str], anchor: siibra.features.anchor.AnatomicalAnchor, description: str = '', datasets: list = [], prerelease: bool = False, id: str = None)
Inheritance diagram of siibra.features.connectivity.regional_connectivity.RegionalConnectivity

Parcellation-averaged connectivity, providing one or more matrices of a given modality for a given parcellation.

compute_centroids(space)

Computes the list of centroid coordinates corresponding to matrix rows, in the given reference space.

Parameters:

space (Space, str) –

Return type:

list[tuple(float, float, float)]

get_matrix(subject: str = None)

Returns a matrix as a pandas dataframe.

Parameters:

subject (str, default: None) – Name of the subject (see ConnectivityMatrix.subjects for available names). If None, the mean is taken in case of multiple available matrices.

Returns:

A square matrix with region names as the column and row names.

Return type:

pd.DataFrame

get_profile(region: str | siibra.core.region.Region, subject: str = None, min_connectivity: float = 0, max_rows: int = None, direction: Literal['column', 'row'] = 'column')

Extract a regional profile from the matrix, to obtain a tabular data feature with the connectivity as the single column. Rows are be sorted by descending connection strength.

Parameters:
  • region (str, Region) –

  • subject (str, default: None) –

  • min_connectivity (float, default: 0) – Regions with connectivity less than this value are discarded.

  • max_rows (int, default: None) – Max number of regions with highest connectivity.

  • direction (str, default: 'column') – Choose the direction of profile extraction particularly for non-symmetric matrices. (‘column’ or ‘row’)

plot_matrix(subject: str = None, regions: List[str] = None, logscale: bool = False, *args, backend='nilearn', **kwargs)

Plots the heatmap of the connectivity matrix using nilearn.plotting.

Parameters:
  • subject (str) – Name of the subject (see ConnectivityMatrix.subjects for available names). If “mean” or None is given, the mean is taken in case of multiple available matrices.

  • regions (list[str]) – Display the matrix only for selected regions. By default, shows all the regions. It can only be a subset of regions of the feature.

  • logscale (bool) – Display the data in log10 scale

  • backend (str) – “nilearn” or “plotly”

  • **kwargs – Can take all the arguments nilearn.plotting.plot_matrix can take. See the doc at https://nilearn.github.io/stable/modules/generated/nilearn.plotting.plot_matrix.html

plot_profile(region: str | siibra.core.region.Region, subject: str = None, min_connectivity: float = 0, max_rows: int = None, direction: Literal['column', 'row'] = 'column', logscale: bool = False, *args, backend='matplotlib', **kwargs)
cohort
property name

Returns a short human-readable name of this feature.

regions
property subjects

Returns the subject identifiers for which matrices are available.