siibra.features.tabular
Multimodal data features in tabular formats.
Submodules
- siibra.features.tabular.bigbrain_intensity_profile
- siibra.features.tabular.cell_density_profile
- siibra.features.tabular.cortical_profile
- siibra.features.tabular.gene_expression
- siibra.features.tabular.interareal_connectivity
- siibra.features.tabular.layerwise_bigbrain_intensities
- siibra.features.tabular.layerwise_cell_density
- siibra.features.tabular.marmoset_cortical_profile
- siibra.features.tabular.receptor_density_fingerprint
- siibra.features.tabular.receptor_density_profile
- siibra.features.tabular.regional_timeseries_activity
- siibra.features.tabular.tabular
Classes
Represents a 1-dimensional profile of measurements along cortical depth, |
|
Represents a 1-dimensional profile of measurements along cortical depth, |
|
A set gene expressions for different candidate genes |
|
Parcellation-averaged connectivity, providing one or more matrices of a |
|
Represents a table of different measures anchored to a brain location. |
|
Represents a table of different measures anchored to a brain location. |
|
Represents a table of different measures anchored to a brain location. |
|
Represents a 1-dimensional profile of measurements along cortical depth, |
|
Blood-oxygen-level-dependent (BOLD) signals per region. |
Package Contents
- class siibra.features.tabular.BigBrainIntensityProfile(regionname: str, depths: list, values: list, boundaries: list, location: siibra.locations.point.Point)

Represents a 1-dimensional profile of measurements along cortical depth, measured at relative depths between 0 representing the pial surface, and 1 corresponding to the gray/white matter boundary.
Mandatory attributes are the list of depth coordinates and the list of corresponding measurement values, which have to be of equal length, as well as a unit and description of the measurements.
Optionally, the depth coordinates of layer boundaries can be specified.
Most attributes are modelled as properties, so dervide classes are able to implement lazy loading instead of direct initialiation.
- DESCRIPTION = "Cortical profiles of BigBrain staining intensities computed by Konrad Wagstyl, as described in...
- location
- class siibra.features.tabular.CellDensityProfile(section: int, patch: int, url: str, anchor: siibra.features.anchor.AnatomicalAnchor, datasets: list = [], prerelease: bool = False, id: str = None)

Represents a 1-dimensional profile of measurements along cortical depth, measured at relative depths between 0 representing the pial surface, and 1 corresponding to the gray/white matter boundary.
Mandatory attributes are the list of depth coordinates and the list of corresponding measurement values, which have to be of equal length, as well as a unit and description of the measurements.
Optionally, the depth coordinates of layer boundaries can be specified.
Most attributes are modelled as properties, so dervide classes are able to implement lazy loading instead of direct initialiation.
- classmethod CELL_READER(b)
- classmethod LAYER_READER(b)
- boundary_annotation(boundary)
Returns the annotation of a specific layer boundary.
- layer_annotation(layer)
- static poly_rev(poly)
- static poly_srt(poly)
- BIGBRAIN_VOLUMETRIC_SHRINKAGE_FACTOR = 1.931
- DESCRIPTION = 'Cortical profile of estimated densities of detected cell bodies (in detected cells per 0.1 cube...
- property boundary_positions
- property cells
- property density_image
- property depth_image
Cortical depth image from layer boundary polygons by equidistant sampling.
- property key
- property layer_mask
Generates a layer mask from boundary annotations.
- property layers
- patch
- section
- property shape
- class siibra.features.tabular.GeneExpressions(levels: List[float], z_scores: List[float], genes: List[str], additional_columns: dict, anchor: siibra.features.anchor.AnatomicalAnchor, datasets: List = [])

A set gene expressions for different candidate genes measured inside a brain structure.
- plot(*args, backend='matplotlib', **kwargs)
Create a box plot per gene.
- Parameters:
backend (str) – “matplotlib”, “plotly”, or others supported by pandas DataFrame plotting backend.
**kwargs – Keyword arguments are passed on to the plot command.
- ALLEN_ATLAS_NOTIFICATION = Multiline-String
Show Value
""" For retrieving microarray data, siibra connects to the web API of the Allen Brain Atlas (© 2015 Allen Institute for Brain Science), available from https://brain-map.org/api/index.html. Any use of the microarray data needs to be in accordance with their terms of use, as specified at https://alleninstitute.org/legal/terms-use/. """
- DESCRIPTION = Multiline-String
Show Value
""" Gene expressions extracted from microarray data in the Allen Atlas. """
- unit = 'expression level'
- class siibra.features.tabular.InterarealConnectivityMatrix(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)

Parcellation-averaged connectivity, providing one or more matrices of a given modality for a given parcellation.
- class ConnectivityConnector(url: str)

