Fetching datasets#

We have several templates, parcellations, and datasets integrated in NiSpace.
These can be accessed through functions named nispace.datasets.fetch_...(). On first access, data should should be downloaded to the user’s home directory into a folder called nispace-data. The user can however provide a custom data folder via the argument nispace_data_dir available for every fetch_ method.

Fetch reference datasets#

We start with the reference datasets as these are most important for you.
With “reference data”, we refer to brain maps that are ususally used to compare a certain (set of) target map(s) to. The main reference maps for now are nuclear imaging maps (pet), mRNA expression maps from the Allen Human Brain Atlas (mrna and magicc). Later, we will run systematic comparisons of user-defined target maps with with these reference maps, for example to answer the question if a group-comparison map (like a SPM t-map) spatially correlates (“colocalizes”) with certain neurotransmitter receptors.

We can fetch our reference data with: nispace.datasets.fetch_reference(...).

  • The first and only mandatory argument determines the reference dataset (e.g., pet or mrna).

  • The second argument is used to subset the datasets; it can be a part of a name or, for the pet dataset, a dict with detailed sub-setting information (see below).

  • The argument parcellation will cause the data to be returned in parcellated format as a pandas DataFrame. See below for included parcellations.

  • The argument collection can be a name of a map subset shipped with the toolbox. Very relevant for pet data, as we have many maps targeting the same transmitter receptor, and more so for mrna data, as we ship the toolbox with, e.g., pre-defined cell-type marker gene sets.

When fetching datasets, the function will by default print detailed information on the sources of each dataset. The user is responsible for citing these sources when used in publications!

[1]:
# load local nispace, for testing
# COMMENT THIS OUT IF YOU RUN THIS LOCALLY AFTER INSTALLING NISPACE
import sys
sys.path.append("/Users/llotter/projects/nispace/")
[2]:
from nispace.datasets import fetch_reference

Nuclear imaging ("pet")#

Collections include:

  • "All": all maps

  • "AllTargetSets": all maps, but sorted in sets by tracer target. If called without a parcellation, this will not have an influence. If called with a parcellation, i.e. returned as a table, it will have a 3-dimensional “multi”-index, with “sets” in the first, “map” in the second, and “weight” (= number of subjects) in the third place.

  • "UniqueTracers": one pre-selected map for each target. When called with a parcellation, returned as table with a 2d-index, sorting the maps into sets by target groups (e.g., “Dopamine”, or “Serotonin”).

  • "UniqueTracerSets": one or more maps for each target, given they have the same tracer. If parcellation is provided, the output table is indexed as for “AllTargetSets”.

In many instances, "UniqueTracers" will be a good choice.

