Modulation of habenula axon terminals supports action-outcome associations in larval zebrafish.
The 1 match
- [1] § Methods › Data analysis › r-dHb thermal reward response dynamics ↔ FigS5__S7_BC.ipynb, lines 208 to 227 · score 0.65 · 0–2 seconds, 8 seconds, 8–10 seconds, angle · 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 · 469 lines · 16 KB · no license · 1 match
- # %%
- %matplotlib widget
- # %%
- from Functions_imaging import *
- # %%
- c_laser = "#AF2413"
- save_fig = Path(os.getcwd())
- file = Path(open(str(save_fig / "path.txt"), 'r').readlines()[0])
- path = list((file / "S5").glob("*"))
- # %%
- window=10*5
- pre_baseline = 10*5
- bins_square = np.linspace(-.1,1,15)
- nan_at_transition = True
- th_bouts = np.deg2rad(10)
- # %%
- p = path[-2]
- processed_data = np.load(p / "smartdeltaF.npy",allow_pickle=True)[()]
- traces = processed_data["traces"]
- time_vector_imaging = processed_data["time_vector"]
- exp = EmbeddedExperiment(p / "behavior")
- bouts = exp.get_bout_properties(threshold=.01)
- laser_state = np.interp(processed_data["time_vector"],
- exp.stimulus_log.t.values,
- exp.stimulus_log.seamless_image_state.values)
- bias_behav = get_behav(bouts,processed_data.copy())
- # %%
- correlations = np.zeros(traces.shape[0])
- for i_trace in range(traces.shape[0]):
- c_ = fast_pearson(traces[i_trace,:],laser_state)
- correlations[i_trace] = c_
- # %%
- correlation_sorting = np.argsort(correlations)
- # %%
- c_laser = "#AF2413"
- offon = np.where(np.diff(laser_state)>0.5)[0]
- onoff = np.where(np.diff(laser_state)<-0.5)[0]
- f,a = plt.subplots()
- for s_,e_ in zip(offon,onoff):
- a.axvspan(time_vector_imaging[s_],time_vector_imaging[e_],
- color=c_laser,lw=0,alpha=.3)
- off_ = 0
- for i in [correlation_sorting[-1],correlation_sorting[0]]:
- a.plot(time_vector_imaging,traces[i,:]+off_,c="k",lw=1.5) #3,6,7 ,16,18,19
- off_+= np.nanmax(traces[i,:])+.5
- a.plot(time_vector_imaging,bias_behav-2,"k",lw=1)
- a.set_xlim([0,time_vector_imaging[-1]])
- a.set_yticks([])
- a.set_xticks([])
- f.set_size_inches([8,3])
- plt.tight_layout()
- sns.despine(left=True,bottom=True)
- plt.show()
- plt.savefig(save_fig / "S5_B.png",dpi=800,bbox_inches="tight")
- # %% [markdown]
- # ## temperature responses
- # %%
- window=20*5
- pre_baseline = 10*5
- nan_at_transition = True
- pooled_ttas = []
- region_ids = []
- pooled_coordinates = []
- fractions = []
- for p in path:
- processed_data = np.load(p / "smartdeltaF.npy",allow_pickle=True)[()]
- traces = processed_data["traces"]
- time_vector_imaging = processed_data["time_vector"]
- exp = EmbeddedExperiment(p / "behavior")
- laser_state = np.interp(processed_data["time_vector"],
- exp.stimulus_log.t.values,
- exp.stimulus_log.seamless_image_state.values)
- ttas = []
- for i_trace in range(traces.shape[0]):
- if np.nanmax(traces[i_trace,:])<50:
- tta = temperature_tta(traces[i_trace,:],laser_state,pre_=pre_baseline,post_=window)
- ttas.append(tta)
- ttas_ = np.stack(ttas)
- pooled_ttas.append(ttas_)
- pooled_ttas = np.concatenate(pooled_ttas,0)
- # %%
- cmap_ = ["Oranges","Blues"]
- vmin_ = -.00
- vmax_ = 2
- time_vector = np.linspace(pre_baseline/5,window/5,pre_baseline+window)
- labels_stim = ["temp\nincr.","temp\ndecr."]
- f,a = plt.subplots(1,2)
- sorting_ = np.argsort(np.nanmean(pooled_ttas[:,1,:],1)-np.nanmean(pooled_ttas[:,0,:],1))
- for i_stim in [0,1]:
- a[i_stim].imshow(pooled_ttas[:,i_stim,:][sorting_,:],
- aspect="auto",extent=[-pre_baseline/5,window/5,0,pooled_ttas.shape[0]],
- vmin=vmin_,vmax=vmax_,cmap=cmap_[i_stim],interpolation=None)
- if i_stim == 0:
- a[i_stim].set_yticks([0,pooled_ttas.shape[0]])
- a[i_stim].set_yticklabels(["0 ",pooled_ttas.shape[0]],fontsize=20)
- a[i_stim].set_ylabel("r-Hb neurons",fontsize=20)
- else: a[i_stim].set_yticks([])
- a[i_stim].set_xticks([-pre_baseline/5,0,window/5])
- a[i_stim].set_xticklabels([-pre_baseline/5,0,window/5],fontsize=20)
- a[i_stim].set_xlabel("time (s)",fontsize=20)
- if region_id == 1: a[i_stim].set_title(labels_stim[i_stim],fontsize=20)
- f.set_size_inches([7.5,5])
- plt.tight_layout()
- plt.show()
- plt.savefig(save_fig / "S5_C.png",dpi=800,bbox_inches="tight")
- # %%
- pval_th = 0.05
- shuffles = 1000
- window=10*5
- pre_baseline = 1*5
- fractions = []
- significant_traces_ON = []
- significant_traces_OFF = []
- pvals = []
- for p in path:
- processed_data = np.load(p / "smartdeltaF.npy",allow_pickle=True)[()]
- traces = processed_data["traces"]
- traces = traces[np.nanmax(traces,1)<10,:]
- time_vector_imaging = processed_data["time_vector"]
- exp = EmbeddedExperiment(p / "behavior")
- laser_state = np.interp(processed_data["time_vector"],
- exp.stimulus_log.t.values,
- exp.stimulus_log.seamless_image_state.values)
- ttas = []
- for i_trace in range(traces.shape[0]):
- tta = temperature_tta(traces[i_trace,:],laser_state,pre_=pre_baseline,post_=window)
- ttas.append(tta)
- ttas_ = np.stack(ttas)
- real_responses = np.nanmean(ttas_[:,:,pre_baseline:],-1)
- pvalues = np.zeros((traces.shape[0],2))
- for i_trace in range(traces.shape[0]):
- shuffle_distribution = np.zeros((shuffles,2))
- for i_shuffle in range(shuffles):
- shuffle_distribution[i_shuffle,:] = np.nanmean(temperature_tta(np.roll(traces[i_trace,:],np.random.randint(traces.shape[1])),
- laser_state,pre_=pre_baseline,post_=window)[:,pre_baseline:],1)
- for i in range(2):
- pvalues[i_trace,i] = np.sum(shuffle_distribution[:,i]>real_responses[i_trace,i])/shuffles
- pvals.append(pvalues[:,0])
- fractions_ = np.array([np.sum(pvalues[:,0]<pval_th)/ttas_.shape[0],
- np.sum(pvalues[:,1]<pval_th)/ttas_.shape[0]])
- fractions.append(fractions_)
- significant_traces_ON.append(ttas_[pvalues[:,0]<pval_th,:,:])
- significant_traces_OFF.append(ttas_[pvalues[:,1]<pval_th,:,:])
- fractions = np.stack(fractions,0)
- pvals = np.concatenate(pvals)
- significant_traces_ON = np.concatenate(significant_traces_ON,0)
- significant_traces_OFF = np.concatenate(significant_traces_OFF,0)
- # %%
- wilcoxon(fractions[:,0],fractions[:,1])
- # %%
- f,a = plt.subplots()
- positions = [0,1]
- medians = np.nanmedian(fractions*100,0)
- for pos_,pos__ in enumerate(positions):
- if (pos_%2)==0:
- c = cm.Oranges(245)
- else:
- c = cm.Blues(245)
- a.bar([pos__],medians[pos_],color=c)
- a.scatter(((np.random.random(fractions.shape[0])-.5)/5)+pos__,
- fractions[:,pos_]*100,lw=0,c="gray",alpha=.6,s=100,edgecolors=(0,0,0,1))
- a.set_ylabel("Percentage of neurons",fontsize=20)
- a.set_yticks([0,20,40,60,80,100])
- a.set_yticklabels([0,20,40,60,80,100],fontsize=20)
- a.set_xticks([.5])
- a.set_xticklabels(["r-dHb"],fontsize=20)
- a.set_ylim([0,100])
- a.set_xlim([-.5,1.5])
- f.set_size_inches([2.6,5])
- plt.tight_layout()
- sns.despine()
- plt.show()
- plt.savefig(save_fig / "S5_D.png",dpi=800,bbox_inches="tight")
- plt.savefig(save_fig / "S5_D.svg",dpi=800,bbox_inches="tight")
- # %% [markdown]
- # ## clustering responses
- # %%
- start = significant_traces_ON[:,0,5:15].max(1)
- end = significant_traces_ON[:,0,-10:].max(1)
- angle = np.arctan2(start,end)
- # %%
- f,a = plt.subplots()
- a.scatter(start,end,c=angle,s=100)
- a.set_yticks([0,1,2,3,4])
- a.set_yticklabels([0,1,2,3,4],fontsize=20)
- a.set_xticks([0,1,2,3,4])
- a.set_xticklabels([0,1,2,3,4],fontsize=20)
- a.set_ylim([-.5,4])
- a.set_xlim([-.5,4])
- a.set_xlabel("ΔF/F 0-2 sec.",fontsize=20)
- a.set_ylabel("ΔF/F 8-10 sec.",fontsize=20)
- sns.despine()
- f.set_size_inches([5,5])
- plt.tight_layout()
- plt.show()
- plt.savefig(save_fig / "S5_E.png",dpi=800,bbox_inches="tight")
- plt.savefig(save_fig / "S5_E.svg",dpi=800,bbox_inches="tight")
- # %%
- time_vector_plot = np.linspace(-1,10,55)
- f,a = plt.subplots(1,2)
- data_list = [significant_traces_ON[:,0,:],
- significant_traces_ON[:,1,:]]
- color_list = [cm.Oranges(245),cm.Oranges(245)]
- labels_list = [np.digitize(angle,np.linspace(-.2,2,4)),np.digitize(angle,np.linspace(-.2,2,4))]
- on_labels = [1,0,0,0,0,0]
- axis_list = [0,1,2,3,4,5]
- for i_axis,c,data,lab,olab in zip(axis_list,color_list,data_list,labels_list,on_labels):
- off_ = 0
- for i in np.unique(lab):
- if olab==1:
- a[i_axis].axvspan(0,10,color=c_laser,lw=0,alpha=.1)
- else:
- a[i_axis].axvspan(-10,0,color=c_laser,lw=0,alpha=.1)
- a[i_axis].plot([-5,10],[off_,off_],"--",c="gray")
- a[i_axis].fill_between(time_vector_plot,
- np.nanmean(data[lab==i,:]+off_,0)-(sem(data[lab==i,:]+off_,nan_policy="omit")),
- np.nanmean(data[lab==i,:]+off_,0)+(sem(data[lab==i,:]+off_,nan_policy="omit")),
- color="gray",alpha=.6,lw=0)
- a[i_axis].plot(time_vector_plot,np.nanmean(data[lab==i,0:],0)+off_,c=c,lw=2)
- off_+=1.5
- a[i_axis].set_xticks([0,10])
- a[i_axis].set_xticklabels([0,10],fontsize=20)
- label_titles = ["temp.\nincr.","temp.\ndecr."]
- for i in range(2):
- a[i].set_ylim([-1,4])
- a[i].set_xlim([-1,10])
- a[i].set_yticks([])
- a[i].set_xlabel("Time\n(sec.)",fontsize=20)
- a[i].set_title(label_titles[i],fontsize=20)
- f.set_size_inches([2.5,5])
- plt.tight_layout()
- sns.despine(left=True)
- plt.show()
- plt.savefig(save_fig / "S5_G.png",dpi=800,bbox_inches="tight")
- plt.savefig(save_fig / "S5_G.svg",dpi=800,bbox_inches="tight")
- # %%
- labels = np.digitize(angle,np.linspace(-.2,2,4))
- for i in range(1,4):
- print((labels==i).sum()/labels.size)
- # %%
- f,a = plt.subplots()
- a.hist(angle,np.linspace(-.5,2,20),color="k")
- a.set_yticks([0,20,40,60])
- a.set_yticklabels([0,20,40,60],fontsize=20)
- a.set_xticks([-0.5,0,.5,1,1.5,2])
- a.set_xticklabels([-0.5,0,.5,1,1.5,2],fontsize=20)
- a.set_ylabel("Counts",fontsize=20)
- a.set_xlabel("Polar angle (rad.)",fontsize=20)
- f.set_size_inches([4,5])
- sns.despine()
- plt.tight_layout()
- plt.show()
- plt.savefig(save_fig / "S5_F.png",dpi=800,bbox_inches="tight")
- plt.savefig(save_fig / "S5_F.svg",dpi=800,bbox_inches="tight")
- # %% [markdown]
- # ## motor modulation index
- # %%
- recompute = False
- mmis_dhb = []
- triggers_dhb = []
- print("dHb...")
- for p in tqdm(path):
- if recompute or (not(recompute) and not((p / "mmi_res.npy").exists())):
- processed_data = np.load(p / "smartdeltaF.npy",allow_pickle=True)[()]
- traces = processed_data["traces"]
- traces = traces[np.nanmax(traces,1)<10,:]
- time_vector_imaging = processed_data["time_vector"]
- exp = EmbeddedExperiment(p / "behavior")
- laser_state = np.interp(processed_data["time_vector"],
- exp.stimulus_log.t.values,
- exp.stimulus_log.seamless_image_state.values)
- bouts = exp.get_bout_properties(threshold=.01)
- bias_behav = get_behav(bouts,processed_data.copy())
- stim_x_behav = get_laser_x_swims(processed_data.copy(),laser_state,bias_behav)
- stim_x_behav[(stim_x_behav<0)&(stim_x_behav>-1)] = -1
- stim_x_behav[(stim_x_behav>0)&(stim_x_behav<1)] = 1
- result,trigg = mmi_analysis_temppval(traces,laser_state,stim_x_behav,bias_behav,pre_=10*5,post_=10*5,
- th_bout=np.deg2rad(10),pval_th=0.05,n_shuffles=1000,fract_th=.3,min_samples=4)
- np.save(p / "mmi_res.npy",{"result":result,"trigg":trigg})
- else:
- data = np.load(p / "mmi_res.npy",allow_pickle=True)[()]
- result = data["result"]
- trigg = data["trigg"]
- mmis_dhb.append(result)
- triggers_dhb.append(trigg)
- # %%
- recompute = False
- path = list((file / "S7_BC").glob("*"))
- mmis_IPN = []
- triggers_IPN = []
- tuning_sideiIPN = []
- print("iIPN...")
- for p in tqdm(path):
- if recompute or (not(recompute) and not((p / "mmi_res.npy").exists())):
- processed_data = np.load(p /"imaging" / "processed.npy",allow_pickle=True)[()]
- params = np.load(p / "params_med.npy",allow_pickle=True)[()]
- traces = params["shell_deltaF"]
- result,trigg = mmi_analysis_temppval(traces,params["laser_state"],
- params["stim_x_behav"],
- params["bias_behav"],pre_=10*5,post_=10*5,
- th_bout=np.deg2rad(10),pval_th=0.05,n_shuffles=1000,fract_th=.3,min_samples=4)
- np.save(p / "mmi_res.npy",{"result":result,"trigg":trigg})
- else:
- params = np.load(p / "params_med.npy",allow_pickle=True)[()]
- data = np.load(p / "mmi_res.npy",allow_pickle=True)[()]
- result = data["result"]
- trigg = data["trigg"]
- mmis_IPN.append(result)
- triggers_IPN.append(trigg)
- tuning_sideiIPN.append(np.array([np.nanmedian(result[np.sign(params["shell_coords"][:,0])==1,1]),
- np.nanmedian(result[np.sign(params["shell_coords"][:,0])==-1,1])
- ]))
- tuning_sideiIPN = np.stack(tuning_sideiIPN)
- # %%
- bins = np.linspace(-10,10,100)
- mmis_dhb_all = np.concatenate(mmis_dhb)[:,0]
- mmis_IPN_all = np.concatenate(mmis_IPN)[:,0]
- mmis_dhb_avg = []
- for i in mmis_dhb:
- mmis_dhb_avg.append(np.nanmedian(i[:,0]))
- mmis_dhb_avg = np.stack(mmis_dhb_avg)
- mmis_IPN_avg = []
- for i in mmis_IPN:
- mmis_IPN_avg.append(np.nanmedian(i[:,0]))
- mmis_IPN_avg = np.stack(mmis_IPN_avg)
- # %%
- print(np.nanmedian(mmis_dhb_avg[np.isfinite(mmis_dhb_avg)]),
- mannwhitneyu(mmis_dhb_avg[np.isfinite(mmis_dhb_avg)],
- mmis_IPN_avg[np.isfinite(mmis_IPN_avg)]))
- # %%
- points_ = np.linspace(-6,6,1000)
- binw = .3
- f,a = plt.subplots()
- d = kernel_density_estimation(mmis_dhb_all[np.isfinite(mmis_dhb_all)],binw,points_)
- a.plot(points_,d[1],"gray")
- a.fill_between(points_,d[1],color="gray",alpha=.3)
- a.plot([np.nanmedian(mmis_dhb_all[np.isfinite(mmis_dhb_all)]),
- np.nanmedian(mmis_dhb_all[np.isfinite(mmis_dhb_all)])],[0,.3],"--",c="gray",lw=2)
- d = kernel_density_estimation(mmis_IPN_all[np.isfinite(mmis_IPN_all)],binw,points_)
- a.plot(points_,d[1],"k")
- a.fill_between(points_,d[1],color="k",alpha=.3)
- a.plot([np.nanmedian(mmis_IPN_all[np.isfinite(mmis_IPN_all)]),
- np.nanmedian(mmis_IPN_all[np.isfinite(mmis_IPN_all)])],[0,.3],"--",c="k",lw=2)
- a.set_ylabel("Density",fontsize=20)
- a.set_xlabel("Multiplication\nindex",fontsize=20)
- a.set_ylim([0,.3])
- a.set_xlim([-6,6])
- a.set_yticks([0,.1,.2,.3])
- a.set_yticklabels([0,.1,.2,.3],fontsize=20)
- a.set_xticks([-6,-3,0,3,6])
- a.set_xticklabels([-6,-3,0,3,6],fontsize=20)
- sns.despine()
- f.set_size_inches([3.5,5])
- plt.tight_layout()
- plt.show()
- plt.savefig(save_fig / "S7_B.png",dpi=800,bbox_inches="tight")
- plt.savefig(save_fig / "S7_B.svg",dpi=800,bbox_inches="tight")
- # %%
- mannwhitneyu(mmis_dhb_all[np.isfinite(mmis_dhb_all)],
- mmis_IPN_all[np.isfinite(mmis_IPN_all)])
- # %%
- print(np.nanmedian(mmis_IPN_all[np.isfinite(mmis_IPN_all)]),
- np.nanmedian(mmis_dhb_all[np.isfinite(mmis_dhb_all)]))
- # %%
- bins = np.linspace(-8,8,6)
- mmis_dhb_hist = []
- for i in mmis_dhb:
- c,_ = np.histogram(i[:,0],bins)
- c = c / np.sum(c)
- mmis_dhb_hist.append(c)
- mmis_dhb_hist = np.stack(mmis_dhb_hist)
- mmis_IPN_hist = []
- for i in mmis_IPN:
- c,_ = np.histogram(i[:,0],bins)
- c = c / np.sum(c)
- mmis_IPN_hist.append(c)
- mmis_IPN_hist = np.stack(mmis_IPN_hist)
- # %%
- bins_plot = (bins[:-1]+bins[1:])/2
- f,a = plt.subplots()
- a.plot(bins_plot,np.nanmean(mmis_dhb_hist,0),c="gray",lw=3)
- a.fill_between(bins_plot, np.nanmean(mmis_dhb_hist,0)-sem(mmis_dhb_hist,0,nan_policy="omit"),
- np.nanmean(mmis_dhb_hist,0)+sem(mmis_dhb_hist,0,nan_policy="omit"),lw=0,alpha=.3,color="gray")
- a.plot(bins_plot,np.nanmean(mmis_IPN_hist,0),c="k",lw=3)
- a.fill_between(bins_plot, np.nanmean(mmis_IPN_hist,0)-sem(mmis_IPN_hist,0,nan_policy="omit"),
- np.nanmean(mmis_IPN_hist,0)+sem(mmis_IPN_hist,0,nan_policy="omit"),lw=0,alpha=.2,color="k")
- a.set_ylim([0,1])
- a.set_xlim([bins_plot[0],bins_plot[-1]])
- a.set_ylabel("Relative frequency",fontsize=20)
- a.set_xlabel("Multiplication\nindex",fontsize=20)
- a.set_yticks([0,.2,.4,.6,.8,1])
- a.set_yticklabels([0,.2,.4,.6,.8,1],fontsize=20)
- a.set_xticks([-6,-3,0,3,6])
- a.set_xticklabels([-6,-3,0,3,6],fontsize=20)
- sns.despine()
- f.set_size_inches([3,5])
- plt.tight_layout()
- plt.show()
- plt.savefig(save_fig / "S7_C.png",dpi=800,bbox_inches="tight")
- plt.savefig(save_fig / "S7_C.svg",dpi=800,bbox_inches="tight")
- # %%
- for i_bin in range(mmis_IPN_hist.shape[1]):
- print(np.round(np.nanmean(mmis_IPN_hist[:,i_bin]),3),
- np.round(sem(mmis_IPN_hist[:,i_bin],0,nan_policy="omit"),3),
- np.round(np.nanmean(mmis_dhb_hist[:,i_bin]),3),
- np.round(sem(mmis_dhb_hist[:,i_bin],0,nan_policy="omit"),3))
- # %%
- for i_bin in range(mmis_IPN_hist.shape[1]):
- sel_IPN = np.isfinite(mmis_IPN_hist[:,i_bin])
- sel_dhb = np.isfinite(mmis_dhb_hist[:,i_bin])
- print(mannwhitneyu(mmis_IPN_hist[sel_IPN,i_bin],mmis_dhb_hist[sel_dhb,i_bin])[1]*mmis_IPN_hist.shape[1])
FigS5__S7_BC.ipynb at commit 7e49434, no license · at the source
Overview
- Institute of Neuroscience, Technical University of Munich, Munich, Germany
- Present Address: Champalimaud Neuroscience Programme, Champalimaud Foundation, Lisbon, Portugal
- SyNergy Excellence Cluster, Munich, Germany
- Bernstein Center for Computational Neuroscience, Munich, Germany
- Max Planck Fellow Group - Mechanisms of Cognition, MPI Psychiatry, Munich, Germany
- Present Address: Department of Neurobiology and Behavior, Cornell University, Ithaca, NY USA
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 1 match between paragraphs and lines of code.
portugueslab/brunoise
0a883ebf07b75b0f83c87a00f6b66c7ca44d5298, 13 September 2024Availability: 2 checks, the latest on 4 November 2026: the link answers
- 4 November 2026: the link answers
- 27 September 2026: the link answers
18 files
- Read and write.ipynb, Jupyter, 363 lines
- brunoise/
__init__.py , Python, 7 lines - brunoise/
external_communication.p , Python, 33 linesy - brunoise/
gui.py , Python, 314 lines - brunoise/
main.py , Python, 12 lines - brunoise/
objective_motor.py , Python, 119 lines - brunoise/
objective_motor_sliders. , Python, 132 linespy - brunoise/
power_control.py , Python, 81 lines - brunoise/
scanning.py , Python, 296 lines - brunoise/
scanning_patterns.py , Python, 63 lines - brunoise/
sequence_diagram.py , Python, 14 lines - brunoise/
state.py , Python, 307 lines - brunoise/
streaming_save.py , Python, 315 lines - noxfile.py, Python, 28 lines
- setup.py, Python, 29 lines
- shutter_controller.ipynb
, Jupyter, 42 lines - LICENSE, License, 674 lines
- README.md, Text, 37 lines
portugueslab/Paoli_et_al_2025
7e494341249294af0737e2a0b00d39352e468622, 27 June 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
14 files
- FigM1_C__FigS2_CF.ipynb, Jupyter, 338 lines
- FigM1_EF.ipynb, Jupyter, 164 lines
- FigM1_HI__FigS3_BF.ipynb
, Jupyter, 430 lines - FigM2__S7_D.ipynb, Jupyter, 604 lines
- FigM4_DE.ipynb, Jupyter, 84 lines
- FigS1_EH.ipynb, Jupyter, 187 lines
- FigS5__S7_BC.ipynb, Jupyter, 469 lines, 1 match
- Fig_M2_H.ipynb, Jupyter, 109 lines
- Fig_M5.ipynb, Jupyter, 159 lines
- Fig_S1_CD.ipynb, Jupyter, 156 lines
- Functions.py, Python, 74 lines
- Functions_ROAST.py, Python, 586 lines
- Functions_imaging.py, Python, 570 lines
- README.md, Text, 1 line
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: portugueslab/
Paoli_et_al_2025
Read it in the paper: doi.org/10.1038/s41467-026-76267-z.
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:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 29 scripts, each with its path and the digest of its content;
- 1 match 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
- zenodo:15814627, at Zenodo; found in “Data availability”
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:
- it points to a dataset: Zenodo 15814627
Read it in the paper: doi.org/10.1038/s41467-026-76267-z.
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, 4 authors, 2 keywords, 12 MeSH terms, 1 funder, 63 references.
Cite
This paper
Paoli, E., Palieri, V., Shenoy, A., & Portugues, R. (2026). Modulation of habenula axon terminals supports action-outcome associations in larval zebrafish. Nature communications, 17(1), 8093. https://
BibTeX
@article{paoli2026modula
author = {Paoli, Emanuele and Palieri, Virginia and Shenoy, Amey and Portugues, Ruben},
title = {{Modulation of habenula axon terminals supports action-outcome associations in larval zebrafish}},
journal = {Nature communications},
year = {2026},
month = aug,
volume = {17},
number = {1},
pages = {8093},
publisher = {Nature Portfolio},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42575891},
pmcid = {PMC13457560}
}
RIS
TY - JOUR
AU - Paoli, Emanuele
AU - Palieri, Virginia
AU - Shenoy, Amey
AU - Portugues, Ruben
TI - Modulation of habenula axon terminals supports action-outcome associations in larval zebrafish
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 8093
SN - 2041-1723
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Modulation of habenula axon terminals supports action-outcome associations in larval zebrafish",
"container-title": "Nature communications",
"author": [
{
"family": "Paoli",
"given": "Emanuele"
},
{
"family": "Palieri",
"given": "Virginia"
},
{
"family": "Shenoy",
"given": "Amey"
},
{
"family": "Portugues",
"given": "Ruben"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "8093",
"DOI": "10.1038/
"PMID": "42575891",
"PMCID": "PMC13457560",
"ISSN": "2041-1723",
"publisher": "Nature Portfolio",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
7
]
]
}
}
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.cub.2023.12.030 [code]
- The preoptic area and dorsal habenula jointly support homeostatic navigation in larval zebrafish.Journal: Current biology : CBIn common: imageio, Numba, seaborn, 5 other tools, zebrafish, 19 references, 3 authors
- [2] doi:10.1038/s41467-025-66084-1 [code]
- Visual motion and landmark position align with heading direction in the zebrafish interpeduncular nucleus.Journal: Nature communicationsIn common: Numba, Pillow, seaborn, 4 other tools, zebrafish, 15 references, author Ruben Portugues
- [3] doi:10.1038/s41593-023-01308-5 [code]
- Neural dynamics and architecture of the heading direction circuit in zebrafish.Journal: Nature neuroscienceIn common: Numba, Pillow, seaborn, 5 other tools, zebrafish, 11 references, author Ruben Portugues
- [4] doi:10.1038/s41586-025-09888-x [code]
- Plastic landmark anchoring in zebrafish compass neurons.Journal: NatureIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, zebrafish, 12 references, author Ruben Portugues
- [5] doi:10.1038/s41467-025-62115-z [code]
- Inhibition mediated by group III metabotropic glutamate receptors regulates habenula activity and defensive behaviors.Journal: Nature communicationsIn common: zebrafish, 16 references
- [6] doi:10.1038/s41467-026-69633-4 [code]
- Visuomotor decision-making through multifeature convergence in the larval zebrafish hindbrain.Journal: Nature communicationsIn common: imageio, Pillow, seaborn, 5 other tools, zebrafish, 11 references
- [7] doi:10.1016/j.cub.2025.09.053 [code]
- Behavioral and circuit principles of temperature gradient navigation.Journal: Current biology : CBIn common: Numba, Pillow, seaborn, 5 other tools, zebrafish, 7 references
- [8] doi:10.1371/journal.pcbi.1013134 [code]
- Sensorimotor integration enhances temperature stimulus processing.Journal: PLoS computational biologyIn common: Numba, seaborn, scikit-learn, 4 other tools, zebrafish, 7 references
- [9] doi:10.1016/j.cell.2022.11.022 [code]
- A brainstem integrator for self-location memory and positional homeostasis in zebrafish.Journal: CellIn common: scikit-learn, pandas, SciPy, 2 other tools, zebrafish, 9 references
- [10] doi:10.1038/s41467-026-75490-y [code]
- Topographically organized dorsal raphe activity modulates forebrain sensory-motor representations and contributes to defensive behaviors.Journal: Nature communicationsIn common: zebrafish, 10 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: 2 repositories of the authors' code, each at its verified commit and with its license, 29 scripts, and 1 match 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:8ecfedf54eb80dc1…
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.1038/s41467-026-76267-z)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-76267-z.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-76267-z
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-76267-z"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-76267-z.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".
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.