Base class for repository connectors.
- class ZipFileLoader(zipfile, filename, decode_func, meta=None)
Loads a file from the zip archive, but mimics the behaviour of cached http requests used in other connectors.
- property cached
- cachefile
- property data
- filename
- func
- meta = None
- zipfile
- get_loader(filename, folder='', decode_func=None)
Get a lazy loader for a file, for loading data only once loader.data is accessed.
- compute_centroids(space)
Computes the list of centroid coordinates corresponding to matrix rows, in the given reference space.
- classmethod decode_meta(spec)
- 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:
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(subject: str = None, regions: 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_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 data
- property name
Returns a short human-readable name of this feature.
- regions
- property subjects
Returns the subject identifiers for which matrices are available.
- class siibra.features.tabular.LayerwiseBigBrainIntensities(regionname: str, means: list, stds: list)

Represents a table of different measures anchored to a brain location.
Columns represent different types of values, while rows represent different samples. The number of columns might thus be interpreted as the feature dimension.
As an example, receptor fingerprints use rows to represent different neurotransmitter receptors, and separate columns for the mean and standard deviations measure across multiple tissue samples.
- DESCRIPTION = "Layerwise averages and standard deviations of of BigBrain staining intensities computed by...
- class siibra.features.tabular.LayerwiseCellDensity(segmentfiles: list, layerfiles: list, anchor: siibra.features.anchor.AnatomicalAnchor, datasets: list = [], prerelease: bool = False, id: str = None)

Represents a table of different measures anchored to a brain location.
Columns represent different types of values, while rows represent different samples. The number of columns might thus be interpreted as the feature dimension.
As an example, receptor fingerprints use rows to represent different neurotransmitter receptors, and separate columns for the mean and standard deviations measure across multiple tissue samples.
- classmethod CELL_READER(b)
- classmethod LAYER_READER(b)
- DESCRIPTION = 'Layerwise estimated densities of detected cell bodies (in detected cells per 0.1 cube...
- property data
- property key
- unit = '# detected cells/0.1mm3'
- class siibra.features.tabular.ReceptorDensityFingerprint(tsvfile: str, anchor: siibra.features.anchor.AnatomicalAnchor, datasets: list = [], prerelease: bool = False, id: str = None)

Represents a table of different measures anchored to a brain location.
Columns represent different types of values, while rows represent different samples. The number of columns might thus be interpreted as the feature dimension.
As an example, receptor fingerprints use rows to represent different neurotransmitter receptors, and separate columns for the mean and standard deviations measure across multiple tissue samples.
- classmethod parse_tsv_data(data: dict)
- plot(*args, **kwargs)
Create a bar plot of a columns of the data. :param backend: “matplotlib”, “plotly”, or others supported by pandas DataFrame
plotting backend.
- Parameters:
**kwargs – takes Matplotlib.pyplot keyword arguments
- polar_plot(*args, backend='matplotlib', **kwargs)
Create a polar plot of the fingerprint. backend: str
“matplotlib” or “plotly”
- DESCRIPTION = 'Fingerprint of densities (in fmol/mg protein) of receptors for classical neurotransmitters...
- property data
- property neurotransmitters: List[str]
- property receptors: List[str]
- property unit: str
- class siibra.features.tabular.ReceptorDensityProfile(receptor: str, tsvfile: str, anchor: siibra.features.anchor.AnatomicalAnchor, datasets: list = [], prerelease: bool = False, id: str = None)

Represents a 1-dimensional profile of measurements along cortical depth, measured at relative depths between 0 representing the pial surface, and 1 corresponding to the gray/white matter boundary.
Mandatory attributes are the list of depth coordinates and the list of corresponding measurement values, which have to be of equal length, as well as a unit and description of the measurements.
Optionally, the depth coordinates of layer boundaries can be specified.
Most attributes are modelled as properties, so dervide classes are able to implement lazy loading instead of direct initialiation.
- classmethod parse_tsv_data(data)
- DESCRIPTION = 'Cortical profile of densities (in fmol/mg protein) of receptors for classical neurotransmitters...
- property key
- property neurotransmitter
- property receptor
- type
- property unit
Optionally overridden in derived classes.
- class siibra.features.tabular.RegionalBOLD(cohort: str, modality: str, regions: list, connector: siibra.retrieval.repositories.RepositoryConnector, decode_func: Callable, files: Dict[str, str], anchor: siibra.features.anchor.AnatomicalAnchor, timestep: str, description: str = '', datasets: list = [], paradigm: str = '', prerelease: bool = False, id: str = None)

Blood-oxygen-level-dependent (BOLD) signals per region.