The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset.
The 40 matches
- [1] § Methods › Marmoset transcriptional data and pre-processing › Single-cell, whole genome mRNA data ↔ Fig3.ipynb, lines 26–102 · score 0.91 · highly_variable_genes, gene expression vectors, CELLxGENE, gene expression matrix, correlated gene expression, visual cortex
- [2] § Methods › Marmoset transcriptional data and pre-processing › Single-cell, whole genome mRNA data ↔ Fig3.ipynb, lines 26–102 · score 0.91 · highly_variable_genes, gene expression vectors, CELLxGENE, gene expression matrix, correlated gene expression, visual cortex
- [3] § Methods › Age prediction ↔ Fig5.ipynb, lines 81–135 · score 0.88 · Gaussian process regression, white noise kernel, support vector regression, radial basis function, summed linear, alpha
- [4] § Methods › Age prediction ↔ Fig5.ipynb, lines 78–132 · score 0.88 · Gaussian process regression, white noise kernel, support vector regression, radial basis function, summed linear, alpha
- [5] § Methods › Statistical analysis › Spatial null models ↔ code/stats_helpers.py, lines 204–253 · score 0.80 · BrainSMASH permuted maps, spatial autocorrelation preserving, Euclidean distance, left hemispheric, surrogate, error
- [6] § Methods › Statistical analysis › Spatial null models ↔ code/stats_helpers.py, lines 204–253 · score 0.80 · BrainSMASH permuted maps, spatial autocorrelation preserving, Euclidean distance, left hemispheric, surrogate, error
- [7] § Results › Developmental changes in myelination similarity ↔ Fig6.ipynb, lines 89–137 · score 0.73 · left hemisphere regions, bilateral regions, Hierarchical clustering, sensory cluster, association cluster, Koniocortex
- [8] § Methods › Marmoset transcriptional data and pre-processing › Single-cell, whole genome mRNA data ↔ Fig3.ipynb, lines 104–175 · score 0.71 · endothelial cells, immune, astrocytes, glut, oligodendrocytes, GAD
- [9] § Methods › Marmoset transcriptional data and pre-processing › Single-cell, whole genome mRNA data ↔ Fig3.ipynb, lines 104–175 · score 0.71 · endothelial cells, immune, astrocytes, glut, oligodendrocytes, GAD
- [10] § Methods › Statistical analysis › Multiple linear regression ↔ code/stats_helpers.py, lines 408–462 · score 0.71 · Benjamini Hochberg, multiple linear regressions, interaction, FDR, sex, variable
- [11] § Methods › Statistical analysis › Multiple linear regression ↔ code/stats_helpers.py, lines 367–421 · score 0.71 · Benjamini Hochberg, multiple linear regressions, interaction, FDR, sex, variable
- [12] § Methods › Age prediction ↔ Fig5.ipynb, lines 341–431 · score 0.69 · absolute error, predicted age, partial correlation, outer, eTIV, fold
- [13] § Methods › Age prediction ↔ Fig5.ipynb, lines 338–428 · score 0.69 · absolute error, predicted age, partial correlation, outer, eTIV, fold
- [14] § Methods › Statistical analysis › Network null models ↔ code/stats_helpers.py, lines 130–170 · score 0.69 · BrainSmash, Euclidean distance, left hemisphere, MBP expression, permute, permutations
- [15] § Methods › Statistical analysis › Network null models ↔ code/stats_helpers.py, lines 130–170 · score 0.69 · BrainSmash, Euclidean distance, left hemisphere, MBP expression, permute, permutations
- [16] § Results › Estimation and anatomical validation of T1w/T2w similarity networks ↔ Sup_Fig2-4.ipynb, lines 447–514 · score 0.68 · intra class edges, cortical class, tract tracing, thresholded, biological, cytoarchitecture
- [17] § Results › Estimation and anatomical validation of T1w/T2w similarity networks ↔ Sup_Fig2-4.ipynb, lines 446–513 · score 0.68 · intra class edges, cortical class, tract tracing, thresholded, biological, cytoarchitecture
- [18] § Results › Developmental changes in myelination similarity ↔ Fig3.ipynb, lines 26–102 · score 0.67 · dorsolateral prefrontal, orbitofrontal cortex, parietal, cingulate, posterior, auditory
- [19] § Results › Developmental changes in myelination similarity ↔ Fig6.ipynb, lines 85–130 · score 0.66 · left hemisphere regions, Hierarchical clustering, sensory cluster, association cluster, Koniocortex, Agranular
- [20] § Methods › Marmoset anatomical data › Axonal connectivity ↔ Sup_Fig2-4.ipynb, lines 447–514 · score 0.66 · tract tracing matrix, upper triangle, edge complete, metric
- [21] § Methods › Marmoset anatomical data › Axonal connectivity ↔ Sup_Fig2-4.ipynb, lines 446–513 · score 0.66 · tract tracing matrix, upper triangle, edge complete, metric
- [22] § Results › Age-related changes in cortical T1w/T2w ↔ Sup_Fig8-.ipynb, lines 547–606 · score 0.65 · pre pubertal, pre puberty, multiple linear regressions, age related change, animal, T1w
- [23] § Results › Age-related changes in cortical T1w/T2w ↔ Sup_Figs7-.ipynb, lines 428–487 · score 0.65 · pre pubertal, pre puberty, multiple linear regressions, age related change, animal, T1w
- [24] § Methods › Statistical analysis › Linear regression sensitivity analyses ↔ Sup_Fig8-.ipynb, lines 609–677 · score 0.63 · median vitreous humour, median white matter, T2w models, covariates, regression, age
- [25] § Methods › Statistical analysis › Linear regression sensitivity analyses ↔ Sup_Figs7-.ipynb, lines 490–558 · score 0.63 · median vitreous humour, median white matter, T2w models, covariates, regression, age
- [26] § Results › Developmental changes in myelination similarity ↔ Fig5.ipynb, lines 341–431 · score 0.63 · absolute error, predict age, partial correlation, eTIV, trained, MAE
- [27] § Results › Developmental changes in myelination similarity ↔ Fig5.ipynb, lines 338–428 · score 0.63 · absolute error, predict age, partial correlation, eTIV, trained, MAE
- [28] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig2.ipynb, lines 369–402 · score 0.63 · Regional correlations, T2w MIND edge, cortical hierarchy, MBP MIND, positioned, Spearman
- [29] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig2.ipynb, lines 311–340 · score 0.63 · Regional correlations, T2w MIND edge, cortical hierarchy, MBP MIND, positioned, Spearman
- [30] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig2.ipynb, lines 369–402 · score 0.60 · cross modal, cortical hierarchy, MBP MIND, T2w MIND, Spearman, T1w
- [31] § Methods › Marmoset transcriptional data and pre-processing › In-situ hybridisation data ↔ Fig2.ipynb, lines 40–61 · score 0.60 · myelin basic protein, male marmoset, mRNA, parcellation, spaced, adult
- [32] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig2.ipynb, lines 40–61 · score 0.60 · T2w volume, myelin basic protein, mRNA, T2w images, parcellated, matched
- [33] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig2.ipynb, lines 311–340 · score 0.60 · cross modal, cortical hierarchy, MBP MIND, T2w MIND, Spearman, T1w
- [34] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Sup_Fig8-.ipynb, lines 193–285 · score 0.59 · sex matched animals, Standard deviation, MBP expression, skewness, maps, age
- [35] § Methods › Marmoset transcriptional data and pre-processing › In-situ hybridisation data ↔ Fig2.ipynb, lines 20–41 · score 0.58 · myelin basic protein, male marmoset, mRNA, parcellation, adult, MBP
- [36] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig3.ipynb, lines 689–826 · score 0.58 · interneuron subtypes, cell subtypes, VIP, GAD, PV, clustering
- [37] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig3.ipynb, lines 690–827 · score 0.58 · interneuron subtypes, cell subtypes, VIP, GAD, PV, clustering
- [38] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig3.ipynb, lines 104–175 · score 0.58 · glutamatergic neurons, correlated gene expression, expression network, astrocytes, CGE, bars
- [39] § Results › T1w/T2w similarity networks align with molecular and cellular transcriptomic markers of myeloarchitecture ↔ Fig3.ipynb, lines 104–175 · score 0.58 · glutamatergic neurons, correlated gene expression, expression network, astrocytes, CGE, bars
- [40] § Methods › Statistical analysis › Linear regression sensitivity analyses ↔ Sup_Fig8-.ipynb, lines 767–810 · score 0.56 · degree age coefficients, eTIV, covariate, regression, correlation
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
Jupyter notebook · 925 lines · 32 KB · MIT · 5 matches
- # %% [markdown]
- # ### **Figure 3: Myeloarchitectonic similarity is associated with co-expression of genes in glutamatergic neurons and PV+ and VIP+ interneurons**
- #
- # Cell type and cell subtype-specific correlated gene expression networks are provided in output/gene_exp/cge/
- #
- # Coarse MIND network edges per subject are saved to output/subj_dfs/edge_per_subj_coarse.csv
- #
- # If using these, 3.2 and 3.3 do not need to be run
- # %% [markdown]
- # #### **3.1 Setup**
- # %%
- # Autoreload
- %load_ext autoreload
- %autoreload 2
- # Import helper functions
- import sys
- sys.path.append('code')
- from stats_helpers import *
- from MIND_helpers import *
- from preprocessing_helpers import *
- from plotting_helpers import *
- # %% [markdown]
- # #### **3.2 Generate correlated gene expression (CGE) networks**
- # %% [markdown]
- # CELLxGENE data from Krienen et al. (2023) can be downloaded at:
- # https://cellxgene.cziscience.com/collections/0fd39ad7-5d2d-41c2-bda0-c55bde614bdb
- # %%
- # Import packages
- import scanpy as sc
- # Initialise directories
- data_dir = "data/"
- save_dir = "output/gene_exp/cge/"
- # Dictionary holding cell type filenames
- cell_types_dict = {
- 'GAD': 'd48da0be-0e47-485f-a36b-f02643d1058d.h5ad',
- 'oligo': 'c5e9c2f7-a450-409f-90d3-382f7109f5e1.h5ad',
- 'astro': 'd6d9942f-491b-416b-8951-330309bbc654.h5ad',
- 'glut': '5123a9c0-67e1-41da-9f59-f0894d62393a.h5ad',
- 'endo': '7d4ce011-c8d5-472f-8256-e3d5551e13e9.h5ad',
- 'immune': 'ac4323c8-c065-4d30-978b-ddb5537c36a2.h5ad'
- }
- # Dictionary holding coarse region names
- # Keys = names given in CELLxGENE matrices
- # Values = short names
- regions = {
- "dorsolateral prefrontal cortex":'DLP',
- "ventrolateral prefrontal cortex":'VLP',
- "medial prefrontal cortex":'MPC',
- "orbitofrontal cortex":'OFC',
- "lateral temporal cortex":'LTC',
- "lateral parietal cortex":'LPC',
- "posterior cingulate area 23":'PCA',
- "primary motor cortex":'M1',
- "primary somatosensory cortex":'S1',
- "primary auditory cortex":'A1',
- "primary visual cortex":'V1',
- "secondary visual cortex":'V2'
- }
- # Loop cell types
- for cell_type, cell_type_path in tqdm(cell_types_dict.items()):
- # Load CELLxGENE df
- adata = sc.read_h5ad(os.path.join(data_dir, cell_type_path))
- # Retain cortical regions of interest
- adata = adata[adata.obs['anatomical_name'].isin(list(regions.keys()))]
- # Retain top 10% most variable genes
- sc.pp.log1p(adata)
- sc.pp.highly_variable_genes(adata, flavor='seurat', n_top_genes=int(adata.var.shape[0]*0.1))
- adata = adata[:, adata.var['highly_variable']]
- # Get list of genes for which expression was measured
- genes = adata.var['human_gene_name'].unique().tolist()
- # Initialse df to hold mean expression of each gene in each region
- region_gene_mat = np.zeros((len(regions), len(genes)))
- # Loop regions
- for idx_region, region in enumerate(list(regions.keys())):
- # Get region indices
- region_indices = np.where(adata.obs['anatomical_name'] == region)[0].tolist()
- region_data = adata.X[region_indices, :]
- # Get mean expression of all genes over all cells in this region
- if region_data.shape[0] > 0:
- region_gene_mat[idx_region, :] = region_data.mean(axis=0)
- # Cross-correlate regional expression vectors to get correlated gene expression matrix
- cge = pd.DataFrame(np.corrcoef(region_gene_mat), index=list(regions.values()), columns=list(regions.values()))
- # Save
- cge.to_csv(os.path.join(save_dir, f'{cell_type}_cge.csv'))
- # %% [markdown]
- # Visualise correlated gene expression networks
- # %%
- from matplotlib.colors import LinearSegmentedColormap
- from matplotlib import rcParams
- # Set font to Arial
- rcParams['font.family'] = 'Arial'
- # Directory containing CGE matrices
- cge_mat_dir = 'output/gene_exp/cge/'
- # Dictionary holding cell type filenames
- cell_dict = {
- 'GAD': 'GAD_cge.csv',
- 'oligo': 'oligo_cge.csv',
- 'astro': 'astro_cge.csv',
- 'glut': 'glut_cge.csv',
- 'endo': 'endo_cge.csv',
- 'immune': 'immune_cge.csv'
- }
- # Dictionary holding colour mapping for cell types
- cmap = {
- 'GAD': [55/255, 126/255, 184/255, 1],
- 'oligo': [77/255, 175/255, 74/255, 1],
- 'astro': [152/255, 78/255, 163/255, 1],
- 'glut': [228/255, 26/255, 28/255, 1],
- 'endo': [0/255, 191/255, 196/255, 1],
- 'immune': [255/255, 127/255, 0/255, 1],
- }
- # Dictionary holding full names for cell types
- cell_names = {
- 'GAD': 'GAD+ interneurons',
- 'oligo': 'Oligodendrocytes',
- 'astro': 'Astrocytes',
- 'glut': 'Glutamatergic neurons',
- 'endo': 'Endothelial cells',
- 'immune': 'Immune cells',
- }
- # Create subplots
- n_cells = len(cell_dict)
- fig, axes = plt.subplots(2, 3, figsize=(12, 7)) # Adjust grid size as needed
- axes = axes.flatten() # Flatten to easily iterate over
- # Iterate over cell types and plot
- for i, (cell, filename) in enumerate(cell_dict.items()):
- # Load CGE matrix
- cge_mat_path = os.path.join(cge_mat_dir, filename)
- cge_mat = pd.read_csv(cge_mat_path, index_col=0)
- # Set colourmap
- cmap_custom = LinearSegmentedColormap.from_list(f'{cell}_cmap', [[1, 1, 1, 1], cmap[cell]])
- # Plot
- ax = axes[i]
- sns.heatmap(cge_mat, cmap=cmap_custom, ax=ax, cbar=True, xticklabels=[], yticklabels=[], rasterized=True)
- ax.set_title(f'{cell_names[cell]}', fontsize=24, pad=20)
- # Adjust colour bar
- cbar = ax.collections[0].colorbar
- cbar.ax.tick_params(labelsize=16)
- min_val = np.nanmin(cge_mat.values)
- ticks = np.linspace(min_val, 1, 4)
- cbar.set_ticks(ticks)
- cbar.set_ticklabels([f'{tick:.2f}' for tick in ticks], fontname='Arial')
- plt.tight_layout()
- plt.show()
- # %% [markdown]
- # Calculate correlated gene expression matrices for interneuron clusters defined in Krienen et al. (2023)
- # %%
- # Import packages
- import scanpy as sc
- # Initialise directories
- data_dir = "data/"
- save_dir = "output/gene_exp/cge/"
- # GAD CELLxGENE df path
- GAD_path = os.path.join(data_dir, "d48da0be-0e47-485f-a36b-f02643d1058d.h5ad")
- # Dictionary holding cell type filenames
- regions = {
- "dorsolateral prefrontal cortex":'DLP',
- "ventrolateral prefrontal cortex":'VLP',
- "medial prefrontal cortex":'MPC',
- "orbitofrontal cortex":'OFC',
- "lateral temporal cortex":'LTC',
- "lateral parietal cortex":'LPC',
- "posterior cingulate area 23":'PCA',
- "primary motor cortex":'M1',
- "primary somatosensory cortex":'S1',
- "primary auditory cortex":'A1',
- "primary visual cortex":'V1',
- "secondary visual cortex":'V2'
- }
- # Load CELLxGENE df
- adata = sc.read_h5ad(GAD_path)
- # Retain cortical regions of interest
- adata = adata[adata.obs['anatomical_name'].isin(list(regions.keys()))]
- # Retain top 10% most variable genes
- sc.pp.log1p(adata)
- sc.pp.highly_variable_genes(adata, flavor='seurat', n_top_genes=int(adata.var.shape[0]*0.1))
- adata = adata[:, adata.var['highly_variable']]
- # Get genes
- genes = adata.var['human_gene_name'].unique().tolist()
- # Get clusters
- clusters = adata.obs["CLUSTER"].unique()
- # Loop clusers
- for cluster in tqdm(clusters):
- # Initialse df to hold mean expression of each gene in each region
- region_gene_mat = np.zeros((len(regions), len(genes)))
- # Loop regions, average across regions
- for idx_region, region in enumerate(regions.keys()):
- # Get indices of cells in the relevant region AND cluster
- region_cluster_idx = np.where((adata.obs["anatomical_name"] == region) & (adata.obs["CLUSTER"] == cluster))[0]
- region_cluster_data = adata.X[region_cluster_idx, :]
- # Get mean expression of all genes over all cells in this cluster in this region
- if region_cluster_data.shape[0] > 0: # Take mean
- region_gene_mat[idx_region, :] = region_cluster_data.mean(axis=0).A1
- # Calculate CGE
- cge = np.corrcoef(region_gene_mat)
- # Save
- cge = pd.DataFrame(cge, index = regions.values(), columns = regions.values())
- cge.to_csv(os.path.join(save_dir, f'GAD_{cluster}_cge.csv'))
- # %% [markdown]
- # #### **3.3 Estimate individual coarse T1w/T2w similarity networks**
- # %% [markdown]
- # First, extract voxels from T1w/T2w images using `extract_voxels_coarse()`
- # %%
- # Load region lookup table(s)
- lut = pd.read_csv('data/lut_master.csv', index_col=0)
- coarse_lut = pd.read_csv('data/coarse_lut.csv', index_col=0)
- # Load subject lookup table
- subj_df = pd.read_csv('data/subj_df_all.csv', index_col=0)
- # Load relevant MRI directories
- scan_dir = 'data/t12_img/'
- label_dir = 'data/label_img/'
- # Create dir to hold voxel values
- vox_dir = 'output/T1wT2w/t12_MIND_coarse_all/'
- os.makedirs(vox_dir, exist_ok=True)
- # Loop subjects, extract voxels, save
- for _, row in subj_df.iterrows():
- t12_img_path = os.path.join(scan_dir, f'T1wT2w_{row["id"].astype(int).astype(str).zfill(3)}.nii')
- label_img_path = os.path.join(label_dir, f'{row["id"].astype(int).astype(str).zfill(3)}_labels.nii')
- vox_coarse = extract_voxels_coarse(
- t12_img_path,
- label_img_path,
- lut, 'bm_code', 'Code',
- coarse_lut, 'ROIs_short', 'Side', 'Codes'
- )
- vox_coarse.to_csv(os.path.join(vox_dir, f'{row["id"].astype(int).astype(str).zfill(3)}_vox_coarse.csv'))
- # %% [markdown]
- # Now calculate MIND networks for each subject using `calculate_MIND_network()`
- # %%
- # Import it to iterate subjects
- import itertools as it
- # Ignore division by 0 errors (these are normal)
- import warnings
- warnings.filterwarnings('ignore', category=RuntimeWarning)
- # Create dir to hold MIND networks
- MIND_dir = 'output/T1wT2w/t12_MIND_coarse_all/'
- os.makedirs(MIND_dir, exist_ok=True)
- # Get ROIs
- labs = coarse_lut['Label'].unique()
- n_rois = len(labs)
- # Initialise df to hold edge values per subject
- edge_per_subj_coarse = np.zeros((subj_df.shape[0], int((n_rois**2-n_rois)/2)))
- # Loop subjects, calculate MIND network, save
- for i, row in subj_df.iterrows():
- vox_path = os.path.join(vox_dir, f'{row["id"].astype(int).astype(str).zfill(3)}_vox_coarse.csv')
- vox_df = pd.read_csv(vox_path)
- MIND_net = calculate_mind_network(vox_df, ['Value'], labs)
- edge_per_subj_coarse[i,:] = MIND_net.values[np.triu_indices(n_rois, k=1)]
- MIND_path = os.path.join(MIND_dir, f'{row["id"].astype(int).astype(str).zfill(3)}_MIND_coarse.csv')
- MIND_net.to_csv(MIND_path)
- # Save edge df
- edge_per_subj_coarse_df = pd.concat([
- subj_df,
- pd.DataFrame(edge_per_subj_coarse, columns=list(it.combinations(labs,2)))
- ])
- edge_per_subj_coarse_df.to_csv('output/subj_dfs/edge_per_subj_coarse.csv', index=False)
- # %% [markdown]
- # #### **3.4 Compute mean adult coarse T1w/T2w similarity network**
- # %% [markdown]
- # Remove outliers
- #
- # Outliers are defined:
- # 1. Automatically, by being in the top/bottom 1% of `global_t12` or `global_MIND`, i.e. mean T1w/T2w or degree across all regions
- # 2. Manually, by identifying poorly registered scans
- # %%
- # Regional T1/2w
- mean_t12_per_subj_df = pd.read_csv('output/subj_dfs/mean_t12_per_subj.csv', index_col=0)
- mean_t12_per_subj_df = mean_t12_per_subj_df.sort_values('Age').reset_index(drop=True)
- # Regional KNN MIND
- degree_per_subj_df = pd.read_csv('output/subj_dfs/degree_per_subj.csv', index_col=0)
- degree_per_subj_df = degree_per_subj_df.sort_values('Age').reset_index(drop=True)
- # Edge KNN MIND
- edge_per_subj_df = pd.read_csv('output/subj_dfs/edge_per_subj.csv', index_col=0)
- edge_per_subj_df = edge_per_subj_df.sort_values('Age').reset_index(drop=True)
- # Define global measures
- global_t12 = mean_t12_per_subj_df.iloc[:,4:].mean(axis=1)
- global_MIND = degree_per_subj_df.iloc[:,4:].mean(axis=1)
- # Generate list of indices to remove
- outlier_ind = mean_t12_per_subj_df.loc[
- (global_t12 < global_t12.quantile(0.01)) |
- (global_t12 > global_t12.quantile(0.99))
- ].index.tolist() + degree_per_subj_df.loc[
- (global_MIND < global_MIND.quantile(0.01)) |
- (global_MIND > global_MIND.quantile(0.99))
- ].index.tolist()
- # Add manually identified outliers to the list
- outlier_id = [425,128,412,410,292,358]
- outlier_ind += [np.where(degree_per_subj_df['id'] == i)[0][0] for i in outlier_id]
- outlier_ind = np.unique(outlier_ind).tolist()
- # Filter
- edge_per_subj_coarse_df = pd.read_csv('output/subj_dfs/edge_per_subj_coarse.csv', index_col=0)
- edge_per_subj_coarse_df_filt = edge_per_subj_coarse_df.drop(index=outlier_ind).reset_index(drop=True)
- # %% [markdown]
- # Calculate mean adult T1w/T2w and mean adult MIND network, using subjects > 1.75 years, save to `/output`
- # %%
- # Get ROIs
- coarse_lut = pd.read_csv('data/coarse_lut.csv', index_col=0)
- labs = coarse_lut['Label'].unique()
- # Compute average MIND network
- adult_edges = edge_per_subj_coarse_df_filt[edge_per_subj_coarse_df_filt['Age'] > 1.75].iloc[:,3:].mean(axis=0)
- adult_MIND = np.zeros((len(labs), len(labs)))
- adult_MIND[np.triu_indices(len(labs), k=1)] = adult_edges
- adult_MIND += adult_MIND.T
- np.fill_diagonal(adult_MIND, 1)
- adult_MIND = pd.DataFrame(adult_MIND, index=labs, columns=labs)
- # Save
- save_dir = 'output/T1wT2w/mean/'
- os.makedirs(save_dir, exist_ok=True)
- adult_MIND.to_csv(os.path.join(save_dir, 'mean_adult_t12_MIND_coarse.csv'))
- # %% [markdown]
- # #### **3.5 Estimate coarse 4-year MBP expression similarity network**
- # %% [markdown]
- # First, extract voxels from MBP 4Y image using `extract_voxels_coarse()`
- # %%
- # Load region lookup table(s)
- lut = pd.read_csv('data/lut_master.csv', index_col=0)
- coarse_lut = pd.read_csv('data/coarse_lut.csv', index_col=0)
- # Initialise image paths
- MBP_4Y_path = 'data/MBP_4Y_img.nii'
- parc_img_path = 'data/sp2_label_512_v1.0.0.nii.gz'
- # Extract voxels
- vox_coarse = extract_voxels_coarse(
- MBP_4Y_path,
- parc_img_path,
- lut, 'bm_code', 'Code',
- coarse_lut, 'ROIs_short', 'Side', 'Codes'
- )
- # Remove outlier values caused by slice artefacts
- vox_coarse = vox_coarse[vox_coarse.Value < 0.8]
- # Save
- MBP_dir = 'output/MBP/'
- os.makedirs(MBP_dir, exist_ok=True)
- vox_coarse.to_csv(os.path.join(MBP_dir, 'MBP_4Y_vox_coarse.csv'))
- # %% [markdown]
- # Now calculate MIND network using `calculate_MIND_network()`
- # %%
- # Ignore division by 0 errors (these are normal)
- import warnings
- warnings.filterwarnings('ignore', category=RuntimeWarning)
- # Get ROIs
- labs = coarse_lut['Label'].unique()
- n_rois = len(labs)
- # Load voxel values from coarse parcellation
- vox_coarse = pd.read_csv('output/MBP/MBP_4Y_vox_coarse.csv', index_col=0)
- # Calculate coarse MIND network
- MBP_4Y_MIND_coarse = calculate_mind_network(vox_coarse, ['Value'], labs)
- # Save
- MBP_dir = 'output/MBP/'
- os.makedirs(MBP_dir, exist_ok=True)
- MBP_4Y_MIND_coarse.to_csv(os.path.join(MBP_dir, 'MBP_4Y_MIND_coarse.csv'))
- # %% [markdown]
- # #### **3.6 Correlate CGE and similarity network edges**
- # %% [markdown]
- # Start by loading data
- # %%
- # ----- Gene expression data ----- #
- # Path to CGE matries
- cge_mat_dir = 'output/gene_exp/cge/'
- # Dictionary containing CGE matrix filenames
- cell_dict = {
- 'GAD': 'GAD_cge.csv',
- 'oligo': 'oligo_cge.csv',
- 'astro': 'astro_cge.csv',
- 'glut': 'glut_cge.csv',
- 'endo': 'endo_cge.csv',
- 'immune': 'immune_cge.csv'
- }
- # Dictionary containing cell type colour mapping
- cmap = {
- 'GAD': [55/255, 126/255, 184/255, 1],
- 'oligo': [77/255, 175/255, 74/255, 1],
- 'astro': [152/255, 78/255, 163/255, 1],
- 'glut': [228/255, 26/255, 28/255, 1],
- 'endo': [0/255, 191/255, 196/255, 1],
- 'immune': [255/255, 127/255, 0/255, 1],
- }
- # ----- Anatomical data ----- #
- # Lookup table
- lut = pd.read_csv('data/lut_master.csv', index_col=0)
- # Coarse lookup table
- coarse_lut = pd.read_csv('data/coarse_lut.csv', index_col=0)
- # Distance matrix
- dist = pd.read_csv('data/distance_matrix.csv', index_col=0)
- dist = dist.iloc[0:115,0:115].values
- # Modality-specific anatomical data
- anat = {
- 'T12':{
- 'mat':pd.read_csv('output/T1wT2w/mean/mean_adult_t12_MIND_coarse.csv', index_col=0), # Coarse matrix
- 'mat_full':pd.read_csv('output/T1wT2w/mean/mean_adult_t12_MIND.csv', index_col=0), # Full matrix
- 'map':pd.read_csv('output/T1wT2w/mean/mean_adult_regional_t12.csv', index_col=0), # Mean value map (full)
- 'surrogates_filename':'output/surrogates/mean_adult_t12_surrogates.csv' # Surrogate mean value maps (full)
- },
- 'MBP':{
- 'mat':pd.read_csv('output/MBP/MBP_4Y_MIND_coarse.csv', index_col=0), # Coarse matrix
- 'mat_full':pd.read_csv('output/MBP/MBP_4Y_MIND.csv', index_col=0), # Full matrix
- 'map':pd.read_csv('output/MBP/MBP_4Y_regional_mean.csv', index_col=0), # Mean value map (full)
- 'surrogates_filename': 'output/surrogates/MBP_4Y_regional_mean_surrogates.csv' # Surrogate mean value maps (full)
- }
- }
- # %% [markdown]
- # Function to compute correlations and plot
- # %%
- def plot_cell_type_cge_MIND_correlations(modality, save_path=None):
- # Load anatomical data
- mat = anat[modality]['mat'].iloc[0:12,0:12] # Get lh
- mat_full = anat[modality]['mat_full'].iloc[0:115,0:115].values
- map = anat[modality]['map']; map = map[map.columns[0]].values[0:115]
- surrogates_filename = anat[modality]['surrogates_filename']
- # Make sure the MIND matrix is ordered correctly
- rois_ordered = ['DLP_L', 'VLP_L', 'MPC_L', 'OFC_L', 'LTC_L', 'LPC_L', 'PCA_L', 'M1_L', 'S1_L', 'A1_L', 'V1_L', 'V2_L']
- mat = mat.loc[rois_ordered,rois_ordered]
- # ----- Compute correlations ----- #
- # Initialise lists to hold r and p values
- cell_type_r_vals = []
- cell_type_p_vals = []
- # Iterate over cell types and plot
- for i, (cell, filename) in enumerate(cell_dict.items()):
- print(f"Calculating cell type: {cell}")
- cge_mat_path = os.path.join(cge_mat_dir, filename)
- cge_mat = pd.read_csv(cge_mat_path, index_col=0)
- # Make sure the matrix is ordered correctly
- rois_ordered = ['DLP', 'VLP', 'MPC', 'OFC', 'LTC', 'LPC', 'PCA', 'M1', 'S1', 'A1', 'V1', 'V2']
- cge_mat = cge_mat.loc[rois_ordered,rois_ordered]
- # Get r and p value
- r, p = get_brainsmashed_edge_correlation_p_val_coarse(mat_a = mat.values,
- mat_b = cge_mat.values,
- mat_a_full = mat_full,
- map_a = map,
- dist = dist,
- coarse_lut = coarse_lut[coarse_lut['Side']=='L'],
- lut = lut[lut['Side']=='L'],
- surrogates_filename = surrogates_filename,
- n_perm = 1000,
- test_type = 'two-tailed')
- cell_type_r_vals.append(r)
- cell_type_p_vals.append(p)
- # ----- Plotting ----- #
- # Sort cell types, colour map, r list, and p list to plot in descending order
- sorted_indices = np.argsort(cell_type_r_vals)
- sorted_cell_types = [list(cmap.keys())[i] for i in sorted_indices]
- sorted_colors = [list(cmap.values())[i] for i in sorted_indices]
- sorted_r_list = [cell_type_r_vals[i] for i in sorted_indices]
- sorted_p_list = [cell_type_p_vals[i] for i in sorted_indices]
- # Get corrected p-values (Bonferroni)
- _, p_corr, _, _ = multipletests(sorted_p_list, alpha=0.05, method='bonferroni')
- # Bar plot
- plt.figure(figsize=(4, 2.5)) # Adjust figure size for horizontal layout
- bars = plt.barh(sorted_cell_types, sorted_r_list, alpha=0.7, color=sorted_colors, height=0.9)
- plt.xlim([0,0.799])
- plt.title('All cell types', fontsize=20, pad=10, fontfamily='Arial')
- plt.yticks(fontsize=14, fontfamily='Arial')
- plt.xlabel('Spearman R', fontsize=20, fontfamily='Arial')
- plt.axvline(x=0, color='k') # Baseline
- # Remove top and right spines
- ax=plt.gca()
- ax.spines['top'].set_visible(False)
- ax.spines['right'].set_visible(False)
- # Annotate bars with asterisks based on p-values
- for bar, p_value in zip(bars, p_corr):
- if p_value < 0.001:
- annotation = '***'
- elif p_value < 0.01:
- annotation = '**'
- elif p_value < 0.05:
- annotation = '*'
- else:
- annotation = ''
- if annotation: # Only annotate if there is an asterisk
- width = bar.get_width()
- y = bar.get_y() + bar.get_height() / 2
- plt.text(
- width + 0.02, y - 0.15,
- annotation,
- ha='left', va='center', fontsize=12, color='black', fontweight='bold'
- )
- plt.tight_layout()
- if save_path is not None:
- plt.savefig(save_path, bbox_inches='tight')
- plt.show()
- # ----- Build and display results table ----- #
- results_df = pd.DataFrame({
- "cell": sorted_cell_types,
- "r val": sorted_r_list,
- "p val": sorted_p_list,
- "p val corrected": p_corr
- })
- print(results_df)
- # %% [markdown]
- # Correlate T1w/T2w MIND with CGE
- # %%
- plot_cell_type_cge_MIND_correlations('T12', save_path=None)
- # %% [markdown]
- # Repeat for MBP expression MIND
- # %%
- plot_cell_type_cge_MIND_correlations('MBP', save_path=None)
- # %% [markdown]
- # Plot scatterplot for correlation between MBP MIND and glutamatergic neuronal co-expression
- # %%
- # Load anatomical data
- modality = 'MBP'
- mat = anat[modality]['mat'].iloc[0:12,0:12] # Get lh
- # Make sure the matrix is ordered correctly
- rois_ordered = ['DLP_L', 'VLP_L', 'MPC_L', 'OFC_L', 'LTC_L', 'LPC_L', 'PCA_L', 'M1_L', 'S1_L', 'A1_L', 'V1_L', 'V2_L']
- mat = mat.loc[rois_ordered,rois_ordered]
- mat_full = anat[modality]['mat_full'].iloc[0:115,0:115].values
- map = anat[modality]['map']; map = map[map.columns[0]].values[0:115]
- surrogates_filename = anat[modality]['surrogates_filename']
- # Set path
- cell = 'glut'
- cge_mat = pd.read_csv(os.path.join(cge_mat_dir, cell_dict[cell]), index_col=0)
- # Make sure the matrix is ordered correctly
- rois_ordered = ['DLP', 'VLP', 'MPC', 'OFC', 'LTC', 'LPC', 'PCA', 'M1', 'S1', 'A1', 'V1', 'V2']
- cge_mat = cge_mat.loc[rois_ordered,rois_ordered]
- # Get r and p value
- r, p = get_brainsmashed_edge_correlation_p_val_coarse(mat_a = mat.values,
- mat_b = cge_mat.values,
- mat_a_full = mat_full,
- map_a = map,
- dist = dist,
- coarse_lut = coarse_lut[coarse_lut['Side']=='L'],
- lut = lut[lut['Side']=='L'],
- surrogates_filename = surrogates_filename,
- n_perm = 1000,
- test_type = 'two-tailed')
- # Scatter plot
- coarse_triu_ind = np.triu_indices_from(cge_mat, k=1)
- cge_mat_triu = cge_mat.values[coarse_triu_ind]
- mat_triu = mat.values[coarse_triu_ind]
- plt.figure(figsize=(4,2))
- sns.regplot(x=cge_mat_triu, y=mat_triu,
- scatter_kws={'alpha': 0.7, 'color': cmap[cell], 'edgecolors':'white', 's': 50},
- line_kws={'color': cmap[cell]})
- ax=plt.gca()
- if p < 0.001:
- p_text = 'p < 0.001'
- else:
- p_text = f'p = {p:.3f}'
- x1, x2 = ax.get_xlim(); y1, y2 = ax.get_ylim()
- ax.text((x1 + 0.025*(x2-x1)), (y1 + 0.75*(y2-y1)), f'r = {r:.2f}\n{p_text}', fontsize=18, fontfamily='Arial')
- ax.set_xlabel('CGE', fontsize=20, fontfamily='Arial')
- ax.set_ylabel('MBP\nMIND', fontsize=20, fontfamily='Arial')
- ax.set_title('Glutamatergic neurons', fontsize=20, pad=15, fontfamily='Arial')
- ax.spines['right'].set_visible(False)
- ax.spines['top'].set_visible(False)
- plt.show()
- # %% [markdown]
- # Repeat for interneuron correlated gene expression matrices
- #
- # Function to compute correlations and plot
- # %%
- def plot_cell_subtype_cge_MIND_correlations(modality, save_path=None):
- # Load anatomical data
- mat = anat[modality]['mat'].iloc[0:12,0:12] # Get lh
- mat_full = anat[modality]['mat_full'].iloc[0:115,0:115].values
- map = anat[modality]['map']; map = map[map.columns[0]].values[0:115]
- surrogates_filename = anat[modality]['surrogates_filename']
- # Make sure the MIND matrix is ordered correctly
- rois_ordered = ['DLP_L', 'VLP_L', 'MPC_L', 'OFC_L', 'LTC_L', 'LPC_L', 'PCA_L', 'M1_L', 'S1_L', 'A1_L', 'V1_L', 'V2_L']
- mat = mat.loc[rois_ordered,rois_ordered]
- # Dictionary storing interneuron subtypes
- subtype_cge_dict = {
- 'GAD': range(1, 13)
- }
- # ----- Compute correlations ----- #
- # Initialise df to hold results
- results = []
- # Loop clusters
- for cell, clusters in subtype_cge_dict.items():
- for cluster in clusters:
- print(f"Calculating cell type cluster: {cell}_{cluster}")
- # Load cell subtype CGE matrix
- file_path = os.path.join(cge_mat_dir, f'{cell}_{cluster}_cge.csv')
- if not os.path.exists(file_path):
- continue
- cge_mat = pd.read_csv(file_path, index_col=0)
- # Make sure rois are in the correct order
- rois_ordered = ['DLP', 'VLP', 'MPC', 'OFC', 'LTC', 'LPC', 'PCA', 'M1', 'S1', 'A1', 'V1', 'V2']
- cge_mat = cge_mat.loc[rois_ordered,rois_ordered]
- # Skip subtype if does not contain data from all cell types
- if cge_mat.isna().any().any():
- print(f'{cell}_{cluster} contains nans: skipping...')
- else:
- # Get r and p value
- r, p = get_brainsmashed_edge_correlation_p_val_coarse(mat_a = mat.values,
- mat_b = cge_mat.values,
- mat_a_full = mat_full,
- map_a = map,
- dist = dist,
- coarse_lut = coarse_lut[coarse_lut['Side']=='L'],
- lut = lut[lut['Side']=='L'],
- surrogates_filename = surrogates_filename,
- n_perm = 1000,
- test_type = 'two-tailed')
- results.append({
- 'cell_type': cell,
- 'cluster': cluster,
- 'r': r,
- 'p': p,
- })
- # Multiple comparisons correction
- raw_p_vals = [res['p'] for res in results]
- valid_idx = [i for i, p in enumerate(raw_p_vals) if not np.isnan(p)]
- valid_p_vals = [raw_p_vals[i] for i in valid_idx]
- _, p_corr, _, _ = multipletests(valid_p_vals, alpha=0.05, method='Bonferroni')
- for i, p_val in zip(valid_idx, p_corr):
- results[i]['p_corr'] = p_val
- for i in range(len(results)):
- if 'p_corr' not in results[i]:
- results[i]['p_corr'] = np.nan
- results_df = pd.DataFrame(results)
- # ----- Plotting ----- #
- # Mapping between clusters and neuronal subtypes (determined in Supplementary Figure 8)
- cluster_to_subtype_mapping = {
- '1':'LAMP5+ 1',
- '2':'LAMP5+ 2',
- '3':'VIP+',
- '4':'SNCG+ 1',
- '5':'SNCG+ 2',
- '6':'MEIS2+',
- '7':'SST+ 1',
- '8':'PV+ 1',
- '9':'PV+ 2',
- '10':'SST+ CHODL+',
- '11':'SST+ 2',
- '12':'SST+ 3',
- }
- # Map clusers to subtypes
- results_df['subtype'] = results_df['cluster'].astype(str).map(cluster_to_subtype_mapping)
- # Sort results
- results_df = results_df.sort_values(by=['r'], ascending=[False])
- # Bar plot
- g = sns.catplot(
- data=results_df, kind="bar", x="r", y="subtype", color=[55/255, 126/255, 184/255, 1],
- errorbar=None, alpha=0.7, height=3, aspect=2
- )
- g.set_axis_labels("Spearman R", "", fontsize=20, fontfamily='Arial')
- g.ax.set_yticklabels(g.ax.get_yticklabels(), ha='right', fontsize=14, fontfamily='Arial')
- g.ax.set_xlim([0, 0.7])
- ax = g.ax
- # Annotate significance
- for bar, (_, row) in zip(ax.patches, results_df.iterrows()):
- p = row['p_corr']
- if p < 0.001:
- txt = '***'
- elif p < 0.01:
- txt = '**'
- elif p < 0.05:
- txt = '*'
- else:
- txt = ''
- width = bar.get_width()
- y = bar.get_y() + bar.get_height() / 2
- ax.text(width + 0.01, y + 0.1, txt, ha='left', va='center', fontsize=14, fontweight='bold')
- if save_path is not None:
- plt.savefig(save_path, bbox_inches='tight')
- plt.show()
- # ----- Display results table ----- #
- print(results_df)
- # %% [markdown]
- # Correlate T1w/T2w MIND with subtype CGE
- # %%
- plot_cell_subtype_cge_MIND_correlations('T12', save_path=None)
- # %% [markdown]
- # Repeat for MBP expression MIND
- # %%
- plot_cell_subtype_cge_MIND_correlations('MBP', save_path=None)
- # %% [markdown]
- # Repeat for oligodendrocyte subtype correlated gene expression matrices (**Supplementary Methods:** *Analysis of oligodendrocyte subtypes*)
- #
- # Function to compute correlations and plot
- # %%
- def oligo_subtype_correlations(modality, save_path=None):
- # Load anatomical data
- mat = anat[modality]['mat'].iloc[0:12,0:12] # Get lh
- mat_full = anat[modality]['mat_full'].iloc[0:115,0:115].values
- map = anat[modality]['map']; map = map[map.columns[0]].values[0:115]
- surrogates_filename = anat[modality]['surrogates_filename']
- # Make sure the MIND matrix is ordered correctly
- rois_ordered = ['DLP_L', 'VLP_L', 'MPC_L', 'OFC_L', 'LTC_L', 'LPC_L', 'PCA_L', 'M1_L', 'S1_L', 'A1_L', 'V1_L', 'V2_L']
- mat = mat.loc[rois_ordered,rois_ordered]
- # Dictionary storing interneuron subtypes
- subtype_cge_dict = {
- 'oligo': range(1, 3)
- }
- # ----- Compute correlations ----- #
- # Initialise df to hold results
- results = []
- # Loop clusters
- for cell, clusters in subtype_cge_dict.items():
- for cluster in clusters:
- print(f"Calculating cell type cluster: {cell}_{cluster}")
- # Load cell subtype CGE matrix
- file_path = os.path.join(cge_mat_dir, f'{cell}_{cluster}_cge.csv')
- if not os.path.exists(file_path):
- continue
- cge_mat = pd.read_csv(file_path, index_col=0)
- # Make sure rois are in the correct order
- rois_ordered = ['DLP', 'VLP', 'MPC', 'OFC', 'LTC', 'LPC', 'PCA', 'M1', 'S1', 'A1', 'V1', 'V2']
- cge_mat = cge_mat.loc[rois_ordered,rois_ordered]
- # Skip subtype if does not contain data from all cell types
- if cge_mat.isna().any().any():
- print(f'{cell}_{cluster} contains nans: skipping...')
- else:
- # Get r and p value
- r, p = get_brainsmashed_edge_correlation_p_val_coarse(mat_a = mat.values,
- mat_b = cge_mat.values,
- mat_a_full = mat_full,
- map_a = map,
- dist = dist,
- coarse_lut = coarse_lut[coarse_lut['Side']=='L'],
- lut = lut[lut['Side']=='L'],
- surrogates_filename = surrogates_filename,
- n_perm = 1000,
- test_type = 'two-tailed')
- results.append({
- 'cell_type': cell,
- 'cluster': cluster,
- 'r': r,
- 'p': p,
- })
- # Multiple comparisons correction
- raw_p_vals = [res['p'] for res in results]
- valid_idx = [i for i, p in enumerate(raw_p_vals) if not np.isnan(p)]
- valid_p_vals = [raw_p_vals[i] for i in valid_idx]
- _, p_corr, _, _ = multipletests(valid_p_vals, alpha=0.05, method='Bonferroni')
- for i, p_val in zip(valid_idx, p_corr):
- results[i]['p_corr'] = p_val
- for i in range(len(results)):
- if 'p_corr' not in results[i]:
- results[i]['p_corr'] = np.nan
- results_df = pd.DataFrame(results)
- print(results_df)
- # %%
- oligo_subtype_correlations('T12', save_path=None)
- # %%
- oligo_subtype_correlations('MBP', save_path=None)
Fig3.ipynb at commit e44a2ec, under MIT · at the source
Overview
- Department of Psychiatry, University of Cambridge, Cambridge, UK
- Department of Physiology, Development and Neuroscience, University of Cambridge, Cambridge, UK
- Human Genetics Branch, National Institute of Mental Health, Bethesda, MD USA
- Department of Psychology, University of Cambridge, Cambridge, UK
- School of Academic Psychiatry, Institute of Psychiatry, Psychology & Neuroscience, King’s College London, London, UK
Abstract
Structural similarity provides a powerful framework for measuring coordinated macro- and micro-structural variation across the cortex of a single brain. Similarity networks derived from myelin-sensitive MRI sequences undergo marked reorganisation during adolescence, linked to adversity exposure and behavioural outcomes in humans and rodents. However, the cellular mechanisms of MRI similarity and its development in non-human primate cortex remain unexplored. Here, we use myelin-sensitive T1w/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 40 matches between paragraphs and lines of code.
edhutch1/marm_MIND
e44a2ec1fd464ee08c5cc70c5a4865c7e064d019, 27 July 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
16 files
- Fig1.ipynb, Jupyter, 433 lines
- Fig2.ipynb, Jupyter, 402 lines, 4 matches
- Fig3.ipynb, Jupyter, 925 lines, 5 matches
- Fig4.ipynb, Jupyter, 186 lines
- Fig5.ipynb, Jupyter, 432 lines, 3 matches
- Fig6.ipynb, Jupyter, 303 lines, 1 match
- Sup_Fig2-4.ipynb, Jupyter, 1,505 lines, 2 matches
- Sup_Fig8-.ipynb, Jupyter, 1,070 lines, 4 matches
- code/
MIND_helpers.py , Python, 162 lines - code/
Sup_MIND_helpers.py , Python, 284 lines - code/
gams_SF11.R , R, 253 lines - code/
plotting_helpers.py , Python, 787 lines - code/
preprocessing_helpers.py , Python, 146 lines - code/
stats_helpers.py , Python, 615 lines, 3 matches - LICENSE, License, 21 lines
- README.md, Text, 59 lines
Zenodo 19758838
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
15 files
- Fig1.ipynb, Jupyter, 346 lines
- Fig2.ipynb, Jupyter, 341 lines, 3 matches
- Fig3.ipynb, Jupyter, 839 lines, 4 matches
- Fig4.ipynb, Jupyter, 182 lines
- Fig5.ipynb, Jupyter, 429 lines, 3 matches
- Fig6.ipynb, Jupyter, 299 lines, 1 match
- Sup_Fig2-4.ipynb, Jupyter, 1,479 lines, 2 matches
- Sup_Figs7-.ipynb, Jupyter, 927 lines, 2 matches
- code/
MIND_helpers.py , Python, 162 lines - code/
Sup_MIND_helpers.py , Python, 284 lines - code/
plotting_helpers.py , Python, 786 lines - code/
preprocessing_helpers.py , Python, 115 lines - code/
stats_helpers.py , Python, 574 lines, 3 matches - LICENSE, License, 21 lines
- README.md, Text, 56 lines
TrangeTung/marmoset_gradient
76754a70be363ca5fe80a28d5de819377dc97e20, 1 November 2022Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
152 files
- Community/
clique_communities.m , MATLAB, 102 lines - Community/
community_louvain.m , MATLAB, 198 lines - Community/
link_communities.m , MATLAB, 150 lines - Community/
modularity_dir.m , MATLAB, 124 lines - Community/
modularity_und.m , MATLAB, 122 lines - Community/
partition_distance.m , MATLAB, 97 lines - Registration-master/
DK39_to_RGB.m , MATLAB, 16 lines - Registration-master/
Functions/ , MATLAB, 108 linesdownsample/ downsample.m - Registration-master/
Functions/ , MATLAB, 65 linesdownsample/ downsample2D.m - Registration-master/
Functions/ , MATLAB, 125 linesdownsample/ upsample.m - Registration-master/
Functions/ , MATLAB, 99 linesdownsample/ upsamplev_test.m - Registration-master/
Functions/ , MATLAB, 18 linesgradient/ gradient2d.m - Registration-master/
Functions/ , MATLAB, 27 linesgradient/ gradient3d.m - Registration-master/
Functions/ , MATLAB, 2 linesplotting/ curve3D.m - Registration-master/
Functions/ , MATLAB, 41 linesplotting/ danDoubleBar.m - Registration-master/
Functions/ , MATLAB, 93 linesplotting/ danPlotPatch.m - Registration-master/
Functions/ , MATLAB, 51 linesplotting/ danTripleBar.m - Registration-master/
Functions/ , MATLAB, 12 linesplotting/ danfigure.m - Registration-master/
Functions/ , MATLAB, 19 linesplotting/ expandAxes.m - Registration-master/
Functions/ , MATLAB, 89 linesplotting/ pcaView.m - Registration-master/
Functions/ , MATLAB, 100 linesplotting/ plotbootstrap.m - Registration-master/
Functions/ , MATLAB, 131 linesplotting/ quiver3glyph.m - Registration-master/
Functions/ , MATLAB, 23 linesplotting/ setAxesToMaximum.m - Registration-master/
Functions/ , MATLAB, 131 linesplotting/ sliceView.m - Registration-master/
Functions/ , MATLAB, 127 linesplotting/ sliceViewTitle.m - Registration-master/
Functions/ , MATLAB, 37 linesplotting/ subplotdan.m - Registration-master/
Functions/ , MATLAB, 118 linesplotting/ threeView.m - Registration-master/
Functions/ , MATLAB, 112 linesplotting/ vis_image_and_segs.m - Registration-master/
Functions/ , MATLAB, 44 linesplotting/ vtkimageoverlay.m - Registration-master/
ThreeD_to_2D_registratio , MATLAB, 1,814 linesn.m - Registration-master/
ThreeD_to_3D_affine_regi , MATLAB, 154 linesstration.m - Registration-master/
ThreeD_to_3D_affine_regi , MATLAB, 166 linesstration_GN.m - Registration-master/
ThreeD_to_3D_registratio , MATLAB, 467 linesn.m - Registration-master/
affine_for_initial_align , MATLAB, 263 linesment.m - Registration-master/
align_fluoro_to_nissl.m , MATLAB, 145 lines - Registration-master/
apply_deformation.m , MATLAB, 605 lines - Registration-master/
apply_transform_to_summa , MATLAB, 151 linesry_data.m - Registration-master/
atlas_free_rigid_alignme , MATLAB, 445 linesnt.m - Registration-master/
atlas_free_rigid_alignme , MATLAB, 485 linesnt_v02.m - Registration-master/
batch_manual_landmark_al , MATLAB, 43 linesign_MBA_pipeline.m - Registration-master/
build_boundary_weight.m , MATLAB, 18 lines - Registration-master/
combine_nissl_and_fluoro , MATLAB, 77 lines_transforms.m - Registration-master/
config_reader.m , MATLAB, 46 lines - Registration-master/
create_location_csv_DK39 , MATLAB, 77 lines.m - Registration-master/
create_location_csv_MBA. , MATLAB, 70 linesm - Registration-master/
create_location_csv_Marm , MATLAB, 68 linesoset.m - Registration-master/
detect_padding_in_nissl. , MATLAB, 70 linesm - Registration-master/
find_centers_for_initial , MATLAB, 122 linesization_nissl.m - Registration-master/
find_centers_for_initial , MATLAB, 151 linesization_nissl_fluoro.m - Registration-master/
getmask.m , MATLAB, 69 lines - Registration-master/
gmm.m , MATLAB, 133 lines - Registration-master/
kmeans_reg.m , MATLAB, 119 lines - Registration-master/
lddmmImage.m , MATLAB, 88 lines - Registration-master/
make_slice_figure.m , MATLAB, 270 lines - Registration-master/
manual_landmark_align.m , MATLAB, 241 lines - Registration-master/
manual_landmark_align_MB , MATLAB, 394 linesA_pipeline.m - Registration-master/
registration_pipeline_DK , MATLAB, 126 lines39.m - Registration-master/
registration_pipeline_MB , MATLAB, 179 linesA.m - Registration-master/
registration_pipeline_ex , MATLAB, 98 linesample.m - Registration-master/
registration_pipeline_ma , MATLAB, 91 linesrmoset.m - Registration-master/
registration_pipeline_ni , MATLAB, 65 linesssl_fluoro.m - Registration-master/
registration_pipeline_ra , MATLAB, 130 linest.m - Registration-master/
registration_pipeline_rn , MATLAB, 75 linesaseq.m - Registration-master/
registration_pipeline_rn , MATLAB, 105 linesaseq_atlas_free_align.m - Registration-master/
search_mba_transformjp2. , MATLAB, 44 linesm - Registration-master/
slice_to_slice_rigid_ali , MATLAB, 195 linesgnment.m - Registration-master/
slice_to_slice_rigid_ali , MATLAB, 223 linesgnment_GN.m - Registration-master/
slice_to_slice_rigid_ali , MATLAB, 241 linesgnment_GN_weight.m - Registration-master/
transform_reg_to_atlas.m , MATLAB, 176 lines - demo.m, MATLAB, 110 lines
- main_custom_code/
Control_Glutamate_model. , MATLAB, 144 linesm - main_custom_code/
Control_Glutamate_summar , MATLAB, 153 linesy.m - main_custom_code/
Control_Random_model.m , MATLAB, 142 lines - main_custom_code/
Control_Random_summary.m , MATLAB, 153 lines - main_custom_code/
Control_model_noise.m , MATLAB, 154 lines - main_custom_code/
FSL_topup_comparison.m , MATLAB, 72 lines - main_custom_code/
Figure1_Group_FC_gradien , MATLAB, 425 linest.m - main_custom_code/
Figure1_Group_FC_gradien , MATLAB, 156 linest_human.m - main_custom_code/
Figure1_dynamic_marmoset , MATLAB, 206 lines_CC_HCP.m - main_custom_code/
Figure1_dynamic_marmoset , MATLAB, 219 lines_CC_ION.m - main_custom_code/
Figure1_dynamic_marmoset , MATLAB, 259 lines_CC_ION_Resubmit2.m - main_custom_code/
Figure1_dynamic_marmoset , MATLAB, 239 lines_CC_NIH.m - main_custom_code/
Figure2_arousal_related_ , MATLAB, 208 linesFC_gradient.m - main_custom_code/
Figure2_retrograde_SC_gr , MATLAB, 165 linesadient.m - main_custom_code/
Figure3_arousal_ralated_ , MATLAB, 179 linesdynamic_summary.m - main_custom_code/
Figure3_dynamic_FC_gradi , MATLAB, 120 linesent_ION.m - main_custom_code/
Figure4_marmoset_modelin , MATLAB, 157 linesg_ION.m - main_custom_code/
Figure4_marmoset_modelin , MATLAB, 245 linesg_NIH.m - main_custom_code/
Figure4_marmoset_modelli , MATLAB, 142 linesng_static_summary_ION.m - main_custom_code/
Figure4_marmoset_modelli , MATLAB, 162 linesng_static_summary_merge. m - main_custom_code/
Figure5_arousal_ralated_ , MATLAB, 119 linesdynamic_modelling_summar y.m - main_custom_code/
Figure5_arousal_ralated_ , MATLAB, 119 linesdynamic_modelling_summar y_merge.m - main_custom_code/
Figure5_marmoset_modelli , MATLAB, 187 linesng_dynamic_summary.m - main_custom_code/
Figure5_marmoset_modelli , MATLAB, 215 linesng_dynamic_summary_merge .m - main_custom_code/
Figure6_marmoset_GeSM_sh , MATLAB, 167 linesuffle_ION.m - main_custom_code/
Figure6_marmoset_GeSM_sh , MATLAB, 169 linesuffle_NIH.m - main_custom_code/
Figure6_marmoset_GeSM_sh , MATLAB, 581 linesuffle_summary.m - main_custom_code/
FigureSI_Age_effect.m , MATLAB, 190 lines - main_custom_code/
FigureSI_Arousal_gradien , MATLAB, 75 linest_value.m - main_custom_code/
FigureSI_head_motion_eff , MATLAB, 115 linesect.m - main_custom_code/
MYEyeTrackVideo.m , MATLAB, 75 lines - main_custom_code/
MY_3D_coreg_slice_to_tem , MATLAB, 87 linesplate.m - main_custom_code/
MY_Classify_State_Eye_Tr , MATLAB, 808 linesack.m - main_custom_code/
MY_Extract_Train_Dataset , MATLAB, 340 lines.m - main_custom_code/
MY_Fitting_Pupil.m , MATLAB, 328 lines - main_custom_code/
MY_Gray2D_to_RGB.m , MATLAB, 42 lines - main_custom_code/
MY_Precise_affine_slice_ , MATLAB, 96 linesregistration.m - main_custom_code/
MY_Template_Arousal_inde , MATLAB, 51 linesx.m - main_custom_code/
MY_cpuArray_GLM_shuffle. , MATLAB, 80 linesm - main_custom_code/
MY_display_ColorMap_RGB. , MATLAB, 97 linesm - main_custom_code/
MY_downsample_and_densit , MATLAB, 66 linesy_receptor.m - main_custom_code/
MY_fitting_curve_distrib , MATLAB, 71 linesution.m - main_custom_code/
MY_gpuArray_GLM_shuffle. , MATLAB, 111 linesm - main_custom_code/
MY_register_Histology_Ma , MATLAB, 87 linesrmoset.m - main_custom_code/
MY_reshape_3D_to_2D.m , MATLAB, 18 lines - main_custom_code/
MY_reslice_atlas_to_Hist , MATLAB, 40 linesology.m - main_custom_code/
Main_fMRI_Preprocessing_ , MATLAB, 290 linescode_Trange.m - main_custom_code/
Preprocessing_NIH_datase , MATLAB, 225 linest.m - main_custom_code/
Rec_Filter.m , MATLAB, 12 lines - main_custom_code/
Resubmit2_minDistance.m , MATLAB, 161 lines - main_custom_code/
Resubmit_CrossSpecies.m , MATLAB, 403 lines - main_custom_code/
Resubmit_HeadMotion_Effe , MATLAB, 316 linesct.m - main_custom_code/
circle_fit_three_line.m , MATLAB, 65 lines - main_custom_code/
register_LDDMM.m , MATLAB, 466 lines - rsfMRI_code/
Bruker2nifti_multislice. , MATLAB, 102 linesm - rsfMRI_code/
Colormap.m , MATLAB, 426 lines - rsfMRI_code/
MY_1st_level_analysis_1r , MATLAB, 17 linesodentNscan_get_default_b atch_struct.m - rsfMRI_code/
MY_1st_level_analysis_es , MATLAB, 7 linestimate_batch_struct.m - rsfMRI_code/
MY_1st_level_analysis_ge , MATLAB, 26 linest_default_batch_struct.m - rsfMRI_code/
MY_1st_level_analysis_mu , MATLAB, 27 lineslti_condition_batch_stru ct.m - rsfMRI_code/
MY_1st_level_analysis_re , MATLAB, 9 linessults_batch_struct.m - rsfMRI_code/
MY_2nd_level_analysis_es , MATLAB, 7 linestimate_batch_struct.m - rsfMRI_code/
MY_2nd_level_analysis_fa , MATLAB, 15 linesctorial_one_sample_ttest _batch_struct.m - rsfMRI_code/
MY_2nd_level_analysis_fa , MATLAB, 17 linesctorial_pairttest_batch_ struct.m - rsfMRI_code/
MY_2nd_level_analysis_re , MATLAB, 9 linessults_batch_struct.m - rsfMRI_code/
MY_Circos_plot.m , MATLAB, 361 lines - rsfMRI_code/
MY_Double_Slice_with_Emp , MATLAB, 34 linesty.m - rsfMRI_code/
MY_circular_fitting_LMS. , MATLAB, 37 linesm - rsfMRI_code/
MY_deNAN_despike_TimeSer , MATLAB, 40 lines.m - rsfMRI_code/
MY_estimate_CC_R2_perRow , MATLAB, 18 lines.m - rsfMRI_code/
MY_estimate_Hemodynamic_ , MATLAB, 117 linesResponse_Function.m - rsfMRI_code/
MY_eyelid_fitting.m , MATLAB, 61 lines - rsfMRI_code/
MY_find_images_in_all_sc , MATLAB, 28 linesans.m - rsfMRI_code/
MY_find_images_in_all_sc , MATLAB, 32 linesans_mixed.m - rsfMRI_code/
exportToPPTX.m , MATLAB, 2,951 lines - rsfMRI_code/
fmask.m , MATLAB, 9 lines - rsfMRI_code/
funmask.m , MATLAB, 6 lines - rsfMRI_code/
get_pars.m , MATLAB, 285 lines - rsfMRI_code/
hough_circle.m , MATLAB, 91 lines - rsfMRI_code/
icatb_param.m , MATLAB, 78 lines - rsfMRI_code/
lvm_import.m , MATLAB, 584 lines - README.md, Text, 20 lines
isebenius/MIND
0d334454eaac62e49a197801446ce7750256c882, 12 March 2024Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
7 files
- .ipynb_checkpoints/
ABCD-MIND-checkpoint.ipy , Jupyter, 429 linesnb - .ipynb_checkpoints/
ABCD-MSN-and-raw-feature , Jupyter, 668 liness-checkpoint.ipynb - MIND.py, Python, 52 lines
- MIND_helpers.py, Python, 149 lines
- get_vertex_df.py, Python, 203 lines
- register_and_vol2surf.py
, Python, 115 lines - README.md, Text, 135 lines
Code availability
Preprocessing of MRI data used Brainsuite18a80 and Advanced Normalisation Tools81 (ANTs). Preprocessing of in-situ hybridisation data used a modified version of previously published Matlab code87 (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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:
- 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 184 scripts, each with its path and the digest of its content;
- 40 matches 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.
Data Availability Statement
All raw data accessed in this study are openly available. Retrograde tract tracing data22 are available from http://
Preprocessing of MRI data used Brainsuite18a80 and Advanced Normalisation Tools81 (ANTs). Preprocessing of in-situ hybridisation data used a modified version of previously published Matlab code87 (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 3 keywords, 8 MeSH terms, 1 funder, 94 references, 1 RRID.
Cite
This paper
Hutchings, E. D., Sawiak, S. J., Smith, R. L., Bethlehem, R. A. I., Roberts, A. C., & Bullmore, E. T. (2026). The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset. Communications biology, 9(1), 1066. https://
BibTeX
@article{hutchings2026ce
author = {Hutchings, E D and Sawiak, S J and Smith, R L and Bethlehem, R A I and Roberts, A C and Bullmore, E T},
title = {{The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset}},
journal = {Communications biology},
year = {2026},
month = may,
volume = {9},
number = {1},
pages = {1066},
publisher = {Nature Publishing Group},
issn = {2399-3642},
doi = {10.1038/
url = {https://
pmid = {42156922},
pmcid = {PMC13454510}
}
RIS
TY - JOUR
AU - Hutchings, E D
AU - Sawiak, S J
AU - Smith, R L
AU - Bethlehem, R A I
AU - Roberts, A C
AU - Bullmore, E T
TI - The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/
VL - 9
IS - 1
SP - 1066
SN - 2399-3642
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "The cellular correlates and adolescent reorganisation of cortical myelination networks in the common marmoset",
"container-title": "Communications biology",
"author": [
{
"family": "Hutchings",
"given": "E D"
},
{
"family": "Sawiak",
"given": "S J"
},
{
"family": "Smith",
"given": "R L"
},
{
"family": "Bethlehem",
"given": "R A I"
},
{
"family": "Roberts",
"given": "A C"
},
{
"family": "Bullmore",
"given": "E T"
}
],
"container-title-short":
"volume": "9",
"issue": "1",
"page": "1066",
"DOI": "10.1038/
"PMID": "42156922",
"PMCID": "PMC13454510",
"ISSN": "2399-3642",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
19
]
]
}
}
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.1038/s41467-026-74153-2 [code]
- Regional, functional and transcriptomic decoding of multidimensional brain structure alterations in obsessive-compulsive disorder.Journal: Nature communicationsIn common: BrainSMASH, BrainSpace, Nipype, 14 other tools, 8 references
- [2] doi:10.1038/s41467-026-73714-9 [code]
- The genetic architecture of cortical similarity networks.Journal: Nature communicationsIn common: Nipype, AFNI, FreeSurfer, 7 other tools, structural MRI / diffusion, 10 references, 2 authors
- [3] doi:10.1038/s41398-026-04025-2 [code]
- Brain energetic landscapes shape state dysregulation in major depressive disorder: a morphological network controllability perspective.Journal: Translational psychiatryIn common: BrainSMASH, BrainSpace, Nipype, 15 other tools, 5 references
- [4] doi:10.1038/s41586-026-10631-3 [code]
- A prognostic human brain network for diffuse midline glioma.Journal: NatureIn common: CAT12, BrainSMASH, BrainSpace, 15 other tools, 1 reference
- [5] doi:10.1038/s41467-026-76011-7 [code]
- Human cortex organizes dynamic co-fluctuations along the sensorimotor-association
axis. Journal: Nature communicationsIn common: BrainSpace, mgcv, Brain Connectivity Toolbox, 12 other tools, 4 references - [6] doi:10.1038/s41593-026-02205-3 [code]
- Competitive interactions shape mammalian brain network dynamics and computation.Journal: Nature neuroscienceIn common: Nipype, Brain Connectivity Toolbox, Parallel Computing Toolbox, 11 other tools, non-human primate, 6 references
- [7] doi:10.7554/elife.103097 [code]
- Canonical neurodevelopmental trajectories of structural and functional manifolds.Journal: eLifeIn common: BrainSpace, mgcv, Brain Connectivity Toolbox, 9 other tools, structural MRI / diffusion, 4 references, author Richard Bethlehem
- [8] doi:10.1038/s41467-026-71151-2 [code]
- Common and distinct neural correlates of social interaction processing and theory of mind in narratives.Journal: Nature communicationsIn common: Nipype, Brain Connectivity Toolbox, AFNI, 16 other tools
- [9] doi:10.1038/s41467-026-71270-w [code]
- Spatiotemporal dynamics of the human cortical functional hierarchy across the lifespan.Journal: Nature communicationsIn common: BrainSpace, GIfTI library for MATLAB, Parallel Computing Toolbox, 9 other tools, 8 references
- [10] doi:10.1371/journal.pbio.3003856 [code]
- Aging and metabolism contribute separately to brain-body health.Journal: PLoS biologyIn common: AFNI, GIfTI library for MATLAB, FreeSurfer, 11 other tools, structural MRI / diffusion, 5 references
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: 4 repositories of the authors' code, each at its verified commit and with its license, 184 scripts, and 40 matches 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:4cdff70587358f21…
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.
