OSCR

Parallel cholinergic circuit in oculomotor nucleus to control eye movements and REM sleep.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 2 matches
  1. [1] § Methods › Calcium imaging and analysis ↔ Fig4. Network_analysis1.ipynb, lines 190–248 · score 0.64 · correlation coefficient matrix, linkage, cluster, node, network
  2. [2] § Results › Functionally distinct nIIIChAT subnetworks ↔ Fig4. Network_analysis1.ipynb, lines 190–248 · score 0.53 · correlation coefficient matrices, Ward, linkage, clustering, peak, network

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 · 697 lines · 30 KB · MIT · 2 matches

  1. # %%
  2. import numpy as np
  3. import pandas as pd
  4. import matplotlib.pyplot as plt
  5. import matplotlib
  6. import seaborn as sns
  7. from itertools import groupby
  8. from operator import itemgetter
  9. import networkx as nx
  10. from scipy.sparse import csr_matrix
  11. from sklearn.metrics.pairwise import cosine_similarity
  12. import os
  13. from scipy.cluster.hierarchy import linkage, fcluster, dendrogram, optimal_leaf_ordering
  14. from scipy.stats import mode
  15. import warnings
  16. import sys
  17. sys.path.insert(0, r'..\tools')
  18. from zscore import zscore
  19. from smooth import smooth,ins_smooth
  20. from color_convert import color_convert_plt
  21. from raster_plot import raster_plot
  22. from color_convert import color_convert_plt
  23. from matplotlib_venn import venn3,venn2
  24. # %%
  25. path=r'.\rawdata\network_analysis'
  26. REM_active=pd.read_excel(path+'\\REM_activeNeurons.xlsx')
  27. REM_active_cellname=REM_active.cell_name2
  28. is_save='no'
  29. EM_active=pd.read_excel(path+'\\em_define.xlsx')
  30. EM_positive=EM_active.cell_name[EM_active.rem_em==1]
  31. EM_negative=EM_active.cell_name[EM_active.rem_em==-1]
  32. EM_po_ne_cellname=EM_active.cell_name[EM_active.rem_em!=0]
  33. EM_po_inREM=EM_positive[np.isin(EM_positive,REM_active_cellname)]
  34. EM_ne_inREM=EM_negative[np.isin(EM_negative,REM_active_cellname)]
  35. EM_po_ne_inREM=EM_po_ne_cellname[np.isin(EM_po_ne_cellname,REM_active_cellname)]
  36. ###取REM active和EM active细胞的并集
  37. union_series = pd.concat([REM_active_cellname, EM_po_ne_cellname]).drop_duplicates().reset_index(drop=True)
  38. print(f'REM active cell number: {len(REM_active_cellname)},number of union: {len(union_series)}')
  39. # %%
  40. ###读取每个细胞眼动的数据
  41. root_EM=r'.\rawdata\out_put\Ca_acrossStage'
  42. df=pd.read_csv(root_EM+'\\R-matrix.csv',index_col='cell_name')
  43. df_arr=df[np.isin(df.index,EM_po_ne_cellname)]
  44. f, ax1 = plt.subplots(figsize=(8, 5), nrows=1)
  45. sns.heatmap(np.array(df_arr), yticklabels = df_arr.index, ax=ax1, vmax=5, vmin=-5, cmap='bwr') ##
  46. plt.show()
  47. # %%
  48. ###计算不同REM episode持续时间下细胞响应的比例
  49. def median(data):
  50. sorted_data=sorted(data)
  51. half = len(data) // 2
  52. meadia_data=(sorted_data[half]+sorted_data[half+1])/2
  53. return meadia_data
  54. if __name__ == '__main__':
  55. path=r'.\process_data'
  56. new_path=r'.\rawdata\network_analysis'
  57. file_list=[i for i in os.listdir(path) if i.startswith('Ca')]
  58. cell_info=pd.read_excel(path+'\\sleep_define.xlsx',index_col=0)
  59. all_cell={'cell_name':[],'cell':[]}
  60. is_save='yes'
  61. print(cell_info.sleep_ID[cell_info.index])
  62. max_epoch=15
  63. ###这一段代码目前用不上
  64. average_Ca=pd.read_excel(path+'\\stages_average_bystates.xlsx',index_col=0)
  65. thre=average_Ca.apply(lambda x:median(x),axis=0)
  66. thre={'0':thre['wake_activity'],'5':thre['nrem_activity'],'10':thre['rem_activity']}
  67. for file in file_list:
  68. prefix=file[2:]
  69. ##睡眠状态
  70. stage=pd.read_csv(path+f'\\Stage{prefix}',sep=',').Stage
  71. Ca_data=pd.read_csv(path+f'\\{file}',sep=',')
  72. episodes= {'0':[],'5':[],'10':[]}
  73. wake_index=[x[0] for x in enumerate(stage) if x[1]==0]
  74. nrem_index=[x[0] for x in enumerate(stage) if x[1]==5]
  75. rem_index=[x[0] for x in enumerate(stage) if x[1]==10]
  76. # print(f"W_index:{wake_index}")
  77. for k, g in groupby(enumerate(wake_index),lambda x:x[0]-x[1]):
  78. group=list(map(itemgetter(1), g))
  79. episodes['0'].append((group[0], group[-1]+1))
  80. for k, g in groupby(enumerate(nrem_index),lambda x:x[0]-x[1]):
  81. group=list(map(itemgetter(1), g))
  82. episodes['5'].append((group[0], group[-1]+1))
  83. for k, g in groupby(enumerate(rem_index),lambda x:x[0]-x[1]):
  84. group=list(map(itemgetter(1), g))
  85. episodes['10'].append((group[0], group[-1]+1))
  86. ###计算状态转变的次数
  87. trans_number=[]
  88. for start, end in episodes['10'][:-1]: ###不同转变状态需修改
  89. if stage[end]!=10:
  90. trans_number.append(end-start)
  91. ###按照REM持续时间排列REM起始点
  92. order = np.argsort(trans_number)
  93. grouped_id= np.array(episodes['10'])[order]
  94. em_fre=pd.read_csv(path+f'\\em_fre{prefix}',sep=',').em_fre.values
  95. em_fre=np.array(em_fre)
  96. em_index=pd.read_csv(path+f'\\em_index{prefix}',sep=',').em_index.values
  97. em_index_list=np.array(em_index).reshape((-1,512))
  98. valid_grouped_id,valid_trans_number=[],[]
  99. for start, end in grouped_id[:-1]: ###不同转变状态需修改
  100. idx =[idx_i for idx_i in np.arange(start, end)]
  101. epoch_n=[]
  102. ###转变前
  103. for num in idx:
  104. if em_fre[num]!=0: ## and (len(np.where(Ca_cell[num]>thre_pos)[0])>0 or len(np.where(Ca_cell[num]<thre_neg)[0])>0)
  105. epoch_n.append(1)
  106. else:
  107. epoch_n.append(0)
  108. if sum(epoch_n)!=0 and 2<=len(idx)<=max_epoch and stage[end]!=10: ###不同转变状态需修改sum(epoch_n)<len(idx)*0.5 and 2<=len(idx)<=max_epoch..
  109. valid_grouped_id.append([start,end])
  110. valid_trans_number.append(end-start)
  111. print(f'valid trnaistion number: {valid_trans_number}')
  112. ###REM duration
  113. unique_values, indices, counts=np.unique(trans_number,return_index=True,return_counts=True)
  114. for i in Ca_data.columns: ## Ca_data.columns:
  115. # print(i)
  116. cell_arr=[]
  117. Ca_cell=smooth(np.array(Ca_data[i]),11)
  118. mean_cell,std_cell=np.mean(Ca_cell),np.std(Ca_cell)
  119. thre_pos,thre_neg=mean_cell+1.96*std_cell,mean_cell-1.96*std_cell
  120. Ca_celli=Ca_cell.reshape((-1,64))
  121. valid_episode=0
  122. for data_ind, [start, end] in enumerate(valid_grouped_id): ###不同转变状态需修改
  123. if end-start:
  124. valid_episode=valid_episode+1
  125. stage_data = Ca_celli[end-1:end+1].flatten()
  126. cell_arr.append(stage_data)
  127. if valid_episode!=0:
  128. cell_mean=np.mean(cell_arr,axis=0)
  129. all_cell['cell'].append(cell_mean)
  130. all_cell['cell_name'].append(i)
  131. else:
  132. continue
  133. # %%
  134. overlap=EM_po_ne_cellname[np.isin(EM_po_ne_cellname,all_cell['cell_name'])]
  135. print(f'cell number of EM active and REM active: {len(overlap)}')
  136. print('length of REM active: {}'.format(len(all_cell['cell_name'])))
  137. ###眼动和睡眠的长度一致,且细胞ID一致
  138. sum_arr={'REM_name':all_cell['cell_name'], 'REM_active':all_cell['cell'], 'EM_name':all_cell['cell_name'], 'EM_active':[df.loc[i].values.tolist() for i in all_cell['cell_name']] }
  139. ###correlation matrix
  140. ave_corr_matrix={}
  141. ave_corr_matrix['REM_active'] = np.corrcoef(sum_arr['REM_active'], rowvar=True)
  142. ave_corr_matrix['EM_active'] =np.corrcoef(sum_arr['EM_active'], rowvar=True)
  143. # ave_corr_matrix['REM_active'] = cosine_similarity(sum_arr['REM_active'])
  144. # ave_corr_matrix['EM_active'] =cosine_similarity(sum_arr['EM_active'])
  145. REM_active_index=np.arange(len(all_cell['cell_name']))[np.isin(sum_arr['REM_name'],REM_active_cellname)]
  146. EM_pos_index=np.arange(len(sum_arr['EM_name']))[np.isin(sum_arr['EM_name'],EM_positive)]
  147. EM_neg_index=np.arange(len(sum_arr['EM_name']))[np.isin(sum_arr['EM_name'],EM_negative)]
  148. EM_po_ne_index=np.arange(len(sum_arr['EM_name']))[np.isin(sum_arr['EM_name'],EM_po_ne_cellname)]
  149. index_cellname={'REM_active':REM_active_index,'EM_active':EM_pos_index}
  150. print (f'REM active index: {len(REM_active_index)}, {REM_active_index}')
  151. print (f'EM positive index: {len(EM_pos_index)}, {EM_pos_index}')
  152. print (f'EM negative index: {len(EM_neg_index)}, {EM_neg_index}')
  153. print (f'EM active index: {len(EM_po_ne_index)}, {EM_po_ne_index}')
  154. # %%
  155. np.save(new_path+'\\EM_hierarchy.dendrogram.npy',ave_corr_matrix['EM_active'])
  156. np.save(new_path+'\\REM_hierarchy.dendrogram.npy',ave_corr_matrix['REM_active'])
  157. # %%
  158. sns.clustermap(ave_corr_matrix['REM_active'],method='ward',metric='euclidean', figsize=(3,3), row_cluster=True,col_cluster=True,cmap="bwr")
  159. # plt.savefig(new_path+'\\EM_hierarchy.dendrogram.pdf')
  160. plt.show()
  161. # %%
  162. '''453
  163. INPUT:
  164. matrix: an array of correlation coefficient matrix
  165. start: the first order
  166. end: the last order
  167. RETURN:
  168. the cluster order which possess the maximal contrast
  169. the reordered matrix according to maximal contrast
  170. the cell index of the maximal contrast
  171. '''
  172. def contrast(matrix, start, end):
  173. correlation_matrix=matrix
  174. lin_clu=linkage(correlation_matrix,method='ward',metric='euclidean')
  175. contrast= {'order':[],'contrast':[]}
  176. # max_contrast,peak_index,peak_group_mat=0,np.arange(len(matrix)),matrix
  177. for numclu in range(start, end):
  178. c_node = fcluster(lin_clu, numclu, criterion='maxclust')
  179. order = np.argsort(c_node)
  180. grouped_id = c_node[order]
  181. ###按照新的cluster进行排序
  182. grouped_mat = correlation_matrix[order][:, order]
  183. Dall = np.sum(correlation_matrix)
  184. Din_sub = np.zeros(numclu)
  185. for iDmat in range(1, numclu+1):
  186. ind_subg = np.where(grouped_id == iDmat)[0]
  187. order_sub = order[ind_subg]
  188. ###计算每个cluster的CC的和
  189. matiD = correlation_matrix[order_sub][:, order_sub]
  190. Din_sub[iDmat-1] = np.sum(matiD)
  191. Din = np.sum(Din_sub)
  192. Dout = Dall - Din
  193. Contrast = (Din - Dout) / (Din + Dout)
  194. # if numclu == 2:
  195. # max_contrast = Contrast
  196. # peak_group_mat=grouped_mat
  197. # peak_group_index=order
  198. #
  199. # else:
  200. # if Contrast > max_contrast:
  201. # max_contrast = Contrast
  202. # peak_group_mat=grouped_mat
  203. # peak_group_index=order
  204. contrast['order'].append(numclu)
  205. contrast['contrast'].append(Contrast)
  206. peak_num_index=np.where(contrast['contrast']==max(contrast['contrast']))[0][0]
  207. return contrast['order'][peak_num_index],contrast['contrast'] ##,peak_group_mat,peak_group_index
  208. # %%
  209. ###提取W, NR, R统一的threshold
  210. def thre_extract(ave_corr_matrix):
  211. thre_list=[]
  212. per=95
  213. contrast_item=[]
  214. for i in ave_corr_matrix.keys():
  215. matrix_i=ave_corr_matrix[i]
  216. np.fill_diagonal(matrix_i, 0)
  217. ###获得最优的层次聚类的order
  218. peak_numclu_i,cc_contrast=contrast(matrix_i,1,11)
  219. ###用上述最优的层次聚类的order进行分析
  220. lin_clu=linkage(matrix_i,method='ward',metric='euclidean')
  221. c_node = fcluster(lin_clu, peak_numclu_i, criterion='maxclust')
  222. print(c_node)
  223. order = np.argsort(c_node)
  224. grouped_id = c_node[order]
  225. print(grouped_id)
  226. Din_sub_val=[]
  227. for iDmat in range(1, peak_numclu_i+1):
  228. ind_subg = np.where(grouped_id == iDmat)[0]
  229. order_sub = order[ind_subg]
  230. matiD = matrix_i[order_sub][:, order_sub]
  231. Din_sub_val.extend(matiD.flatten())
  232. thre_list.extend(Din_sub_val)
  233. contrast_item.append(cc_contrast)
  234. return np.percentile(thre_list,per),contrast_item
  235. thre,contrast_item=thre_extract(ave_corr_matrix)
  236. thre
  237. # %%
  238. arr_contrast_item=np.array(contrast_item)
  239. plt.figure(figsize=(6,4))
  240. for i,contrast_i in enumerate(arr_contrast_item):
  241. peak_x=np.where(contrast_i==max(contrast_i))[0][0]
  242. peak_y=contrast_i[peak_x]
  243. plt.plot(contrast_i,lw=1,label=i);plt.legend()
  244. plt.scatter(peak_x,peak_y,s=5,c='r')
  245. np.save(new_path+'\\contrast.npy', contrast_item)
  246. # plt.savefig(new_path+'\\contrast.pdf')
  247. plt.show()
  248. # %%
  249. warnings.filterwarnings("ignore")
  250. ###寻找具有最优contrast的层次聚类order,并用该order对数据进行ensemble分析
  251. ###寻找最优oorder->确定最优clusetr->阈筛选
  252. peak_numclu = []
  253. binarized_optimal_clusetr_matrix,cluster_index,all_binarized_optimal,all_cluster_index={},{},{},{}
  254. for i in ave_corr_matrix.keys():
  255. plt.figure(figsize=(6,8))
  256. matrix_i=ave_corr_matrix[i]
  257. np.fill_diagonal(matrix_i, 0)
  258. # matrix_i = np.where(matrix_i >thre[i], 1, 0)
  259. # matrix_i=(1-matrix_i)**2
  260. ###对原始的cc matrix进行作图
  261. plt.subplot(321)
  262. sns.heatmap(matrix_i,cmap='bwr');plt.title('Raw CC values')
  263. ###获得最优的层次聚类的order
  264. peak_numclu_i,cc_contrast=contrast(matrix_i,2,11)
  265. ###用上述最优的层次聚类的order进行分析
  266. lin_clu=linkage(matrix_i,method='ward',metric='euclidean')
  267. c_node = fcluster(lin_clu, peak_numclu_i, criterion='maxclust')
  268. order = np.argsort(c_node)
  269. grouped_id = c_node[order]
  270. grouped_mat = matrix_i[order][:, order]
  271. Din_sub = np.zeros(peak_numclu_i)
  272. Din_sub_val,Din_sub_val_matrix,Din_sub_val_index=[],[],[]
  273. for iDmat in range(1, peak_numclu_i+1):
  274. ind_subg = np.where(grouped_id == iDmat)[0]
  275. order_sub = order[ind_subg] ###order_sub对应的就是细胞的命名编号
  276. matiD = matrix_i[order_sub][:, order_sub]
  277. Din_sub_val.extend(matiD.flatten())
  278. Din_sub_val_matrix.append(matiD)
  279. Din_sub_val_index.append(order_sub)
  280. Din_sub[iDmat-1] = np.sum(matiD)
  281. per=90
  282. ###每个状态单独提取阈值
  283. thre=np.percentile(Din_sub_val,per)
  284. print(thre)
  285. ###用三个状态统一的阈值
  286. # thre=thre_extract(ave_corr_matrix)
  287. ###填充三个状态下层次聚类的最优order
  288. peak_numclu.append(peak_numclu_i)
  289. ###对具有最大contrast的的cc matrix进行重新作图
  290. plt.subplot(322)
  291. sns.heatmap(grouped_mat,cmap='bwr');plt.title('Ordered CC values')
  292. ###所有位于cluster中的cc值的分布
  293. plt.subplot(323)
  294. sns.distplot(Din_sub_val,color='tomato');plt.title('The distribution of CC values within clusters')
  295. plt.vlines(x=thre,ymin=0,ymax=5,colors='gray',lw=2,linestyle='--')
  296. print(f'The threshold of {per} percentile:{thre}')
  297. plt.subplot(324)
  298. binarized_connectivity_matrix = np.where(grouped_mat >thre, 1, 0)
  299. sns.heatmap(binarized_connectivity_matrix,cmap='bwr');plt.title('Binarized CC values')
  300. ###获取具有最大均值的cluster及其对应的细胞的index
  301. averaged_cluster=[np.mean(cluster_i) for cluster_i in Din_sub_val_matrix]
  302. optimal_cluster_index=np.where(averaged_cluster==max(averaged_cluster))[0][0]
  303. print(f'the cluster which possesses the maximal averaged contrast: {optimal_cluster_index+1}')
  304. optimal_cluster=Din_sub_val_matrix[optimal_cluster_index]
  305. cluster_index[i]=Din_sub_val_index[optimal_cluster_index]
  306. ###存储所有cell
  307. all_cluster_index[i]=order
  308. plt.subplot(325)
  309. sns.heatmap(optimal_cluster,cmap='bwr');plt.title('Cluster with maximal average')
  310. plt.subplot(326)
  311. binarized_optimal_cluster = np.where(optimal_cluster >thre, 1, 0)
  312. sns.heatmap(binarized_optimal_cluster,cmap='bwr');plt.title('Binarized cluster with maximal average')
  313. binarized_optimal_clusetr_matrix[i]=binarized_optimal_cluster
  314. all_binarized_optimal[i]=binarized_connectivity_matrix
  315. print(all_cluster_index[i].shape,all_binarized_optimal[i].shape)
  316. plt.tight_layout()
  317. if is_save=='no':
  318. plt.savefig(new_path+f'\\1_workflow_{i}.pdf')
  319. plt.show()
  320. # %%
  321. for stage_name,cluster_matrix in binarized_optimal_clusetr_matrix.items():
  322. plt.figure(figsize=(6,3))
  323. plt.subplot(121)
  324. sns.heatmap(cluster_matrix,cmap='bwr');plt.title('Selected cluster')
  325. print(cluster_index[stage_name])
  326. plt.subplot(122)
  327. sns.heatmap(all_binarized_optimal[stage_name],cmap='bwr');plt.title('All neurons')
  328. print(all_cluster_index[stage_name])
  329. plt.show()
  330. # %%
  331. ###绘制连接网络
  332. valid_cell_ind,all_cell_ind={},{}
  333. network_parameters,node_parameters={}, {}
  334. net_graph={}
  335. for stage_name,cluster_matrix in binarized_optimal_clusetr_matrix.items():
  336. plt.figure(figsize=(12,3))
  337. plt.subplot(131)
  338. # binarized_connectivity_matrix = np.where(stage_matrix >thre[stage_name], 1, 0) ###np.percentile(similarity_matrix,99)
  339. sns.heatmap(cluster_matrix,cmap='bwr');plt.title(f'Binarized cluster matrix {cluster_matrix.shape}')
  340. plt.subplot(132)
  341. ### remove the isolated cell
  342. nonzero_valid_nodes=[i for i,arr_i in enumerate(cluster_matrix) if np.sum(arr_i)>0]
  343. nonzero_nodes_matrix=cluster_matrix[nonzero_valid_nodes][:,nonzero_valid_nodes]
  344. sns.heatmap(nonzero_nodes_matrix,cmap='bwr');plt.title(f'Cluster matrix {nonzero_nodes_matrix.shape}')
  345. plt.subplot(133)
  346. ### remove the two-isolated cell
  347. nonisolated_valid_nodes=[i for i,arr_i in enumerate(nonzero_nodes_matrix) if np.sum(arr_i)>1 and np.sum(nonzero_nodes_matrix[:,i])>1]
  348. nonisolated_nodes_matrix=nonzero_nodes_matrix[nonisolated_valid_nodes][:,nonisolated_valid_nodes]
  349. valid_cell_ind[stage_name]=cluster_index[stage_name][nonzero_valid_nodes][nonisolated_valid_nodes]
  350. mismatch_cell_index=[i for i in valid_cell_ind[stage_name] if i not in all_cluster_index[stage_name]]
  351. print(f'{stage_name}中{len(mismatch_cell_index)}个细胞不在总体中')
  352. ### 提取所有有连接的细胞
  353. included_nodes=[i for i,arr_i in enumerate(all_binarized_optimal[stage_name]) if np.sum(arr_i)>=1 and np.sum(all_binarized_optimal[stage_name][:,i])>=1]
  354. print(f'selectively connected cell:{len(nonisolated_valid_nodes)}, all connected cell: {len(included_nodes)}')
  355. all_nodes_matrix=all_binarized_optimal[stage_name][included_nodes][:,included_nodes]
  356. all_cell_ind[stage_name]=all_cluster_index[stage_name][included_nodes]
  357. mismatch_cell_index=[i for i in valid_cell_ind[stage_name] if i not in all_cell_ind[stage_name]]
  358. print(f'{stage_name}中{len(mismatch_cell_index)}个细胞不在总体中')
  359. # # Assuming similarity_matrices is a list of nonzero similarity matrices
  360. # adjacency_matrices = csr_matrix(nonisolated_nodes_matrix)
  361. # # Calculate clustering coefficients for each adjacency matrix
  362. # graph = nx.from_scipy_sparse_matrix(adjacency_matrices)
  363. #
  364. # # Draw the graph with dotted lines for functional connectivity
  365. # pos = nx.spring_layout(graph)
  366. # Get the indices of the connected nodes in the binary connectivity matrix
  367. connected_indices = np.argwhere(nonisolated_nodes_matrix == 1)
  368. edges = [(valid_cell_ind[stage_name][i], valid_cell_ind[stage_name][j]) for (i, j) in connected_indices]
  369. nodes=[valid_cell_ind[stage_name][i] for i,arr_i in enumerate(nonisolated_nodes_matrix)] # if np.sum(arr_i)>0
  370. network_included_nodes=valid_cell_ind[stage_name][np.isin(valid_cell_ind[stage_name],index_cellname[stage_name])]# Get the indices of the connected nodes in the binary connectivity matrix
  371. # 获取所有细胞的网络节点
  372. all_connected_indices = np.argwhere(all_nodes_matrix == 1)
  373. all_edges = [(all_cell_ind[stage_name][i], all_cell_ind[stage_name][j]) for (i, j) in all_connected_indices]
  374. all_nodes=[all_cell_ind[stage_name][i] for i,arr_i in enumerate(all_nodes_matrix)] # if np.sum(arr_i)>0
  375. print(f'selectively connected cell:{len(edges)}, all connected cell: {len(all_edges)}')
  376. graph=nx.Graph()
  377. graph.add_edges_from(edges)
  378. pos = nx.spring_layout(graph)
  379. nx.draw_networkx_nodes(graph, pos, nodelist=nodes, node_size=10, node_color="green")
  380. nx.draw_networkx_nodes(graph, pos, nodelist=network_included_nodes,node_size=10, node_color="magenta")
  381. nx.draw_networkx_edges(graph, pos, edgelist=edges, style='dotted',edge_color='gray')
  382. plt.title(f'Connectivity n={len(network_included_nodes)}/{graph.number_of_nodes()}')
  383. net_graph[stage_name]={'edges': edges,'nodes': nodes,'shared':network_included_nodes,'all_nodes':all_nodes, 'all_edges':all_edges}
  384. # ###网络分析细胞中已经label的细胞
  385. network_included_cellname=np.array(sum_arr[f'{stage_name[:-6]}name'])[network_included_nodes]
  386. if stage_name=='EM_active':
  387. network_map_labeld_cellname=network_included_cellname[np.isin(network_included_cellname,EM_positive)]
  388. if stage_name=='REM_active':
  389. network_map_labeld_cellname=network_included_cellname[np.isin(network_included_cellname,REM_active_cellname)]
  390. if len(network_map_labeld_cellname)==len(network_included_cellname):
  391. print(f'{stage_name}网络匹配数据没有问题')
  392. else:
  393. print(f'{stage_name}网络匹配数据存在问题')
  394. all_cellname_in_network=np.array(sum_arr[f'{stage_name[:-6]}name'])[valid_cell_ind[stage_name]]
  395. print('all cellname in network {}'.format(all_cellname_in_network))
  396. np.save(new_path+f'\\network_incluede_{stage_name}.npy',all_cellname_in_network)
  397. ### the innate properties of network
  398. ### Compute the average clustering coefficient for the graph
  399. clustering_coefficient = nx.average_clustering(graph)
  400. ### Compute the clustering density
  401. clustering_density=nx.density(graph)
  402. ### Returns the average local efficiency of the graph
  403. clustering_efficiency=nx.global_efficiency(graph)
  404. # ### Returns the rich-club coefficient of the graph
  405. # rich_club_coefficient=nx.rich_club_coefficient(graph)
  406. print(f'cluster parameters: {clustering_coefficient}, density: {clustering_density}, efficiency: {clustering_efficiency}')
  407. ### Compute the clustering coefficient for nodes
  408. nodes_coefficient=nx.clustering(graph)
  409. ave_nodes_coefficient=np.mean(list(nodes_coefficient.values()))
  410. ### Compute the degree centrality for nodes
  411. Gdegree=nx.degree_centrality(graph) ###计算中心度-点度中心度
  412. ave_Gdegree=np.mean(list(Gdegree.values()))
  413. #中介中心性计算
  414. Bdegree=nx.betweenness_centrality(graph) #返回的值是一个字典
  415. ave_Bdegree=np.mean(list(Bdegree.values()))
  416. # Bdegree=pd.DataFrame({'name':list(Bdegree.keys()),'Bdegree':list(Bdegree.values())})
  417. if is_save=='no':
  418. plt.savefig(new_path+f'\\2_workflow_{stage_name}.pdf')
  419. # print(list(zip(list(nodes_coefficient.values()),list(Gdegree.values()),list(Bdegree.values()))))
  420. network_parameters[stage_name]=[clustering_coefficient,clustering_density,clustering_efficiency,
  421. ave_nodes_coefficient, ave_Gdegree, ave_Bdegree]
  422. plt.show()
  423. # break
  424. # %%
  425. import networkx as nx
  426. import matplotlib.pyplot as plt
  427. import numpy as np
  428. from matplotlib.patches import Ellipse
  429. def plot_ellipse(mean, cov, color, scale=2):
  430. eigenvalues, eigenvectors = np.linalg.eig(cov)
  431. max_variance_index = np.argmax(eigenvalues)
  432. max_eigenvector = eigenvectors[:, max_variance_index]
  433. angle = np.degrees(np.arctan2(max_eigenvector[1], max_eigenvector[0]))
  434. ellipse = Ellipse(xy=mean,
  435. width=scale * 2 * np.sqrt(eigenvalues[max_variance_index]),
  436. height=scale * 2 * np.sqrt(eigenvalues[1 - max_variance_index]),
  437. angle=angle,
  438. edgecolor=color,
  439. facecolor='None',
  440. linewidth=2)
  441. plt.gca().add_patch(ellipse)
  442. plt.figure(figsize=(12, 8))
  443. G = nx.Graph()
  444. G1 = nx.Graph()
  445. G1.add_edges_from(net_graph['REM_active']['all_edges'])
  446. G2 = nx.Graph()
  447. G2.add_edges_from(net_graph['EM_active']['all_edges'])
  448. k=0.45
  449. plt.subplot(231)
  450. ###调整K值,k 参数值越小,节点之间的距离越近,从而使布局更紧凑
  451. pos1 = nx.spring_layout(G1, k=k)
  452. nx.draw_networkx_nodes(G1, pos1, nodelist=G1.nodes(), node_size=10, node_color='gray')
  453. nx.draw_networkx_nodes(G1, pos1, nodelist=net_graph['REM_active']['nodes'], node_size=5, node_color='limegreen')
  454. nx.draw_networkx_edges(G1, pos1, edgelist=G1.edges(), style='dotted', edge_color='gray')
  455. plt.title('REM_active n={}/{}'.format(len(net_graph['REM_active']['nodes']), G1.number_of_nodes()))
  456. ## label each node
  457. # label1 = {node: node for node in G1.nodes()}
  458. # nx.draw_networkx_labels(G1, pos1, labels=label1, font_size=5, font_color='black', verticalalignment='bottom')
  459. ###连接强度包括:度数中心性(degree_centrality);接近中心性(closeness_centrality);中介中心性(betweenness_centrality)
  460. closeness_centrality1 = nx.closeness_centrality(G1)
  461. shared_clos_cen1 = [closeness for node, closeness in closeness_centrality1.items() if node in net_graph['REM_active']['nodes']]
  462. isolated_clos_cen1 = [closeness for node, closeness in closeness_centrality1.items() if node not in net_graph['REM_active']['nodes']]
  463. print(len(closeness_centrality1), np.mean(list(closeness_centrality1.values())), '\n',
  464. len(shared_clos_cen1), np.mean(shared_clos_cen1), '\n',
  465. len(isolated_clos_cen1), np.mean(isolated_clos_cen1))
  466. # 提取 REM_active 节点的位置
  467. rem_active_positions = np.array([pos1[node] for node in net_graph['REM_active']['nodes']])
  468. mean_pos_rem = np.mean(rem_active_positions, axis=0)
  469. cov_pos_rem = np.cov(rem_active_positions, rowvar=False)
  470. # 绘制 REM_active 节点区域的椭圆
  471. plot_ellipse(mean_pos_rem, cov_pos_rem, 'limegreen')
  472. plt.subplot(232)
  473. pos2 = nx.spring_layout(G2, k=k)
  474. nx.draw_networkx_nodes(G2, pos2, nodelist=G2.nodes(), node_size=10, node_color='gray')
  475. nx.draw_networkx_nodes(G2, pos2, nodelist=net_graph['EM_active']['nodes'], node_size=5, node_color='darkmagenta')
  476. nx.draw_networkx_edges(G2, pos2, edgelist=G2.edges(), style='dotted', edge_color='gray')
  477. plt.title('EM_active n={}/{}'.format(len(net_graph['EM_active']['nodes']), G2.number_of_nodes()))
  478. ## label each node
  479. # label2 = {node: node for node in G2.nodes()}
  480. # nx.draw_networkx_labels(G2, pos2, labels=label2, font_size=5, font_color='black', verticalalignment='bottom')
  481. ###连接强度包括:度数中心性(degree_centrality);接近中心性(closeness_centrality);中介中心性(betweenness_centrality)
  482. closeness_centrality2 = nx.closeness_centrality(G2)
  483. shared_clos_cen2 = [closeness for node, closeness in closeness_centrality2.items() if node in net_graph['EM_active']['nodes']]
  484. isolated_clos_cen2 = [closeness for node, closeness in closeness_centrality2.items() if node not in net_graph['EM_active']['nodes']]
  485. print(len(closeness_centrality2), np.mean(list(closeness_centrality2.values())), '\n',
  486. len(shared_clos_cen2), np.mean(shared_clos_cen2), '\n',
  487. len(isolated_clos_cen2), np.mean(isolated_clos_cen2))
  488. # 提取 EM_active 节点的位置
  489. em_active_positions = np.array([pos2[node] for node in net_graph['EM_active']['nodes']])
  490. mean_pos_em = np.mean(em_active_positions, axis=0)
  491. cov_pos_em = np.cov(em_active_positions, rowvar=False)
  492. # 绘制 EM_active 节点区域的椭圆
  493. plot_ellipse(mean_pos_em, cov_pos_em, 'darkmagenta')
  494. plt.subplot(233)
  495. # 创建整体图形
  496. G = nx.compose(G1, G2)
  497. # 绘制整体图形的布局
  498. pos = nx.spring_layout(G)
  499. # 绘制第一个网络的节点和边
  500. nx.draw_networkx_nodes(G1, pos, nodelist=G1.nodes(), node_size=12, node_color='#7e318e')
  501. # nx.draw_networkx_nodes(G1, pos, nodelist=net_graph['REM_active']['shared'], node_size=4, node_color='magenta') ###color_convert_plt('#ffaf74')
  502. nx.draw_networkx_edges(G1, pos, edgelist=G1.edges(), style='dotted', edge_color='#7e318e')
  503. # 绘制第二个网络的节点和边
  504. nx.draw_networkx_nodes(G2, pos, nodelist=G2.nodes(), node_size=12, node_color='#00ff00')
  505. # nx.draw_networkx_nodes(G2, pos, nodelist=net_graph['EM_active']['shared'], node_size=4, node_color='magenta')
  506. nx.draw_networkx_edges(G2, pos, edgelist=G2.edges(), style='dotted', edge_color='#00ff00')
  507. shared_node = np.intersect1d(net_graph['EM_active']['nodes'], net_graph['REM_active']['nodes'])
  508. nx.draw_networkx_nodes(G, pos, nodelist=shared_node, node_size=2, node_color='black')
  509. plt.title('co-local n={}'.format(G.number_of_nodes()))
  510. if is_save == 'yes':
  511. np.save(new_path + '\\All_net_data.npy', net_graph)
  512. plt.savefig(new_path + '\\All_neurons_network.pdf')
  513. plt.show()
  514. # %%
  515. from t_test import t_test
  516. plt.figure(figsize=(5,5))
  517. isolated_clos_cen2.remove(max(isolated_clos_cen2))
  518. net_REM=np.concatenate((shared_clos_cen1,isolated_clos_cen1))
  519. net_EM=np.concatenate((shared_clos_cen2,isolated_clos_cen2))
  520. _avg = [np.mean(net_REM),np.mean(shared_clos_cen1),np.mean(isolated_clos_cen1),np.mean(net_EM),np.mean(shared_clos_cen2),np.mean(isolated_clos_cen2)]
  521. _err1 = np.std(net_REM)/np.sqrt(len(net_REM))
  522. _err2 = np.std(shared_clos_cen1)/np.sqrt(len(shared_clos_cen1))
  523. _err3 = np.std(isolated_clos_cen1)/np.sqrt(len(isolated_clos_cen1))
  524. _err4 = np.std(net_EM)/np.sqrt(len(net_EM))
  525. _err5 = np.std(shared_clos_cen2)/np.sqrt(len(shared_clos_cen2))
  526. _err6 = np.std(isolated_clos_cen2)/np.sqrt(len(isolated_clos_cen2))
  527. _err=[_err1,_err2,_err3,_err4,_err5,_err6]
  528. _,p0=t_test(net_REM,net_EM)
  529. _,p1=t_test(shared_clos_cen1,isolated_clos_cen1)
  530. _,p2=t_test(shared_clos_cen2,isolated_clos_cen2)
  531. colors=['magenta','magenta','magenta','gray','gray','gray']
  532. plt.bar([1,2,3,4,5,6],_avg, width=0.5, color=colors, alpha=0.4)
  533. for item in net_REM:
  534. plt.plot(1, item, 'ro')
  535. for item in shared_clos_cen1:
  536. plt.plot(2, item, 'ro')
  537. for item in isolated_clos_cen1:
  538. plt.plot(3, item, 'ro')
  539. for item in net_EM:
  540. plt.plot(4, item, 'bo')
  541. for item in shared_clos_cen2:
  542. plt.plot(5, item, 'bo')
  543. for item in isolated_clos_cen2:
  544. plt.plot(6, item, 'bo')
  545. plt.errorbar([1,2,3,4,5,6][0],_avg[0], yerr=_err[0], capsize=10, color='k')
  546. plt.errorbar([1,2,3,4,5,6][1],_avg[1], yerr=_err[1], capsize=10, color='k')
  547. plt.errorbar([1,2,3,4,5,6][2],_avg[2], yerr=_err[2], capsize=10, color='k')
  548. plt.errorbar([1,2,3,4,5,6][3],_avg[3], yerr=_err[3], capsize=10, color='k')
  549. plt.errorbar([1,2,3,4,5,6][4],_avg[4], yerr=_err[4], capsize=10, color='k')
  550. plt.errorbar([1,2,3,4,5,6][5],_avg[5], yerr=_err[5], capsize=10, color='k')
  551. plt.hlines(0.75, 1, 2, 'k');plt.text(1, 0.8, f'P = {np.round(p0,4)}')
  552. plt.hlines(0.7, 3, 4, 'k');plt.text(3, 0.75, f'P = {np.round(p1,4)}')
  553. plt.hlines(0.7, 5, 6, 'k');plt.text(5, 0.75, f'P = {np.round(p2,4)}')
  554. plt.ylabel("Closeness centrality")
  555. plt.xticks([2,4],['REM','EMs']);plt.ylim(0,0.9)
  556. plt.tight_layout()
  557. para_network=pd.DataFrame([shared_clos_cen1,isolated_clos_cen1,shared_clos_cen2,isolated_clos_cen2]).T
  558. para_network.columns=['shared_clos_cen1','isolated_clos_cen1','shared_clos_cen2','isolated_clos_cen2']
  559. if is_save=='yes':
  560. para_network.to_excel(new_path+'\\closeness_centrality2.xlsx',index=None)
  561. plt.savefig(new_path+'\\connectivity strength2.pdf')
  562. plt.show()
  563. # %%
  564. venn2(subsets=(17,14, 11), set_labels=('REM active', 'EM active'),set_colors=(color_convert_plt('#bfeebe'),color_convert_plt('#d3d3d3')),alpha=0.6,normalize_to=1.0)
  565. plt.title('overlap_EM_REM')
  566. plt.savefig(new_path + '\\overlap_node.pdf')
  567. plt.show()
  568. # %%

