A multimodal spatial atlas of transcriptomic, morphological, and electrophysiological cell type densities in the mouse brain.
The 14 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
- [1] § Methods › Alignment of transcriptomic cell types with morphology and electrophysiology › Alignment of mRNA to established neuronal t-types. ↔ densities_app/Validation_compute_m_type_gene_expressions.ipynb, lines 89 to 190 · score 0.94 · log2 nonzero expression, gene selection, near zero, selects genes, gene expression, decay · Report a mismatch
- [2] § Methods › Atlas construction: whole-brain, voxel-scale cell-type density atlas › Estimation of cutting angles and coronal region volumes for MERFISH sections. ↔ t-types/notebooks/density1.1_missing_regions-Copy1.ipynb, lines 48 to 64 · score 0.79 · Golgi cells, Bergman glia, Purkinje cells, Purkinje layers, neurotransmitter, GABA · Report a mismatch
- [3] § Methods › Atlas construction: whole-brain, voxel-scale cell-type density atlas › Estimation of cutting angles and coronal region volumes for MERFISH sections. ↔ t-types/density1.1_missing_regions.py, lines 47 to 80 · score 0.76 · Golgi cells, Bergman glia, Purkinje cells, neurotransmitter, GABA, Glut · Report a mismatch
- [4] § Methods › Atlas construction: whole-brain, voxel-scale cell-type density atlas › Cell Density Estimation and Scaling Across Brain Regions. ↔ t-types/density1_estimation_all_region_53slices_average_reconstcords_voxvol.py, lines 74 to 115 · score 0.73 · voxelized region, parcellation substructures, region volumes, neurotransmitter, division, intersecting · Report a mismatch
- [5] § Methods › Atlas construction: whole-brain, voxel-scale cell-type density atlas › Cell Density Estimation and Scaling Across Brain Regions. ↔ t-types/notebooks/density1_estimation_all_region_53slices_average_reconstcords_voxvol-Copy1.ipynb, lines 29 to 104 · score 0.72 · parcellation substructures, MERFISH cell, region volumes, neurotransmitter, division, intersecting · Report a mismatch
- [6] § Methods › Alignment of transcriptomic cell types with morphology and electrophysiology › Elbow method to determine the number of clusters. ↔ densities_app/Validation_compute_m_type_gene_expressions.ipynb, lines 580 to 674 · score 0.72 · optimal cluster, UMAP projected, WCSS, Elbow, compositions, model · Report a mismatch
- [7] § Methods › Atlas construction: whole-brain, voxel-scale cell-type density atlas › Estimation of cutting angles and coronal region volumes for MERFISH sections. ↔ t-types/notebooks/density1_estimation_all_region_53slices_average_reconstcords_voxvol-Copy1.ipynb, lines 29 to 104 · score 0.72 · x_ccf, y_ccf, region ID, reconstructed, template, voxel · Report a mismatch
- [8] § Methods › Alignment of transcriptomic cell types with morphology and electrophysiology › Alignment of mRNA to established neuronal t-types. ↔ t-types/scripts/calc_av_jobarray_classesonly_writegpfs.py, the whole file · a weak match · score 0.71 · gene identifiers, gene expression, AnnData, libraries, trimmed, log2 · Report a mismatch
- [9] § Methods › Alignment of transcriptomic cell types with morphology and electrophysiology › Elbow method to determine the number of clusters. ↔ densities_app/transcribe_t_types_to_me_types.ipynb, lines 191 to 321 · score 0.69 · optimal cluster, UMAP projected, WCSS, Elbow, model, density · Report a mismatch
- [10] § Results › Data quality, technical considerations, and validation of density estimates ↔ t-types/notebooks/density5_calculate_total_cells_newjson-Copy1.ipynb, lines 1036 to 1095 · score 0.59 · fiber tracts, cerebral nuclei, olfactory areas, thresholds, cell · Report a mismatch
- [11] § Results › Data quality, technical considerations, and validation of density estimates ↔ t-types/notebooks/density1.3_print_info_unscaled-Copy1.ipynb, lines 164 to 202 · score 0.57 · fiber tracts, cerebral nuclei, olfactory areas, literature, validation · Report a mismatch
- [12] § Methods › Atlas construction: whole-brain, voxel-scale cell-type density atlas › Extending CCFv3’s hierarchical annotations and parcellations for comprehensive dataset integration. ↔ t-types/density0.1_update_parcellation_annotation_with_CRB_MOB.py, lines 18 to 68 · score 0.54 · Purkinje layers, glomerular layer, olfactory bulb, parcellation term, lobules, ontology · Report a mismatch
- [13] § Methods › Alignment of transcriptomic cell types with morphology and electrophysiology › Elbow method to determine the number of clusters. ↔ densities_app/Validation_compute_m_type_gene_expressions.ipynb, lines 410 to 495 · score 0.53 · mRNA, gene expression, Semilogarithmic, log10, brain regions, summed · Report a mismatch
- [14] § Methods › Alignment of transcriptomic cell types with morphology and electrophysiology › Elbow method to determine the number of clusters. ↔ densities_app/Validation_compute_m_type_gene_expressions.ipynb, lines 580 to 674 · score 0.52 · UMAP projection, UMAP1, UMAP2, composition, Elbow, cluster · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Jupyter notebook · 816 lines · 29 KB · Apache-2.0 · 4 matches
- # %%
- !pip freeze
- # %%
- import pandas as pd
- import numpy as np
- # %%
- import pandas as pd
- import numpy as np
- extended_p_me_t = pd.read_csv("../probabilistic_mapping_extention/extended_p_me_t.csv", index_col=0)
- common_t_types = extended_p_me_t.index
- msk_t_types = np.asarray([("IMN" not in x) & ("NN" not in x) for x in common_t_types])
- common_t_types = common_t_types[msk_t_types]
- extended_p_me_t = extended_p_me_t.reindex(common_t_types, axis=0)
- extended_p_me_t = extended_p_me_t.div(np.sum(extended_p_me_t, axis=1), axis=0)
- np.sum(extended_p_me_t,axis=1)
- # %%
- # mt_labels = pd.read_csv("../probabilistic_mapping_extention/t_and_m_types.csv", index_col=0)
- # dict_mclass = {0.0: "PC", 1.0: "IN"}
- # dict_dendclass = {x: "dend_" + str(int(x)) for x in np.unique(mt_labels["dendrites"])}
- # dict_axclass = {x: "ax_" + str(int(x)) for x in np.unique(mt_labels["axon"])}
- # dict_mlabels = {"class": dict_mclass, "dendrites": dict_dendclass, "axon": dict_axclass}
- # m_labels = ["_".join([dict_mlabels["class"][mt_labels["class"][x]],
- # dict_mlabels["dendrites"][mt_labels["dendrites"][x]],
- # dict_mlabels["axon"][mt_labels["axon"][x]]
- # ]) for x in mt_labels.index]
- # t_labels = mt_labels["AIBS lvl 0"]
- # %%
- neur_list = ["IN_", "PC_"]
- dend_list = [f"dend_{x}_" for x in range(10)]
- ax_list = [f"ax_{x}" for x in range(10)]
- m_types_list = []
- for neur in neur_list:
- for dend in dend_list:
- for ax in ax_list:
- m_types_list.append(neur+dend+ax)
- pd.DataFrame(m_types_list, columns=["canonical m-type"]).to_csv("/Users/yroussel/Documents/projects/probabilistic_mapping_wholebrain/lida_m_types/m_types_list.csv")
- # %%
- import mygene
- def convert_gene_tags_to_labels(dataframe):
- """
- Convert gene tags to gene labels using MyGeneInfo API.
- :param dataframe: Pandas DataFrame containing gene tags as column names.
- :return: Pandas DataFrame with gene labels replacing gene tags.
- """
- mg = mygene.MyGeneInfo()
- ens = dataframe.columns.to_list()
- ginfo = mg.querymany(ens, scopes='ensembl.gene')
- dict_id_to_symbol = {}
- for g in ginfo:
- try:
- dict_id_to_symbol[g["query"]] = g["symbol"]
- except:
- dict_id_to_symbol[g["query"]] = g["query"]
- return dataframe.rename(dict_id_to_symbol, axis=1)
- yao = pd.read_csv("../experimental_data/yao/all_clusters_trim_mean25_g32285ct5322.csv", index_col="gene_identifier").T
- # yao = convert_gene_tags_to_labels(yao)
- # %%
- # df = pd.concat([yao.T[t_labels].T,
- # pd.DataFrame(m_labels, index=t_labels, columns=["m_type"])],
- # axis=1)
- # df.head()
- # %%
- # mean_df = df.groupby("m_type").mean()
- # std_df = df.groupby("m_type").std()
- # sum_df = df.groupby("m_type").sum()
- # %%
- from scipy import sparse
- import seaborn as sns
- import matplotlib.pyplot as plt
- def geneSelection(data, threshold=0, atleast=10,
- yoffset=.02, xoffset=5, decay=1.5, n=None,
- plot=True, markers=None, genes=None, figsize=(6,3.5),
- markeroffsets=None, labelsize=10, alpha=1, verbose=1):
- if sparse.issparse(data):
- zeroRate = 1 - np.squeeze(np.array((data>threshold).mean(axis=0)))
- A = data.multiply(data>threshold)
- # A.data = np.log2(A.data)
- A.data = A.data
- meanExpr = np.zeros_like(zeroRate) * np.nan
- detected = zeroRate < 1
- meanExpr[detected] = np.squeeze(np.array(A[:,detected].mean(axis=0))) / (1-zeroRate[detected])
- else:
- zeroRate = 1 - np.mean(data>threshold, axis=0)
- meanExpr = np.zeros_like(zeroRate) * np.nan
- detected = zeroRate < 1
- mask = data[:,detected]>threshold
- logs = np.zeros_like(data[:,detected]) * np.nan
- # logs[mask] = np.log2(data[:,detected][mask])
- logs[mask] = data[:,detected][mask]
- meanExpr[detected] = np.nanmean(logs, axis=0)
- lowDetection = np.array(np.sum(data>threshold, axis=0)).squeeze() < atleast
- zeroRate[lowDetection] = np.nan
- meanExpr[lowDetection] = np.nan
- if n is not None:
- up = 10
- low = 0
- for t in range(100):
- nonan = ~np.isnan(zeroRate)
- selected = np.zeros_like(zeroRate).astype(bool)
- selected[nonan] = zeroRate[nonan] > np.exp(-decay*(meanExpr[nonan] - xoffset)) + yoffset
- if np.sum(selected) == n:
- break
- elif np.sum(selected) < n:
- up = xoffset
- xoffset = (xoffset + low)/2
- else:
- low = xoffset
- xoffset = (xoffset + up)/2
- if verbose>0:
- print('Chosen offset: {:.2f}'.format(xoffset))
- else:
- nonan = ~np.isnan(zeroRate)
- selected = np.zeros_like(zeroRate).astype(bool)
- selected[nonan] = zeroRate[nonan] > np.exp(-decay*(meanExpr[nonan] - xoffset)) + yoffset
- if plot:
- if figsize is not None:
- plt.figure(figsize=figsize)
- plt.ylim([0, 1])
- if threshold>0:
- plt.xlim([np.log2(threshold), np.ceil(np.nanmax(meanExpr))])
- # plt.xlim([threshold, np.ceil(np.nanmax(meanExpr))])
- else:
- plt.xlim([0, np.ceil(np.nanmax(meanExpr))])
- x = np.arange(plt.xlim()[0], plt.xlim()[1]+.1,.1)
- y = np.exp(-decay*(x - xoffset)) + yoffset
- if decay==1:
- plt.text(.4, 0.2, '{} genes selected\ny = exp(-x+{:.2f})+{:.2f}'.format(np.sum(selected),xoffset, yoffset),
- color='k', fontsize=labelsize, transform=plt.gca().transAxes)
- else:
- plt.text(.4, 0.2, '{} genes selected\ny = exp(-{:.1f}*(x-{:.2f}))+{:.2f}'.format(np.sum(selected),decay,xoffset, yoffset),
- color='k', fontsize=labelsize, transform=plt.gca().transAxes)
- plt.plot(x, y, color=sns.color_palette()[1], linewidth=2)
- xy = np.concatenate((np.concatenate((x[:,None],y[:,None]),axis=1), np.array([[plt.xlim()[1], 1]])))
- t = plt.matplotlib.patches.Polygon(xy, color=sns.color_palette()[1], alpha=.4)
- plt.gca().add_patch(t)
- plt.scatter(meanExpr, zeroRate, s=1, alpha=alpha, rasterized=True)
- if threshold==0:
- plt.xlabel('Mean log2 nonzero expression')
- plt.ylabel('Frequency of zero expression')
- else:
- plt.xlabel('Mean log2 nonzero expression')
- plt.ylabel('Frequency of near-zero expression')
- plt.tight_layout()
- if markers is not None and genes is not None:
- if markeroffsets is None:
- markeroffsets = [(0, 0) for g in markers]
- for num,g in enumerate(markers):
- i = np.where(genes==g)[0]
- plt.scatter(meanExpr[i], zeroRate[i], s=10, color='k')
- dx, dy = markeroffsets[num]
- plt.text(meanExpr[i]+dx+.1, zeroRate[i]+dy, g, color='k', fontsize=labelsize)
- return selected
- selected_genes_level0 = geneSelection(yao.values, threshold=0, atleast=10,
- yoffset=.02, xoffset=5, decay=1.5)
- selected_genes_level0 = yao.columns[selected_genes_level0]
- # %%
- # x = std_df[selected_genes_level0].mean(axis=0)
- # y = std_df[selected_genes_level0].std(axis=0)
- # plt.plot(x, y, "o")
- # selected_genes_level1 = (x < 2) & (y > 1.5)
- # plt.plot(x[selected_genes_level1], y[selected_genes_level1], "o")
- # selected_genes_level1 = selected_genes_level0[selected_genes_level1]
- # plt.xlabel('in m-type gene variability (std)')
- # plt.ylabel('cross m-type gene variability (std)')
- # plt.show()
- # %%
- # m_type_gene_expression = convert_gene_tags_to_labels(mean_df[selected_genes_level1])
- # m_type_gene_expression.to_csv('./m_type_gene_expression.csv')
- # %%
- # m_type_gene_expression.head(3)
- # %%
- # m_type_gene_expression_sum = convert_gene_tags_to_labels(sum_df[selected_genes_level1])
- # m_type_gene_expression_sum.to_csv('./m_type_gene_expression_sum.csv')
- # %%
- # t_type_gene_expression = convert_gene_tags_to_labels(df[selected_genes_level1].drop_duplicates())
- # t_type_gene_expression.to_csv('./t_type_gene_expression.csv')
- # %%
- # t_type_gene_expression = t_type_gene_expression.rename({x : "_".join(x.split(" ")) for x in t_type_gene_expression.index}, axis=0)
- # %%
- # %%
- file = './Brain_regions_me_types_composition.csv'
- me_types_densities = pd.read_csv(file, index_col=0, header=[0, 1])
- # Sum the columns within each "m-type" group
- m_types_densities = me_types_densities.T.groupby(level='m-type').sum().T
- me_types_densities.columns = [f"{col[0]}|{col[1]}" for col in me_types_densities.columns]
- m_types_densities.head()
- # %%
- import pickle
- import pandas as pd
- def concatenate_dataframes(dataframes_dict):
- """
- Concatenates a dictionary of DataFrames into a single DataFrame.
- Parameters:
- - dataframes_dict (dict): Dictionary where keys are strings and values are DataFrames with a single column named 'density'.
- Returns:
- - pd.DataFrame: A single concatenated DataFrame with columns renamed to the keys of the input dictionary.
- """
- # Create an empty list to hold the renamed DataFrames
- renamed_dfs = []
- # Iterate over the dictionary
- for key, df in dataframes_dict.items():
- # Rename the 'density' column to the key
- renamed_df = df.rename(columns={'density_mm3': key})
- # Append the renamed DataFrame to the list
- renamed_dfs.append(renamed_df)
- # Concatenate all DataFrames along the columns
- concatenated_df = pd.concat(renamed_dfs, axis=1)
- return concatenated_df
- # Open the pickle file in binary read mode
- with open('./scaled_densities_t_types_as_keys.pickle', 'rb') as file:
- # Load the data from the file
- data = pickle.load(file)
- # Now you can use the data variable which contains the deserialized object
- # print(data)
- sorted_data = {k: data[k] for k in sorted(data)}
- t_densities_df = concatenate_dataframes(sorted_data)
- t_tpes_dict = {x: x.replace(" ", "_") for x in t_densities_df.columns}
- t_densities_df = t_densities_df.rename(t_tpes_dict, axis=1)
- t_densities_df.head()
- # %%
- # %%
- # t_densities_df.columns
- # len(common_ttypes)
- # t_densities_df[common_ttypes]
- # t_type_gene_expression.T[common_ttypes].T
- # %%
- # common_ttypes = t_type_gene_expression.index.intersection(t_densities_df.columns)
- # ish_true = t_densities_df[common_ttypes].fillna(0) @ t_type_gene_expression.T[common_ttypes].T.fillna(0)
- # %%
- # common_mtypes = m_type_gene_expression.index.intersection(m_types_densities.columns)
- # ish_pred = m_types_densities[common_mtypes].fillna(0) @ m_type_gene_expression.T[common_mtypes].T.fillna(0)
- # ish_pred_sum = m_types_densities[common_mtypes].fillna(0) @ m_type_gene_expression_sum.T[common_mtypes].T.fillna(0)
- # %%
- extended_p_me_t
- # %%
- yao_df = yao.rename({x : "_".join(x.split(" ")) for x in yao.index}, axis=0)
- comon_yaotypes = yao_df.index.intersection(extended_p_me_t.index)
- comon_yaotypes = comon_yaotypes[extended_p_me_t.T[comon_yaotypes].fillna(0).sum() > 0]
- common_ttypes = comon_yaotypes.intersection(t_densities_df.columns)
- ttype_gene_expression = convert_gene_tags_to_labels(yao_df[selected_genes_level0][selected_genes_level0].T[common_ttypes].fillna(0).T)
- me_type_gene_expression = ttype_gene_expression.T @ extended_p_me_t.T[common_ttypes].T.fillna(0)
- me_type_gene_expression = me_type_gene_expression.T
- common_brain_regions = t_densities_df.index.intersection(me_types_densities.index)
- me_types_densities = t_densities_df.reindex(common_brain_regions)[common_ttypes].fillna(0) @ extended_p_me_t.T[common_ttypes].T.fillna(0)
- # common_metypes = me_type_gene_expression.index.intersection(me_types_densities.columns)
- me_types_used = extended_p_me_t.columns[extended_p_me_t.T[comon_yaotypes].fillna(0).sum(axis=1) > 0]
- correction = (len(comon_yaotypes) / len(me_types_used))
- ish_me = me_types_densities.reindex(common_brain_regions).fillna(0) / correction @ me_type_gene_expression / correction
- ish_true = t_densities_df.reindex(common_brain_regions)[common_ttypes].fillna(0) @ ttype_gene_expression
- # %%
- print(len(me_types_used))
- print(len(comon_yaotypes))
- print((len(me_types_used)/ len(comon_yaotypes))**2)
- # %%
- print(me_type_used)
- # %%
- print(
- np.mean(t_densities_df.reindex(common_brain_regions)[common_ttypes].fillna(0), axis=1).mean(),
- np.mean(me_types_densities.reindex(common_brain_regions).fillna(0), axis=1).mean()
- )
- print(
- ttype_gene_expression.mean().mean(),
- me_type_gene_expression.mean().mean()
- )
- (len(common_ttypes) / len(me_types_densities.columns)) **2
- # %%
- plt.figure(figsize=(20,4))
- plt.semilogy(np.sum(t_densities_df.reindex(common_brain_regions)[common_ttypes].fillna(0), axis=1), 'o')
- plt.semilogy(np.sum(me_types_densities.reindex(common_brain_regions).fillna(0), axis=1), 'o', alpha=.5)
- plt.xticks(rotation=90)
- plt.show()
- plt.figure(figsize=(20,4))
- plt.semilogy(np.abs(
- np.sum(t_densities_df.reindex(common_brain_regions)[common_ttypes].fillna(0), axis=1) - np.sum(me_types_densities.reindex(common_brain_regions).fillna(0), axis=1)
- ),
- 'o')
- plt.xticks(rotation=90)
- plt.show()
- # %%
- plt.figure(figsize=(20,4))
- plt.semilogy(np.sum(ttype_gene_expression, axis=0), 'o')
- plt.semilogy(np.sum(me_type_gene_expression, axis=0), 'o', alpha=.5)
- plt.xticks(rotation=90)
- plt.show()
- # %%
- # %%
- from sklearn.preprocessing import StandardScaler
- # ish_pred = StandardScaler().fit_transform(ish_pred)
- # ish_true = StandardScaler().fit_transform(ish_true)
- # err = np.abs(ish_pred - ish_true) / np.abs(ish_true)
- # err_sum = np.abs(ish_pred_sum - ish_true) / np.abs(ish_true)
- err_me = np.abs(ish_me - ish_true + 1e-1) / np.abs(ish_true + 1e-1)
- err_me
- # %%
- me_types_used = extended_p_me_t.columns[extended_p_me_t.T[comon_yaotypes].fillna(0).sum(axis=1) > 0]
- (len(comon_yaotypes) / len(me_types_used))**2
- # %%
- plt.figure(figsize=(12,4))
- plt.plot(extended_p_me_t.T[comon_yaotypes].fillna(0).sum(), 'o')
- plt.xticks(rotation=90)
- plt.show()
- plt.figure(figsize=(12,4))
- plt.plot(extended_p_me_t.T[comon_yaotypes].fillna(0).sum(axis=1), 'o')
- plt.xticks(rotation=90)
- plt.show()
- # %%
- showed_brain_regions
- # %%
- # Defining the global font properties
- plt.rcParams.update({
- 'font.size': 16, # Default font size for text
- 'font.family': 'Helvetica Neue', # Font family (e.g., 'serif', 'sans-serif')
- 'axes.titleweight': 'bold', # Title font weight (e.g., 'bold', 'normal')
- 'axes.labelsize': 12, # Font size for axis labels
- 'xtick.labelsize': 8, # Font size for x-tick labels
- 'ytick.labelsize': 8, # Font size for y-tick labels
- 'figure.titlesize': 16, # Font size for figure title
- 'figure.titleweight': 'bold',# Font weight for figure title
- 'axes.titlepad': 20, # Padding between title and plot
- 'figure.figsize': (10, 6), # Default figure size (width, height)
- 'axes.titlelocation': 'center' # Center-align the title
- })
- showed_brain_regions = common_brain_regions[::20].drop('y')
- showed_genes = ish_true.columns[::10]
- plt.figure(figsize=(11.8,4))
- plt.subplot(221)
- plt.semilogy(err_me.sum()[showed_genes], 'o')
- plt.xticks([], [], rotation=90)
- plt.ylabel(r'$\sum_{regions}^{} \frac{|mRNA_{t} - mRNA_{me}|}{mRNA_{t}}$')
- plt.subplot(222)
- plt.semilogy(err_me.T.sum()[showed_brain_regions], 'o')
- plt.xticks([], [], rotation=90)
- plt.ylabel(r'$\sum_{genes}^{} \frac{|mRNA_{t} - mRNA_{me}|}{mRNA_{t}}$')
- plt.subplot(223)
- plt.semilogy(ish_true.sum()[showed_genes], 'o')
- plt.semilogy((ish_me).sum()[showed_genes], 'o') #/70
- plt.ylabel(r'$\sum_{regions}^{} mRNA$')
- plt.xticks(rotation=90)
- plt.legend([r'$mRNA_{t}$', r'$mRNA_{me}$'])
- plt.subplot(224)
- plt.semilogy(ish_true.T.sum()[showed_brain_regions], 'o')
- plt.semilogy(ish_me.T.sum()[showed_brain_regions], 'o') #/70
- plt.ylabel(r'$\sum_{genes}^{} mRNA$')
- plt.xticks(rotation=90)
- plt.legend([r'$mRNA_{t}$', r'$mRNA_{me}$'])
- plt.tight_layout()
- plt.show()
- plt.figure(figsize=(11.8,11.8/3))
- plt.subplot(131)
- plt.imshow(np.log10(ish_true.reindex(showed_brain_regions)[showed_genes] + 1), vmin=0, vmax=7)
- plt.title(r'$log_{10}(mRNA_{t})$')
- plt.xticks(np.arange(len(showed_genes)), showed_genes, rotation=90)
- plt.yticks(np.arange(len(showed_brain_regions)), showed_brain_regions)
- # plt.colorbar()
- plt.subplot(132)
- plt.imshow(np.log10(ish_me.reindex(showed_brain_regions)[showed_genes] + 1), vmin=0, vmax=7)
- plt.title(r'$log_{10}(mRNA_{me})$')
- plt.xticks(np.arange(len(showed_genes)), showed_genes, rotation=90)
- plt.yticks(np.arange(len(showed_brain_regions)), showed_brain_regions)
- plt.yticks([], [])
- # plt.colorbar()
- plt.subplot(133)
- plt.imshow(np.log10(err_me.reindex(showed_brain_regions)[showed_genes] + 1), vmin=0, vmax=7)
- plt.title(r'$log_{10}(\frac{|mRNA_{t} - mRNA_{me}|}{mRNA_{t}})$')
- plt.xticks(np.arange(len(showed_genes)), showed_genes, rotation=90)
- plt.yticks(np.arange(len(showed_brain_regions)), showed_brain_regions)
- plt.yticks([], [])
- # plt.colorbar()
- plt.tight_layout()
- plt.show()
- plt.figure(figsize=(11.8/3,11.8/3))
- plt.imshow(np.log10(err_me.reindex(showed_brain_regions)[showed_genes] + 1), vmin=0, vmax=7)
- plt.title(r'$log_{10}(\frac{|mRNA_{t} - mRNA_{me}|}{mRNA_{t}})$')
- plt.xticks(np.arange(len(showed_genes)), showed_genes, rotation=90)
- plt.xticks([], [])
- plt.yticks(np.arange(len(showed_brain_regions)), showed_brain_regions)
- plt.yticks([], [])
- plt.colorbar(label=r'$density \ log_{10}$', location='bottom', orientation='horizontal')
- plt.show()
- # %%
- print(
- ish_true.sum().sum(),
- (ish_me).sum().sum(),
- (ish_true.sum().sum() - (ish_me).sum().sum() )/ ish_true.sum().sum()
- )
- # %%
- ish_true
- # %%
- ish_me/26.5
- # %%
- import matplotlib.pyplot as plt
- def plot_map(data, title, filename):
- """Plot and save heatmap of data."""
- plt.figure(figsize=(5, 3))
- heatmap = plt.pcolor(data.values, cmap="jet")
- # for y in range(data.shape[0]):
- # for x in range(data.shape[1]):
- # if 0 < data.values[y, x] < 1.:
- # plt.text(x + 0.5, y + 0.5, int(100 * data.values[y, x]),
- # horizontalalignment='center',
- # verticalalignment='center')
- plt.colorbar(heatmap, label =r"$log_{10}(mm^{3})$")
- plt.xticks(np.arange(len(data.columns)) + .5, data.columns, rotation=90)
- plt.yticks(np.arange(len(data.index)) + .5, data.index)
- plt.title(title)
- # plt.tight_layout()
- plt.savefig(filename)
- # %%
- # showed_brain_regions_heatmap = common_brain_regions[::20].drop('y')
- me_types_used_heatmap = me_types_used[::12]
- plot_map(np.log10(me_types_densities.reindex(showed_brain_regions)[me_types_used_heatmap] + 1.),
- r"$me-types \ densities$",
- "me_types_densities_.png")
- plt.show()
- # %%
- import pandas as pd
- import umap
- import matplotlib.pyplot as plt
- def plot_umap(df, types, showed_reg):
- """
- Plot a UMAP of the dataset and print the sample names next to the datapoints.
- Parameters:
- df (pd.DataFrame): Input dataframe with sample names as the index and feature values as the values.
- """
- # Initialize UMAP model
- reducer = umap.UMAP()
- # Fit and transform the data
- embedding = reducer.fit_transform(df.values)
- # Create a scatter plot
- plt.figure(figsize=(5, 5))
- plt.scatter(embedding[:, 0], embedding[:, 1], s=100, alpha=0.5)
- # Annotate points with sample names
- for i, sample_name in enumerate(df.index):
- if sample_name in showed_reg:
- plt.annotate(sample_name, (embedding[i, 0], embedding[i, 1]), fontsize=9, alpha=0.75)
- # Set plot title and labels
- plt.title(f'UMAP of the {types} compositon')
- plt.xlabel('UMAP1')
- plt.ylabel('UMAP2')
- # Show the plot
- plt.show()
- # %%
- showed_brain_regions_umap = common_brain_regions[::10].drop('y')
- plot_umap(np.log10(me_types_densities + 1), "me-types", showed_brain_regions_umap)
- plot_umap(np.log10(t_densities_df[common_ttypes].fillna(0) + 1), "t-types", showed_brain_regions_umap)
- # %%
- import pandas as pd
- import umap
- import matplotlib.pyplot as plt
- from sklearn.cluster import KMeans
- from scipy.cluster.hierarchy import dendrogram, linkage
- import seaborn as sns
- def plot_umap_and_clusters(df, types, showed_reg, max_clusters=10):
- """
- Plot a UMAP projection and perform clustering.
- Use the Elbow Method to determine the optimal number of clusters.
- Plot a dendrogram and a bar plot of e-type distribution within clusters.
- Parameters:
- df (pd.DataFrame): Input dataframe with sample names as the index and feature values as the values.
- max_clusters (int): Maximum number of clusters to test for the Elbow Method.
- """
- # Initialize UMAP model
- reducer = umap.UMAP()
- # Fit and transform the data
- embedding = reducer.fit_transform(df.values)
- # Determine the optimal number of clusters using the Elbow Method
- wcss = []
- for n in range(1, max_clusters + 1):
- kmeans = KMeans(n_clusters=n, random_state=42)
- # kmeans.fit(embedding)
- kmeans.fit_predict(df.values)
- wcss.append(kmeans.inertia_)
- # Plot the Elbow Method graph
- plt.figure(figsize=(5, 2.5))
- plt.plot(range(1, max_clusters + 1), wcss, marker='o')
- plt.title('Elbow Method for Optimal Number of Clusters')
- plt.xlabel('Number of clusters')
- plt.ylabel('WCSS')
- plt.show()
- # Ask the user to input the optimal number of clusters based on the Elbow plot
- optimal_clusters = int(input("Enter the optimal number of clusters based on the Elbow plot: "))
- # Perform K-Means clustering with the selected number of clusters
- kmeans = KMeans(n_clusters=optimal_clusters, random_state=42)
- df['cluster'] = kmeans.fit_predict(embedding)
- # df['cluster'] = kmeans.fit_predict(df.values)
- df['cluster'] = ['cluster_' + str(x) for x in df['cluster']]
- # Plot UMAP projection with cluster labels
- plt.figure(figsize=(11.8 / 3, 4))
- scatter = plt.scatter(embedding[:, 0], embedding[:, 1],
- c=[int(x.split("_")[1]) for x in df['cluster']],
- cmap='viridis', s=100, alpha=0.5)
- # plt.title('UMAP projection with K-Means clusters')
- plt.title(f'{types} compositon UMAP')
- plt.xlabel('UMAP1')
- plt.ylabel('UMAP2')
- plt.legend(*scatter.legend_elements(), title="Clusters", fontsize=8)
- # Annotate points with sample names
- for i, sample_name in enumerate(df.index):
- if sample_name in showed_reg:
- plt.annotate(sample_name, (embedding[i, 0], embedding[i, 1]), fontsize=9, alpha=0.75)
- plt.show()
- # try:
- # # Hierarchical Clustering and Dendrogram
- # Z = linkage(df.drop('cluster', axis=1), method='ward')
- # plt.figure(figsize=(30, 8))
- # dendrogram(Z, labels=df.index, leaf_rotation=90, leaf_font_size=8, color_threshold=0)
- # plt.title('Hierarchical Clustering Dendrogram')
- # plt.xlabel('Sample Index')
- # plt.ylabel('Distance')
- # plt.show()
- # except:
- # print("HCA error")
- # try:
- # # Bar plot of e-type distribution within clusters
- # cluster_counts = df.groupby('cluster').size()
- # type_distribution = df.groupby(['cluster'])[df.columns[:-1]].sum()
- # # e_type_distribution_percent = e_type_distribution.div(cluster_counts, axis=0) * 100
- # type_distribution_percent = type_distribution.div(np.sum(type_distribution, axis=1), axis=0) * 100
- # type_distribution_percent.plot(kind='bar', stacked=True, figsize=(5, 5), colormap='jet')
- # plt.title('Type Distribution within Clusters')
- # plt.xlabel('Cluster')
- # plt.ylabel('Percentage')
- # # plt.legend(title='Type', bbox_to_anchor=(1.05, 1), loc='upper left')
- # plt.show()
- # except:
- # print("bar plot error")
- return df
- # %%
- showed_brain_regions_umap = common_brain_regions[::10].drop('y')
- me_types_densities_clusters = plot_umap_and_clusters(np.log10(me_types_densities + 1.),
- "me-types",
- showed_brain_regions_umap,
- max_clusters=20)
- # %%
- t_types_densities_clusters = plot_umap_and_clusters(np.log10(t_densities_df[common_ttypes].fillna(0) + 1),
- "t-types",
- showed_brain_regions_umap,
- max_clusters=20)
- # %%
- import seaborn as sns
- # Merge the two dataframes on index and keep only the cluster columns
- df_merged = pd.DataFrame({'cluster_t': t_types_densities_clusters['cluster'], 'cluster_me': me_types_densities_clusters['cluster']})
- # Create the contingency table using `pd.crosstab`
- contingency_table = pd.crosstab(df_merged['cluster_me'], df_merged['cluster_t'])
- # Plot the contingency table as a heatmap
- plt.figure(figsize=(11.8 / 3, 4))
- sns.heatmap(contingency_table, annot=True, cmap="YlGnBu", cbar=True)
- plt.xlabel("t-types clusters")
- plt.ylabel("me-types clusters")
- plt.title("Shared Regions Between Clusters")
- plt.show()
- # %%
- def get_example_indices(df_me):
- # Group by the cluster column and get the first index from each cluster
- example_indices = df_me.groupby('cluster').apply(lambda x: x.index[0])
- return example_indices
- def create_pie_charts(df, df_c, example_indices, threshold=1):
- # Determine the layout of subplots based on the number of clusters
- n_clusters = len(example_indices)
- n_cols = 3 # Define how many columns per row
- n_rows = (n_clusters + n_cols - 1) // n_cols # Calculate rows needed
- fig, axes = plt.subplots(n_rows, n_cols, figsize=(11.8, (11.8 / n_cols) * n_rows))
- axes = axes.flatten() # Flatten to make indexing easier
- # Loop over each region and create a pie chart in a subplot
- for i, reg in enumerate(example_indices):
- data = df.T[reg].T
- values = data / data.sum() # Normalize to get percentages
- labels = data.index
- # Filter out labels with less than threshold percentage
- filtered_labels = [label if pct > threshold else '' for label, pct in zip(labels, values * 100)]
- filtered_pct = [f'{pct:.1f}%' if pct > threshold else '' for pct in values * 100]
- # Plot pie chart in the corresponding subplot
- axes[i].pie(values, labels=filtered_labels, autopct=lambda pct: f'{pct:.1f}%' if pct > threshold else '', startangle=140)
- axes[i].set_title(f'{reg} ({df_c["cluster"][reg]})')
- # Remove any unused subplots
- for j in range(i + 1, len(axes)):
- fig.delaxes(axes[j])
- # plt.tight_layout()
- plt.show()
- # %%
- import matplotlib.pyplot as plt
- import matplotlib.colors as mcolors
- import numpy as np
- def get_example_indices(df_me):
- # Group by the cluster column and get the first index from each cluster
- example_indices = df_me.groupby('cluster').apply(lambda x: x.index[0])
- return example_indices
- def create_pie_charts(df, df_c, example_indices, threshold=1):
- # Determine the layout of subplots based on the number of clusters
- n_clusters = len(example_indices)
- n_cols = 3 # Define how many columns per row
- n_rows = (n_clusters + n_cols - 1) // n_cols # Calculate rows needed
- fig, axes = plt.subplots(n_rows, n_cols, figsize=(11.8, (11.8 / n_cols) * n_rows))
- axes = axes.flatten() # Flatten to make indexing easier
- # Define a perceptually uniform colormap
- cmap = colormaps["jet"]
- colors = cmap(np.linspace(0, 1, len(df.index))) # Generate distinct colors for all labels
- # Loop over each region and create a pie chart in a subplot
- for i, reg in enumerate(example_indices):
- data = df.T[reg].T
- values = data / data.sum() # Normalize to get percentages
- labels = data.index
- # Filter out labels with less than threshold percentage
- filtered_labels = [label if pct > threshold else '' for label, pct in zip(labels, values * 100)]
- filtered_pct = [f'{pct:.1f}%' if pct > threshold else '' for pct in values * 100]
- # Select corresponding colors
- chart_colors = [colors[j] for j in range(len(labels))]
- # Plot pie chart in the corresponding subplot
- axes[i].pie(
- values,
- labels=filtered_labels,
- autopct=lambda pct: f'{pct:.1f}%' if pct > threshold else '',
- startangle=140,
- colors=chart_colors
- )
- axes[i].set_title(f"{reg} ({df_c['cluster'][reg]})")
- # Remove any unused subplots
- for j in range(i + 1, len(axes)):
- fig.delaxes(axes[j])
- plt.tight_layout()
- plt.show()
- # %%
- showed_brain_regions
- # %%
- example_indices
- # %%
- from matplotlib import colormaps
- cmap = colormaps["jet"]
- example_indices = get_example_indices(me_types_densities_clusters.reindex(showed_brain_regions))
- create_pie_charts(me_types_densities, me_types_densities_clusters, example_indices, threshold=4.9)
- # %%
- example_indices = get_example_indices(t_types_densities_clusters.reindex(showed_brain_regions))
- create_pie_charts(t_densities_df[common_ttypes].fillna(0), t_types_densities_clusters, example_indices, threshold=4.9)
- # %%
Validation_compute_m_type_gene_expressions.ipynb at commit b55ee2e, under Apache-2.0 · at the source
Overview
- Blue Brain Project, École polytechnique fédérale de Lausanne (EPFL), Geneva, Switzerland
- Department of Mathematics, University of Oxford, Oxford, United Kingdom
- Open Brain Institute, Lausanne, Switzerland
Abstract
Brain cells can be classified according to their transcriptomic, morphological, and electrophysiological features. Comprehensive data on the spatial density of cell types that integrate all three properties are critical for improving models of how neuronal diversity contributes to brain function, yet existing atlases lack this information. To address this gap, we created a quantitative, three-dimensional atlas of cell type density distributions in the mouse brain. We began by generating a transcriptomic cell type atlas, scaling regional density estimates from brain slices using cell counts and anatomical dimensions. For densely populated regions like the cerebellum, we further refined these estimates by applying voxel-wise corrections based on average Nissl staining intensity. To connect transcriptomic identities with functional characteristics, we leveraged patch-sequencing datasets that combine single-neuron mRNA profiles, morphological reconstructions, and electrophysiological recordings from cortical neurons. Transcriptomic types were determined from gene expression data, morphological types were assigned based on structural reconstructions, and electrophysiological types were identified using K-means clustering. The resulting whole-brain atlas (consisting of 5274 transcriptomic clusters and 458 functional morphological-electrophy
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 14 matches between paragraphs and lines of code.
BlueBrain/Molsys-transcriptomic-atlas
1b3064e95e59f8397b3bddcde294279d35699024, 19 December 2024Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
36 files
- t-types/
density0.1_update_parcel , Python, 441 lines, 1 matchlation_annotation_with_C RB_MOB.py - t-types/
density0.2_volume_calc_f , Python, 136 linesrom_template copy.py - t-types/
density0.2_volume_calc_f , Python, 99 linesrom_template.py - t-types/
density0.3_position_volu , Python, 131 linesme_calc.py - t-types/
density1.1_missing_regio , Python, 154 lines, 1 matchns.py - t-types/
density1.2_test_total_ne , Python, 175 linesuron_count_pickle_create .py - t-types/
density1.3_print_info_un , Python, 114 linesscaled.py - t-types/
density1.5_scaling.py , Python, 226 lines - t-types/
density1_estimation_all_ , Python, 206 lines, 1 matchregion_53slices_average_ reconstcords_voxvol.py - t-types/
helper_functions.py , Python, 571 lines - t-types/
notebooks/ , Jupyter, 567 linesdensity0.1_update_parcel lation_annotation_with_C RB_MOB-Copy1.ipynb - t-types/
notebooks/ , Jupyter, 341 linesdensity0.2_volume_calc_f rom_template-Copy1.ipynb - t-types/
notebooks/ , Jupyter, 238 linesdensity0.3_position_volu me_calc-Copy1.ipynb - t-types/
notebooks/ , Jupyter, 334 lines, 1 matchdensity1.1_missing_regio ns-Copy1.ipynb - t-types/
notebooks/ , Jupyter, 371 linesdensity1.2_test_total_ne uron_count_pickle_create -Copy1.ipynb - t-types/
notebooks/ , Jupyter, 746 lines, 1 matchdensity1.3_print_info_un scaled-Copy1.ipynb - t-types/
notebooks/ , Jupyter, 1,185 linesdensity1.5_multi_scaling -Copy1.ipynb - t-types/
notebooks/ , Jupyter, 904 linesdensity1.5_scaling-Copy1 .ipynb - t-types/
notebooks/ , Jupyter, 708 linesdensity1.6_scaled_print_ info-Copy1.ipynb - t-types/
notebooks/ , Jupyter, 584 lines, 2 matchesdensity1_estimation_all_ region_53slices_average_ reconstcords_voxvol-Copy 1.ipynb - t-types/
notebooks/ , Jupyter, 841 linesdensity3.1_pipeline_vali dation_nrrdcreate-Copy1. ipynb - t-types/
notebooks/ , Jupyter, 337 linesdensity3_paper_generate_ globalonly_scaled_transc riptomic_densities_on_al l_hierarchy.ipynb - t-types/
notebooks/ , Jupyter, 804 linesdensity4_print_info-Copy 1.ipynb - t-types/
notebooks/ , Jupyter, 1,290 lines, 1 matchdensity5_calculate_total _cells_newjson-Copy1.ipy nb - t-types/
scripts/ , Shell, 50 linescalc_av_jobarray.sh - t-types/
scripts/ , Python, 86 lines, 1 matchcalc_av_jobarray_classes only_writegpfs.py - t-types/
scripts/ , Python, 83 linescalc_av_jobarray_writegp fs.py - t-types/
scripts/ , Python, 331 linesdensity2_comp_nrrd_on_1n ode.py - t-types/
scripts/ , Python, 215 linesdensity2_comp_nrrd_on_1n ode_scaled.py - t-types/
scripts/ , Shell, 50 linesdensity_comp_nrrd_jobarr ay.sh - t-types/
scripts/ , Shell, 50 linesuc2_calc_av_jobarray.sh - t_type_to_me_type_conver
ter/ , Python, 160 linesconvert_t_type_nrrds_to_ me_type_nrrds.py - t_type_to_me_type_conver
ter/ , Shell, 10 linesdl_t_type_nrrd.sh - t_type_to_me_type_conver
ter/ , Shell, 46 linesprocess_t_types_job.sh - LICENSE, License, 201 lines
- README.md, Text, 17 lines
cveraszto/TME-types
2a04aabfb4fef7e3fbade6e1eec258491d5a3201, 3 March 2026Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
27 files
- notebooks/
density0.1_update_parcel , Jupyter, 567 lineslation_annotation_with_C RB_MOB.ipynb - notebooks/
density0.2_volume_calc_f , Jupyter, 341 linesrom_template.ipynb - notebooks/
density0.3_position_volu , Jupyter, 238 linesme_calc.ipynb - notebooks/
density1.1_missing_regio , Jupyter, 334 linesns.ipynb - notebooks/
density1.2_test_total_ne , Jupyter, 371 linesuron_count_pickle_create .ipynb - notebooks/
density1.3_print_info_un , Jupyter, 746 linesscaled.ipynb - notebooks/
density1.5_multi_scaling , Jupyter, 1,185 lines.ipynb - notebooks/
density1.5_scaling.ipynb , Jupyter, 904 lines - notebooks/
density1.6_scaled_print_ , Jupyter, 708 linesinfo.ipynb - notebooks/
density1_estimation_all_ , Jupyter, 584 linesregion_53slices_average_ reconstcords_voxvol.ipyn b - notebooks/
density3.1_pipeline_vali , Jupyter, 841 linesdation_nrrdcreate.ipynb - notebooks/
density3_paper_generate_ , Jupyter, 337 linesglobalonly_scaled_transc riptomic_densities_on_al l_hierarchy.ipynb - notebooks/
density4_print_info.ipyn , Jupyter, 804 linesb - notebooks/
density5_calculate_total , Jupyter, 1,290 lines_cells_newjson.ipynb - notebooks/
deprecated_loop_new_scal , Jupyter, 1,699 linesing.ipynb - notebooks/
find_duplicates.ipynb , Jupyter, 103 lines - notebooks/
test_missing_files.ipynb , Jupyter, 135 lines - notebooks/
test_parcellation_annota , Jupyter, 513 linestion_update_with_CRB_MOB .ipynb - scripts/
calc_av_jobarray.py , Python, 80 lines - scripts/
calc_av_jobarray.sh , Shell, 50 lines - scripts/
calc_av_jobarray_classes , Python, 86 linesonly_writegpfs.py - scripts/
calc_av_jobarray_writegp , Python, 83 linesfs.py - scripts/
density2_comp_nrrd_on_1n , Python, 331 linesode.py - scripts/
density2_comp_nrrd_on_1n , Python, 215 linesode_scaled.py - scripts/
helper_functions.py , Python, 570 lines - scripts/
uc2_calc_av_jobarray.sh , Shell, 50 lines - README.md, Text, 123 lines
YannRoussel/probabilistic_mapping_extention
b55ee2e8d8bf3f654630511b4240283d60164249, 10 March 2026Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
11 files
- densities_app/
.ipynb_checkpoints/ , Jupyter, 806 linesValidation_compute_m_typ e_gene_expressions-check point.ipynb - densities_app/
.ipynb_checkpoints/ , Jupyter, 39 linesextended p_map for cell atlas pipeline-checkpoint.ipyn b - densities_app/
.ipynb_checkpoints/ , Python, 21 linesp_map_for_cellatlas_pipe line-checkpoint.py - densities_app/
.ipynb_checkpoints/ , Jupyter, 470 linestranscribe_t_types_to_me _types-checkpoint.ipynb - densities_app/
.ipynb_checkpoints/ , Jupyter, 219 linesvisualisation_multiproc- checkpoint.ipynb - densities_app/
Validation_compute_m_typ , Jupyter, 816 linese_gene_expressions.ipynb - densities_app/
extended p_map for cell atlas pipeline.ipynb , Jupyter, 48 lines - densities_app/
p_map_for_cellatlas_pipe , Python, 21 linesline.py - densities_app/
transcribe_t_types_to_me , Jupyter, 504 lines_types.ipynb - repository limit reached (2,000 files or 30 MB): the rest is at the source (27 files)
- LICENSE, License, 201 lines
- README.md, Text, 166 lines
BlueBrain/ccfv3a-extended-atlas
7e02bfbcd437811a0ec0164f478c26c695561838, 13 December 2024Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
13 files
- pipeline/
mask_id_annot.py , Python, 116 lines - pipeline/
mask_subregions_folder.p , Python, 145 linesy - pipeline/
registration_antspy.py , Python, 229 lines - pipeline/
registration_niftireg_re , Python, 200 linesgF3D.py - plots/
plot_points.py , Python, 132 lines - tools/
add_images_from_folder.p , Python, 137 linesy - tools/
apply_def_field.py , Python, 146 lines - tools/
bounding_box.py , Python, 141 lines - tools/
common_hierarchy_identif , Python, 211 linesication.py - tools/
hierarchy_id.py , Python, 156 lines - tools/
math2.py , Python, 215 lines - LICENSE.txt, License, 202 lines
- README.md, Text, 211 lines
registry.opendata.aws/bluebrain_opendata
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
Zenodo 15176439
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
YannRoussel/probabilistic_mapping_extension
b55ee2e8d8bf3f654630511b4240283d60164249, 10 March 2026Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
11 files
- densities_app/
.ipynb_checkpoints/ , Jupyter, 806 linesValidation_compute_m_typ e_gene_expressions-check point.ipynb - densities_app/
.ipynb_checkpoints/ , Jupyter, 39 linesextended p_map for cell atlas pipeline-checkpoint.ipyn b - densities_app/
.ipynb_checkpoints/ , Python, 21 linesp_map_for_cellatlas_pipe line-checkpoint.py - densities_app/
.ipynb_checkpoints/ , Jupyter, 470 linestranscribe_t_types_to_me _types-checkpoint.ipynb - densities_app/
.ipynb_checkpoints/ , Jupyter, 219 linesvisualisation_multiproc- checkpoint.ipynb - densities_app/
Validation_compute_m_typ , Jupyter, 816 lines, 4 matchese_gene_expressions.ipynb - densities_app/
extended p_map for cell atlas pipeline.ipynb , Jupyter, 48 lines - densities_app/
p_map_for_cellatlas_pipe , Python, 21 linesline.py - densities_app/
transcribe_t_types_to_me , Jupyter, 504 lines, 1 match_types.ipynb - repository limit reached (2,000 files or 30 MB): the rest is at the source (27 files)
- LICENSE, License, 201 lines
- README.md, Text, 166 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:
- 7 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 89 scripts, each with its path and the digest of its content;
- 14 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
Datasets cited
- portal.brain-map.org/
atlases-and-data/ , at Allen Brain Map; found in the referencesbkp
Data Availability
The code and data necessary to reproduce our results are publicly available at the following repositories: 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, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 10 MeSH terms, 1 funder, 61 references.
Cite
This paper
Verasztó, C., Roussel, Y., Kanari, L., Piluso, S., Markram, H., & Keller, D. (2026). A multimodal spatial atlas of transcriptomic, morphological, and electrophysiological cell type densities in the mouse brain. PLoS computational biology, 22(3), e1014106. https://
BibTeX
@article{veraszto2026mul
author = {Verasztó, Csaba and Roussel, Yann and Kanari, Lida and Piluso, Sébastien and Markram, Henry and Keller, Daniel},
title = {{A multimodal spatial atlas of transcriptomic, morphological, and electrophysiological cell type densities in the mouse brain}},
journal = {PLoS computational biology},
year = {2026},
month = mar,
volume = {22},
number = {3},
pages = {e1014106},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/
url = {https://
pmid = {41875149},
pmcid = {PMC13120702}
}
RIS
TY - JOUR
AU - Verasztó, Csaba
AU - Roussel, Yann
AU - Kanari, Lida
AU - Piluso, Sébastien
AU - Markram, Henry
AU - Keller, Daniel
TI - A multimodal spatial atlas of transcriptomic, morphological, and electrophysiological cell type densities in the mouse brain
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/
VL - 22
IS - 3
SP - e1014106
SN - 1553-734X
PB - PLOS
DO - 10.1371/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1371/
"type": "article-journal",
"title": "A multimodal spatial atlas of transcriptomic, morphological, and electrophysiological cell type densities in the mouse brain",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Verasztó",
"given": "Csaba"
},
{
"family": "Roussel",
"given": "Yann"
},
{
"family": "Kanari",
"given": "Lida"
},
{
"family": "Piluso",
"given": "Sébastien"
},
{
"family": "Markram",
"given": "Henry"
},
{
"family": "Keller",
"given": "Daniel"
}
],
"container-title-short":
"volume": "22",
"issue": "3",
"page": "e1014106",
"DOI": "10.1371/
"PMID": "41875149",
"PMCID": "PMC13120702",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
24
]
]
}
}
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.1371/journal.pcbi.1010058 [code]
- Mapping of morpho-electric features to molecular identity of cortical inhibitory neurons.Journal: PLoS computational biologyIn common: scikit-learn, pandas, SciPy, 2 other tools, mouse, cellular / molecular, 7 references, 3 authors
- [2] doi:10.1038/s41586-023-06812-z [code]
- A high-resolution transcriptomic and spatial atlas of cell types in the whole mouse brain.Journal: NatureIn common: anndata, UMAP, pandas, 2 other tools, portal.brain-map.org/atlases-and-data/bkp, genetics / omics, mouse, 13 references
- [3] doi:10.1162/imag_a_00565 [code]
- An extended and improved CCFv3 annotation and Nissl atlas of the entire mouse brain.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Nipype, NiBabel, scikit-learn, 3 other tools, mouse, 7 references, 2 authors
- [4] doi:10.1038/s41467-025-64259-4 [code]
- Data-driven fine-grained region discovery in the mouse brain with transformers.Journal: Nature communicationsIn common: anndata, seaborn, scikit-learn, 4 other tools, portal.brain-map.org/atlases-and-data/bkp, genetics / omics, mouse, 7 references
- [5] doi:10.1038/s41467-024-53971-2 [code]
- scPair: Boosting single cell multimodal analysis by leveraging implicit feature selection and single cell atlases.Journal: Nature communicationsIn common: anndata, UMAP, seaborn, 5 other tools, portal.brain-map.org/atlases-and-data/bkp, genetics / omics, mouse, 6 references
- [6] doi:10.1038/s41586-023-06808-9 [code]
- Molecularly defined and spatially resolved cell atlas of the whole mouse brain.Journal: NatureIn common: SimpleITK, anndata, OpenCV, 6 other tools, portal.brain-map.org/atlases-and-data/bkp, genetics / omics, mouse, cellular / molecular, 5 references
- [7] doi:10.1371/journal.pcbi.1010739 [code]
- A method to estimate the cellular composition of the mouse brain from heterogeneous datasets.Journal: PLoS computational biologyIn common: pandas, SciPy, NumPy, mouse, 5 references, 2 authors
- [8] doi:10.1038/s41592-026-03194-8 [code]
- Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.Journal: Nature methodsIn common: anndata, NiBabel, seaborn, 5 other tools, portal.brain-map.org/atlases-and-data/bkp, genetics / omics, 6 references
- [9] doi:10.1038/s41588-025-02120-6 [code]
- Quantitative characterization of cell niches in spatially resolved omics data.Journal: Nature geneticsIn common: anndata, UMAP, seaborn, 5 other tools, genetics / omics, mouse, 8 references
- [10] doi:10.1038/s41467-022-35288-0 [code]
- Spatial-ID: a cell typing method for spatially resolved transcriptomics via transfer learning and spatial embedding.Journal: Nature communicationsIn common: anndata, pandas, Matplotlib, 1 other tool, genetics / omics, mouse, cellular / molecular, 11 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: 7 repositories of the authors' code, each at its verified commit and with its license, 89 scripts, and 14 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:3c4e7715cfb68111…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014106)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014106.svg
:target: https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014106
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014106"><img src="https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014106.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
- BlueBrain/Molsys-transcriptomic-atlas: README.md on GitHub
- cveraszto/TME-types: README.md on GitHub
- YannRoussel/probabilistic_mapping_extention: README.md on GitHub
- BlueBrain/ccfv3a-extended-atlas: README.md on GitHub
- YannRoussel/probabilistic_mapping_extension: README.md on GitHub
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
