Skip to content

Commit

Permalink
Update Schaefer parcelation to v0.14.3 (#2138)
Browse files Browse the repository at this point in the history
* updated fetching of schaefer atlas to v0.14.3 by default for correct region labels

* include options for 700 and 900 region parcelations for schaefer atlas

* added 700 and 900 parcelations to schaefer test

* fixed url in schaefer reference
  • Loading branch information
danjgale authored and GaelVaroquaux committed Sep 25, 2019
1 parent bf65253 commit 920f7bd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ Fixes
- :func:`nilearn.plotting.plot_matrix` providing labels=None, False, or an empty list now correctly disables labels.
- :func:`nilearn.datasets.fetch_surf_nki_enhanced` is now downloading the correct
left and right functional surface data for each subject
- :func:`nilearn.datasets.fetch_atlas_schaefer_2018` now downloads from release
version 0.14.3 (instead of 0.8.1) by default, which includes corrected region label
names along with 700 and 900 region parcelations.
- Colormap creation functions have been updated to avoid matplotlib deprecation warnings
about colormap reversal

Expand Down
19 changes: 13 additions & 6 deletions nilearn/datasets/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ def fetch_atlas_schaefer_2018(n_rois=400, yeo_networks=7, resolution_mm=1,
----------
n_rois: int
number of regions of interest {100, 200, 300, 400 (default), 500, 600,
800, 1000}
700, 800, 900, 1000}
yeo_networks: int
ROI annotation according to yeo networks {7 (default), 17}
Expand Down Expand Up @@ -1307,7 +1307,7 @@ def fetch_atlas_schaefer_2018(n_rois=400, yeo_networks=7, resolution_mm=1,
References
----------
For more information on this dataset, see
https://github.com/ThomasYeoLab/CBIG/tree/v0.8.1-Schaefer2018_LocalGlobal/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal
https://github.com/ThomasYeoLab/CBIG/tree/v0.14.3-Update_Yeo2011_Schaefer2018_labelname/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/Parcellations
Schaefer A, Kong R, Gordon EM, Laumann TO, Zuo XN, Holmes AJ,
Eickhoff SB, Yeo BTT. Local-Global parcellation of the human
Expand All @@ -1320,8 +1320,15 @@ def fetch_atlas_schaefer_2018(n_rois=400, yeo_networks=7, resolution_mm=1,
intrinsic functional connectivity. J Neurophysiol 106(3):1125-65, 2011.
Licence: MIT.
Notes
-----
Release v0.14.3 of the Schaefer 2018 parcellation is used by
default. Versions prior to v0.14.3 are known to contain erroneous region
label names. For more details, see
https://github.com/ThomasYeoLab/CBIG/blob/master/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/Parcellations/Updates/Update_20190916_README.md
"""
valid_n_rois = [100, 200, 300, 400, 500, 600, 800, 1000]
valid_n_rois = list(range(100, 1100, 100))
valid_yeo_networks = [7, 17]
valid_resolution_mm = [1, 2]
if n_rois not in valid_n_rois:
Expand All @@ -1338,9 +1345,9 @@ def fetch_atlas_schaefer_2018(n_rois=400, yeo_networks=7, resolution_mm=1,

if base_url is None:
base_url = ('https://raw.githubusercontent.com/ThomasYeoLab/CBIG/'
'v0.8.1-Schaefer2018_LocalGlobal/stable_projects/'
'brain_parcellation/Schaefer2018_LocalGlobal/'
'Parcellations/MNI/'
'v0.14.3-Update_Yeo2011_Schaefer2018_labelname/'
'stable_projects/brain_parcellation/'
'Schaefer2018_LocalGlobal/Parcellations/MNI/'
)

files = []
Expand Down
2 changes: 1 addition & 1 deletion nilearn/datasets/tests/test_atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def test_fetch_atlas_pauli_2017():

@with_setup(tst.setup_tmpdata, tst.teardown_tmpdata)
def test_fetch_atlas_schaefer_2018():
valid_n_rois = [100, 200, 300, 400, 500, 600, 800, 1000]
valid_n_rois = list(range(100, 1100, 100))
valid_yeo_networks = [7, 17]
valid_resolution_mm = [1, 2]

Expand Down

0 comments on commit 920f7bd

Please sign in to comment.