[3]:
# Get all pet maps as paths to volumes
print("All pet maps")
pet_maps = fetch_reference("pet")
print("Number of pet maps:", len(pet_maps))
print("First map path:", pet_maps[0])
All pet maps
INFO | 16/06/25 09:25:24 | nispace: Loading pet maps.
The NiSpace "PET" dataset is based on openly available nuclear imaging maps largely accessed via neuromaps
(https://neuromaps-main.readthedocs.io/). If requested in the varying original spaces and resolutions (termed "MNI152",
"fsaverageOriginal", or "fsLROriginal"), the maps are downloaded directly from the source and cached locally. If, as is highly
recommended, the maps are requested in a defined space ("MNI152NLin2009cAsym", "MNI152NLin6Asym", "fsaverage", or "fsLR"),
they are downloaded from the NiSpace-data GitHub repo (find them in `~HOME/nispace-data/reference/pet/map`).
The NiSpace-hosted MNI maps were directly registered to 2mm MNI152NLin6Asym space, and transformed to 2mm MNI152NLin2009cAsym
with a pre-estimated MNI-to-MNI transformation using SynthMorph v4 (https://martinos.org/malte/synthmorph/). The resulting maps
were masked with a liberal grey matter mask generated from the Harvard-Oxford atlas and scaled from 1e-6 to 1. The scaling was
transferred from MNI to surface maps if both were available for the same source (e.g., maps from Beliveau et al.).
The accompanying metadata table contains detailed information about tracers, source samples, original publications and data
sources, as well as the publication licenses. Every map should be cited when used. The responsibility for this lies with the user!
We additionally ask to cite:
- Markello et al., 2022 (https://doi.org/10.1038/s41592-022-01625-w)
- Hansen et al., 2022 (https://doi.org/10.1038/s41593-022-01186-3)
- Dukart et al., 2021 (https://doi.org/10.1002/hbm.25244)
- Hoffmann et al., 2024 (https://doi.org/10.1162/imag_a_00197; if NiSpace-processed maps are used)
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b

- target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017         Source: Beliveau2017       CC BY-NC-SA 4.0  https://doi.org/10.1523/JNEUROSCI.2830-16.2016
    CAVE: Processed in fsaverage space, use  volumetric maps only for subcortex! (NiSpace tables contain only fsaverage-cortical data for now.)
- target-5HT1a_tracer-way100635_n-35_dx-hc_pub-savli2012         Source: Savli2012          CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2012.07.001
- target-5HT1b_tracer-az10419369_n-36_dx-hc_pub-beliveau2017     Source: Beliveau2017       CC BY-NC-SA 4.0  https://doi.org/10.1523/JNEUROSCI.2830-16.2016
    CAVE: Processed in fsaverage space, use  volumetric maps only for subcortex! (NiSpace tables contain only fsaverage-cortical data for now.)
- target-5HT1b_tracer-p943_n-23_dx-hc_pub-savli2012              Source: Savli2012          CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2012.07.001
- target-5HT1b_tracer-p943_n-65_dx-hc_pub-gallezot2010           Source: Gallezot2010       CC BY-NC-SA 4.0  https://doi.org/10.1038/jcbfm.2009.195, https://doi.org/10.1007/s00213-010-1881-0, https://doi.org/10.1001/archgenpsychiatry.2011.91, https://doi.org/10.1016/j.biopsych.2013.11.022, https://doi.org/10.1016/j.jad.2016.02.021, https://doi.org/10.1007/s00259-014-2958-5, https://doi.org/10.1002/syn.22159
- target-5HT2a_tracer-altanserin_n-19_dx-hc_pub-savli2012        Source: Savli2012          CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2012.07.001
- target-5HT2a_tracer-cimbi36_n-29_dx-hc_pub-beliveau2017        Source: Beliveau2017       CC BY-NC-SA 4.0  https://doi.org/10.1523/JNEUROSCI.2830-16.2016
    CAVE: Processed in fsaverage space, use  volumetric maps only for subcortex! (NiSpace tables contain only fsaverage-cortical data for now.)
- target-5HT4_tracer-sb207145_n-59_dx-hc_pub-beliveau2017        Source: Beliveau2017       CC BY-NC-SA 4.0  https://doi.org/10.1523/JNEUROSCI.2830-16.2016
    CAVE: Processed in fsaverage space, use  volumetric maps only for subcortex! (NiSpace tables contain only fsaverage-cortical data for now.)
- target-5HT6_tracer-gsk215083_n-30_dx-hc_pub-radhakrishnan2018  Source: Radhakrishnan2018  CC BY-NC-SA 4.0  https://doi.org/10.2967/jnumed.117.206516, https://doi.org/10.1016/j.pscychresns.2019.111007
- target-5HTT_tracer-dasb_n-100_dx-hc_pub-beliveau2017           Source: Beliveau2017       CC BY-NC-SA 4.0  https://doi.org/10.1523/JNEUROSCI.2830-16.2016
    CAVE: Processed in fsaverage space, use  volumetric maps only for subcortex! (NiSpace tables contain only fsaverage-cortical data for now.)
- target-5HTT_tracer-dasb_n-18_dx-hc_pub-savli2012               Source: Savli2012          CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2012.07.001
- target-5HTT_tracer-madam_n-10_dx-hc_pub-fazio2016              Source: Fazio2016          CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2016.03.019
- target-A4B2_tracer-flubatine_n-30_dx-hc_pub-hillmer2016        Source: Hillmer2016        CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2016.07.026, https://doi.org/10.1093/ntr/ntx091
- target-CB1_tracer-fmpepd2_n-22_dx-hc_pub-laurikainen2019       Source: Laurikainen2019    CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2018.10.013
- target-CB1_tracer-omar_n-77_dx-hc_pub-normandin2015            Source: Normandin2015      CC BY-NC-SA 4.0  https://doi.org/10.1038/jcbfm.2015.46, https://doi.org/10.1016/j.bpsc.2015.09.008, https://doi.org/10.1016/j.biopsych.2015.08.021, https://doi.org/10.1111/j.1530-0277.2012.01815.x
- target-CMRglu_tracer-fdg_n-20_dx-hc_pub-castrillon2023         Source: Castrillon2023     CC BY-NC-SA 4.0  https://doi.org/10.1126/sciadv.adi7632
- target-COX1_tracer-ps13_n-11_dx-hc_pub-kim2020                 Source: Kim2020            CC0 1.0          https://doi.org/10.1007/s00259-020-04855-2, https://doi.org/10.18112/openneuro.ds004401.v1.0.1
- target-D1_tracer-sch23390_n-13_dx-hc_pub-kaller2017            Source: Kaller2017         CC BY-NC-SA 4.0  https://doi.org/10.1007/s00259-017-3645-0
- target-D23_tracer-fallypride_n-49_dx-hc_pub-jaworska2020       Source: Jaworska2020       CC BY-NC-SA 4.0  https://doi.org/10.1038/s41386-020-0662-7
- target-D23_tracer-flb457_n-37_dx-hc_pub-smith2017              Source: Smith2017          CC BY-NC-SA 4.0  https://doi.org/10.1177/0271678X17737693
- target-D23_tracer-flb457_n-55_dx-hc_pub-sandiego2015           Source: Sandiego2015       CC BY-NC-SA 4.0  https://doi.org/10.1038/jcbfm.2014.237, https://doi.org/10.1177/0271678X17737693, https://doi.org/10.1038/s41386-019-0456-y, https://doi.org/10.1001/jamapsychiatry.2014.2414, https://doi.org/10.1038/npp.2017.223
- target-DAT_tracer-fepe2i_n-6_dx-hc_pub-sasaki2012              Source: Sasaki2012         CC BY-NC-SA 4.0  https://doi.org/10.2967/jnumed.111.101626
- target-DAT_tracer-fpcit_n-174_dx-hc_pub-dukart2018             Source: Dukart2018         CC BY-NC-SA 4.0  https://doi.org/10.1038/s41598-018-22444-0
    CAVE: SPECT, not PET!
- target-DAT_tracer-fpcit_n-30_dx-hc_pub-garciagomez2013         Source: Garciagomez2013    free             https://doi.org/10.1016/j.remn.2013.02.009
    CAVE: SPECT, not PET!
- target-FDOPA_tracer-fluorodopa_n-12_dx-hc_pub-garciagomez2018  Source: Garciagomez2018    free             https://doi.org/10.33588/imagendiagnostica.901.2
- target-GABAa_tracer-flumazenil_n-16_dx-hc_pub-norgaard2021     Source: Norgaard2021       CC BY-NC-SA 4.0  https://doi.org/10.1016/j.neuroimage.2021.117878
    CAVE: Processed in fsaverage space, use  volumetric maps only for subcortex! (NiSpace tables contain only fsaverage-cortical data for now.)
- target-GABAa_tracer-flumazenil_n-6_dx-hc_pub-dukart2018        Source: Dukart2018         CC BY-NC-SA 4.0  https://doi.org/10.1038/s41598-018-22444-0
- target-GABAa5_tracer-ro154513_n-10_dx-hc_pub-lukow2022         Source: Lukow2022          CC BY 4.0        https://doi.org/10.1038/s42003-022-03268-1
- target-H3_tracer-gsk189254_n-8_dx-hc_pub-gallezot2017          Source: Gallezot2017       CC BY-NC-SA 4.0  https://doi.org/10.1177/0271678X16650697, https://doi.org/10.1038/jcbfm.2009.195
- target-HDAC_tracer-martinostat_n-8_dx-hc_pub-wey2016           Source: Wey2016            CC0 1.0          https://doi.org/10.1126/scitranslmed.aaf7551
- target-KOR_tracer-ly2795050_n-28_dx-hc_pub-vijay2018           Source: Vijay2018          CC BY-NC-SA 4.0  https://doi.org/10.1038/s41386-018-0199-1
- target-M1_tracer-lsn3172176_n-24_dx-hc_pub-naganawa2020        Source: Naganawa2020       CC BY-NC-SA 4.0  https://doi.org/10.2967/jnumed.120.246967
- target-mGluR5_tracer-abp688_n-22_dx-hc_pub-rosaneto            Source: Rosaneto           CC BY-NC-SA 4.0  https://doi.org/10.1101/2021.10.28.466336
- target-mGluR5_tracer-abp688_n-28_dx-hc_pub-dubois2015          Source: Dubois2015         CC BY-NC-SA 4.0  https://doi.org/10.1007/s00259-015-3167-6
- target-mGluR5_tracer-abp688_n-73_dx-hc_pub-smart2019           Source: Smart2019          CC BY-NC-SA 4.0  https://doi.org/10.1007/s00259-018-4252-4
- target-MOR_tracer-carfentanil_n-204_dx-hc_pub-kantonen2020     Source: Kantonen2020       CC BY-NC-SA 4.0  https://doi.org/10.1038/mp.2017.183
- target-MOR_tracer-carfentanil_n-39_dx-hc_pub-turtonen2021      Source: Turtonen2021       CC BY-NC-SA 4.0  https://doi.org/10.1016/j.bpsc.2020.10.013
- target-NET_tracer-mrb_n-10_dx-hc_pub-hesse2017                 Source: Hesse2017          CC BY-NC-SA 4.0  https://doi.org/10.1007/s00259-016-3590-3
- target-NET_tracer-mrb_n-77_dx-hc_pub-ding2010                  Source: Ding2010           CC BY-NC-SA 4.0  https://doi.org/10.1002/syn.20696, https://doi.org/10.1016/j.neuroimage.2013.10.004, https://doi.org/10.1038/s41366-019-0471-4, https://doi.org/10.1210/jc.2017-02717
- target-NMDA_tracer-ge179_n-29_dx-hc_pub-galovic2021            Source: Galovic2021        CC BY-NC-SA 4.0  https://doi.org/10.1001/jamaneurol.2022.4352, https://doi.org/10.1016/j.neuroimage.2021.118194, https://doi.org/10.2967/jnumed.113.130641
    CAVE: Unlike other tracers, [18F]GE-179 binds to open (active) NMDA receptors!
- target-SV2A_tracer-ucbj_n-76_dx-hc_pub-finnema2016             Source: Finnema2016        CC BY-NC-SA 4.0  https://doi.org/10.1177/0271678X17724947, https://doi.org/10.2967/jnumed.120.246967, https://doi.org/10.1177/0271678X211004312, https://doi.org/10.1186/s13195-020-00742-y, https://doi.org/10.1177/0271678X20946198, https://doi.org/10.1093/cid/ciab484, https://doi.org/10.1038/s41380-021-01184-0, https://doi.org/10.1016/j.bpsc.2015.09.008, https://doi.org/10.1111/epi.16653, https://doi.org/10.1186/s13550-020-00670-w, https://doi.org/10.1002/alz.12097, https://doi.org/10.1111/epi.14701, https://doi.org/10.1038/s41467-019-09562-7, https://doi.org/10.1001/jamaneurol.2018.1836
- target-TSPO_tracer-pbr28_n-6_dx-hc_pub-lois2018                Source: Lois2018           MIT              https://doi.org/10.1021/acschemneuro.8b00072, https://doi.org/10.5281/zenodo.1174364
- target-VAChT_tracer-feobv_n-18_dx-hc_pub-aghourian2017         Source: Aghourian2017      CC BY-NC-SA 4.0  https://doi.org/10.1038/mp.2017.183
- target-VAChT_tracer-feobv_n-4_dx-hc_pub-tuominen               Source: Tuominen           CC BY-NC-SA 4.0  https://doi.org/10.1101/2021.10.28.466336
- target-VAChT_tracer-feobv_n-5_dx-hc_pub-bedard2019             Source: Bedard2019         CC BY-NC-SA 4.0  https://doi.org/10.1016/j.sleep.2018.12.020
- target-VMAT2_tracer-dtbz_n-76_dx-hc_pub-larsen2020             Source: Larsen2020         CC0 1.0          https://doi.org/10.18112/openneuro.ds002385.v1.1.0, https://doi.org/10.1038/s41467-020-14693-3

Number of pet maps: 48
First map path: /Users/llotter/nispace-data/reference/pet/map/target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017/target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017_space-MNI152NLin2009cAsym.nii.gz
This command returned the paths to all maps and printed citation information. We can turn off the latter with the ´print_references` argument.
This is how we get a single specific map:
[4]:
# Get a single map based on the exact name
print("Get a single map (path to volume)")
pet_maps = fetch_reference(
    "pet",
    maps="target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017",
    print_references=False
)
print("Filtered map path:", pet_maps)
Get a single map (path to volume)
INFO | 16/06/25 09:25:24 | nispace: Loading pet maps.
INFO | 16/06/25 09:25:24 | nispace: Applying filter: target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017
INFO | 16/06/25 09:25:24 | nispace: Filtered from 48 to 1 maps.
Filtered map path: [PosixPath('/Users/llotter/nispace-data/reference/pet/map/target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017/target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017_space-MNI152NLin2009cAsym.nii.gz')]

We have more options for sub-setting the pet collection, e.g.:

[5]:
# Subset maps based on sub-string
print("Maps containing '5HT'")
pet_maps = fetch_reference(
    "pet",
    maps="5HT",
    print_references=False
)
print("Number of maps:", len(pet_maps))
print()

# Subset maps based on detail dict
print("Maps containing `5HT` or 'GABA' with a sample sizes over 30")
pet_maps = fetch_reference(
    "pet",
    maps={"target": ["5HT", "GABA"], "n":">30"},
    print_references=False
)
print("Number of maps:", len(pet_maps))

Maps containing '5HT'
INFO | 16/06/25 09:25:24 | nispace: Loading pet maps.
INFO | 16/06/25 09:25:24 | nispace: Applying filter: 5HT
INFO | 16/06/25 09:25:24 | nispace: Filtered from 48 to 12 maps.
Number of maps: 12

Maps containing `5HT` or 'GABA' with a sample sizes over 30
INFO | 16/06/25 09:25:24 | nispace: Loading pet maps.
INFO | 16/06/25 09:25:24 | nispace: Applying filter: {'target': ['5HT', 'GABA'], 'n': '>30'}
INFO | 16/06/25 09:25:24 | nispace: Filtered from 48 to 5 maps.
Number of maps: 5

If we pass a parcellation (see below for the available ones), we will get the data already parcellated as a pandas DataFrame.

[6]:
# Get all pet maps as table
print("All pet maps as table")
pet_tab = fetch_reference(
    "pet",
    parcellation="Destrieux",
    print_references=False
)
print(pet_tab.shape) # pet maps x 148 parcels
display(pet_tab.head(5))
All pet maps as table
INFO | 16/06/25 09:25:24 | nispace: Loading pet maps.
INFO | 16/06/25 09:25:24 | nispace: Loading data parcellated with 'Destrieux'
(48, 148)
hemi-L_lab-G+and+S+frontomargin hemi-L_lab-G+and+S+occipital+inf hemi-L_lab-G+and+S+paracentral hemi-L_lab-G+and+S+subcentral hemi-L_lab-G+and+S+transv+frontopol hemi-L_lab-G+and+S+cingul+Ant hemi-L_lab-G+and+S+cingul+Mid+Ant hemi-L_lab-G+and+S+cingul+Mid+Post hemi-L_lab-G+cingul+Post+dorsal hemi-L_lab-G+cingul+Post+ventral ... hemi-R_lab-S+parieto+occipital hemi-R_lab-S+pericallosal hemi-R_lab-S+postcentral hemi-R_lab-S+precentral+inf+part hemi-R_lab-S+precentral+sup+part hemi-R_lab-S+suborbital hemi-R_lab-S+subparietal hemi-R_lab-S+temporal+inf hemi-R_lab-S+temporal+sup hemi-R_lab-S+temporal+transverse
map
target-5HT1a_tracer-cumi101_n-8_dx-hc_pub-beliveau2017 0.166229 0.140417 0.243418 0.223326 0.251212 0.239098 0.217597 0.179494 0.154957 0.107641 ... 0.159265 0.115716 0.187204 0.208126 0.171509 0.250436 0.195168 0.278166 0.243162 0.175779
target-5HT1a_tracer-way100635_n-35_dx-hc_pub-savli2012 0.343777 0.318346 0.228999 0.361994 0.322103 0.378598 0.313098 0.328132 0.340351 0.219930 ... 0.257297 NaN 0.251281 0.315240 0.254720 0.479086 0.298675 0.441795 0.387867 0.343412
target-5HT1b_tracer-az10419369_n-36_dx-hc_pub-beliveau2017 0.372709 0.340716 0.393472 0.397098 0.395923 0.436471 0.384247 0.353049 0.198469 0.455205 ... 0.392033 0.242409 0.354596 0.432699 0.419893 0.356429 0.369909 0.354134 0.367515 0.384210
target-5HT1b_tracer-p943_n-23_dx-hc_pub-savli2012 0.531205 0.383014 0.274941 0.453660 0.476328 0.411272 0.399859 0.390499 0.409591 0.168372 ... 0.402827 NaN 0.341502 0.482905 0.421282 0.366256 0.378882 0.314340 0.364261 0.398171
target-5HT1b_tracer-p943_n-65_dx-hc_pub-gallezot2010 0.520292 0.448108 0.392367 0.481213 0.511100 0.492182 0.470508 0.450506 0.440909 0.307216 ... 0.416835 NaN 0.443536 0.541298 0.486467 0.457092 0.425547 0.474332 0.477182 0.488412

5 rows × 148 columns

“Collections” provide pre-defined subsets of a dataset. In part, they provide multi-indices to group maps into sets. This is mandatory for X-set enrichment analyses (see later notebooks). If a collection is requested without a parcellation, a list of unique maps in the collection will be returned.

[7]:
# Filter using pre-defined collection
print("Filter using pre-defined collection")
pet_tab = fetch_reference(
    "pet",
    collection="UniqueTracers",
    parcellation="Destrieux",
    print_references=False
)
print(pet_tab.shape) # pet maps x 148 parcels
display(pet_tab)
Filter using pre-defined collection
INFO | 16/06/25 09:25:24 | nispace: Loading pet maps.
INFO | 16/06/25 09:25:24 | nispace: Applying collection filter from: /Users/llotter/nispace-data/reference/pet/collection-UniqueTracers.collect.
INFO | 16/06/25 09:25:24 | nispace: Loading data parcellated with 'Destrieux'
(28, 148)
hemi-L_lab-G+and+S+frontomargin hemi-L_lab-G+and+S+occipital+inf hemi-L_lab-G+and+S+paracentral hemi-L_lab-G+and+S+subcentral hemi-L_lab-G+and+S+transv+frontopol hemi-L_lab-G+and+S+cingul+Ant hemi-L_lab-G+and+S+cingul+Mid+Ant hemi-L_lab-G+and+S+cingul+Mid+Post hemi-L_lab-G+cingul+Post+dorsal hemi-L_lab-G+cingul+Post+ventral ... hemi-R_lab-S+parieto+occipital hemi-R_lab-S+pericallosal hemi-R_lab-S+postcentral hemi-R_lab-S+precentral+inf+part hemi-R_lab-S+precentral+sup+part hemi-R_lab-S+suborbital hemi-R_lab-S+subparietal hemi-R_lab-S+temporal+inf hemi-R_lab-S+temporal+sup hemi-R_lab-S+temporal+transverse
set map
General target-CMRglu_tracer-fdg_n-20_dx-hc_pub-castrillon2023 0.637165 0.619877 0.567377 0.672438 0.595498 0.710548 0.681885 0.713068 0.902651 0.609607 ... 0.779698 NaN 0.649124 0.740246 0.705462 0.747042 0.800423 0.666042 0.706858 0.747902
target-SV2A_tracer-ucbj_n-76_dx-hc_pub-finnema2016 0.657544 0.596147 0.494876 0.629006 0.643146 0.705044 0.652129 0.696556 0.744545 0.483915 ... 0.646438 NaN 0.616731 0.626233 0.571934 0.720553 0.708779 0.678673 0.693986 0.657282
target-HDAC_tracer-martinostat_n-8_dx-hc_pub-wey2016 0.723660 0.649211 0.569503 0.651314 0.668096 0.653438 0.663738 0.674450 0.701170 0.532489 ... 0.702607 NaN 0.651778 0.715930 0.699370 0.696435 0.708003 0.713312 0.708125 0.732933
target-VMAT2_tracer-dtbz_n-76_dx-hc_pub-larsen2020 0.018498 0.015489 0.009632 0.019396 0.016348 0.030043 0.032365 0.037730 0.043705 0.012664 ... 0.022411 NaN 0.010768 0.016225 0.013911 0.025913 0.037628 0.020601 0.022400 0.024775
Immunity target-TSPO_tracer-pbr28_n-6_dx-hc_pub-lois2018 0.687424 0.660813 0.584524 0.647924 0.669249 0.688761 0.665796 0.682357 0.729417 0.657087 ... 0.611432 NaN 0.610236 0.632971 0.613377 0.696122 0.654375 0.694619 0.661497 0.704014
target-COX1_tracer-ps13_n-11_dx-hc_pub-kim2020 0.499441 0.562536 0.541698 0.529926 0.483388 0.526488 0.520554 0.512171 0.511276 0.498973 ... 0.633066 NaN 0.547782 0.511331 0.515266 0.524606 0.519848 0.515943 0.521818 0.556394
Glutamate target-mGluR5_tracer-abp688_n-73_dx-hc_pub-smart2019 0.603225 0.587133 0.577452 0.788872 0.580190 0.834775 0.822082 0.829476 0.875077 0.550936 ... 0.713332 NaN 0.678623 0.759680 0.636508 0.800428 0.786214 0.737080 0.792729 0.808482
target-NMDA_tracer-ge179_n-29_dx-hc_pub-galovic2021 0.588515 0.635087 0.539512 0.629076 0.551330 0.647853 0.625612 0.659034 0.703712 0.597561 ... 0.679042 NaN 0.631428 0.676052 0.662457 0.735381 0.717249 0.688368 0.681596 0.800036
GABA target-GABAa5_tracer-ro154513_n-10_dx-hc_pub-lukow2022 0.412239 0.345132 0.287038 0.415120 0.419536 0.619151 0.567274 0.500065 0.469611 0.369955 ... 0.357666 NaN 0.350135 0.400915 0.372432 0.548175 0.423651 0.436350 0.417468 0.371995
target-GABAa_tracer-flumazenil_n-6_dx-hc_pub-dukart2018 0.625535 0.675792 0.487560 0.690240 0.573373 0.767576 0.687402 0.711057 0.812428 0.552503 ... 0.737331 NaN 0.635869 0.673358 0.631843 0.788609 0.724558 0.734305 0.734722 0.709873
Dopamine target-FDOPA_tracer-fluorodopa_n-12_dx-hc_pub-garciagomez2018 0.311773 0.310412 0.278725 0.311788 0.291158 0.381907 0.352170 0.334281 0.323056 0.275160 ... 0.299785 NaN 0.294830 0.312347 0.297550 0.384336 0.322066 0.335199 0.323028 0.308332
target-D1_tracer-sch23390_n-13_dx-hc_pub-kaller2017 0.183397 0.107540 0.078948 0.134384 0.154039 0.212894 0.185288 0.188905 0.228113 0.140633 ... 0.160792 NaN 0.140606 0.166885 0.133613 0.253925 0.201628 0.179463 0.192266 0.180495
target-D23_tracer-flb457_n-55_dx-hc_pub-sandiego2015 0.124486 0.121408 0.084513 0.133352 0.109683 0.143691 0.134510 0.118684 0.120475 0.086851 ... 0.108762 NaN 0.117825 0.114013 0.100719 0.141583 0.118455 0.179718 0.158241 0.142994
target-DAT_tracer-fpcit_n-174_dx-hc_pub-dukart2018 0.216720 0.244649 0.203527 0.282351 0.197790 0.312059 0.312815 0.312701 0.309115 0.254075 ... 0.291758 NaN 0.268230 0.289977 0.260974 0.307850 0.302147 0.291319 0.300988 0.308747
Serotonin target-5HT1a_tracer-way100635_n-35_dx-hc_pub-savli2012 0.343777 0.318346 0.228999 0.361994 0.322103 0.378598 0.313098 0.328132 0.340351 0.219930 ... 0.257297 NaN 0.251281 0.315240 0.254720 0.479086 0.298675 0.441795 0.387867 0.343412
target-5HT1b_tracer-p943_n-23_dx-hc_pub-savli2012 0.531205 0.383014 0.274941 0.453660 0.476328 0.411272 0.399859 0.390499 0.409591 0.168372 ... 0.402827 NaN 0.341502 0.482905 0.421282 0.366256 0.378882 0.314340 0.364261 0.398171
target-5HT2a_tracer-altanserin_n-19_dx-hc_pub-savli2012 0.646100 0.664230 0.344610 0.643179 0.613207 0.672502 0.556656 0.590664 0.765490 0.419012 ... 0.643719 NaN 0.568004 0.670378 0.569513 0.742673 0.652110 0.816891 0.790372 0.694868
target-5HT4_tracer-sb207145_n-59_dx-hc_pub-beliveau2017 0.174944 0.119751 0.207285 0.194449 0.204750 0.195337 0.190975 0.206011 0.142586 0.147011 ... 0.186995 0.12081 0.171658 0.178548 0.157012 0.200668 0.214346 0.232763 0.223681 0.187331
target-5HT6_tracer-gsk215083_n-30_dx-hc_pub-radhakrishnan2018 0.467500 0.474760 0.369479 0.471615 0.466632 0.478962 0.427414 0.426780 0.478465 0.275282 ... 0.447684 NaN 0.398272 0.456344 0.401045 0.444029 0.452315 0.513601 0.486448 0.463709
target-5HTT_tracer-dasb_n-18_dx-hc_pub-savli2012 0.075403 0.060895 0.047332 0.100048 0.071061 0.121359 0.117065 0.130216 0.137156 0.064386 ... 0.088269 NaN 0.044580 0.047651 0.034051 0.140805 0.097268 0.054309 0.058438 0.110957
Noradrenaline/Acetylcholine target-NET_tracer-mrb_n-10_dx-hc_pub-hesse2017 0.125213 0.119253 0.182873 0.159184 0.118253 0.131935 0.164863 0.187228 0.145118 0.072495 ... 0.137826 NaN 0.131542 0.099739 0.133062 0.092092 0.164904 0.140657 0.130026 0.166982
target-A4B2_tracer-flubatine_n-30_dx-hc_pub-hillmer2016 0.324428 0.293606 0.258438 0.313554 0.314013 0.321499 0.341065 0.345242 0.340055 0.245778 ... 0.319758 NaN 0.326021 0.364841 0.352878 0.316778 0.340708 0.327949 0.340424 0.326998
target-M1_tracer-lsn3172176_n-24_dx-hc_pub-naganawa2020 0.444522 0.414434 0.349799 0.456415 0.437987 0.461943 0.428506 0.441084 0.480004 0.321075 ... 0.439156 NaN 0.433537 0.440224 0.402316 0.466079 0.455077 0.494821 0.490704 0.476752
target-VAChT_tracer-feobv_n-18_dx-hc_pub-aghourian2017 0.129291 0.116044 0.136455 0.155591 0.119098 0.151412 0.187293 0.196462 0.154970 0.112630 ... 0.125380 NaN 0.134102 0.148374 0.148903 0.140091 0.146624 0.130764 0.136900 0.174610
Opiods/Endocannabinoids target-MOR_tracer-carfentanil_n-204_dx-hc_pub-kantonen2020 0.315304 0.106893 0.119487 0.248392 0.283774 0.384791 0.373470 0.325987 0.263722 0.093779 ... 0.122963 NaN 0.190894 0.262917 0.244298 0.354848 0.242357 0.256187 0.259966 0.160587
target-KOR_tracer-ly2795050_n-28_dx-hc_pub-vijay2018 0.636851 0.599297 0.680876 0.773017 0.592962 0.775930 0.815478 0.719906 0.625592 0.493672 ... 0.605544 NaN 0.680841 0.731199 0.703461 0.684780 0.618201 0.656212 0.679512 0.665723
target-CB1_tracer-omar_n-77_dx-hc_pub-normandin2015 0.689277 0.632309 0.587256 0.642378 0.698075 0.703207 0.659200 0.663820 0.628370 0.492806 ... 0.556511 NaN 0.571252 0.590105 0.562312 0.740709 0.594028 0.687437 0.644567 0.620364
Histamine target-H3_tracer-gsk189254_n-8_dx-hc_pub-gallezot2017 0.191803 0.159743 0.178721 0.212827 0.195197 0.284119 0.269029 0.249380 0.226593 0.154015 ... 0.177500 NaN 0.182234 0.214274 0.213985 0.239113 0.201344 0.174119 0.179242 0.209483

28 rows × 148 columns

We provide PET maps registered and/or transformed to different specific spaces. These are:

  • MNI152: Original space in which the PET maps were published. This should not be used if you don’t plan to run registration yourself.

  • MNI152NLin6Asym: One of the two common volumetric spaces currently used in MRI analyses (2 mm isotropic voxels).

  • Mni152NLin2009cAsym: The other common volumetric space (2 mm isotropic voxels).

  • fsaverage: The fsaverage space as used by FreeSurfer (41k vertices).

  • fsLR: The Human Connectome Project space (32k vertices).

Data is requested in specific spaces via the space argument. Parcellated data was obtained within the space optimal for each map.

[8]:
# Get all maps for the noradrenaline transporter in a specific space
print("Get all maps for the noradrenaline transporter in a specific space")
pet_maps = fetch_reference(
    "pet",
    maps={"target": "NET"},
    space="MNI152NLin6Asym",
    print_references=False
)
print("Filtered map path:", pet_maps)
Get all maps for the noradrenaline transporter in a specific space
INFO | 16/06/25 09:25:24 | nispace: Loading pet maps.
INFO | 16/06/25 09:25:24 | nispace: Applying filter: {'target': 'NET'}
INFO | 16/06/25 09:25:24 | nispace: Filtered from 48 to 2 maps.
Filtered map path: [PosixPath('/Users/llotter/nispace-data/reference/pet/map/target-NET_tracer-mrb_n-10_dx-hc_pub-hesse2017/target-NET_tracer-mrb_n-10_dx-hc_pub-hesse2017_space-MNI152NLin6Asym.nii.gz'), PosixPath('/Users/llotter/nispace-data/reference/pet/map/target-NET_tracer-mrb_n-77_dx-hc_pub-ding2010/target-NET_tracer-mrb_n-77_dx-hc_pub-ding2010_space-MNI152NLin6Asym.nii.gz')]

Gene expression ("mrna")#

The mrna dataset is only available in tabulated format, so you always have to pass a parcellation.

Collections:

  • "CellTypesPsychEncodeTPM": cell type marker sets from Lake 2016 or Darmanis 2015

  • "CellTypesPsychEncodeUMI": cell type marker sets from Lake Lake 2018

  • "SynGO": Synapse-function related gene sets from the SynGO database

  • "Chromosome": Chromosome-wise gene sets

[9]:
# Get all genes for a given parcellation
mrna_tab = fetch_reference(
    "mrna",
    parcellation="Destrieux",
)
display(f"{mrna_tab.shape[0]} genes x {mrna_tab.shape[1]} parcels", mrna_tab.head(5))
INFO | 16/06/25 09:25:24 | nispace: Loading mrna maps.
INFO | 16/06/25 09:25:24 | nispace: Loading data parcellated with 'Destrieux'
The NiSpace "mRNA" dataset is based on Allen Human Brain Atlas (AHBA) gene expression data published in Hawrylycz et al.,
2012 (https://doi.org/10.1038/nature11405). The dataset consists of mRNA expression data from postmortem brain tissue of
six donors, mapped onto MNI or fsaverage parcels using the abagen toolbox (Markello et al., 2021, https://doi.org/10.7554/eLife.72129).
The data was extracted using abagen.get_expression_data(..., lr_mirror="bidirectional"), considering parcel hemisphere and
cortical vs. subcortical location. Only genes that showed a mean donor-to-donor Spearman correlation of > 0.1 were retained.
In addition to the two publications listed above, please cite publications associated with gene set collections as appropriate.
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


'9983 genes x 148 parcels'
hemi-L_lab-G+and+S+frontomargin hemi-L_lab-G+and+S+occipital+inf hemi-L_lab-G+and+S+paracentral hemi-L_lab-G+and+S+subcentral hemi-L_lab-G+and+S+transv+frontopol hemi-L_lab-G+and+S+cingul+Ant hemi-L_lab-G+and+S+cingul+Mid+Ant hemi-L_lab-G+and+S+cingul+Mid+Post hemi-L_lab-G+cingul+Post+dorsal hemi-L_lab-G+cingul+Post+ventral ... hemi-R_lab-S+parieto+occipital hemi-R_lab-S+pericallosal hemi-R_lab-S+postcentral hemi-R_lab-S+precentral+inf+part hemi-R_lab-S+precentral+sup+part hemi-R_lab-S+suborbital hemi-R_lab-S+subparietal hemi-R_lab-S+temporal+inf hemi-R_lab-S+temporal+sup hemi-R_lab-S+temporal+transverse
map
A1BG 0.603714 0.424911 0.354168 0.514914 0.581526 0.579099 0.590871 0.478636 0.326660 0.399391 ... 0.541757 0.535359 0.514457 0.571902 0.455186 0.596736 0.483036 0.532298 0.525557 0.675296
A1BG-AS1 0.676432 0.642984 0.598713 0.677616 0.621552 0.692636 0.638342 0.665583 0.658907 0.582184 ... 0.641603 0.561390 0.653640 0.605653 0.594782 0.639442 0.675937 0.714092 0.690400 0.673898
A2M 0.389871 0.512336 0.452206 0.407705 0.371963 0.461573 0.480850 0.487001 0.499881 0.455021 ... 0.637554 0.506473 0.547387 0.562318 0.499580 0.408249 0.534483 0.438315 0.489514 0.549798
AAAS 0.423352 0.538288 0.540322 0.485360 0.411931 0.436433 0.386540 0.429897 0.572567 0.559250 ... 0.607518 0.505082 0.687997 0.556730 0.573323 0.394876 0.574625 0.403460 0.534128 0.863640
AAK1 0.626127 0.576627 0.585677 0.575091 0.586051 0.454669 0.476326 0.504907 0.520796 0.560450 ... 0.461256 0.483384 0.552856 0.470787 0.573373 0.456328 0.517026 0.473286 0.448987 0.529261

5 rows × 148 columns

Collections will subset and sort genes.

[10]:
# Get all genes for a given parcellation
mrna_tab = fetch_reference(
    "mrna",
    parcellation="Destrieux",
    collection="CellTypesPsychEncodeTPM"
)
display(f"{mrna_tab.shape[0]} genes x {mrna_tab.shape[1]} parcels", mrna_tab.head(5))
INFO | 16/06/25 09:25:24 | nispace: Loading mrna maps.
INFO | 16/06/25 09:25:24 | nispace: Applying collection filter from: /Users/llotter/nispace-data/reference/mrna/collection-CellTypesPsychEncodeTPM.collect.
INFO | 16/06/25 09:25:25 | nispace: Loading data parcellated with 'Destrieux'
The NiSpace "mRNA" dataset is based on Allen Human Brain Atlas (AHBA) gene expression data published in Hawrylycz et al.,
2012 (https://doi.org/10.1038/nature11405). The dataset consists of mRNA expression data from postmortem brain tissue of
six donors, mapped onto MNI or fsaverage parcels using the abagen toolbox (Markello et al., 2021, https://doi.org/10.7554/eLife.72129).
The data was extracted using abagen.get_expression_data(..., lr_mirror="bidirectional"), considering parcel hemisphere and
cortical vs. subcortical location. Only genes that showed a mean donor-to-donor Spearman correlation of > 0.1 were retained.
In addition to the two publications listed above, please cite publications associated with gene set collections as appropriate.
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b

- CellTypesPsychEncodeTPM  Source: Lake2016      https://doi.org/10.1126/science.aaf1204
- CellTypesPsychEncodeTPM  Source: Darmanis2015  https://doi.org/10.1073/pnas.1507125112
- CellTypesPsychEncodeTPM  Source: Wang2018      https://doi.org/10.1126/science.aat8464

'444 genes x 148 parcels'
hemi-L_lab-G+and+S+frontomargin hemi-L_lab-G+and+S+occipital+inf hemi-L_lab-G+and+S+paracentral hemi-L_lab-G+and+S+subcentral hemi-L_lab-G+and+S+transv+frontopol hemi-L_lab-G+and+S+cingul+Ant hemi-L_lab-G+and+S+cingul+Mid+Ant hemi-L_lab-G+and+S+cingul+Mid+Post hemi-L_lab-G+cingul+Post+dorsal hemi-L_lab-G+cingul+Post+ventral ... hemi-R_lab-S+parieto+occipital hemi-R_lab-S+pericallosal hemi-R_lab-S+postcentral hemi-R_lab-S+precentral+inf+part hemi-R_lab-S+precentral+sup+part hemi-R_lab-S+suborbital hemi-R_lab-S+subparietal hemi-R_lab-S+temporal+inf hemi-R_lab-S+temporal+sup hemi-R_lab-S+temporal+transverse
set map
Adult-Ex1 CAMK2A 0.856693 0.832408 0.769181 0.796297 0.825396 0.799951 0.758317 0.791016 0.840002 0.768446 ... 0.814037 0.787670 0.842221 0.824618 0.799944 0.802145 0.804215 0.833016 0.825433 0.773056
CCDC88C 0.381734 0.444780 0.338015 0.384871 0.231575 0.438720 0.374331 0.414423 0.400377 0.428926 ... 0.503742 0.348189 0.377369 0.477814 0.431914 0.344379 0.439141 0.557285 0.540488 0.447918
CDH9 0.737575 0.658874 0.645671 0.707994 0.718000 0.783677 0.726552 0.725915 0.723024 0.656156 ... 0.664827 0.708056 0.625394 0.665168 0.688928 0.762926 0.705784 0.728381 0.713863 0.673886
GNAL 0.491871 0.478382 0.516195 0.460755 0.349280 0.422342 0.486171 0.496494 0.475241 0.547364 ... 0.378101 0.428946 0.365687 0.438092 0.481262 0.417479 0.433718 0.493504 0.438263 0.303117
GPR83 0.491008 0.465609 0.397596 0.422830 0.388784 0.403003 0.435505 0.435573 0.397809 0.357583 ... 0.358643 0.393777 0.402178 0.309362 0.367687 0.365041 0.451380 0.518286 0.445866 0.491256

5 rows × 148 columns

Resting state networks ("rsn")#

The rsn dataset is a set of resting state network probability maps. It is handled as the pet dataset.

Collections:

  • "All": All behavioral domains sorted into sets based on higher-level domains.

[11]:
# load all maps
print("Load all maps")
rsn_maps = fetch_reference("rsn", space="MNI152")

# load a single pet map
print("Load a single RSN map")
rsn_maps = fetch_reference(
    "rsn",
    maps="Aud",
    print_references=False,
    space="MNI152"
)
print(rsn_maps)

# get all maps as table for a parcellation
print("Get all maps as table for a parcellation")
rsn_tab = fetch_reference(
    "rsn",
    parcellation="Destrieux",
    print_references=False,
    space="MNI152"
)
display(rsn_tab.head(2))
Load all maps
INFO | 16/06/25 09:25:25 | nispace: Loading rsn maps.
The NiSpace "RSN" dataset is based on resting-state network probability maps generated by Dworetsky et al., 2021
(https://doi.org/10.1016/j.neuroimage.2021.118164). The maps are downloaded from the associated GitHub repository
(https://github.com/GrattonLab/Dworetsky_etal_ConsensusNetworks) and cached locally (find them in
`~HOME/nispace-data/reference/rsn/map`). Please cite the original publication when using these maps.
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


Load a single RSN map
INFO | 16/06/25 09:25:25 | nispace: Loading rsn maps.
INFO | 16/06/25 09:25:25 | nispace: Applying filter: Aud
INFO | 16/06/25 09:25:25 | nispace: Filtered from 14 to 1 maps.
[PosixPath("/Users/llotter/nispace-data/reference/rsn/map/nw-Aud/nw-Aud_space-MNI152.nii']")]
Get all maps as table for a parcellation
INFO | 16/06/25 09:25:25 | nispace: Loading rsn maps.
INFO | 16/06/25 09:25:25 | nispace: Loading data parcellated with 'Destrieux'
hemi-L_lab-G+and+S+frontomargin hemi-L_lab-G+and+S+occipital+inf hemi-L_lab-G+and+S+paracentral hemi-L_lab-G+and+S+subcentral hemi-L_lab-G+and+S+transv+frontopol hemi-L_lab-G+and+S+cingul+Ant hemi-L_lab-G+and+S+cingul+Mid+Ant hemi-L_lab-G+and+S+cingul+Mid+Post hemi-L_lab-G+cingul+Post+dorsal hemi-L_lab-G+cingul+Post+ventral ... hemi-R_lab-S+parieto+occipital hemi-R_lab-S+pericallosal hemi-R_lab-S+postcentral hemi-R_lab-S+precentral+inf+part hemi-R_lab-S+precentral+sup+part hemi-R_lab-S+suborbital hemi-R_lab-S+subparietal hemi-R_lab-S+temporal+inf hemi-R_lab-S+temporal+sup hemi-R_lab-S+temporal+transverse
map
nw-Aud -0.119025 0.030076 0.138495 0.439149 -0.124080 -0.081502 0.103589 0.160210 -0.159586 -0.049191 ... 0.023141 -0.043084 0.206432 -0.036749 0.130652 -0.064339 -0.152281 -0.057003 0.070081 0.613958
nw-CO -0.134179 -0.000936 0.029942 0.222530 -0.244543 -0.094110 0.458779 0.218662 -0.311963 -0.284088 ... 0.012664 0.093555 0.127784 0.200611 0.180290 -0.324147 -0.208874 -0.086683 -0.029506 0.141854

2 rows × 148 columns

Neurosynth term maps ("neurosynth")#

The neurosynth dataset is only available in tabulated format, so you always have to pass a parcellation.

Collections:

  • "CognitiveFunctions": manually curated and categorized list of terms assoicated to broad cognitive domains

[12]:
# Get all genes for a given parcellation
neurosynth_tab = fetch_reference(
    "neurosynth",
    parcellation="Schaefer200TianS2",
)
display(f"{neurosynth_tab.shape[0]} terms x {neurosynth_tab.shape[1]} parcels", neurosynth_tab.head(5))
INFO | 16/06/25 09:25:25 | nispace: Loading neurosynth maps.
INFO | 16/06/25 09:25:25 | nispace: Loading and inner-merging data parcellated with 'Schaefer200' and 'TianS2'
The NiSpace "neurosynth" dataset is based on the Neurosynth database (https://neurosynth.org/). The dataset consists of all
terms in the Neurosynth database as preselected by the authors (i.e., the same available via their website). For each term,
a "MKDAChi2" meta-analysis map was generated in MNI152NLin6Asym-2mm space using the nimare package (https://nimare.readthedocs.io/).
The resulting "z_desc-association" maps were parcellated and are available only as parcellation tables. We ask to cite:
- Yarkoni et al., 2011 (https://doi.org/10.1038/nmeth.1635) for neurosynth
- Salo et al., 2022 (https://doi.org/10.52294/001c.87681) for nimare
- Wager et al., 2007 (https://doi.org/10.1093/scan/nsm015) for the MKDAChi2 algorithm
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


'1334 terms x 232 parcels'
hemi-L_div-Vis_lab-1 hemi-L_div-Vis_lab-2 hemi-L_div-Vis_lab-3 hemi-L_div-Vis_lab-4 hemi-L_div-Vis_lab-5 hemi-L_div-Vis_lab-6 hemi-L_div-Vis_lab-7 hemi-L_div-Vis_lab-8 hemi-L_div-Vis_lab-9 hemi-L_div-Vis_lab-10 ... hemi-R_lab-THA+VA hemi-R_lab-THA+DA hemi-R_lab-NAc+shell hemi-R_lab-NAc+core hemi-R_lab-pGP hemi-R_lab-aGP hemi-R_lab-aPUT hemi-R_lab-pPUT hemi-R_lab-aCAU hemi-R_lab-pCAU
map
abilities 0.362992 0.411401 0.473653 0.819001 0.198036 0.978645 0.842301 -0.422545 0.025033 0.223432 ... -0.508977 -0.620085 -1.338172 -1.041403 -0.323786 -0.699422 -1.209605 -0.659254 -1.620233 -0.880869
ability 0.395189 0.187913 0.393415 0.023410 0.292252 0.517031 0.789485 0.213077 0.331388 0.738013 ... -0.497820 -1.016025 -2.251947 -0.965339 -1.071935 -1.210142 -1.187464 -1.276916 -0.446526 -0.083585
abstract 0.019574 0.929748 3.285519 0.244171 0.978648 -0.320235 1.881808 1.375193 1.245818 0.474525 ... -2.064765 -0.921057 -0.156552 -0.468877 -1.293330 -0.983690 -1.116213 -0.780750 -1.638573 -1.596848
abuse -0.558509 -1.086712 -1.174378 -0.249232 -0.668564 1.143069 -0.570804 -1.053871 -0.414536 -0.144280 ... 0.827074 1.281954 3.376993 2.575085 2.509335 1.737999 1.600366 -0.252831 2.204873 1.506879
acc -1.210659 -1.947663 -1.935868 -0.380162 -1.423609 -0.493732 -0.748570 -2.050332 -1.402867 -0.470303 ... 1.869581 0.418041 0.671167 1.717349 -0.586445 -0.096006 0.913634 0.185387 0.971623 -0.433070

5 rows × 232 columns

Collections will subset and sort terms.

[13]:
# Get all genes for a given parcellation
neurosynth_tab = fetch_reference(
    "neurosynth",
    parcellation="Schaefer200TianS2",
    collection="CognitiveFunctions"
)
display(f"{neurosynth_tab.shape[0]} genes x {neurosynth_tab.shape[1]} parcels", neurosynth_tab.head(5))
INFO | 16/06/25 09:25:25 | nispace: Loading neurosynth maps.
INFO | 16/06/25 09:25:25 | nispace: Applying collection filter from: /Users/llotter/nispace-data/reference/neurosynth/collection-CognitiveFunctions.collect.
INFO | 16/06/25 09:25:25 | nispace: Loading and inner-merging data parcellated with 'Schaefer200' and 'TianS2'
The NiSpace "neurosynth" dataset is based on the Neurosynth database (https://neurosynth.org/). The dataset consists of all
terms in the Neurosynth database as preselected by the authors (i.e., the same available via their website). For each term,
a "MKDAChi2" meta-analysis map was generated in MNI152NLin6Asym-2mm space using the nimare package (https://nimare.readthedocs.io/).
The resulting "z_desc-association" maps were parcellated and are available only as parcellation tables. We ask to cite:
- Yarkoni et al., 2011 (https://doi.org/10.1038/nmeth.1635) for neurosynth
- Salo et al., 2022 (https://doi.org/10.52294/001c.87681) for nimare
- Wager et al., 2007 (https://doi.org/10.1093/scan/nsm015) for the MKDAChi2 algorithm
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


'101 genes x 232 parcels'
hemi-L_div-Vis_lab-1 hemi-L_div-Vis_lab-2 hemi-L_div-Vis_lab-3 hemi-L_div-Vis_lab-4 hemi-L_div-Vis_lab-5 hemi-L_div-Vis_lab-6 hemi-L_div-Vis_lab-7 hemi-L_div-Vis_lab-8 hemi-L_div-Vis_lab-9 hemi-L_div-Vis_lab-10 ... hemi-R_lab-THA+VA hemi-R_lab-THA+DA hemi-R_lab-NAc+shell hemi-R_lab-NAc+core hemi-R_lab-pGP hemi-R_lab-aGP hemi-R_lab-aPUT hemi-R_lab-pPUT hemi-R_lab-aCAU hemi-R_lab-pCAU
set map
Perception perception 1.133071 3.301463 4.446642 0.212208 1.815583 -1.475900 0.358515 5.493434 2.475737 -0.202547 ... 0.100313 0.311329 -2.674099 -1.880081 -0.173204 0.542946 0.142748 0.280095 -1.960971 -1.473937
visual 5.890478 7.901569 8.199807 5.368539 6.184002 1.743208 7.003493 6.539099 7.760546 5.723816 ... -1.944004 -0.140336 -5.345172 -4.911377 -2.240981 -3.005180 -3.477686 -2.754033 -3.630711 -2.689753
visuospatial 1.006021 1.249790 1.218041 1.212403 -0.096277 0.073850 0.927427 1.782185 2.118819 0.272614 ... -1.269447 -0.437938 -2.301355 -0.998670 -1.118729 -1.852602 -1.699228 -0.953515 -1.389019 -0.730410
auditory -0.883764 -1.091530 -0.854216 -0.117754 -0.325813 -0.861369 0.680713 0.190991 0.163705 0.262778 ... -0.832790 -1.889987 -4.012762 -3.527764 0.048870 -0.347030 -1.386799 -0.001288 -2.472988 -1.429422
olfactory -1.140938 -1.159713 -1.762673 -0.487174 -1.150570 -0.774892 -0.316994 -1.440115 -1.305542 -0.840673 ... 0.083408 -0.104390 0.946097 -0.309021 2.983119 2.371118 1.089475 1.433120 -0.586631 -0.358755

5 rows × 232 columns

Features of cortex topology ("cortexfeatures")#

The cortexfeatures dataset is a collection of features of cortical topology maps from neuromaps.
The maps are only available in surface spaces, but parcellated data can of course easily be brought together with MNI input volumes.

Collections:

Note that for two expansion maps, there’s only right hemisphere data available.

[14]:
# Get all genes for a given parcellation
cortexfeatures_maps = fetch_reference(
    "cortexfeatures",
    space="fsLR",
)
print("Number of cortexfeatures maps:", len(cortexfeatures_maps))
print("First map path:", cortexfeatures_maps[0])
INFO | 16/06/25 09:25:25 | nispace: Loading cortexfeatures maps.
The NiSpace "cortexfeatures" dataset consists of different features of cortical topology available via neuromaps
(https://neuromaps-main.readthedocs.io/). Many of these maps were used in Shafiei et al., 2023 (https://doi.org/10.1038/s41467-023-41689-6).
The maps are fetched directly from neuromaps (space = "fsLROriginal" or "fsaverageOriginal") or downloaded from the NiSpace-data
GitHub repo (space = "fsLR" | "fsaverage"; recommended). Please cite the original publication when using these maps:
- thickness: Van Essen et al., 2013 (https://doi.org/10.1016/j.neuroimage.2013.05.041)
- t1t2: Van Essen et al., 2013 (https://doi.org/10.1016/j.neuroimage.2013.05.041)
- saaxis: Sydnor et al., 2021 (https://doi.org/10.1016/j.neuron.2021.06.016)
- devel/evolexpansion: Hill et al., 2010 (https://doi.org/10.1073/pnas.1001229107)
- evolexpansion/specieshomology: Xu et al., 2020 (https://doi.org/10.1016/j.neuroimage.2020.117346)
- geneexpr (1. principal component): Markello et al., 2021 (https://doi.org/10.7554/eLife.72129)
- fcgradient1/2/3: Margulies et al., 2016 (https://doi.org/10.1073/pnas.1608282113)
- cbf/cbv/cmro2/cmrglc/glycindex: Vaishnavi et al., 2010 (https://doi.org/10.1073/pnas.1010459107)
- meg: Shafiei et al., 2022 (https://doi.org/10.1371/journal.pbio.3001735)
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


Number of cortexfeatures maps: 23
First map path: (PosixPath('/Users/llotter/nispace-data/reference/cortexfeatures/map/feature-thickness_pub-hcps1200/feature-thickness_pub-hcps1200_space-fsLR_hemi-L.surf.gii.gz'), PosixPath('/Users/llotter/nispace-data/reference/cortexfeatures/map/feature-thickness_pub-hcps1200/feature-thickness_pub-hcps1200_space-fsLR_hemi-R.surf.gii.gz'))

Collections will subset and sort terms; cortex parcellations are available.

[15]:
# Get Shafiei et al. MEG Power maps in
cortexfeatures_tab = fetch_reference(
    "cortexfeatures",
    space="fsLR",
    collection="MEG",
    parcellation="HCP"
)
display(f"{cortexfeatures_tab.shape[0]} maps", cortexfeatures_tab.head(5))
INFO | 16/06/25 09:25:25 | nispace: Loading cortexfeatures maps.
INFO | 16/06/25 09:25:25 | nispace: Applying collection filter from: /Users/llotter/nispace-data/reference/cortexfeatures/collection-MEG.collect.
INFO | 16/06/25 09:25:25 | nispace: Loading data parcellated with 'Glasser'
The NiSpace "cortexfeatures" dataset consists of different features of cortical topology available via neuromaps
(https://neuromaps-main.readthedocs.io/). Many of these maps were used in Shafiei et al., 2023 (https://doi.org/10.1038/s41467-023-41689-6).
The maps are fetched directly from neuromaps (space = "fsLROriginal" or "fsaverageOriginal") or downloaded from the NiSpace-data
GitHub repo (space = "fsLR" | "fsaverage"; recommended). Please cite the original publication when using these maps:
- thickness: Van Essen et al., 2013 (https://doi.org/10.1016/j.neuroimage.2013.05.041)
- t1t2: Van Essen et al., 2013 (https://doi.org/10.1016/j.neuroimage.2013.05.041)
- saaxis: Sydnor et al., 2021 (https://doi.org/10.1016/j.neuron.2021.06.016)
- devel/evolexpansion: Hill et al., 2010 (https://doi.org/10.1073/pnas.1001229107)
- evolexpansion/specieshomology: Xu et al., 2020 (https://doi.org/10.1016/j.neuroimage.2020.117346)
- geneexpr (1. principal component): Markello et al., 2021 (https://doi.org/10.7554/eLife.72129)
- fcgradient1/2/3: Margulies et al., 2016 (https://doi.org/10.1073/pnas.1608282113)
- cbf/cbv/cmro2/cmrglc/glycindex: Vaishnavi et al., 2010 (https://doi.org/10.1073/pnas.1010459107)
- meg: Shafiei et al., 2022 (https://doi.org/10.1371/journal.pbio.3001735)
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


'7 maps'
hemi-L_lab-V1 hemi-L_lab-MST hemi-L_lab-V6 hemi-L_lab-V2 hemi-L_lab-V3 hemi-L_lab-V4 hemi-L_lab-V8 hemi-L_lab-4 hemi-L_lab-3b hemi-L_lab-FEF ... hemi-R_lab-p47r hemi-R_lab-TGv hemi-R_lab-MBelt hemi-R_lab-LBelt hemi-R_lab-A4 hemi-R_lab-STSva hemi-R_lab-TE1m hemi-R_lab-PI hemi-R_lab-a32pr hemi-R_lab-p24
map
feature-megpoweralpha_pub-shafiei2022 0.387189 0.371029 0.419728 0.393263 0.397562 0.379381 0.373574 0.280895 0.307106 0.243195 ... NaN 0.258090 0.326856 0.335782 0.318433 0.289083 0.309614 0.279493 0.146504 0.194861
feature-megpowerbeta_pub-shafiei2022 0.081581 0.084571 0.092286 0.083078 0.085123 0.084859 0.082015 0.123797 0.125518 0.117502 ... NaN 0.082419 0.088494 0.091363 0.092477 0.083383 0.082821 0.085638 0.070595 0.095166
feature-megpowerdelta_pub-shafiei2022 0.287946 0.285411 0.253132 0.283037 0.278647 0.290103 0.295168 0.291391 0.277593 0.314561 ... NaN 0.372782 0.320389 0.310155 0.318652 0.354477 0.337920 0.358141 0.247408 0.349247
feature-megpowergamma1_pub-shafiei2022 0.016545 0.016488 0.016378 0.016892 0.017763 0.018468 0.018105 0.023799 0.022541 0.023665 ... NaN 0.029115 0.017564 0.015964 0.020731 0.021669 0.021285 0.022166 0.016908 0.023213
feature-megpowergamma2_pub-shafiei2022 0.009168 0.009479 0.007795 0.009303 0.009853 0.010531 0.010682 0.009163 0.008926 0.009566 ... NaN 0.022181 0.009675 0.008285 0.013160 0.014524 0.014891 0.014345 0.007601 0.010786

5 rows × 360 columns

BigBrain features ("bigbrain")#

The bigbrain dataset is adopted from the BigBrainWarp toolbox (https://bigbrainwarp.readthedocs.io) by Paquola et al. See the automatically printed info below for more details.

Collections:

  • "CorticalLayers": Different maps of cortical layer thickness (1-6) published in Wagstyl et al., 2020 (https://doi.org/10.1371/journal.pbio.3000678)

  • "DifferentiationGradients": Gradient maps of cortical differentiation included with the BigBrainWarp toolbox

    • "feature-histogradient1/2": first two eigenvectors of cytoarchitectural differentiation derived from BigBrain

    • "feature-microgradient1/2": first two eigenvector of microstructural differentiation derived from quantitative in-vivo T1 imaging

    • "feature-funcgradient1/2/3": first three eigenvectors of functional differentiation derived from rs-fMRI

Note that for two expansion maps, there’s only right hemisphere data available.

[20]:
# Get all genes for a given parcellation
bigbrain_maps = fetch_reference(
    "bigbrain",
    space="fsaverage",
)
print("Number of bigbrain maps:", len(bigbrain_maps))
print("First map path:", bigbrain_maps[0])
INFO | 16/06/25 09:27:25 | nispace: Loading bigbrain maps.
The NiSpace "bigbrain" dataset is adopted from the BigBrainWarp toolbox (https://bigbrainwarp.readthedocs.io) by Paquola et al.
(see below). Further information on the dataset: https://bigbrainwarp.readthedocs.io/en/latest/pages/toolbox_contents.html
The maps are fetched directly from the BigBrainWarp Sciebo folder (space = "fsaverageOriginal") or downloaded from
the NiSpace-data GitHub repo (space = "fsLR" | "fsaverage"; recommended). The data is licensed under the CC BY-NC-SA 4.0 license.
Please cite the following publication when using these maps:
- BigBrain: Amunts et al., 2013 (https://doi.org/10.1126/science.1235381)
- BigBrainWarp toolbox: Paquola et al., 2021 (https://doi.org/10.7554/eLife.70119)
- Approximate cortical layer thickness: Wagstyl et al., 2020 (https://doi.org/10.1371/journal.pbio.3000678)
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


Number of bigbrain maps: 13
First map path: (PosixPath('/Users/llotter/nispace-data/reference/bigbrain/map/feature-layer1_pub-wagstyl2020/feature-layer1_pub-wagstyl2020_space-fsaverage_hemi-L.shape.gii.gz'), PosixPath('/Users/llotter/nispace-data/reference/bigbrain/map/feature-layer1_pub-wagstyl2020/feature-layer1_pub-wagstyl2020_space-fsaverage_hemi-R.shape.gii.gz'))

Collections will subset and sort terms; cortex parcellations are available.

[21]:
# Get cortical layer thickness maps
bigbrain_tab = fetch_reference(
    "bigbrain",
    space="fsaverage",
    collection="DifferentiationGradients",
    parcellation="Schaefer200"
)
display(f"{bigbrain_tab.shape[0]} maps", bigbrain_tab.head(5))
INFO | 16/06/25 09:27:27 | nispace: Loading bigbrain maps.
INFO | 16/06/25 09:27:27 | nispace: Applying collection filter from: /Users/llotter/nispace-data/reference/bigbrain/collection-DifferentiationGradients.collect.
INFO | 16/06/25 09:27:27 | nispace: Loading data parcellated with 'Schaefer200'
The NiSpace "bigbrain" dataset is adopted from the BigBrainWarp toolbox (https://bigbrainwarp.readthedocs.io) by Paquola et al.
(see below). Further information on the dataset: https://bigbrainwarp.readthedocs.io/en/latest/pages/toolbox_contents.html
The maps are fetched directly from the BigBrainWarp Sciebo folder (space = "fsaverageOriginal") or downloaded from
the NiSpace-data GitHub repo (space = "fsLR" | "fsaverage"; recommended). The data is licensed under the CC BY-NC-SA 4.0 license.
Please cite the following publication when using these maps:
- BigBrain: Amunts et al., 2013 (https://doi.org/10.1126/science.1235381)
- BigBrainWarp toolbox: Paquola et al., 2021 (https://doi.org/10.7554/eLife.70119)
- Approximate cortical layer thickness: Wagstyl et al., 2020 (https://doi.org/10.1371/journal.pbio.3000678)
To ensure reproducibility, note the NiSpace commit/version: 9887eac15f2dba714de4f9344cfeb39cf7420e2b


'7 maps'
hemi-L_div-Vis_lab-1 hemi-L_div-Vis_lab-2 hemi-L_div-Vis_lab-3 hemi-L_div-Vis_lab-4 hemi-L_div-Vis_lab-5 hemi-L_div-Vis_lab-6 hemi-L_div-Vis_lab-7 hemi-L_div-Vis_lab-8 hemi-L_div-Vis_lab-9 hemi-L_div-Vis_lab-10 ... hemi-R_div-Default_lab-PFCm+1 hemi-R_div-Default_lab-PFCm+2 hemi-R_div-Default_lab-PFCm+3 hemi-R_div-Default_lab-PFCm+4 hemi-R_div-Default_lab-PFCm+5 hemi-R_div-Default_lab-PFCm+6 hemi-R_div-Default_lab-PFCm+7 hemi-R_div-Default_lab-PCC+1 hemi-R_div-Default_lab-PCC+2 hemi-R_div-Default_lab-PCC+3
map
feature-histogradient1_pub-paquola2021 0.396202 0.598884 0.326065 0.631844 0.274718 0.481230 0.041881 0.352943 0.509418 0.240793 ... -0.238716 -0.425919 -0.108872 -0.357142 -0.243042 -0.394422 -0.391514 0.327984 0.008510 0.138938
feature-histogradient2_pub-paquola2021 -0.199851 0.133102 0.092499 0.015694 0.222189 -0.317501 0.379477 0.182478 0.270283 0.231073 ... -0.307540 -0.130802 -0.186044 -0.189851 -0.181120 -0.053847 0.068960 -0.031519 0.095256 0.026301
feature-microgradient1_pub-paquola2021 -0.008298 0.007619 -0.068237 0.059946 0.018820 0.031213 0.108157 -0.011606 0.062248 0.108594 ... -0.076054 -0.093718 -0.101298 -0.087163 -0.080423 -0.063367 -0.039383 -0.011067 -0.056551 -0.012604
feature-microgradient2_pub-paquola2021 0.008824 -0.013949 -0.016407 -0.009944 -0.018447 0.003640 -0.020313 -0.007329 -0.017412 -0.012929 ... -0.007570 -0.019199 -0.014719 -0.011837 -0.007193 -0.006115 0.004094 0.010782 -0.001166 0.008716
feature-funcgradient1_pub-paquola2021 0.198735 0.210743 0.245741 0.247181 0.129999 0.051108 0.193364 0.222374 0.209818 0.218404 ... -0.768585 -0.536115 -0.232727 -0.611842 -0.513837 -0.249603 -0.264178 -0.164339 -0.458201 -0.039034

5 rows × 200 columns

Fetch integrated parcellations#

We have some volumetric and surface parcellations integrated. These can be loaded via nispace.datasets.fetch_parcellation().

The first argument should be a string with the parcellation’s name. The other arguments, space, n_parcels, resolution, and hemi are used to find the matching parcellation. If no parcellation matching all criteria is found, an error message with relevant info will be returned.

If a parcellation was found, the function will return the path to the parcellation (hemispheres) and a list of labels. See API reference for detailed info.

Currently available:

  • "Schaefer{100 | 200 | 400}" (MNI152NLin6Asym, MNI152NLin2009cAsym, fsaverage, fsLR)

  • "TianS{1 | 2 | 3}" (MNI152NLin6Asym, MNI152NLin2009cAsym)

  • "Glasser" (fsaverage, fsLR)

  • "Destrieux" (MNI152NLin6Asym, MNI152NLin2009cAsym, fsaverage, fsLR)

  • "DesikanKilliany" (MNI152NLin6Asym, MNI152NLin2009cAsym, fsaverage, fsLR)

  • "DesikanKillianyTourville" (MNI152NLin6Asym, MNI152NLin2009cAsym)

Cortex and subcortex parcellations can be combined on-the-fly. This is very easily achieved by passing two parcellation names as one string, i.e.:

  • "DesikanKillianyAseg": Combination of Desikan-Killiany and Aseg parcellation (MNI152NLin6Asym, MNI152NLin2009cAsym)

  • "Schaefer200TianS1": Combination of Schaefer200 and TianS1 parcellation (MNI152NLin6Asym, MNI152NLin2009cAsym)

Only cortex-subcortex combinations are allowed.

Some parcellations have “alias” names. This just means that different names will refer to the same parcellation.

  • "DesikanKilliany": "Desikan"

  • "DesikanKillianyTourville": "DKT"

  • "Glasser": "HCP", "MMP"

  • "TianS{1 | 2 | 3}": "MelbourneS{1 | 2 | 3}"

The parcellation name strings are the same as those that can be passed to the parcellation argument of the fetch_reference function above. Calling cortex-subcortex combinations will result in joined dataframes

[16]:
from nispace.datasets import fetch_parcellation
# for plotting
from nispace.datasets import fetch_template, parcellation_lib
from nilearn.plotting import plot_roi, plot_surf_roi
import matplotlib.pyplot as plt

for parc_name in parcellation_lib:
    print("Parcellation:", parc_name)
    if "alias" in parcellation_lib[parc_name]:
        print("Alias for:", parcellation_lib[parc_name]["alias"])
        continue

    parc, labels, space = fetch_parcellation(
        parc_name,
        return_space=True,
        return_loaded=True
    )
    print("Type:", type(parc))
    print("Space:", space)
    print("First 5 labels:", labels[:5])

    # volumetric
    if "mni152" in space.lower():
        plot_roi(parc, title=parc_name)
    # surface -> plot only left hemisphere
    else:
        plot_surf_roi(fetch_template("fsaverage", hemi="L"), roi_map=parc[0].agg_data())
    plt.show()
Parcellation: Schaefer100
INFO | 15/06/25 15:57:21 | nispace: Loading cortex parcellation 'Schaefer100' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_div-Vis_lab-1', 'hemi-L_div-Vis_lab-2', 'hemi-L_div-Vis_lab-3', 'hemi-L_div-Vis_lab-4', 'hemi-L_div-Vis_lab-5']
../_images/nb_introduction_fetching_datasets_36_1.png
Parcellation: Schaefer200
INFO | 15/06/25 15:57:22 | nispace: Loading cortex parcellation 'Schaefer200' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_div-Vis_lab-1', 'hemi-L_div-Vis_lab-2', 'hemi-L_div-Vis_lab-3', 'hemi-L_div-Vis_lab-4', 'hemi-L_div-Vis_lab-5']
../_images/nb_introduction_fetching_datasets_36_3.png
Parcellation: Schaefer400
INFO | 15/06/25 15:57:23 | nispace: Loading cortex parcellation 'Schaefer400' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_div-Vis_lab-1', 'hemi-L_div-Vis_lab-2', 'hemi-L_div-Vis_lab-3', 'hemi-L_div-Vis_lab-4', 'hemi-L_div-Vis_lab-5']
../_images/nb_introduction_fetching_datasets_36_5.png
Parcellation: TianS1
INFO | 15/06/25 15:57:24 | nispace: Loading subcortex parcellation 'TianS1' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_lab-HIP', 'hemi-L_lab-AMY', 'hemi-L_lab-pTHA', 'hemi-L_lab-aTHA', 'hemi-L_lab-NAc']
../_images/nb_introduction_fetching_datasets_36_7.png
Parcellation: MelbourneS1
Alias for: TianS1
Parcellation: TianS2
INFO | 15/06/25 15:57:25 | nispace: Loading subcortex parcellation 'TianS2' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_lab-aHIP', 'hemi-L_lab-pHIP', 'hemi-L_lab-lAMY', 'hemi-L_lab-mAMY', 'hemi-L_lab-THA+DP']
../_images/nb_introduction_fetching_datasets_36_9.png
Parcellation: MelbourneS2
Alias for: TianS2
Parcellation: TianS3
INFO | 15/06/25 15:57:26 | nispace: Loading subcortex parcellation 'TianS3' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_lab-HIP+head+m', 'hemi-L_lab-HIP+head+l', 'hemi-L_lab-HIP+body', 'hemi-L_lab-HIP+tail', 'hemi-L_lab-THA+VPm']
../_images/nb_introduction_fetching_datasets_36_11.png
Parcellation: MelbourneS3
Alias for: TianS3
Parcellation: Glasser
INFO | 15/06/25 15:57:26 | nispace: Loading cortex parcellation 'Glasser' in 'fsaverage' space.
Type: <class 'tuple'>
Space: fsaverage
First 5 labels: ['hemi-L_lab-V1', 'hemi-L_lab-MST', 'hemi-L_lab-V6', 'hemi-L_lab-V2', 'hemi-L_lab-V3']
INFO | 15/06/25 15:57:26 | nispace: Loading fsaverage 'pial' template in '41k' resolution.
../_images/nb_introduction_fetching_datasets_36_13.png
Parcellation: HCP
Alias for: Glasser
Parcellation: MMP
Alias for: Glasser
Parcellation: DesikanKilliany
INFO | 15/06/25 15:57:29 | nispace: Loading cortex parcellation 'DesikanKilliany' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_lab-bankssts', 'hemi-L_lab-caudalanteriorcingulate', 'hemi-L_lab-caudalmiddlefrontal', 'hemi-L_lab-cuneus', 'hemi-L_lab-entorhinal']
../_images/nb_introduction_fetching_datasets_36_15.png
Parcellation: Desikan
Alias for: DesikanKilliany
Parcellation: DesikanKillianyTourville
INFO | 15/06/25 15:57:30 | nispace: Loading cortex parcellation 'DesikanKillianyTourville' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_lab-caudalanteriorcingulate', 'hemi-L_lab-caudalmiddlefrontal', 'hemi-L_lab-cuneus', 'hemi-L_lab-entorhinal', 'hemi-L_lab-fusiform']
../_images/nb_introduction_fetching_datasets_36_17.png
Parcellation: DKT
Alias for: DesikanKillianyTourville
Parcellation: Destrieux
INFO | 15/06/25 15:57:31 | nispace: Loading cortex parcellation 'Destrieux' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_lab-G+and+S+frontomargin', 'hemi-L_lab-G+and+S+occipital+inf', 'hemi-L_lab-G+and+S+paracentral', 'hemi-L_lab-G+and+S+subcentral', 'hemi-L_lab-G+and+S+transv+frontopol']
../_images/nb_introduction_fetching_datasets_36_19.png
Parcellation: Aseg
INFO | 15/06/25 15:57:31 | nispace: Loading subcortex parcellation 'Aseg' in 'MNI152NLin2009cAsym' space.
Type: <class 'nibabel.nifti1.Nifti1Image'>
Space: MNI152NLin2009cAsym
First 5 labels: ['hemi-L_lab-Thalamus', 'hemi-L_lab-Caudate', 'hemi-L_lab-Putamen', 'hemi-L_lab-Pallidum', 'hemi-L_lab-Hippocampus']
../_images/nb_introduction_fetching_datasets_36_21.png

Fetch example datasets#

We include a few example datasets for evaluation and exploration purposes. Available:

  • "happy" (CAVE: DUMMY DATA): n = 100 fake subjects in two groups. The first 50 are “happy” subjects (sub-001H - sub-050H), generated from CB1 and MU-opioid receptor PET maps. The second half are “neutral”/control subjects, each generated from a mixture of other PET maps. For analyses, they can be treated as two independent groups or two scans of the same subject.

  • "abide": fALFF resting-state fMRI data from the ABIDE-I dataset, fetched from nilearn and parcellated. When fetching this, you will receive an associated table with subject information.

  • "enigma": ENIGMA cortical thickness case-control results. Valued are Cohen’s d per parcel.

To fetch an example dataset, use the fetch_example function. Currently, only parcellated data is available, so you have to specify the parcellation. For ENIGMA, there’s only the "DesikanKilliany" parcellation, some more for the other two datasets.

[17]:
from nispace.datasets import fetch_example

print("Happy data")
tab_example = fetch_example("happy", "Glasser")
display(tab_example.head(5))

print("ABIDE data")
tab_example, info_example = fetch_example("abide", "Schaefer200TianS1")
display(tab_example.head(5))
display(info_example.head(5))

print("ENIGMA data")
tab_example = fetch_example("enigma", "DesikanKilliany")
display(tab_example)
Happy data
INFO | 15/06/25 15:57:32 | nispace: Loading example dataset: 'happy', parcellated with: Glasser.
hemi-L_lab-V1 hemi-L_lab-MST hemi-L_lab-V6 hemi-L_lab-V2 hemi-L_lab-V3 hemi-L_lab-V4 hemi-L_lab-V8 hemi-L_lab-4 hemi-L_lab-3b hemi-L_lab-FEF ... hemi-R_lab-p47r hemi-R_lab-TGv hemi-R_lab-MBelt hemi-R_lab-LBelt hemi-R_lab-A4 hemi-R_lab-STSva hemi-R_lab-TE1m hemi-R_lab-PI hemi-R_lab-a32pr hemi-R_lab-p24
sub-001H 0.336429 0.471550 0.455314 0.362316 0.333990 0.381957 0.437665 0.381304 0.490977 0.555933 ... 0.630642 0.595949 0.530645 0.497731 0.552863 0.592239 0.550500 0.571144 0.641664 0.672440
sub-002H 0.360431 0.499942 0.481051 0.387166 0.359117 0.410283 0.473021 0.399784 0.514548 0.580300 ... 0.664077 0.637451 0.564991 0.525941 0.584053 0.631199 0.586171 0.615562 0.682176 0.712676
sub-003H 0.227936 0.356384 0.332664 0.250524 0.230877 0.266542 0.314204 0.278995 0.355711 0.430758 ... 0.498984 0.464809 0.407976 0.377520 0.422245 0.465237 0.435265 0.438843 0.510712 0.526831
sub-004H 0.334931 0.482154 0.453596 0.360782 0.336447 0.387239 0.450365 0.386952 0.491461 0.565563 ... 0.646925 0.624795 0.543489 0.504370 0.563390 0.616762 0.568944 0.602902 0.679163 0.708075
sub-005H 0.310893 0.466165 0.429950 0.336922 0.315447 0.364915 0.427671 0.376783 0.473257 0.553516 ... 0.632794 0.607021 0.524912 0.486204 0.545657 0.600055 0.551947 0.586539 0.671353 0.698421

5 rows × 360 columns

ABIDE data
INFO | 15/06/25 15:57:32 | nispace: Loading example dataset: 'abide', parcellated with: Schaefer200TianS1.
INFO | 15/06/25 15:57:32 | nispace: Returning parcellated and associated subject data.
hemi-L_div-Vis_lab-1 hemi-L_div-Vis_lab-2 hemi-L_div-Vis_lab-3 hemi-L_div-Vis_lab-4 hemi-L_div-Vis_lab-5 hemi-L_div-Vis_lab-6 hemi-L_div-Vis_lab-7 hemi-L_div-Vis_lab-8 hemi-L_div-Vis_lab-9 hemi-L_div-Vis_lab-10 ... hemi-L_lab-PUT hemi-L_lab-CAU hemi-R_lab-HIP hemi-R_lab-AMY hemi-R_lab-pTHA hemi-R_lab-aTHA hemi-R_lab-NAc hemi-R_lab-GP hemi-R_lab-PUT hemi-R_lab-CAU
subject
50003 1530.1179 1677.4820 1607.0056 1508.5145 1187.09780 1510.6517 1534.3547 1513.21020 1557.09070 1394.90080 ... 1288.88000 1246.14330 1061.72600 1057.3959 1185.1282 1366.7485 1374.32760 1028.86320 1220.36430 1366.8842
50004 1077.5151 1094.0139 1033.4298 1036.3722 686.27716 1194.0590 917.2903 1004.15094 813.08685 1002.22266 ... 1011.58075 921.38135 932.35223 891.8384 961.8646 942.3631 1018.32367 854.32776 956.10596 943.5990
50005 1287.0707 1186.0944 1024.3271 1388.4406 814.70250 1461.1589 1083.4020 1166.30380 946.10547 1254.68530 ... 1273.04880 1111.30180 1052.04750 1133.1693 1140.8767 1122.5364 1142.63590 993.38480 1309.49410 1070.8911
50006 1301.8971 1094.0586 991.6907 1503.6521 751.03217 1558.8677 1003.2750 1206.68430 955.63060 1779.52200 ... 1111.70310 1024.06250 1161.70690 1230.7429 1103.4869 1058.5040 929.65420 929.08440 1046.40090 1028.6166
50007 1503.5083 1181.2339 1113.0653 1403.4066 838.12440 1385.6886 1114.9324 1288.69320 946.09924 1222.88730 ... 1196.67370 1202.98320 1167.58180 1088.9086 1052.7567 1034.6626 1227.07100 994.04517 1185.00150 1214.7137

5 rows × 216 columns

site site_num dx dx_num dsm_iv_tr age sex sex_num qc_rater_1 qc_func_rater_2 qc_func_rater_3 adi_r_social_total_a adi_r_verbal_total_bv adi_rrb_total_c ados_total srs_raw_total scq_total aq_total
subject
50003 PITT 9 ASD 1 1.0 24.45 M 1 OK OK OK 27.0 22.0 5.0 13.0 NaN NaN NaN
50004 PITT 9 ASD 1 1.0 19.09 M 1 OK OK OK 19.0 12.0 5.0 18.0 NaN NaN NaN
50005 PITT 9 ASD 1 1.0 13.73 F 2 OK maybe OK 23.0 19.0 3.0 12.0 NaN NaN NaN
50006 PITT 9 ASD 1 1.0 13.37 M 1 OK maybe OK 13.0 10.0 4.0 12.0 NaN NaN NaN
50007 PITT 9 ASD 1 1.0 17.78 M 1 OK maybe OK 21.0 14.0 9.0 17.0 NaN NaN NaN
ENIGMA data
INFO | 15/06/25 15:57:32 | nispace: Loading example dataset: 'enigma', parcellated with: DesikanKilliany.
L_bankssts L_caudalanteriorcingulate L_caudalmiddlefrontal L_cuneus L_entorhinal L_fusiform L_inferiorparietal L_inferiortemporal L_isthmuscingulate L_lateraloccipital ... R_rostralanteriorcingulate R_rostralmiddlefrontal R_superiorfrontal R_superiorparietal R_superiortemporal R_supramarginal R_frontalpole R_temporalpole R_transversetemporal R_insula
MDD -0.058 -0.042 -0.014 0.047 -0.041 -0.117 -0.063 -0.049 -0.104 -0.023 ... -0.098 -0.038 -0.078 0.032 -0.031 -0.053 -0.062 0.013 -0.051 -0.115
PTSD -0.100 -0.100 -0.120 -0.070 0.050 -0.060 -0.140 -0.070 -0.020 -0.150 ... 0.010 -0.100 -0.120 -0.120 -0.140 -0.150 -0.100 -0.020 -0.050 -0.110
AN -0.738 -0.065 -0.760 -0.663 0.060 -0.538 -0.895 -0.537 -0.620 -0.747 ... -0.003 -0.507 -0.722 -0.925 -0.522 -0.756 -0.332 -0.055 -0.258 -0.339
ADHD 0.000 -0.040 -0.050 0.020 -0.080 -0.100 0.010 -0.030 0.030 0.030 ... -0.010 0.000 0.000 0.010 0.000 -0.020 0.010 -0.120 0.010 -0.050
ASD 0.000 0.020 0.050 0.060 -0.150 NaN 0.010 -0.050 0.020 -0.010 ... 0.090 0.220 0.200 -0.040 -0.050 -0.080 0.090 -0.150 -0.130 -0.100
OCD -0.060 0.003 -0.090 -0.042 -0.062 -0.109 -0.140 -0.087 -0.068 -0.074 ... 0.005 -0.091 -0.038 -0.047 0.014 0.003 0.021 0.015 -0.024 -0.065
BD -0.207 -0.095 -0.266 -0.056 -0.036 -0.288 -0.265 -0.250 -0.132 -0.156 ... -0.087 -0.264 -0.256 -0.158 -0.194 -0.184 -0.102 -0.059 -0.109 -0.168
SCZ -0.352 -0.119 -0.363 -0.203 -0.203 -0.491 -0.362 -0.449 -0.309 -0.331 ... -0.120 -0.313 -0.397 -0.219 -0.438 -0.386 -0.207 -0.236 -0.262 -0.406
22q11.2 -0.030 -0.210 0.510 0.520 0.160 0.190 0.250 0.280 0.300 0.220 ... 0.160 0.800 0.530 0.300 -0.320 0.710 0.140 0.010 0.060 0.630
Epilepsy - all -0.092 0.039 -0.319 -0.157 -0.264 -0.187 -0.197 -0.085 -0.049 -0.190 ... 0.093 -0.197 -0.269 -0.313 -0.123 -0.223 -0.109 -0.181 -0.182 -0.022
Epilepsy - temporal -0.077 0.087 -0.202 -0.091 -0.188 -0.108 -0.127 -0.038 0.004 -0.126 ... -0.026 -0.046 -0.100 -0.134 0.042 -0.071 0.039 -0.276 -0.072 -0.030
Epilepsy - generalized -0.100 0.181 -0.403 -0.190 -0.445 -0.359 -0.242 -0.207 -0.021 -0.311 ... 0.200 -0.242 -0.365 -0.474 -0.165 -0.303 -0.100 -0.033 -0.161 0.069
PD -0.104 0.043 -0.135 -0.112 -0.096 -0.198 -0.188 -0.193 -0.177 -0.166 ... -0.010 -0.047 -0.110 -0.174 -0.077 -0.153 -0.094 -0.096 -0.068 -0.077

13 rows × 68 columns