Fig4. Network_analysis1.ipynb at commit e6ed22f, under MIT · at the source

Overview

Authors: Chengyong Jiang1, Yuanyuan Luo1, Xinrong Tan1, Hongtao Wang1, Qingshuo Meng1, Yanyu Xiong1, Er Chen1, Yuqing Chen1, Liyuan Cui1, Zhili Huang1,2, Biao Yan1, Jiayi Zhang1,3
  1. Institutes of Brain Science, State Key Laboratory of Brain Function and Disorders, MOE Frontiers Center for Brain Science, Fudan University,Shanghai, PR China
  2. Department of Pharmacology, School of Basic Medical Sciences, Fudan University,Shanghai, PR China
  3. Department of Ophthalmology and Vision Science, Eye & ENT Hospital, Fudan University,Shanghai, PR China
Journal: Nature communications, volume 17, issue 1, article 7934
Dates: received 21 November 2024; accepted 12 June 2026; published online 24 June 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-74768-5 · PMID 42342690 · PMCID PMC13448821 · OpenAlex W7165804481
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: behavior only (modality), mouse (organism), systems (subfield)
Methods: Spectral & time-frequency, Statistics, Preprocessing, Evoked potentials, Connectivity, fMRI & imaging, Single-unit activity, calcium imaging, Physiology & signal measures
Keywords: Brainstem, REM sleep
MeSH: Cholinergic Neurons*, Eye Movements*, Oculomotor Nuclear Complex*, Sleep, REM*, Animals, Female, Male, Mice, Mice, Inbred C57BL, Mice, Transgenic, Oculomotor Muscles, Optogenetics, Periaqueductal Gray, Vesicular Glutamate Transport Protein 2, Vesicular Inhibitory Amino Acid Transport Proteins, Wakefulness (* major topic)
Topic: Sleep and Wakefulness Research (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: cited by 1 paper (Europe PMC); 76 references in the paper
Research resources: ChAT-Cre transgenic mice RRID:IMSR_JAX:006410, Ai14 reporter mice RRID:IMSR_JAX:007914

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.

Repositories

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

codeocean:9306840

License: none: the authors keep all their rights
State: cannot be verified, verified on 27 September 2026
Evidence: found in the paper
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: cannot be verified
  • 27 September 2026: cannot be verified

18810386233/Parallel-circuit-in-oculomotor-nucleus-to-control-eye-movements-and-REM-sleep

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: e6ed22fbea6005434343ad4b1dc159705b59a260, 20 December 2024
Languages: Jupyter (7)
Size: 11 files, 7 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (environment.yml), 7 notebooks
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: Matplotlib (7 files), NumPy (7 files), pandas (7 files), seaborn (7 files), SciPy (6 files), scikit-learn (2 files), NetworkX (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
10 files

codeocean:7736716

License: none: the authors keep all their rights
State: cannot be verified, verified on 27 September 2026
Evidence: found in the paper
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: cannot be verified
  • 27 September 2026: cannot be verified
At the source:

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:

Read it in the paper: doi.org/10.1038/s41467-026-74768-5.

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:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 7 scripts, each with its path and the digest of its content;
  • 2 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

Data availability statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-74768-5.

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, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 2 keywords, 16 MeSH terms, 1 funder, 75 references, 2 RRIDs.

Cite

This paper

Jiang, C., Luo, Y., Tan, X., Wang, H., Meng, Q., Xiong, Y., Chen, E., Chen, Y., Cui, L., Huang, Z., Yan, B., & Zhang, J. (2026). Parallel cholinergic circuit in oculomotor nucleus to control eye movements and REM sleep. Nature communications, 17(1), 7934. https://doi.org/10.1038/s41467-026-74768-5

BibTeX

@article{jiang2026parallel,
author = {Jiang, Chengyong and Luo, Yuanyuan and Tan, Xinrong and Wang, Hongtao and Meng, Qingshuo and Xiong, Yanyu and Chen, Er and Chen, Yuqing and Cui, Liyuan and Huang, Zhili and Yan, Biao and Zhang, Jiayi},
title = {{Parallel cholinergic circuit in oculomotor nucleus to control eye movements and REM sleep}},
journal = {Nature communications},
year = {2026},
month = jun,
volume = {17},
number = {1},
pages = {7934},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-74768-5},
url = {https://doi.org/10.1038/s41467-026-74768-5},
pmid = {42342690},
pmcid = {PMC13448821}
}

RIS

TY - JOUR
AU - Jiang, Chengyong
AU - Luo, Yuanyuan
AU - Tan, Xinrong
AU - Wang, Hongtao
AU - Meng, Qingshuo
AU - Xiong, Yanyu
AU - Chen, Er
AU - Chen, Yuqing
AU - Cui, Liyuan
AU - Huang, Zhili
AU - Yan, Biao
AU - Zhang, Jiayi
TI - Parallel cholinergic circuit in oculomotor nucleus to control eye movements and REM sleep
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/06/24
VL - 17
IS - 1
SP - 7934
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-74768-5
UR - https://doi.org/10.1038/s41467-026-74768-5
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-74768-5",
"type": "article-journal",
"title": "Parallel cholinergic circuit in oculomotor nucleus to control eye movements and REM sleep",
"container-title": "Nature communications",
"author": [
{
"family": "Jiang",
"given": "Chengyong"
},
{
"family": "Luo",
"given": "Yuanyuan"
},
{
"family": "Tan",
"given": "Xinrong"
},
{
"family": "Wang",
"given": "Hongtao"
},
{
"family": "Meng",
"given": "Qingshuo"
},
{
"family": "Xiong",
"given": "Yanyu"
},
{
"family": "Chen",
"given": "Er"
},
{
"family": "Chen",
"given": "Yuqing"
},
{
"family": "Cui",
"given": "Liyuan"
},
{
"family": "Huang",
"given": "Zhili"
},
{
"family": "Yan",
"given": "Biao"
},
{
"family": "Zhang",
"given": "Jiayi"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "7934",
"DOI": "10.1038/s41467-026-74768-5",
"PMID": "42342690",
"PMCID": "PMC13448821",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-74768-5",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
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.1038/s41593-026-02314-z [code]
Low-dimensional population dynamics in the brainstem gate REM sleep.
Journal: Nature neuroscience
In common: seaborn, scikit-learn, pandas, 3 other tools, systems, mouse, 11 references
[2] doi:10.1038/s41467-026-72454-0 [code]
Dynamic neuronal ensembles encode burst-suppression revealed by cortex-wide optical-electrical interfaces.
Journal: Nature communications
In common: NetworkX, seaborn, scikit-learn, 4 other tools, systems, mouse, 2 references
[3] doi:10.7554/elife.100880 [code]
An applicable and efficient retrograde monosynaptic circuit mapping tool for larval zebrafish.
Journal: eLife
In common: NetworkX, seaborn, scikit-learn, 4 other tools, systems, 1 reference
[4] doi:10.1038/s41467-026-71923-w [code]
Integrating optogenetic fMRI and spatial transcriptomics to reveal circuit-specific gene signatures in fronto- and hippo-thalamic networks.
Journal: Nature communications
In common: seaborn, scikit-learn, pandas, 3 other tools, systems, mouse, 1 reference
[5] doi:10.1038/s41593-026-02388-9 [code]
Hippocampal CA3 connectomics reveals a gradient of mossy fiber inputs and selective feedforward inhibition onto pyramidal cells.
Journal: Nature neuroscience
In common: NetworkX, seaborn, scikit-learn, 4 other tools, systems, mouse
[6] doi:10.1016/j.isci.2026.116825 [code]
Social hierarchy shapes behavioral and transcriptional responses to chronic stress and ketamine in male mice.
Journal: iScience
In common: NetworkX, seaborn, scikit-learn, 4 other tools, systems, mouse
[7] doi:10.1016/j.celrep.2026.117420 [code]
Neural population dynamics of direct electrical stimulation of neocortex.
Journal: Cell reports
In common: NetworkX, seaborn, scikit-learn, 4 other tools, systems, mouse
[8] doi:10.1016/j.neuron.2026.03.034 [code]
Dentate gyrus interneurons modulate winner-take-all network dynamics in freely behaving mice.
Journal: Neuron
In common: NetworkX, seaborn, scikit-learn, 4 other tools, systems, mouse
[9] doi:10.1038/s41593-026-02232-0 [code]
Entorhinal cortex represents task-relevant remote locations independently of CA1.
Journal: Nature neuroscience
In common: NetworkX, seaborn, scikit-learn, 4 other tools, systems, mouse
[10] doi:10.1038/s41592-026-03076-z [code]
Neuropixels Opto: combining high-resolution electrophysiology and optogenetics.
Journal: Nature methods
In common: pandas, SciPy, Matplotlib, 1 other tool, systems, mouse, 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.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.