cubnm.datasets¶
Example datasets
|
Load example structural connectivity matrix from HCP-YA dataset |
|
Load example BOLD data from the HCP-YA dataset |
|
Load example FC from the HCP-YA dataset |
|
Load example FCD from the HCP-YA dataset |
|
Loads example heterogeneity maps |
- cubnm.datasets.load_sc(measure, parc='schaefer-100', sub='group-train706', norm='mean')¶
Load example structural connectivity matrix from HCP-YA dataset
Parameters¶
- measure: {‘strength’, ‘length’}
Structural connectivity measure.
'strength': SC strength (tract counts)'length': SC tracts length
- parc:
str Parcellation. Currently only
'schaefer-100'is supported.- sub:
str Subject or group ID. Two subjects and two group-averaged matrices are currently included:
'100206''100307''group-train706''group-test303'
- norm: {‘mean’, None}
SC strength normalization method. Only used when
measureis'strength'.'mean': normalize to mean 0.01. DefaultNone: no normalization
Returns¶
np.ndarrayStructural connectivity matrix. Shape: (nodes, nodes)
- cubnm.datasets.load_bold(parc='schaefer-100', sub='100206', ses='REST1_LR')¶
Load example BOLD data from the HCP-YA dataset
Parameters¶
- parc:
str Parcellation. Currently only
'schaefer-100'is available.- sub:
str Subject ID. Currently two subjects are included:
'100206''100307'
- ses: {‘REST1_LR’, ‘REST2_LR’}
Imaging session.
Returns¶
np.ndarrayThe BOLD signal. Shape: (nodes, volumes)
- parc:
- cubnm.datasets.load_fc(parc='schaefer-100', sub='group-train706', ses='REST', exc_interhemispheric=False, return_tril=True)¶
Load example FC from the HCP-YA dataset
Parameters¶
- parc:
str Parcellation. Currently only
'schaefer-100'is available.- sub:
str Subject or group ID. Two subjects and two group-averaged matrices are currently included:
'100206''100307''group-train706''group-test303'
- ses: {‘REST1_LR’, ‘REST2_LR’, ‘REST’}
Imaging session. For subject-level data currently only
'REST1_LR', and'REST2_LR'are included and for group-level data only'REST'is included.'REST'includes the data averaged across all sessions.- exc_interhemispheric:
bool Whether to exclude interhemispheric connections. Default: False
- return_tril:
bool Whether to return the lower triangular part of the FC matrix.
Returns¶
np.ndarrayFunctional connectivity matrix or its lower triangular part. Shape: (nodes, nodes) or (node_pairs,)
- parc:
- cubnm.datasets.load_fcd(parc='schaefer-100', sub='group-train706', ses='REST', window_size=30, window_step=5, drop_edges=True, exc_interhemispheric=False, return_tril=True)¶
Load example FCD from the HCP-YA dataset
Parameters¶
- parc:
str Parcellation. Currently only
'schaefer-100'is available.- sub:
str Subject or group ID. Two subjects and two group-averaged matrices are currently included:
'100206''100307''group-train706''group-test303'
- ses: {‘REST1_LR’, ‘REST2_LR’, ‘REST’}
Imaging session. For subject-level data currently only
'REST1_LR', and'REST2_LR'are included and for group-level data only'REST'is included.'REST'includes the data pooled across all sessions.- window_size:
int dynamic FC window size (in seconds) will be converted to N TRs (nearest even number) The actual window size is number of TRs + 1 (including center)
- window_step:
int dynamic FC window step (in seconds) will be converted to N TRs
- drop_edges:
bool drop edge windows which have less than window_size volumes
- exc_interhemispheric:
bool Whether to exclude interhemispheric connections. Default: False
- return_tril:
bool Whether to return the lower triangular part of the FCD matrix. Ignored when
subis a group (in this case the return matrix is pooled from FCD lower triangles of individual subjects).
Returns¶
np.ndarrayFunctional connectivity dynamics matrix or its lower triangular part. Shape: (nodes, nodes) or (node_pairs,)
- parc:
- cubnm.datasets.load_maps(names, parc='schaefer-100', norm='minmax')¶
Loads example heterogeneity maps
Parameters¶
- names:
strorlist One or more maps selected from this list:
'myelinmap''thickness''fcgradient01''genepc1''nmda''gabaa''yeo7'
- parc:
str Parcellation. Currently only
'schaefer-100'is supported.- norm: {‘zscore’, ‘minmax’, None}
Map normalization method applied across nodes.
'zscore': maps are z-score normalized'minmax': maps are min-max normalized to [0, 1]None: no normalization
Returns¶
np.ndarrayorstrMaps arrays or path to their text file. Shape: (maps, nodes)
Notes¶
For more information and code on how these maps were obtained and parcellated see
utils.datasets.load_mapsin https://github.com/amnsbr/eidev. The set of maps included here are limited and provided just as examples. We recommend users to useneuromapsand similar tools to obtain and parcellate further maps.- names: