Region- and cell type-specific changes in gene expression in the cerebellum after classical fear conditioning.
The 17 matches
- [1] § Methods › Visium spatial transcriptomics analysis › Differential gene expression analysis ↔ Codes/Analysis/spatial_pseudobulk_deseq.R, lines 274–347 · score 0.75 · DESeq, independentFiltering, pairwise comparison, LRT DEGs, alpha, HC
- [2] § Methods › snRNA-seq data analysis › Preprocess and annotation ↔ Codes/Analysis/preprocess_annotate_snrna.ipynb, lines 599–615 · score 0.72 · Seurat v3, sc.pp.highly_variable_genes, flavor, latent, scVI, batch
- [3] § Methods › Visium spatial transcriptomics analysis › Spatial transcriptomics mapping and preprocess ↔ Codes/Analysis/preprocess_annotate_snrna.ipynb, lines 599–615 · score 0.72 · Seurat v3, sc.pp.highly_variable_genes, flavor, latent, scVI, batch
- [4] § Methods › Visium spatial transcriptomics analysis › Annotation of spatial clusters ↔ Codes/Analysis/annotation_cell2location.ipynb, lines 277–288 · score 0.71 · detection alpha, cell2location, cell abundance, training, model
- [5] § Results › Specific inhibitory neuron subtype expressing Kit is highly associated with fear conditioning ↔ Codes/Analysis/preprocess_annotate_snrna.ipynb, lines 794–801 · score 0.69 · Inh Piezo2, Inh Zfhx4, inhibitory neurons, Inh Kit, snRNA, cells
- [6] § Results › snRNA-seq in the DCN reveals cell type- and learning phase-specific transcriptional changes ↔ Codes/Figure/Figure5.R, lines 1–42 · score 0.66 · snRNA, CD DEGs, LRT DEGs, UMAP, astrocyte, Quadrant
- [7] § Methods › snRNA-seq data analysis › Transcription factor activity analysis ↔ Codes/Analysis/pySCENIC_downstream.R, lines 1–55 · score 0.60 · pySCENIC, motifs, AUC, adjacency, mm10, scores
- [8] § Methods › Visium spatial transcriptomics analysis › Spatial transcriptomics mapping and preprocess ↔ Codes/Analysis/spatialclustering_squidpy.ipynb, lines 55–59 · score 0.60 · joint graph, Squidpy, space, resolution, Leiden, sc
- [9] § Results › Specific inhibitory neuron subtype expressing Kit is highly associated with fear conditioning ↔ Codes/Analysis/snrna_MAST.R, lines 1584–1642 · score 0.59 · Inh Piezo2, Inh Zfhx4, Inh Kit, snRNA, DEGs, DCN
- [10] § Methods › snRNA-seq data analysis › Differential gene expression analysis ↔ Codes/Analysis/snrna_MAST.R, lines 928–996 · score 0.59 · pairwise comparison, log2FC, MAST, zlm, Hurdle, LRT
- [11] § Results › Specific inhibitory neuron subtype expressing Kit is highly associated with fear conditioning ↔ Codes/Analysis/preprocess_annotate_snrna.ipynb, lines 794–801 · score 0.57 · Inh Zfhx4, inhibitory neurons, Inh Kit, neuronal, cells
- [12] § Results › Specific inhibitory neuron subtype expressing Kit is highly associated with fear conditioning ↔ Codes/Figure/Figure6.R, lines 1–41 · score 0.56 · inhibitory neuron, Inh Kit, UMAP, Quadrant, Zfhx4, Grm5
- [13] § Results › Spatial transcriptomic analysis in the cerebellum after classical fear conditioning ↔ Codes/Figure/Figure2.R, lines 43–111 · score 0.56 · granular layer, molecular layer, ventricle, medulla, Purkinje, seq
- [14] § Results › Spatial transcriptomic analysis in the cerebellum after classical fear conditioning ↔ Codes/Analysis/spatial_pseudobulk_deseq.R, lines 274–347 · score 0.55 · granular layer, molecular layer, ventricle, medulla, Purkinje, seq
- [15] § Methods › snRNA-seq data analysis › Transcription factor activity analysis ↔ Codes/Analysis/pySCENIC_downstream.R, lines 160–207 · score 0.54 · regulon activity, Bonferroni, RAS, scores, TF, cell
- [16] § Results › Specific inhibitory neuron subtype expressing Kit is highly associated with fear conditioning ↔ Codes/Figure/Figure6.R, lines 1–41 · score 0.54 · inhibitory neurons, Inh Kit, Zfhx4, Grm5, regulator, neuronal
- [17] § Methods › Visium spatial transcriptomics analysis › Differential gene expression analysis ↔ Codes/Analysis/spatial_pseudobulk_deseq.R, lines 65–84 · score 0.53 · mitochondrial genes, DESeq2, summing, subsets, cell
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 · 970 lines · 31 KB · CC-BY-4.0 · 4 matches
- # %%
- import gc
- import pandas as pd
- import numpy as np
- import scanpy as sc
- import anndata as ad
- import scvi
- import torch
- import anndata
- import copy
- from rich import print
- from scib_metrics.benchmark import Benchmarker
- from scvi.model.utils import mde
- from scvi_colab import install
- #import scrublet as scr
- import matplotlib.pyplot as plt
- import random
- import matplotlib as mpl
- import seaborn as sns
- # Set font
- mpl.rcParams['pdf.fonttype'] = 42
- mpl.rcParams['font.family'] = ['Arial']
- # Check torch
- torch.cuda.is_available()
- # %%
- scvi.settings.seed = 2023
- # %%
- import os
- os.chdir('/data1/Spatial_DCN/')
- # %%
- import gc
- # %%
- # set seed for randomness
- torch.manual_seed(2023)
- random.seed(2023)
- np.random.seed(2023)
- torch.backends.cudnn.deterministic = True
- torch.backends.cudnn.benchmark = False
- # %%
- # plot settings
- title_fs = 16
- axis_label_fs = 14
- axis_tick_fs = 12
- legend_fs = 10
- # %% [markdown]
- # # Import raw data
- # %%
- adata_hc = sc.read_h5ad('Resources/snRNA_samples/HC/HC_matrix/HC_matrix.h5ad')
- adata_cd = sc.read_h5ad('Resources/snRNA_samples/FC/FC_matrix/FC_matrix.h5ad')
- adata_tn = sc.read_h5ad('Resources/snRNA_samples/TN/TN_matrix/TN_matrix.h5ad')
- # %%
- # set same name as Visium
- adata_cd.obs['sample'] = 'CD'
- # %%
- adata_lst = [adata_hc, adata_cd, adata_tn]
- # %%
- samp_lst = ['HC', 'CD', 'TN']
- # %%
- for ad in adata_lst:
- ad.var_names = ad.var['gene_symbols'].astype(str)
- # %%
- for adata in adata_lst:
- adata.var_names_make_unique()
- # %%
- for i in range(3):
- print(f"Number of spots/genes for {samp_lst[i]} sample: {len(adata_lst[i].obs)}/{len(adata_lst[i].var)}")
- # %% [markdown]
- # # Doublet detection
- # %%
- hc_cnt = pd.DataFrame(data=adata_hc.X.toarray(), index=adata_hc.obs_names, columns=adata_hc.var_names)
- cd_cnt = pd.DataFrame(data=adata_cd.X.toarray(), index=adata_cd.obs_names, columns=adata_cd.var_names)
- tn_cnt = pd.DataFrame(data=adata_tn.X.toarray(), index=adata_tn.obs_names, columns=adata_tn.var_names)
- # %%
- hc_scrub = scr.Scrublet(hc_cnt, expected_doublet_rate= 0.008 * 7.6)
- cd_scrub = scr.Scrublet(cd_cnt, expected_doublet_rate= 0.008 * 10.8)
- tn_scrub = scr.Scrublet(tn_cnt, expected_doublet_rate= 0.008 * 7.9)
- # %%
- hc_db_scr, hc_db_pred = hc_scrub.scrub_doublets()
- cd_db_scr, cd_db_pred = cd_scrub.scrub_doublets()
- tn_db_scr, tn_db_pred = tn_scrub.scrub_doublets()
- # %%
- db_scr_lst = [hc_db_scr, cd_db_scr, tn_db_scr]
- db_pred_lst = [hc_db_pred, cd_db_pred, tn_db_pred]
- # %%
- for i in range(3):
- adata_lst[i].obs['doublet_score'] = db_scr_lst[i]
- adata_lst[i].obs['doublet_prediction'] = db_pred_lst[i]
- # %%
- for adata in adata_lst:
- print(len(adata[adata.obs['doublet_prediction'] == True].obs_names))
- # %%
- for i in range(3):
- adata_lst[i] = adata_lst[i][adata_lst[i].obs['doublet_prediction'] == False]
- print(f"Number of spots/genes for {samp_lst[i]} sample: {len(adata_lst[i].obs)}/{len(adata_lst[i].var)}")
- # %% [markdown]
- # # QC
- # %%
- # Basic filtering
- for adata in adata_lst:
- sc.pp.filter_genes(adata, min_cells= 3)
- for i in range(3):
- print(f"Number of spots/genes for {samp_lst[i]} sample: {len(adata_lst[i].obs)}/{len(adata_lst[i].var)}")
- # %%
- for adata in adata_lst:
- adata.var['mt'] = adata.var_names.str.startswith('mt-')
- sc.pp.calculate_qc_metrics(adata, qc_vars=['mt'], percent_top=None, log1p=False, inplace=True)
- # %%
- qc_lst = ['total_counts', 'n_genes_by_counts', 'pct_counts_mt']
- # %%
- concat_data = sc.concat(
- adata_lst,
- label="sample",
- keys=['HC', 'CD', 'TN'],
- index_unique="-",
- join = 'outer'
- )
- # %%
- # Plot QC parameters before QC
- fig, axes = plt.subplots(nrows = 3, ncols = 1, figsize= (14,10))
- for i in range(3):
- ax = sc.pl.violin(concat_data, keys = qc_lst[i], jitter = 0.4, show = False, groupby = 'sample', xlabel = None, size = 1, ylabel = '', ax= axes[i])
- ax.spines['right'].set_visible(False)
- ax.spines['top'].set_visible(False)
- ax.tick_params(axis='both', which='major', labelsize= axis_tick_fs)
- ax.grid(False)
- ax.set_title(f'{qc_lst[i]}', fontsize = title_fs)
- plt.subplots_adjust(hspace = 0.4)
- plt.savefig('Figures/20231019_res/vlnplot_beforeqc_aftrdbremove_allqcmetrics_3snrna_20231104.pdf', bbox_inches = 'tight')
- # %%
- # Spot filtering
- max_gene = 8000
- min_gene = 200
- max_count = 60000
- max_mito = 20
- for adata in adata_lst:
- sc.pp.filter_cells(adata, max_counts=max_count)
- sc.pp.filter_cells(adata, min_genes= min_gene)
- sc.pp.filter_cells(adata, max_genes= max_gene)
- for i in range(3):
- adata = adata_lst[i]
- adata = adata[adata.obs['pct_counts_mt'] < max_mito, ~(adata.var_names == "Gm42418")]
- adata_lst[i] = adata
- for i in range(3):
- print(f"Number of spots/genes for {samp_lst[i]} sample: {len(adata_lst[i].obs)}/{len(adata_lst[i].var)}")
- # %%
- concat_data = sc.concat(
- adata_lst,
- label="sample",
- keys=['HC', 'CD', 'TN'],
- index_unique="-",
- join = 'outer'
- )
- concat_data
- # 24735 spots, 23362 genes
- # 24303 spots, 23267 genes
- # %%
- # Plot QC parameters before QC
- fig, axes = plt.subplots(nrows = 3, ncols = 1, figsize= (14,10))
- for i in range(3):
- ax = sc.pl.violin(concat_data, keys = qc_lst[i], jitter = 0.4, show = False, groupby = 'sample', xlabel = None, size = 1, ylabel = '', ax= axes[i])
- ax.spines['right'].set_visible(False)
- ax.spines['top'].set_visible(False)
- ax.tick_params(axis='both', which='major', labelsize= axis_tick_fs)
- ax.grid(False)
- ax.set_title(f'{qc_lst[i]}', fontsize = title_fs)
- plt.subplots_adjust(hspace = 0.4)
- plt.savefig('Figures/20231019_res/vlnplot_afterqc_aftrdbremove_allqcmetrics_3snrna_20231104.pdf', bbox_inches = 'tight')
- # %%
- # save raw count
- concat_data.write_h5ad('Tables/Data/snrna_dcn_3samples_int_afterdoubletrm_rawcount_outerjoin_20231104.h5ad')
- # %%
- #concat_data = sc.read_h5ad('Tables/Tables/h5ad_data/snrna_dcn_3samples_int_afterdoubletrm_rawcount_outerjoin_20230831.h5ad')
- # %%
- concat_data.layers["counts"] = concat_data.X.copy()
- # %% [markdown]
- # # Normalize data
- # %%
- sc.pp.normalize_total(concat_data)
- sc.pp.log1p(concat_data)
- # %%
- concat_data.raw = concat_data
- # %% [markdown]
- # # SCVI analysis
- # %%
- # Selecting highly variable genes
- sc.pp.highly_variable_genes(
- concat_data,
- flavor="seurat_v3",
- n_top_genes=2000,
- layer="counts",
- batch_key="sample",
- subset=True,
- )
- # %%
- TF_CPP_MIN_LOG_LEVEL=0
- # %%
- scvi.model.SCVI.setup_anndata(concat_data, layer="counts", batch_key="sample")
- # %%
- vae = scvi.model.SCVI(concat_data, n_layers=2, n_latent=30, gene_likelihood="nb")
- vae.train()
- # %%
- SCVI_LATENT_KEY = "X_scVI"
- concat_data.obsm[SCVI_LATENT_KEY] = vae.get_latent_representation()
- # %%
- # Clustering
- sc.pp.neighbors(concat_data, use_rep="X_scVI")
- # %%
- sc.tl.leiden(concat_data, resolution = 0.3, key_added = 'leiden_0.3')
- sc.tl.leiden(concat_data, resolution = 0.4, key_added = 'leiden_0.4')
- sc.tl.leiden(concat_data, resolution = 0.5, key_added = 'leiden_0.5')
- sc.tl.leiden(concat_data, resolution = 0.6, key_added = 'leiden_0.6')
- sc.tl.leiden(concat_data, resolution = 0.7, key_added = 'leiden_0.7')
- sc.tl.leiden(concat_data, resolution = 0.8, key_added = 'leiden_0.8')
- sc.tl.leiden(concat_data, resolution = 0.9, key_added = 'leiden_0.9')
- sc.tl.leiden(concat_data, resolution = 1, key_added = 'leiden_1.0')
- sc.tl.leiden(concat_data, resolution = 1.1, key_added = 'leiden_1.1')
- sc.tl.leiden(concat_data, resolution = 1.2, key_added = 'leiden_1.2')
- sc.tl.leiden(concat_data, resolution = 1.3, key_added = 'leiden_1.3')
- sc.tl.leiden(concat_data, resolution = 1.4, key_added = 'leiden_1.4')
- sc.tl.leiden(concat_data, resolution = 1.5, key_added = 'leiden_1.5')
- # %%
- sc.tl.umap(concat_data)
- # %% [markdown]
- # ## Plotting
- # %% [markdown]
- # ### Plot doublet prediction
- # This process is conducted after doublet detection, and before removing doublet.
- # %%
- concat_data.obs['doublet_prediction'] = concat_data.obs['doublet_prediction'].astype('category')
- # %%
- concat_data[concat_data.obs['doublet_prediction'] == False].obs.value_counts('sample')
- # %%
- # Check doublet
- mpl.rcParams['figure.figsize'] = (7,6)
- ax = sc.pl.umap(concat_data, color = ['doublet_prediction'], show = False,legend_fontsize = legend_fs, size = 10, sort_order = False)
- ax.title.set_fontsize(title_fs)
- ax.xaxis.label.set_fontsize(axis_label_fs)
- ax.yaxis.label.set_fontsize(axis_label_fs)
- plt.savefig('Figures/20231019_res/umap_snrna_3samples_sample_doubletprediction_outerjoin_20231104.pdf', bbox_inches = 'tight')
- # %% [markdown]
- # ### Plotting UMAP
- # %%
- mpl.rcParams['figure.figsize'] = (5,5)
- ax = sc.pl.umap(concat_data, color = ['leiden_0.4','leiden_0.5', 'leiden_0.6', 'leiden_0.7', 'leiden_0.8', 'leiden_0.9', 'leiden_1.0',], ncols = 3, show = False, legend_fontsize = legend_fs, size = 10, sort_order = False,
- legend_loc = 'on data')
- for sp in ax:
- sp.title.set_fontsize(title_fs)
- sp.xaxis.label.set_fontsize(axis_label_fs)
- sp.yaxis.label.set_fontsize(axis_label_fs)
- #plt.savefig('Figures/20230827_res/umap_snrna_3samples_rmdoublets_sample_leiden_multirestest_outerjoin_20230831.pdf', bbox_inches = 'tight')
- # %%
- concat_data.obs['leiden'] = concat_data.obs['leiden_1.0'].astype('category')
- # %%
- mpl.rcParams['figure.figsize'] = (5.2,5)
- ax = sc.pl.umap(concat_data, color = ['leiden'], show = False, legend_fontsize = legend_fs, size = 10, sort_order = False,
- wspace = 0.25, legend_loc = 'on data')
- ax.title.set_fontsize(title_fs)
- ax.xaxis.label.set_fontsize(axis_label_fs)
- ax.yaxis.label.set_fontsize(axis_label_fs)
- plt.savefig('Figures/20231019_res/umap_snrna_3samples_leiden1.0_20231104.pdf', bbox_inches = 'tight')
- # %%
- pd.crosstab(concat_data.obs['leiden'], concat_data.obs['sample'])
- # %%
- # violin plot of QC metrics for each leiden cluster
- fig, axes = plt.subplots(nrows = 3, ncols = 1, figsize= (14,10))
- for i in range(3):
- ax = sc.pl.violin(concat_data, keys = qc_lst[i], jitter = 0.4, show = False, groupby = 'leiden', xlabel = None, size = 1, ylabel = '', ax= axes[i])
- ax.spines['right'].set_visible(False)
- ax.spines['top'].set_visible(False)
- ax.tick_params(axis='both', which='major', labelsize= axis_tick_fs)
- ax.grid(False)
- ax.set_title(f'{qc_lst[i]}', fontsize = title_fs)
- plt.subplots_adjust(hspace = 0.4)
- plt.savefig('Figures/20231019_res/vlnplot_allqcmetrics_byleiden_res0.8_3snrna_20231104.pdf', bbox_inches = 'tight')
- # %%
- # plot UMAP based on QC metrics
- mpl.rcParams['figure.figsize'] = (5,5)
- ax = sc.pl.umap(concat_data, color = qc_lst, size = 15, show = False, legend_fontsize= legend_fs,legend_loc = 'on data')
- for sp in ax:
- sp.title.set_fontsize(title_fs)
- sp.xaxis.label.set_fontsize(axis_label_fs)
- sp.yaxis.label.set_fontsize(axis_label_fs)
- plt.savefig('Figures/20231019_res/umap_leiden_qccriteria_res1.0_20231104.pdf', bbox_inches= 'tight')
- # %%
- # Plot each samples individually
- fig, axs = plt.subplots(ncols = 3, nrows = 1, figsize = (12,3.5))
- sc.pl.umap(concat_data[concat_data.obs['sample'] == 'HC',], color="leiden_1.0", size = 10,legend_loc= None,
- title = 'HC', show = False, ax = axs[0])
- sc.pl.umap(concat_data[concat_data.obs['sample'] == 'CD',], color="leiden_1.0", size = 10,legend_loc= None,
- title = 'CD', show = False, ax = axs[1])
- sc.pl.umap(concat_data[concat_data.obs['sample'] == 'TN',], color="leiden_1.0", size = 10,legend_loc= None,
- title = 'TN', show = False, ax = axs[2])
- for subplot in axs:
- subplot.set_xlabel(subplot.get_xlabel(), fontsize= axis_label_fs)
- subplot.set_ylabel(subplot.get_ylabel(), fontsize= axis_label_fs)
- subplot.set_title(subplot.get_title(), fontsize = title_fs)
- plt.savefig("Figures/20231019_res/umap_3samples_snrna_rmdoublets_scviclusters_splitsample_outerjoin_20231104.pdf", bbox_inches = 'tight')
- # %%
- concat_data.obs['leiden'].value_counts()
- # %%
- # remove cluster 26 due to low nuclei count
- concat_data = concat_data[~(concat_data.obs['leiden'] == '26')].copy()
- # %%
- # export data
- concat_data.write_h5ad('Tables/Data/snrna_dcn_3samples_rmdoublet_intscvi_res1.0_20231104.h5ad')
- # %%
- #concat_data = sc.read_h5ad('Tables/Data/snrna_dcn_3samples_rmdoublet_intscvi_res1.0_20231104.h5ad')
- # %% [markdown]
- # # Find markers of each cluster (for annotation)
- # %%
- concat_data = concat_data.raw.to_adata()
- # %%
- concat_data
- # 24303 cells, 23267 genes
- # %%
- raw_adata = sc.read_h5ad('Tables/Data/snrna_dcn_3samples_int_afterdoubletrm_rawcount_outerjoin_20231104.h5ad')
- # %%
- concat_data.layers['counts'] = raw_adata.X.copy()
- # %%
- sc.tl.rank_genes_groups(concat_data, groupby = 'leiden', pts = True, method = 'wilcoxon')
- # %%
- markers_df = sc.get.rank_genes_groups_df(concat_data, group = None)
- # %%
- markers_df.to_csv('Tables/snrna_3samples_resolution1.0_markergenes_df_testwilcox_20231116.csv')
- # %% [markdown]
- # # Annotation using marker genes
- # %%
- concat_data.obs['cell_type'] = ''
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['0','1','6','15'])] = 'Oligodendrocyte'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['2','4', '24'])] = 'Granule_cell'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['3','8'])] = 'Astrocyte'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['5','9', '14', '19', '20', '23'])] = 'Inh_DCN'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['7', '12'])] = 'Exc_DCN'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['10'])] = 'OPC'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['11'])] = 'Microglia'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['13','22'])] = 'Vascular_cell'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['16'])] = 'Ependymal_cell'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['17'])] = 'Bergmanns_glia'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['18'])] = 'Endothelial_cell'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['21'])] = 'UBC'
- #concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['24'])] = 'Granule_cell_TN'
- concat_data.obs['cell_type'][concat_data.obs['leiden'].isin(['25'])] = 'Purkinje'
- # %%
- concat_data.obs['cell_type'] = concat_data.obs['cell_type'].astype('category')
- # %%
- concat_data.obs['cell_type'].value_counts()
- # %%
- concat_data.write_h5ad('Tables/Data/snrna_dcn_3samples_rmdoublet_res1.0_afterannot_20231104.h5ad')
- # %%
- concat_data = sc.read_h5ad('Tables/Data/snrna_dcn_3samples_rmdoublet_res1.0_afterannot_20231104.h5ad')
- # %%
- concat_data.X = concat_data.layers['counts'].copy()
- concat_data.write_h5ad('Tables/Data/snrna_dcn_3samples_res1.0_afterannot_rawcnts_20240214.h5ad')
- # %%
- cnt_data = sc.read_h5ad('Tables/Data/snrna_dcn_3samples_res1.0_afterannot_rawcnts_20240214.h5ad')
- # %%
- cnt_data.obs.to_csv('Tables/Data/snrna_metadata.csv')
- # %%
- df = pd.DataFrame(cnt_data.X.toarray(), index=cnt_data.obs_names, columns=cnt_data.var_names)
- # Save the DataFrame to a CSV file
- df.to_csv('Tables/Data/snrna_onlycnt_mtx.csv')
- # %%
- mpl.rcParams['figure.figsize'] = (6.5,5.5)
- ax = sc.pl.umap(concat_data, color = ['leiden','cell_type'], size = 15, show = False, legend_fontsize= legend_fs,legend_loc = 'on data')
- for sp in ax:
- sp.title.set_fontsize(title_fs)
- sp.xaxis.label.set_fontsize(axis_label_fs)
- sp.yaxis.label.set_fontsize(axis_label_fs)
- plt.savefig('Figures/20231019_res/umap_leiden_celltype_colors_res1.0_20231104.pdf', bbox_inches= 'tight')
- # %%
- mpl.rcParams['figure.figsize'] = (6.5,5.5)
- ax = sc.pl.umap(concat_data, color = ['leiden','cell_type'], size = 15, show = False, legend_fontsize= legend_fs,legend_loc = 'on data')
- for sp in ax:
- sp.title.set_fontsize(title_fs)
- sp.xaxis.label.set_fontsize(axis_label_fs)
- sp.yaxis.label.set_fontsize(axis_label_fs)
- plt.savefig('Figures/20240604_res/umap_leiden_celltype_colors_res1.0_20240714.pdf', bbox_inches= 'tight')
- # %% [markdown]
- # ## Check marker genes of cell types
- # %%
- concat_data
- # %%
- hc_data = concat_data[concat_data.obs['sample'] == 'HC'].copy()
- hc_data
- # %%
- concat_data.uns['cell_type_colors']
- # %%
- hc_data.uns['cell_type_colors']
- # %%
- np.max(hc_data.X)
- # %%
- plt.rcParams['figure.figsize'] = (10,4.5)
- sc.pl.violin(hc_data, keys=['Eef1a2'], groupby='cell_type',
- #palette = ['#1f77b4', '#aa40fc', '#e377c2', '#b5bd61','#17becf', '#aec7e8'],
- show = False)
- plt.title('Eef1a2 expression in homecage (baseline)', size = title_fs)
- plt.gca().xaxis.label.set_fontsize(axis_label_fs)
- plt.gca().yaxis.label.set_fontsize(axis_label_fs)
- plt.tick_params(axis='both', which='major', labelsize= axis_tick_fs)
- plt.xticks(rotation = 15)
- plt.savefig('Figures/20240604_res/vlnplot_hc_eef1a2_expr_percelltype_all_20240715.pdf', bbox_inches = 'tight')
- # %%
- sc.tl.rank_genes_groups(hc_data, groupby = 'cell_type', pts = True, method = 'wilcoxon', key_added = 'celltype_markers')
- markers_df_hc = sc.get.rank_genes_groups_df(hc_data, group = None, key = 'celltype_markers')
- # %%
- markers_df.to_csv('Tables/snrna_3samples_celltype_markergenes_df_testwilcox_20231104.csv')
- # %%
- concat_data.obs['cell_type'] = pd.Categorical(concat_data.obs['cell_type'], categories = ['Astrocyte', 'Bergmanns_glia', 'Endothelial_cell', 'Ependymal_cell',
- 'Granule_cell', 'Granule_cell_TN', 'Exc_DCN', 'Inh_DCN','Microglia',
- 'OPC', 'Oligodendrocyte','Purkinje', 'UBC', 'Vascular_cell'], ordered = True)
- # %%
- sc.pl.stacked_violin(concat_data, groupby = 'cell_type', var_names = ['Aldoc', 'Gdf10', 'Cldn5', 'Foxj1', 'Gabra6', 'Slc17a6', 'Gad2', 'Tmem119', 'Pdgfra','Plp1', 'Pcp2',
- 'Eomes', 'Vtn'], swap_axes = True, show = False,figsize = (10,10),
- save = 'celltype_markers_20231104.pdf'
- )
- # %%
- markers_df_hc[(markers_df_hc['names'] == 'Eef1a2')].sort_values('logfoldchanges', ascending = False)
- # %%
- pd.crosstab(concat_data.obs['sample'], concat_data.obs['cell_type'])
- # %% [markdown]
- # # Subset and reclustering of DCN inhibitory neurons
- # %%
- concat_data = sc.read_h5ad('Tables/Data/snrna_dcn_3samples_rmdoublet_res1.0_afterannot_20231104.h5ad')
- # %%
- adata_inh = concat_data[concat_data.obs['cell_type'].isin(['Inh_DCN'])].copy()
- # %%
- adata_inh.X = adata_inh.layers['counts'].copy()
- # %%
- adata_inh
- # 2032 cells, 23267 genes
- # %% [markdown]
- # ## QC
- # %%
- inh_lst = []
- for samp in samp_lst:
- adata = adata_inh[adata_inh.obs['sample'] == samp].copy()
- inh_lst.append(adata)
- # %%
- for adata in inh_lst:
- sc.pp.filter_genes(adata, min_cells = 3)
- # %%
- inh_lst
- # %%
- adata_inh = sc.concat(
- inh_lst,
- join = 'outer'
- )
- # %%
- adata_inh
- # 2032 nuclei, 18842 genes
- # %% [markdown]
- # ## Normalize
- # %%
- sc.pp.normalize_total(adata_inh)
- sc.pp.log1p(adata_inh)
- adata_inh.raw = adata_inh
- # %% [markdown]
- # ## Run SCVI
- # %%
- # Selecting highly variable genes
- sc.pp.highly_variable_genes(
- adata_inh,
- flavor="seurat_v3",
- n_top_genes=2000,
- layer="counts",
- batch_key="sample",
- subset=True,
- )
- TF_CPP_MIN_LOG_LEVEL=0
- scvi.model.SCVI.setup_anndata(adata_inh, layer="counts", batch_key="sample")
- vae_dcn = scvi.model.SCVI(adata_inh, n_layers=2, n_latent=30, gene_likelihood="nb")
- vae_dcn.train()
- # %%
- SCVI_LATENT_KEY = "X_scVI"
- adata_inh.obsm[SCVI_LATENT_KEY] = vae_dcn.get_latent_representation()
- # %%
- # Clustering
- sc.pp.neighbors(adata_inh, use_rep="X_scVI", n_pcs = 20)
- # %%
- sc.tl.umap(adata_inh)
- # %%
- sc.tl.leiden(adata_inh, resolution = 0.3, key_added = 'leiden_0.3')
- sc.tl.leiden(adata_inh, resolution = 0.4, key_added = 'leiden_0.4')
- sc.tl.leiden(adata_inh, resolution = 0.5, key_added = 'leiden_0.5')
- sc.tl.leiden(adata_inh, resolution = 0.6, key_added = 'leiden_0.6')
- sc.tl.leiden(adata_inh, resolution = 0.7, key_added = 'leiden_0.7')
- sc.tl.leiden(adata_inh, resolution = 0.8, key_added = 'leiden_0.8')
- sc.tl.leiden(adata_inh, resolution = 0.9, key_added = 'leiden_0.9')
- sc.tl.leiden(adata_inh, resolution = 1, key_added = 'leiden_1.0')
- sc.tl.leiden(adata_inh, resolution = 1.1, key_added = 'leiden_1.1')
- sc.tl.leiden(adata_inh, resolution = 1.2, key_added = 'leiden_1.2')
- sc.tl.leiden(adata_inh, resolution = 1.3, key_added = 'leiden_1.3')
- sc.tl.leiden(adata_inh, resolution = 1.4, key_added = 'leiden_1.4')
- sc.tl.leiden(adata_inh, resolution = 1.5, key_added = 'leiden_1.5')
- sc.tl.leiden(adata_inh, resolution = 1.6, key_added = 'leiden_1.6')
- sc.tl.leiden(adata_inh, resolution = 1.7, key_added = 'leiden_1.7')
- sc.tl.leiden(adata_inh, resolution = 1.8, key_added = 'leiden_1.8')
- sc.tl.leiden(adata_inh, resolution = 1.9, key_added = 'leiden_1.9')
- sc.tl.leiden(adata_inh, resolution = 2.0, key_added = 'leiden_2.0')
- # %%
- sc.pl.umap(adata_inh, color = 'leiden_1.0')
- # %%
- plt.rcParams['figure.figsize'] = (12,8)
- sc.pl.umap(adata_inh, color=["leiden_0.3", "leiden_0.5", "leiden_0.6", "leiden_0.7", 'leiden_1.4'], size = 60,ncols = 3, legend_fontsize = legend_fs, show = False,
- wspace = 0.2)
- # %%
- sc.pl.dendrogram(adata_inh, groupby = 'leiden_0.3')
- # %%
- adata_inh.write_h5ad('Tables/Data/snrna_subsetdcn_afterqc_scvi_20231104.h5ad')
- # %%
- #adata_inh = sc.read_h5ad('Tables/Data/snrna_subsetdcn_afterqc_scvi_20231104.h5ad')
- # %%
- adata_inh.X = adata_inh.layers['counts'].copy()
- # %% [markdown]
- # ## Annotating clusters using SCANVI
- # %%
- adata_inh
- # %%
- adata_inh = adata_inh.raw.to_adata()
- # %%
- adata_raw = sc.read_h5ad('Tables/Data/snrna_dcn_3samples_int_afterdoubletrm_rawcount_outerjoin_20231104.h5ad')
- adata_raw_inh = adata_raw[adata_inh.obs_names,adata_inh.var_names]
- # %%
- adata_inh.layers['counts'] = adata_raw_inh.X.copy()
- adata_inh.layers['log1p'] = adata_inh.X.copy()
- adata_inh.X = adata_inh.layers['counts'].copy()
- # %% [markdown]
- # Reference: Kebschull et al., 2021
- # %%
- # Train reference
- adata_ref = sc.read_h5ad('/data1/Spatial_DCN/Resources/kebschull_dcn_rawcounts_anndata.h5ad')
- adata_ref
- # 4605 cells, 53797 genes
- # %%
- adata_ref = adata_ref[adata_ref.obs['final.clusters2'].str.contains('Inh')].copy()
- adata_ref
- # 2363 cells, 53797 genes
- # %%
- adata_ref.layers['counts'] = adata_ref.X.copy()
- # %%
- # Match sample column name to reference
- adata_inh.obs['orig.ident'] = adata_inh.obs['sample']
- # %%
- # concatenate dataset with reference
- merged_data = adata_inh.concatenate(adata_ref)
- # %%
- merged_data
- # 4395 cells, 18020 genes
- # %% [markdown]
- # ### Run SCVI on reference merged dataset
- # %%
- merged_data.layers['counts'] = merged_data.X.copy()
- sc.pp.normalize_total(merged_data, target_sum = 1e4)
- sc.pp.log1p(merged_data)
- merged_data.raw = merged_data
- sc.pp.highly_variable_genes(
- merged_data, n_top_genes=3000, batch_key="orig.ident", subset=True, layer = 'counts', flavor = 'seurat_v3'
- )
- # %%
- TF_CPP_MIN_LOG_LEVEL=0
- # %%
- scvi.model.SCVI.setup_anndata(merged_data, batch_key="orig.ident", layer="counts", categorical_covariate_keys= ['batch'])
- # %%
- vae = scvi.model.SCVI(merged_data)
- vae.train()
- # %%
- # set reference column to project
- merged_data.obs['final.clusters2'] = merged_data.obs['final.clusters2'].cat.add_categories('Unknown')
- merged_data.obs = merged_data.obs.fillna(value = {'final.clusters2': 'Unknown'})
- # %% [markdown]
- # ### train SCANVI
- # %%
- lvae = scvi.model.SCANVI.from_scvi_model(vae, adata = merged_data, unlabeled_category = 'Unknown',labels_key = 'final.clusters2')
- lvae.train(max_epochs = 20, n_samples_per_label = 100)
- # %%
- merged_data.obs['SCANVI_prediction'] = lvae.predict(merged_data)
- # %%
- merged_data.obs['bc2'] = merged_data.obs.index.map(lambda x: x[:-2])
- cell_mapper = dict(zip(merged_data.obs.bc2, merged_data.obs.SCANVI_prediction))
- adata_inh.obs['SCANVI_predicted'] = adata_inh.obs.index.map(cell_mapper)
- # %%
- sc.pl.dendrogram(adata_inh, groupby = 'leiden_0.3')
- # %%
- # Clustering
- #mpl.rcParams['figure.figsize'] = (5.5,5)
- sc.pl.umap(adata_inh, color = ['leiden_0.5','SCANVI_predicted'], wspace = 0.35)
- # %% [markdown]
- # ## Find markers of DCN neuronal celltypes
- # %%
- sc.tl.rank_genes_groups(adata_inh, groupby = 'leiden_0.3', pts = True, method = 'wilcoxon', key_added='leiden_0.3_markers')
- markers_df = sc.get.rank_genes_groups_df(adata_inh, group = None, key='leiden_0.3_markers')
- # %%
- sc.tl.rank_genes_groups(adata_inh, groupby = 'neuronal_celltype', pts = True, method = 'wilcoxon', key_added='celltype_markers')
- markers_df = sc.get.rank_genes_groups_df(adata_inh, group = None, key='celltype_markers')
- # %%
- markers_df[markers_df['names'] == 'Kit'].sort_values(by = 'logfoldchanges', ascending = False)
- # %%
- markers_df[markers_df['names'] == 'Sox14'].sort_values(by = 'logfoldchanges', ascending = False)
- # %%
- marker_df = markers_df.rename(columns={"group": "Neuronal_celltype", "names": "Gene"})
- # %%
- adata_inh.obs['leiden_0.3'].value_counts()
- # %%
- adata_inh = adata_inh[~(adata_inh.obs['leiden_0.3'] == '7')]
- # %%
- # annotate inhibitory neuron cell type
- adata_inh.obs['neuronal_celltype'] = ''
- adata_inh.obs['neuronal_celltype'][adata_inh.obs['leiden_0.3'].isin(['1','2','3'])] = 'Inh_Zfhx4'
- adata_inh.obs['neuronal_celltype'][adata_inh.obs['leiden_0.3'].isin(['0', '4', '6', '8'])] = 'Inh_Kit'
- adata_inh.obs['neuronal_celltype'][adata_inh.obs['leiden_0.3'].isin(['5'])] = 'Inh_Piezo2'
- adata_inh.obs['neuronal_celltype'] = adata_inh.obs['neuronal_celltype'].astype('category')
- # %%
- adata_inh.obs['leiden'] = adata_inh.obs['leiden_0.3'].astype('category')
- # %%
- mpl.rcParams['figure.figsize'] = (5,5)
- ax = sc.pl.umap(adata_inh, color = ['leiden', 'neuronal_celltype'], wspace = 0.24, show = False,
- legend_fontsize= legend_fs, size = 40)
- for sp in ax:
- sp.title.set_fontsize(title_fs)
- sp.xaxis.label.set_fontsize(axis_label_fs)
- sp.yaxis.label.set_fontsize(axis_label_fs)
- plt.savefig('Figures/20240217_res/umap_snrna_onlyinh_color_leiden_ct_20240311.pdf', bbox_inches = 'tight')
- # %%
- figs, axs = plt.subplots(ncols = 1, nrows = 3, figsize = (4.2, 7))
- sc.pl.violin(adata_inh, groupby='neuronal_celltype', keys=['Kit'], ax = axs[0], show = False, size = 0)
- axs[0].set_title('Kit', size = title_fs, x = 0.08)
- sc.pl.violin(adata_inh, groupby='neuronal_celltype', keys=['Piezo2'], ax = axs[1], show = False, size = 0)
- axs[1].set_title('Piezo2', size = title_fs, x = 0.1)
- sc.pl.violin(adata_inh, groupby='neuronal_celltype', keys=['Zfhx4'], ax = axs[2], show = False, size = 0)
- axs[2].set_title('Zfhx4', size = title_fs, x = 0.1)
- for ax in axs:
- ax.title.set_fontsize(title_fs)
- ax.set_xlabel('')
- ax.set_ylabel('')
- ax.tick_params(labelsize=axis_tick_fs)
- plt.subplots_adjust(hspace = 0.4)
- plt.savefig('Figures/20240217_res/vlnplot_inhibitory_celltype_markers_20240507.pdf', bbox_inches = 'tight')
- # %%
- # Plot each samples individually
- fig, axs = plt.subplots(ncols = 3, nrows = 1, figsize = (11.5,3))
- sc.pl.umap(adata_inh[adata_inh.obs['sample'] == 'HC',], color="leiden", size = 35,legend_loc= None,
- title = 'HC', show = False, ax = axs[0])
- sc.pl.umap(adata_inh[adata_inh.obs['sample'] == 'CD',], color="leiden", size = 35,legend_loc= None,
- title = 'CD', show = False, ax = axs[1])
- sc.pl.umap(adata_inh[adata_inh.obs['sample'] == 'TN',], color="leiden", size = 35,legend_loc= None,
- title = 'TN', show = False, ax = axs[2])
- for subplot in axs:
- subplot.set_xlabel(subplot.get_xlabel(), fontsize= axis_label_fs)
- subplot.set_ylabel(subplot.get_ylabel(), fontsize= axis_label_fs)
- subplot.set_title(subplot.get_title(), fontsize = title_fs)
- plt.savefig('Figures/20240217_res/umap_snrna_onlyinh_splitsample_20240311.pdf', bbox_inches = 'tight')
- # %%
- adata_inh.X = adata_inh.layers['log1p'].copy()
- # %%
- # Plot each samples individually
- fig, axs = plt.subplots(ncols = 3, nrows = 1, figsize = (11.5,3))
- sc.pl.umap(adata_inh[adata_inh.obs['sample'] == 'HC',], color="Grm5", size = 35,legend_loc= None,
- title = 'HC', show = False, ax = axs[0], vmax = 3.5)
- sc.pl.umap(adata_inh[adata_inh.obs['sample'] == 'CD',], color="Grm5", size = 35,legend_loc= None,
- title = 'CD', show = False, ax = axs[1])
- sc.pl.umap(adata_inh[adata_inh.obs['sample'] == 'TN',], color="Grm5", size = 35,legend_loc= None,
- title = 'TN', show = False, ax = axs[2], vmax = 3.5)
- for subplot in axs:
- subplot.set_xlabel(subplot.get_xlabel(), fontsize= axis_label_fs)
- subplot.set_ylabel(subplot.get_ylabel(), fontsize= axis_label_fs)
- subplot.set_title(subplot.get_title(), fontsize = title_fs)
- #plt.savefig('Figures/20240217_res/umap_snrna_onlyinh_splitsample_20240311.pdf', bbox_inches = 'tight')
- # %%
- adata_inh.write_h5ad('Tables/Data/snrna_subsetinh_afterannot_20240311.h5ad')
- # %%
- adata_inh = sc.read_h5ad('Tables/Data/snrna_subsetinh_afterannot_20240311.h5ad')
- # %%
- markers_df.to_csv('Tables/3samples_dcn_inh_neurocelltype_markers_20241022.csv')
- # %% [markdown]
- # # Export for MAST
- # %%
- concat_out = concat_data[~(concat_data.obs['cell_type'].isin(['Granule_cell', 'UBC','Purkinje', 'Bergmanns_glia','Ependymal_cell', 'Vascular_cell', 'Endothelial_cell']))].copy()
- #dcn_out = adata_inh[~(adata_inh.obs['neuronal_celltype'] == 'Inhibitory_1_Zfhx4_TN')].copy()
- # %%
- concat_out.obs['cell_type'].unique()
- # %%
- concat_out.X = concat_out.layers['counts'].copy()
- #dcn_out.X = dcn_out.layers['counts'].copy()
- # %%
- sc.pp.normalize_total(concat_out, target_sum=1e6)
- sc.pp.log1p(concat_out)
- #
- #
- # ize_total(dcn_out, target_sum=1e6)
- #sc.pp.log1p(dcn_out)
- # %%
- def prep_anndata(adata_):
- def fix_dtypes(adata_):
- df = pd.DataFrame(adata_.X.A, index=adata_.obs_names, columns=adata_.var_names)
- df = df.join(adata_.obs)
- return sc.AnnData(df[adata_.var_names], obs=df.drop(columns=adata_.var_names))
- adata_ = fix_dtypes(adata_)
- sc.pp.filter_genes(adata_, min_cells=3)
- return adata_
- # %%
- concat_out = prep_anndata(concat_out)
- #dcn_out = prep_anndata(dcn_out)
- # %%
- concat_out
- #17383 cells, 22728 genes
- # %%
- adata_lst = []
- for ct in concat_out.obs['cell_type'].unique():
- adata_ct = concat_out[concat_out.obs['cell_type'] == ct].copy()
- adata_ct = prep_anndata(adata_ct)
- print(f"{ct}: {len(adata_ct.obs)} nucleis, {len(adata_ct.var)} genes")
- adata_lst.append(adata_ct)
- # %%
- inh_out = adata_inh.copy()
- # %%
- inh_out.X = adata_inh.layers['counts'].copy()
- # %%
- def prep_anndata(adata_):
- def fix_dtypes(adata_):
- df = pd.DataFrame(adata_.X.A, index=adata_.obs_names, columns=adata_.var_names)
- df = df.join(adata_.obs)
- return sc.AnnData(df[adata_.var_names], obs=df.drop(columns=adata_.var_names))
- adata_ = fix_dtypes(adata_)
- sc.pp.filter_genes(adata_, min_cells=3)
- return adata_
- # %%
- adata_lst = []
- for ct in inh_out.obs['neuronal_celltype'].unique():
- adata_ct = inh_out[inh_out.obs['neuronal_celltype'] == ct].copy()
- sc.pp.normalize_total(adata_ct, target_sum=1e6)
- sc.pp.log1p(adata_ct)
- adata_ct = prep_anndata(adata_ct)
- print(f"{ct}: {len(adata_ct.obs)} nucleis, {len(adata_ct.var)} genes")
- adata_lst.append(adata_ct)
- # %%
- for ad in adata_lst:
- ad.write_h5ad(f"Tables/Data/MAST_adatas/adata_{ad.obs['neuronal_celltype'][0]}_forMAST_analysis_20240311.h5ad")
- # %%
- np.max(adata_lst[0].X)
preprocess_annotate_snrna.ipynb, under CC-BY-4.0 · at the source
Overview
- Department of Integrated Biomedical and Life Science, Korea University,Seoul, Republic of Korea
- BK21FOUR R&E Center for Learning Health Systems, Korea University,Seoul, Republic of Korea
- Department of Physiology, Seoul National University College of Medicine,Seoul, Republic of Korea
- Department of Biomedical Science, Seoul National University College of Medicine,Seoul, Republic of Korea
- School of Biosystems and Biomedical Sciences, College of Health Sciences, Korea University,Seoul, Republic of Korea
- Department of Neuroscience and Pharmacology, Iowa Neuroscience Institute, University of Iowa,Iowa City, IA USA
- Department of Neuroscience, Johns Hopkins University,Baltimore, MD USA
- Neuroscience Research Institute, Seoul National Medical Research Center, Seoul, Republic of Korea
- Wide River Institute of Immunology, Seoul National University,Hongcheon, Republic of Korea
- Convergence Dementia Research Center, Medical Research Center, Seoul National University,Seoul, Republic of Korea
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above, with 17 matches between paragraphs and lines of code.
Zenodo 15335138
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
13 files
- Codes/
Analysis/ , Jupyter, 746 lines, 1 matchannotation_cell2location .ipynb - Codes/
Analysis/ , Jupyter, 199 linescreate_pseudobulk.ipynb - Codes/
Analysis/ , Jupyter, 970 lines, 4 matchespreprocess_annotate_snrn a.ipynb - Codes/
Analysis/ , Jupyter, 384 linespreprocess_scvi.ipynb - Codes/
Analysis/ , R, 407 lines, 2 matchespySCENIC_downstream.R - Codes/
Analysis/ , R, 1,642 lines, 2 matchessnrna_MAST.R - Codes/
Analysis/ , R, 725 lines, 3 matchesspatial_pseudobulk_deseq .R - Codes/
Analysis/ , Jupyter, 120 lines, 1 matchspatialclustering_squidp y.ipynb - Codes/
Figure/ , R, 126 linesFigure1.R - Codes/
Figure/ , R, 470 lines, 1 matchFigure2.R - Codes/
Figure/ , R, 523 linesFigure4.R - Codes/
Figure/ , R, 548 lines, 1 matchFigure5.R - Codes/
Figure/ , R, 301 lines, 2 matchesFigure6.R
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: Zenodo 15335138
Read it in the paper: doi.org/10.1038/s42003-026-10034-0.
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:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 13 scripts, each with its path and the digest of its content;
- 17 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.
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: Zenodo 15335138
Read it in the paper: doi.org/10.1038/s42003-026-10034-0.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 2 keywords, 10 MeSH terms, 2 funders, 86 references.
Cite
This paper
Ji, J., Baek, J., Hwang, K.-D., Choi, S., Kasuya, J., Roh, S.-E., Kim, S. J., Abel, T., An, J.-Y., & Lee, Y.-S. (2026). Region- and cell type-specific changes in gene expression in the cerebellum after classical fear conditioning. Communications biology, 9(1), 878. https://
BibTeX
@article{ji2026region,
author = {Ji, Jungeun and Baek, Jinhee and Hwang, Kyoung-Doo and Choi, Seunghwan and Kasuya, Junko and Roh, Seung-Eon and Kim, Sang Jeong and Abel, Ted and An, Joon-Yong and Lee, Yong-Seok},
title = {{Region- and cell type-specific changes in gene expression in the cerebellum after classical fear conditioning}},
journal = {Communications biology},
year = {2026},
month = apr,
volume = {9},
number = {1},
pages = {878},
publisher = {Nature Publishing Group},
issn = {2399-3642},
doi = {10.1038/
url = {https://
pmid = {42032255},
pmcid = {PMC13319209}
}
RIS
TY - JOUR
AU - Ji, Jungeun
AU - Baek, Jinhee
AU - Hwang, Kyoung-Doo
AU - Choi, Seunghwan
AU - Kasuya, Junko
AU - Roh, Seung-Eon
AU - Kim, Sang Jeong
AU - Abel, Ted
AU - An, Joon-Yong
AU - Lee, Yong-Seok
TI - Region- and cell type-specific changes in gene expression in the cerebellum after classical fear conditioning
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/
VL - 9
IS - 1
SP - 878
SN - 2399-3642
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Region- and cell type-specific changes in gene expression in the cerebellum after classical fear conditioning",
"container-title": "Communications biology",
"author": [
{
"family": "Ji",
"given": "Jungeun"
},
{
"family": "Baek",
"given": "Jinhee"
},
{
"family": "Hwang",
"given": "Kyoung-Doo"
},
{
"family": "Choi",
"given": "Seunghwan"
},
{
"family": "Kasuya",
"given": "Junko"
},
{
"family": "Roh",
"given": "Seung-Eon"
},
{
"family": "Kim",
"given": "Sang Jeong"
},
{
"family": "Abel",
"given": "Ted"
},
{
"family": "An",
"given": "Joon-Yong"
},
{
"family": "Lee",
"given": "Yong-Seok"
}
],
"container-title-short":
"volume": "9",
"issue": "1",
"page": "878",
"DOI": "10.1038/
"PMID": "42032255",
"PMCID": "PMC13319209",
"ISSN": "2399-3642",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
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.1016/j.xcrm.2026.102766 [code]
- A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.Journal: Cell reports. MedicineIn common: SingleCellExperiment, limma, anndata, 17 other tools, genetics / omics, cellular / molecular, 5 references
- [2] doi:10.1038/s41586-026-10629-x [code]
- Whole-genome duplication shaped cell-type evolution in the vertebrate brain.Journal: NatureIn common: reticulate, rstatix, anndata, 16 other tools, genetics / omics, mouse, cellular / molecular, 4 references
- [3] doi:10.1186/s13059-026-04177-w [code]
- Genomic sequence evolution underlying human neocortical interareal diversification.Journal: Genome biologyIn common: Squidpy, reticulate, rstatix, 15 other tools, genetics / omics, mouse, cellular / molecular, 4 references
- [4] doi:10.1038/s41586-026-10214-2 [code]
- Multidimensional profiling of heterogeneity in supratentorial ependymomas.Journal: NatureIn common: Squidpy, SingleCellExperiment, reticulate, 18 other tools, genetics / omics, mouse
- [5] doi:10.1002/imt2.70163 [code]
- Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.Journal: iMetaIn common: SingleCellExperiment, limma, rstatix, 18 other tools, genetics / omics, mouse, cellular / molecular
- [6] doi:10.1016/j.celrep.2026.117073 [code]
- Single-cell epigenomics uncovers heterochromatin instability and transcription factor dysfunction during mouse brain aging.Journal: Cell reportsIn common: reticulate, anndata, DESeq2, 14 other tools, genetics / omics, mouse, cellular / molecular, 6 references
- [7] doi:10.1038/s41467-026-71803-3 [code]
- Charting the transition from in vitro gliogenesis to the in vivo maturation of human glial progenitor cells transplanted into the hypomyelinated mouse brain.Journal: Nature communicationsIn common: Squidpy, reticulate, anndata, 14 other tools, genetics / omics, mouse, cellular / molecular, 4 references
- [8] doi:10.1016/j.cpblue.2026.100007 [code]
- An integrated single-cell and spatial proteotranscriptomics atlas of fibroblast-driven immunoregulation within the human adult oral cavity.Journal: Cell press blueIn common: SingleCellExperiment, reticulate, limma, 17 other tools, 1 reference
- [9] doi:10.1371/journal.pcbi.1014327 [code]
- Supervised deep learning with gene functional annotation for cell classification.Journal: PLoS computational biologyIn common: SingleCellExperiment, reticulate, limma, 16 other tools, genetics / omics, cellular / molecular, 1 reference
- [10] doi:10.1038/s41467-026-71525-6 [code]
- Single-nucleus brain transcriptomics reveals microglia dysfunction in multiple system atrophy.Journal: Nature communicationsIn common: rstatix, anndata, circlize, 15 other tools, genetics / omics, cellular / molecular, 2 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: 1 repository of the authors' code, each at its verified commit and with its license, 13 scripts, and 17 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:c4177080e09c66f0…
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
[.
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.
