Mapping heterogeneous brain structural subtypes in alzheimer's disease and mild cognitive impairment using normative models.
The 1 match
- [1] § Materials and methods › Transcriptomic analysis ↔ abagen/datasets/fetchers.py, lines 72–160 · score 0.57 · Allen Human Brain, adult, abagen, transcriptomic, Ontology, Atlas
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 546 lines · 19 KB · BSD-3-Clause · 1 match
- # -*- coding: utf-8 -*-
- """
- Functions for downloading the Allen Brain Atlas human microarray dataset.
- """
- from collections import namedtuple
- from functools import partial
- import multiprocessing as mp
- import os
- from pkg_resources import resource_filename
- import nibabel as nib
- import pandas as pd
- from .. import io
- from ..utils import load_gifti, first_entry
- from .utils import _get_dataset_dir, _fetch_files
- WELL_KNOWN_IDS = nib.volumeutils.Recoder(
- (('9861', 'H0351.2001', '178238387', '157722636', '157722638'),
- ('10021', 'H0351.2002', '178238373', '157723301', '157723303'),
- ('12876', 'H0351.1009', '178238359', '157722290', '157722292'),
- ('15496', 'H0351.1015', '178238266', '162021642', '162021644'),
- ('14380', 'H0351.1012', '178238316', '157721937', '157721939'),
- ('15697', 'H0351.1016', '178236545', '157682966', '157682968')),
- fields=('subj', 'uid', 'url', 't1w', 't2w')
- )
- VALID_DONORS = sorted(WELL_KNOWN_IDS.value_set('subj')
- | WELL_KNOWN_IDS.value_set('uid'))
- RESOURCE = partial(resource_filename, 'abagen')
- def check_donors(donors, default='12876', valid=VALID_DONORS):
- """
- Checks that provided `donors` are valid
- Parameters
- ----------
- donors : list of str
- List of donors to download; can be either donor number or UID. Can also
- specify 'all' to download all available donors. If 'None' is provided
- then `default` will be used.
- default : str, optional
- Default donor to use if `donors` is None. Default: '12876'
- valid : list of str, optional
- List of valid donnor numbers and UIDs. Default: :obj:`VALID_DONORS`
- Returns
- -------
- donors : list of str
- Donor subject IDs
- """
- if donors is None:
- donors = [default]
- elif donors == 'all':
- donors = valid
- elif isinstance(donors, str):
- donors = [donors]
- donors = list(donors).copy()
- for n, sub_id in enumerate(donors):
- if sub_id not in valid:
- raise ValueError('Invalid subject id: {0}. Subjects must in: {1}.'
- .format(sub_id, valid))
- donors[n] = WELL_KNOWN_IDS[sub_id] # convert to ID system
- donors = sorted(set(donors), key=lambda x: int(x))
- return donors
- def fetch_microarray(data_dir=None, donors=None, resume=True, verbose=1,
- convert=True, n_proc=1):
- """
- Downloads the Allen Human Brain Atlas microarray expression dataset
- Parameters
- ----------
- data_dir : str, optional
- Directory where data should be downloaded and unpacked. Default: $HOME/
- abagen-data
- donors : list, optional
- List of donors to download; can be either donor number or UID. Can also
- specify 'all' to download all available donors. Default: 12876
- resume : bool, optional
- Whether to resume download of a partly-downloaded file. Default: True
- verbose : int, optional
- Verbosity level (0 means no message). Default: 1
- convert : bool, optional
- Whether to convert downloaded CSV files into parquet format for faster
- loading in the future; only available if ``fastparquet`` and ``python-
- snappy`` are installed. Default: True
- n_proc : int, optional
- Number of processes to parallelize download if multiple donors are
- specified. Default: 1
- Returns
- -------
- data : dict
- Two-level nested dictionary, where top-level keys are donor IDs and
- second-level keys are ['microarray', 'ontology', 'pacall', 'probes',
- 'annotation'], where corresponding values are lists of filepaths to
- downloaded CSV files.
- References
- ----------
- Hawrylycz, M. J., Lein, E. S., Guillozet-Bongaarts, A. L., Shen, E. H., Ng,
- L., Miller, J. A., ... & Abajian, C. (2012). An anatomically comprehensive
- atlas of the adult human brain transcriptome. Nature, 489(7416), 391.
- """
- url = "https://human.brain-map.org/api/v2/well_known_file_download/{}"
- dataset_name = 'microarray'
- data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir,
- verbose=verbose)
- sub_files = ('MicroarrayExpression.csv',
- 'Ontology.csv', 'PACall.csv',
- 'Probes.csv', 'SampleAnnot.csv')
- n_files = len(sub_files)
- donors = check_donors(donors)
- if n_proc < 0:
- n_proc = mp.cpu_count() + n_proc + 1
- files = [
- [(os.path.join('normalized_microarray_donor{}'.format(sub), fname),
- url.format(WELL_KNOWN_IDS.url[sub]),
- dict(uncompress=True,
- move=os.path.join('normalized_microarray_donor{}'.format(sub),
- 'donor{}.zip'.format(sub))))
- for fname in sub_files]
- for sub in donors
- ]
- if n_proc > 1:
- with mp.Pool(n_proc) as pool:
- results = [pool.apply_async(_fetch_files,
- (data_dir, f),
- dict(resume=resume, verbose=verbose))
- for f in files]
- # flatten outputs into single list
- files = [fn for res in results for fn in res.get()]
- else:
- # flatten list of lists into single list
- files = [fn for f in files for fn in f]
- files = _fetch_files(data_dir, files, resume=resume, verbose=verbose)
- # if we want to convert files to parquet format it's good to do that now
- # this step is _already_ super long, so an extra 1-2 minutes is negligible
- if convert and io.use_parq:
- for fn in files[0::n_files] + files[2::n_files]:
- io._make_parquet(fn, convert_only=True)
- keys = ['microarray', 'ontology', 'pacall', 'probes', 'annotation']
- return {
- donor: dict(zip(keys, files[k:k + n_files]))
- for k, donor in zip(range(0, len(files), n_files), donors)
- }
- def fetch_rnaseq(data_dir=None, donors=None, resume=True, verbose=1):
- """
- Downloads RNA-sequencing data from the Allen Human Brain Atlas
- Parameters
- ----------
- data_dir : str, optional
- Directory where data should be downloaded and unpacked. Default:
- current directory
- donors : list, optional
- List of donors to download; can be either donor number or UID. Can also
- specify 'all' to download all available donors (two). Default: 9861
- resume : bool, optional
- Whether to resume download of a partly-downloaded file. Default: True
- verbose : int, optional
- Verbosity level (0 means no message). Default: 1
- Returns
- -------
- data : dict
- Two-level nested dictionary, where top-level keys are donor IDs and
- second-level keys are ['counts', 'tpm', 'ontology', 'genes',
- 'annotation'], where corresponding values are lists of filepaths to
- downloaded CSV files.
- References
- ----------
- Hawrylycz, M. J., Lein, E. S., Guillozet-Bongaarts, A. L., Shen, E. H., Ng,
- L., Miller, J. A., ... & Abajian, C. (2012). An anatomically comprehensive
- atlas of the adult human brain transcriptome. Nature, 489(7416), 391.
- """
- url = "https://human.brain-map.org/api/v2/well_known_file_download/{}"
- well_known_ids = {
- '9861': '278447594',
- '10021': '278448166'
- }
- dataset_name = 'rnaseq'
- data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir,
- verbose=verbose)
- sub_files = ('Genes.csv', 'Ontology.csv',
- 'RNAseqCounts.csv', 'RNAseqTPM.csv', 'SampleAnnot.csv')
- n_files = len(sub_files)
- valid = ['9861', '10021', 'H0351.2001', 'H0351.2002']
- donors = sorted(set(check_donors(donors, default=valid[0])) & set(valid),
- key=lambda x: int(x))
- files = [
- [(os.path.join('rnaseq_donor{}'.format(sub), fname),
- url.format(well_known_ids[sub]),
- dict(uncompress=True,
- move=os.path.join('rnaseq_donor{}'.format(sub),
- 'donor{}.zip'.format(sub))))
- for fname in sub_files]
- for sub in donors
- ]
- files = [fn for f in files for fn in f]
- files = _fetch_files(data_dir, files, resume=resume, verbose=verbose)
- keys = ['genes', 'ontology', 'counts', 'tpm', 'annotation']
- return {
- donor: dict(zip(keys, files[k:k + n_files]))
- for k, donor in zip(range(0, len(files), n_files), donors)
- }
- def fetch_raw_mri(data_dir=None, donors=None, resume=True, verbose=1):
- """
- Downloads the "raw" Allen Human Brain Atlas T1w/T2w MRI images
- Parameters
- ----------
- data_dir : str, optional
- Directory where data should be downloaded and unpacked. Default: $HOME/
- abagen-data
- donors : list, optional
- List of donors to download; can be either donor number or UID. Can also
- specify 'all' to download all available donors. Default: 12876
- resume : bool, optional
- Whether to resume download of a partly-downloaded file. Default: True
- verbose : int, optional
- Verbosity level (0 means no message). Default: 1
- Returns
- -------
- mris : dict
- Two-level nested dictionary, where top-level keys are donor IDs and
- second-level keys are ['t1w', 't2w'], where corresponding values are
- lists of filepaths to downloaded Nifti files
- """
- url = "https://human.brain-map.org/api/v2/well_known_file_download/{}"
- dataset_name = 'mri'
- data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir,
- verbose=verbose)
- sub_files = dict(t1w='T1.nii.gz', t2w='T2.nii.gz')
- n_files = len(sub_files)
- donors = check_donors(donors)
- files = [
- (os.path.join('mri_donor{}'.format(sub), fname),
- url.format(getattr(WELL_KNOWN_IDS, img)[sub]),
- dict(move=os.path.join('mri_donor{}'.format(sub),
- fname)))
- for sub in donors
- for img, fname in sub_files.items()
- ]
- files = _fetch_files(data_dir, files, resume=resume, verbose=verbose)
- return {
- donor: dict(zip(sub_files.keys(), files[k:k + n_files]))
- for k, donor in zip(range(0, len(files), n_files), donors)
- }
- def fetch_freesurfer(data_dir=None, donors=None, resume=True, verbose=1):
- """
- Downloads FreeSurfer reconstructions of the Allen Human Brain Atlas MRIs
- Parameters
- ----------
- data_dir : str, optional
- Directory where data should be downloaded and unpacked. Default: $HOME/
- abagen-data
- donors : list, optional
- List of donors to download; can be either donor number or UID. Can also
- specify 'all' to download all available donors. Default: 12876
- resume : bool, optional
- Whether to resume download of a partly-downloaded file. Default: True
- verbose : int, optional
- Verbosity level (0 means no message). Default: 1
- Returns
- -------
- freesurfer : dict
- Dictionary where keys are donor IDs and values are paths to FreeSurfer
- directories for requested `donors`
- References
- ----------
- Romero-Garcia, R., Whitaker, K., Vasa, F., Seidlitz, J., Shinn, M., Fonagy,
- P., Jones, P., et al. (2017). Data supporting NSPN publication "Structural
- covariance networks are coupled to expression of genes enriched in
- supragranular layers of the human cortex " [Dataset].
- https://doi.org/10.17863/CAM.11392
- """
- url = "https://www.repository.cam.ac.uk/bitstream/handle/1810/265272/" \
- "donor{}.zip"
- dataset_name = 'freesurfer'
- data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir,
- verbose=verbose)
- donors = check_donors(donors)
- files = [
- ('donor{}'.format(sub),
- url.format(sub),
- dict(uncompress=True,
- move=os.path.join('freesurfer.tar.gz')))
- for sub in donors
- ]
- files = _fetch_files(data_dir, files, resume=resume, verbose=verbose)
- return {
- donor: files[k]
- for k, donor in enumerate(donors)
- }
- def fetch_desikan_killiany(native=False, surface=False, *args, **kwargs):
- """
- Fetches Desikan-Killiany atlas shipped with `abagen`
- Parameters
- ----------
- native : bool, optional
- Whether to return individualized atlases in donor native space.
- Default: False
- surface : bool, optional
- Whether to return surface instead of volumetric parcellation. This
- option is currently incompatible with ``native=True``; instead, refer
- to :func:`abagen.datasets.fetch_freesurfer` for donor-specific surface
- atlases. Default: False
- Returns
- -------
- atlas : dict
- Dictionary with keys ['image', 'info'] pointing to atlas image and
- information files. If ``native`` then 'image' is a dictionary where
- keys are donor IDs and values are image paths. If ``surface`` then
- 'image' is a tuple of GIFTI files (.label.gii.gz)
- References
- ----------
- Desikan, R. S., Ségonne, F., Fischl, B., Quinn, B. T., Dickerson, B. C.,
- Blacker, D., ... & Albert, M. S. (2006). An automated labeling system
- for subdividing the human cerebral cortex on MRI scans into gyral based
- regions of interest. Neuroimage, 31(3), 968-980.
- Examples
- --------
- >>> import abagen
- >>> atlas = abagen.fetch_desikan_killiany()
- >>> print(atlas['image']) # doctest: +ELLIPSIS
- /.../abagen/data/atlas-desikankilliany.nii.gz
- >>> print(atlas['info']) # doctest: +ELLIPSIS
- /.../abagen/data/atlas-desikankilliany.csv
- When fetching native-space atlases, `atlas['image']` will be a dictionary
- where the keys are donor IDs and the values are paths to the donor-specific
- atlases:
- >>> atlas = abagen.fetch_desikan_killiany(native=True)
- >>> print(atlas['image'].keys())
- dict_keys(['9861', '10021', '12876', '14380', '15496', '15697'])
- >>> print(atlas['image']['9861']) # doctest: +ELLIPSIS
- /.../abagen/data/native_dk/9861/atlas-desikankilliany.nii.gz
- """
- # grab resource filenames
- img = dict()
- for donor in check_donors('all'):
- fp = 'data' if not native else os.path.join('data', 'native_dk', donor)
- if surface:
- impath = tuple([
- RESOURCE(
- os.path.join(fp, f'atlas-desikankilliany-{h}.label.gii.gz')
- )
- for h in ('lh', 'rh')
- ])
- else:
- impath = RESOURCE(os.path.join(fp, 'atlas-desikankilliany.nii.gz'))
- img[donor] = impath
- if not native:
- img = first_entry(img)
- info = RESOURCE('data/atlas-desikankilliany.csv')
- return dict(image=img, info=info)
- def fetch_gene_group(group):
- """
- Return list of gene acronyms belonging to provided `group`
- Groups are defined as in [DS1]_
- Parameters
- ----------
- group : {'brain', 'neuron', 'oligodendrocyte', 'synaptome', 'layers'}
- Desired gene group
- Returns
- -------
- genes : list of str
- List of gene acronyms
- References
- ----------
- .. [DS1] Burt, J. B., Demirtaş, M., Eckner, W. J., Navejar, N. M., Ji, J.
- L., Martin, W. J., ... & Murray, J. D. (2018). Hierarchy of
- transcriptomic specialization across human cortex captured by
- structural neuroimaging topography. Nature neuroscience, 21(9), 1251.
- """
- groups = ['brain', 'neuron', 'oligodendrocyte', 'synaptome', 'layers']
- if group.lower() not in groups:
- raise ValueError('Provided group {} not one of the available gene '
- 'groups: {}'.format(group, groups))
- group = group.lower()
- fn = RESOURCE(os.path.join('data', 'burt2018_natneuro.csv.gz'))
- genes = pd.read_csv(fn).query('group == "{}"'.format(group))['acronym']
- return sorted(list(genes))
- def fetch_donor_info():
- """
- Returns dataframe with donor demographic information
- Returns
- -------
- info : pandas.DataFrame
- With columns ['donor', 'age', 'sex', 'ethnicity', 'medical_conditions',
- 'post_mortem_interval_hours'] detailing basic demographic info about
- donors
- """
- fn = RESOURCE(os.path.join('data', 'donor_info.csv'))
- donors = pd.read_csv(fn)
- return donors
- Brain = namedtuple('Brain', ('lh', 'rh'))
- Surface = namedtuple('Surface', ('vertices', 'faces'))
- def fetch_fsaverage5(load=True):
- """
- Fetches and optionally loads fsaverage5 surface
- Parameters
- ----------
- load : bool, optional
- Whether to pre-load files. Default: True
- Returns
- -------
- brain : namedtuple ('lh', 'rh')
- If `load` is True, a namedtuple where each entry in the tuple is a
- hemisphere, represented as a namedtuple with fields ('vertices',
- 'faces'). If `load` is False, a namedtuple where entries are filepaths.
- """
- hemispheres = []
- for hemi in ('lh', 'rh'):
- fn = RESOURCE(
- os.path.join('data', f'fsaverage5-pial-{hemi}.surf.gii.gz')
- )
- if load:
- hemispheres.append(Surface(*load_gifti(fn).agg_data()))
- else:
- hemispheres.append(fn)
- return Brain(*hemispheres)
- def fetch_fsnative(donors, surf='pial', load=True, data_dir=None, resume=True,
- verbose=1):
- """
- Fetches and optionally loads fsnative surface of `donor`
- Parameters
- ----------
- donors : str or list-of-str
- Donor(s) to download; can be either donor number or UID. Can also
- specify 'all' to download all available donors.
- surf : {'orig', 'white', 'pial', 'inflated', 'sphere'}, optional
- Which surface to load. Default: 'pial'
- load : bool, optional
- Whether to pre-load files. Default: True
- data_dir : str, optional
- Directory where data should be downloaded and unpacked. Default: $HOME/
- abagen-data
- resume : bool, optional
- Whether to resume download of a partly-downloaded file. Default: True
- verbose : int, optional
- Verbosity level (0 means no message). Default: 1
- Returns
- -------
- brain : namedtuple ('lh', 'rh')
- If `load` is True, a namedtuple where each entry in the tuple is a
- hemisphere, represented as a namedtuple with fields ('vertices',
- 'faces'). If `load` is False, a namedtuple where entries are filepaths.
- If multiple donors are requested a dictionary is returned where keys
- are donor IDs.
- """
- donors = check_donors(donors)
- if len(donors) > 1:
- return {donor: fetch_fsnative(donor, surf, data_dir, resume, verbose)
- for donor in donors}
- donors = donors[0]
- fpath = fetch_freesurfer(donors=donors, data_dir=data_dir, resume=resume,
- verbose=verbose)[donors]
- hemispheres = []
- for hemi in ('lh', 'rh'):
- fn = os.path.join(fpath, 'surf', f'{hemi}.{surf}')
- if load:
- hemispheres.append(Surface(*nib.freesurfer.read_geometry(fn)))
- else:
- hemispheres.append(fn)
- return Brain(*hemispheres)
fetchers.py at commit dc4a007, under BSD-3-Clause · at the source
Overview
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repositories
Its files are read in the Code ↔ Paper reader above, with 1 match between paragraphs and lines of code.
rmarkello/abagen
dc4a007e4e902e51f97251390c8d1bbf7e58c6d3, 29 September 2023Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
55 files
- abagen/
__init__.py , Python, 26 lines - abagen/
_version.py , Python, 683 lines - abagen/
allen.py , Python, 817 lines - abagen/
cli/ , Python, 1 line__init__.py - abagen/
cli/ , Python, 417 linesrun.py - abagen/
correct.py , Python, 626 lines - abagen/
datasets/ , Python, 17 lines__init__.py - abagen/
datasets/ , Python, 546 lines, 1 matchfetchers.py - abagen/
datasets/ , Python, 604 linesutils.py - abagen/
images.py , Python, 586 lines - abagen/
info.py , Python, 164 lines - abagen/
io.py , Python, 430 lines - abagen/
matching.py , Python, 620 lines - abagen/
mouse/ , Python, 13 lines__init__.py - abagen/
mouse/ , Python, 120 linesgene.py - abagen/
mouse/ , Python, 178 linesio.py - abagen/
mouse/ , Python, 268 linesmouse.py - abagen/
mouse/ , Python, 171 linesstructure.py - abagen/
mouse/ , Python, 83 linesutils.py - abagen/
probes_.py , Python, 763 lines - abagen/
reporting.py , Python, 625 lines - abagen/
samples_.py , Python, 491 lines - abagen/
surfaces.py , Python, 231 lines - abagen/
tests/ , Python, 1 line__init__.py - abagen/
tests/ , Python, 1 linecli/ __init__.py - abagen/
tests/ , Python, 118 linescli/ test_run.py - abagen/
tests/ , Python, 46 linesconftest.py - abagen/
tests/ , Python, 1 linedatasets/ __init__.py - abagen/
tests/ , Python, 198 linesdatasets/ test_fetchers.py - abagen/
tests/ , Python, 43 linesdatasets/ test_utils.py - abagen/
tests/ , Python, 1 linemouse/ __init__.py - abagen/
tests/ , Python, 37 linesmouse/ test_gene.py - abagen/
tests/ , Python, 52 linesmouse/ test_io.py - abagen/
tests/ , Python, 102 linesmouse/ test_mouse.py - abagen/
tests/ , Python, 66 linesmouse/ test_structure.py - abagen/
tests/ , Python, 136 linestest_allen.py - abagen/
tests/ , Python, 257 linestest_correct.py - abagen/
tests/ , Python, 266 linestest_images.py - abagen/
tests/ , Python, 128 linestest_io.py - abagen/
tests/ , Python, 183 linestest_matching.py - abagen/
tests/ , Python, 276 linestest_probes.py - abagen/
tests/ , Python, 58 linestest_reporting.py - abagen/
tests/ , Python, 322 linestest_samples.py - abagen/
tests/ , Python, 60 linestest_surfaces.py - abagen/
tests/ , Python, 56 linestest_transforms.py - abagen/
tests/ , Python, 88 linestest_utils.py - abagen/
transforms.py , Python, 185 lines - abagen/
utils.py , Python, 221 lines - docs/
conf.py , Python, 129 lines - setup.py, Python, 14 lines
- tools/
update_changes.sh , Shell, 54 lines - tools/
update_readme.py , Python, 33 lines - versioneer.py, Python, 2,277 lines
- LICENSE, License, 29 lines
- README.rst, Text, 163 lines
amarquand/PCNtoolkit
73b19a0f900138281d3a29b9514f2cfc631662af, 25 September 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
123 files
- doc/
conf.py , Python, 141 lines - doc/
convert_notebooks.py , Python, 228 lines - doc/
tutorials/ , Jupyter, 126 linesnotebooks/ 00_getting_started.ipynb - doc/
tutorials/ , Jupyter, 253 linesnotebooks/ 01_loading_data.ipynb - doc/
tutorials/ , Jupyter, 508 linesnotebooks/ 02_BLR.ipynb - doc/
tutorials/ , Jupyter, 443 linesnotebooks/ 03_HBR_Normal.ipynb - doc/
tutorials/ , Jupyter, 515 linesnotebooks/ 04_HBR_SHASH.ipynb - doc/
tutorials/ , Jupyter, 485 linesnotebooks/ 05_HBR_Beta.ipynb - doc/
tutorials/ , Jupyter, 269 linesnotebooks/ 06_transfer_extend.ipynb - doc/
tutorials/ , Jupyter, 220 linesnotebooks/ 07_model_comparison.ipyn b - doc/
tutorials/ , Jupyter, 215 linesnotebooks/ 08_cluster.ipynb - doc/
tutorials/ , Jupyter, 224 linesnotebooks/ 09_command_line_interfac e.ipynb - doc/
tutorials/ , Jupyter, 209 linesnotebooks/ 10_merge.ipynb - doc/
tutorials/ , Jupyter, 248 linesnotebooks/ 11_composite_basis_funct ion.ipynb - doc/
tutorials/ , Jupyter, 259 linesnotebooks/ 12_transfer_pretrained.i pynb - doc/
tutorials/ , Jupyter, 288 linesnotebooks/ 13_evaluation_metrics.ip ynb - doc/
tutorials/ , Jupyter, 300 linesnotebooks/ 15_HBR_ZINB.ipynb - doc/
tutorials/ , Jupyter, 175 linesnotebooks/ 15_longitudinal_modellin g_loading_precomputed_ma trix.ipynb - examples/
00_getting_started.ipynb , Jupyter, 126 lines - examples/
01_loading_data.ipynb , Jupyter, 253 lines - examples/
02_BLR.ipynb , Jupyter, 508 lines - examples/
03_HBR_Normal.ipynb , Jupyter, 443 lines - examples/
04_HBR_SHASH.ipynb , Jupyter, 515 lines - examples/
05_HBR_Beta.ipynb , Jupyter, 485 lines - examples/
06_transfer_extend.ipynb , Jupyter, 269 lines - examples/
07_model_comparison.ipyn , Jupyter, 220 linesb - examples/
08_cluster.ipynb , Jupyter, 215 lines - examples/
09_command_line_interfac , Jupyter, 224 linese.ipynb - examples/
10_merge.ipynb , Jupyter, 209 lines - examples/
11_composite_basis_funct , Jupyter, 248 linesion.ipynb - examples/
12_transfer_pretrained.i , Jupyter, 259 linespynb - examples/
13_evaluation_metrics.ip , Jupyter, 288 linesynb - examples/
14_longitudinal_modellin , Jupyter, 514 linesg.ipynb - examples/
15_HBR_ZINB.ipynb , Jupyter, 300 lines - examples/
15_longitudinal_modellin , Jupyter, 175 linesg_loading_precomputed_ma trix.ipynb - pcntoolkit/
__init__.py , Python, 59 lines - pcntoolkit/
dataio/ , Python, 1 line__init__.py - pcntoolkit/
dataio/ , Python, 368 linesdata_factory.py - pcntoolkit/
dataio/ , Python, 560 linesfileio.py - pcntoolkit/
dataio/ , Python, 1,723 linesnorm_data.py - pcntoolkit/
longitudinal_score/ , Python, 9 lines__init__.py - pcntoolkit/
longitudinal_score/ , Python, 121 lineslongitudinal_score.py - pcntoolkit/
longitudinal_score/ , Python, 253 lineszdiff_score.py - pcntoolkit/
longitudinal_score/ , Python, 252 lineszgain_score.py - pcntoolkit/
math_functions/ , Python, 1 line__init__.py - pcntoolkit/
math_functions/ , Python, 528 linesbasis_function.py - pcntoolkit/
math_functions/ , Python, 327 linescorrelation_matrix.py - pcntoolkit/
math_functions/ , Python, 49 linesfactorize.py - pcntoolkit/
math_functions/ , Python, 982 lineslikelihood.py - pcntoolkit/
math_functions/ , Python, 617 linesprior.py - pcntoolkit/
math_functions/ , Python, 530 linesscaler.py - pcntoolkit/
math_functions/ , Python, 401 linesshash.py - pcntoolkit/
math_functions/ , Python, 973 linesvelocity.py - pcntoolkit/
math_functions/ , Python, 688 lineswarp.py - pcntoolkit/
normative.py , Python, 259 lines - pcntoolkit/
normative_model.py , Python, 1,320 lines - pcntoolkit/
regression_model/ , Python, 1 line__init__.py - pcntoolkit/
regression_model/ , Python, 1,161 linesblr.py - pcntoolkit/
regression_model/ , Python, 188 linesfactory.py - pcntoolkit/
regression_model/ , Python, 697 lineshbr.py - pcntoolkit/
regression_model/ , Python, 294 linesregression_model.py - pcntoolkit/
regression_model/ , Python, 61 linestest_model.py - pcntoolkit/
util/ , Python, 1 line__init__.py - pcntoolkit/
util/ , Python, 66 linesautoscale_plot.py - pcntoolkit/
util/ , Python, 80 linesdata_utils.py - pcntoolkit/
util/ , Python, 769 linesevaluator.py - pcntoolkit/
util/ , Python, 203 linesjob_observer.py - pcntoolkit/
util/ , Python, 374 linesmigration.py - pcntoolkit/
util/ , Python, 42 linesmodel_comparison.py - pcntoolkit/
util/ , Python, 351 linesoutput.py - pcntoolkit/
util/ , Python, 127 linespaths.py - pcntoolkit/
util/ , Python, 1,441 linesplotter.py - pcntoolkit/
util/ , Python, 1,028 linesrunner.py - render_citation.py, Python, 395 lines
- test/
__init__.py , Python, 1 line - test/
conftest.py , Python, 132 lines - test/
fixtures/ , Python, 1 line__init__.py - test/
fixtures/ , Python, 184 linesblr_model_fixtures.py - test/
fixtures/ , Python, 163 linesdata_fixtures.py - test/
fixtures/ , Python, 117 linesevaluator_fixtures.py - test/
fixtures/ , Python, 108 lineshbr_model_fixtures.py - test/
fixtures/ , Python, 57 linesnorm_data_fixtures.py - test/
fixtures/ , Python, 117 linespath_fixtures.py - test/
fixtures/ , Python, 63 linesplotter_fixtures.py - test/
fixtures/ , Python, 48 linestest_model_fixtures.py - test/
test_cli/ , Python, 1 line__init__.py - test/
test_cli/ , Python, 142 linestest_basic_commands.py - test/
test_cli/ , Python, 65 linestest_error_handling.py - test/
test_core/ , Python, 1 line__init__.py - test/
test_core/ , Python, 133 linestest_data_io.py - test/
test_core/ , Python, 64 linestest_norm_factory.py - test/
test_core/ , Python, 124 linestest_normative_model_mai n.py - test/
test_core/ , Python, 184 linestest_pretrained_model.py - test/
test_core/ , Python, 275 linestest_regression_models.p y - test/
test_core/ , Python, 180 linestest_utils.py - test/
test_dataio/ , Python, 1 line__init__.py - test/
test_dataio/ , Python, 261 linestest_normdata.py - test/
test_longitudinal/ , Python, 428 linesconftest.py - test/
test_longitudinal/ , Python, 438 linestest_scoring.py - test/
test_longitudinal/ , Python, 324 linestest_thrivelines.py - test/
test_longitudinal/ , Python, 65 linestest_validation.py - test/
test_math/ , Python, 107 linestest_basis_functions.py - test/
test_math/ , Python, 165 linestest_factorize.py - test/
test_math/ , Python, 261 linestest_likelihood.py - test/
test_math/ , Python, 93 linestest_prior.py - test/
test_math/ , Python, 211 linestest_velocity.py - test/
test_math/ , Python, 101 linestest_warp.py - test/
test_norm/ , Python, 1 line__init__.py - test/
test_norm/ , Python, 37 linestest_norm_factory.py - test/
test_norm/ , Python, 371 linestest_normative_model_hel per.py - test/
test_norm/ , Python, 195 linestest_normative_model_tra nsfer.py - test/
test_normative.py , Python, 22 lines - test/
test_regression_models/ , Python, 1 line__init__.py - test/
test_regression_models/ , Python, 204 linestest_blr.py - test/
test_regression_models/ , Python, 561 linestest_hbr.py - test/
test_util/ , Python, 119 linestest_mace.py - test/
test_util/ , Python, 191 linestest_migration.py - test/
test_util/ , Python, 60 linestest_msll.py - test/
test_util/ , Python, 86 linestest_plotter.py - test/
test_util/ , Python, 260 linestest_runner.py - test/
test_util/ , Python, 214 linestest_skewness_kurtosis.p y - LICENSE, License, 674 lines
- README.md, Text, 74 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 174 scripts, each with its path and the digest of its content;
- 1 match between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: amarquand/
PCNtoolkit - it says that the data are available on request
Read it in the paper: doi.org/10.1038/s41398-026-03902-0.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 2 keywords, 16 MeSH terms, 3 funders, 70 references.
Cite
This paper
Wei, X., Zhang, T., Xiong, R., Zhang, Q., Zhang, J., Jin, Z., & Li, L. (2026). Mapping heterogeneous brain structural subtypes in alzheimer's disease and mild cognitive impairment using normative models. Translational psychiatry, 16(1), 168. https://
BibTeX
@article{wei2026mapping,
author = {Wei, Xiaotong and Zhang, Tingting and Xiong, Ronglong and Zhang, Qiuzhu and Zhang, Junjun and Jin, Zhenlan and Li, Ling},
title = {{Mapping heterogeneous brain structural subtypes in alzheimer's disease and mild cognitive impairment using normative models}},
journal = {Translational psychiatry},
year = {2026},
month = mar,
volume = {16},
number = {1},
pages = {168},
publisher = {Nature Publishing Group},
issn = {2158-3188},
doi = {10.1038/
url = {https://
pmid = {41771832},
pmcid = {PMC13022452}
}
RIS
TY - JOUR
AU - Wei, Xiaotong
AU - Zhang, Tingting
AU - Xiong, Ronglong
AU - Zhang, Qiuzhu
AU - Zhang, Junjun
AU - Jin, Zhenlan
AU - Li, Ling
TI - Mapping heterogeneous brain structural subtypes in alzheimer's disease and mild cognitive impairment using normative models
T2 - Translational psychiatry
J2 - Transl Psychiatry
PY - 2026
DA - 2026/
VL - 16
IS - 1
SP - 168
SN - 2158-3188
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Mapping heterogeneous brain structural subtypes in alzheimer's disease and mild cognitive impairment using normative models",
"container-title": "Translational psychiatry",
"author": [
{
"family": "Wei",
"given": "Xiaotong"
},
{
"family": "Zhang",
"given": "Tingting"
},
{
"family": "Xiong",
"given": "Ronglong"
},
{
"family": "Zhang",
"given": "Qiuzhu"
},
{
"family": "Zhang",
"given": "Junjun"
},
{
"family": "Jin",
"given": "Zhenlan"
},
{
"family": "Li",
"given": "Ling"
}
],
"container-title-short":
"volume": "16",
"issue": "1",
"page": "168",
"DOI": "10.1038/
"PMID": "41771832",
"PMCID": "PMC13022452",
"ISSN": "2158-3188",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
2
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1162/imag.a.1269 [code]
- From early to contemporary normative modeling: Mapping individual differences in neurophysiological signals.Journal: Imaging neuroscience (Cambridge, Mass.)In common: ArviZ, PyMC, xarray, 7 other tools, 8 references
- [2] doi:10.1038/s41467-026-72940-5 [code]
- Cerebellar growth is associated with domain-specific cerebral maturation and socio-linguistic behavior.Journal: Nature communicationsIn common: ArviZ, PyMC, xarray, 8 other tools, 1 reference
- [3] doi:10.7554/elife.100605 [code]
- Age-related changes in ‘cortical’ 1/
f dynamics are linked to cardiac activity Journal: n/aIn common: ArviZ, PyMC, seaborn, 5 other tools, 2 references - [4] doi:10.1371/journal.pcbi.1014340 [code]
- pyhgf: A neural network library for predictive coding.Journal: PLoS computational biologyIn common: ArviZ, PyMC, xarray, 6 other tools
- [5] doi:10.1038/s41467-026-74153-2 [code]
- Regional, functional and transcriptomic decoding of multidimensional brain structure alterations in obsessive-compulsive disorder.Journal: Nature communicationsIn common: abagen, Connectome Workbench, NiBabel, 5 other tools, 2 references
- [6] doi:10.1371/journal.pmed.1004809 [code]
- Brain morphology in Anorexia Nervosa and its subtypes: A multi-cohort study of individual participant data.Journal: PLoS medicineIn common: abagen, NiBabel, seaborn, 5 other tools, structural MRI / diffusion, 2 references
- [7] doi:10.1038/s42003-026-09956-6 [code]
- Linking changes in sulcal morphometry to cognitive development from childhood to adolescence.Journal: Communications biologyIn common: abagen, NiBabel, seaborn, 5 other tools, structural MRI / diffusion, 2 references
- [8] doi:10.1093/braincomms/fcag176 [code]
- Tau topography subtypes account for clinical heterogeneity and longitudinal trajectories in early-onset Alzheimer's disease.Journal: Brain communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, Alzheimer's / dementia, 4 references
- [9] doi:10.3389/fneur.2026.1815799 [code]
- Gray matter volume alterations in adolescents with ADHD are associated with cell type-specific transcriptional signatures.Journal: Frontiers in neurologyIn common: PyMC, NiBabel, seaborn, 5 other tools, structural MRI / diffusion, 2 references
- [10] doi:10.1038/s41591-026-04287-9 [code]
- An international mega-analysis of psychedelic drug effects on brain circuit function.Journal: Nature medicineIn common: ArviZ, PyMC, NiBabel, 6 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 174 scripts, and 1 match between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:64d5fe604a53d6d4…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
