diff --git a/doc/whats_new.rst b/doc/whats_new.rst index 9fb607813b..43b0eb5dc3 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -67,6 +67,10 @@ Changes - :func:`nilearn.plotting.view_connectome` now converts NaNs in the adjacency matrix to 0. +- Removed the plotting connectomes example which used the Seitzman atlas + from `examples/03_connectivity/plot_sphere_based_connectome.py`. + The atlas data is unsuitable for the method & the example is redundant. + Fixes ----- diff --git a/examples/03_connectivity/plot_sphere_based_connectome.py b/examples/03_connectivity/plot_sphere_based_connectome.py index b3ba1a3593..616089d768 100644 --- a/examples/03_connectivity/plot_sphere_based_connectome.py +++ b/examples/03_connectivity/plot_sphere_based_connectome.py @@ -4,8 +4,8 @@ This example shows how to extract signals from spherical regions. We show how to build spheres around user-defined coordinates, as well as -centered on coordinates from the Power-264 atlas [1], the Dosenbach-160 -atlas [2], and the Seitzman-300 atlas [3]. +centered on coordinates from the Power-264 atlas [1], and the Dosenbach-160 +atlas [2]. **References** @@ -15,11 +15,6 @@ [2] Dosenbach N.U., Nardos B., et al. "Prediction of individual brain maturity using fMRI.", 2010, Science 329, 1358-1361. -[3] `Seitzman, B. A., et al. "A set of functionally-defined brain regions with -improved representation of the subcortex and cerebellum.", 2018, bioRxiv, -450452 -`_ - We estimate connectomes using two different methods: **sparse inverse covariance** and **partial_correlation**, to recover the functional brain **networks structure**. @@ -332,55 +327,6 @@ plotting.show() - -############################################################################### -# Connectome extracted from Seitzman's atlas -# ----------------------------------------------------- -# We repeat the same steps for Seitzman's atlas. -seitzman = datasets.fetch_coords_seitzman_2018() - -coords = np.vstack(( - seitzman.rois['x'], - seitzman.rois['y'], - seitzman.rois['z'], -)).T - -############################################################################### -# Before calculating the connectivity matrix, let's look at the distribution -# of the regions of the default mode network. -dmn_rois = seitzman.networks == "DefaultMode" -dmn_coords = coords[dmn_rois] -zero_matrix = np.zeros((len(dmn_coords), len(dmn_coords))) -plotting.plot_connectome(zero_matrix, dmn_coords, - title='Seitzman default mode network', - node_color='darkred', node_size=20) - -############################################################################### -# Now let's calculate connectivity for the Seitzman atlas. -spheres_masker = input_data.NiftiSpheresMasker( - seeds=coords, smoothing_fwhm=6, radius=4, - detrend=True, standardize=True, low_pass=0.1, high_pass=0.01, t_r=2, - allow_overlap=True) - -timeseries = spheres_masker.fit_transform(func_filename, - confounds=confounds_filename) - -covariance_estimator = GraphicalLassoCV() -covariance_estimator.fit(timeseries) -matrix = covariance_estimator.covariance_ - -plotting.plot_matrix(matrix, vmin=-1., vmax=1., colorbar=True, - title='Seitzman correlation matrix') - -plotting.plot_connectome(matrix, coords, title='Seitzman correlation graph', - edge_threshold="99.7%", node_size=20, colorbar=True) - - -############################################################################### -# We can easily identify the networks from the matrix blocks. -print('Seitzman networks names are {0}'.format(np.unique(seitzman.networks))) -plotting.show() - ############################################################################### # .. seealso:: #