Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation.
The 21 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ codes/utils/figure4C_G.py, lines 434–535 · score 0.88 · StandardScaler, variance explained, principal component, stim trials, catch trials, pivoted
- [2] § Methods › Quantification and data analysis › Gradient boosted decision tree model ↔ codes/utils/figure1KL.py, lines 215–300 · score 0.78 · log loss, Optuna, Hyperparameter, minimized, rounds, optimization
- [3] § Methods › Calcium imaging ↔ converters/widefield_to_nwb.py, lines 65–135 · score 0.75 · Hamamatsu Orca, jRGECO1a, dorsal cortex, SynchronousTrigger, excitatory, exposure
- [4] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ codes/utils/figure1KL.py, lines 302–423 · score 0.67 · feature perturbation, SHAP, interventional, interaction, prediction, model
- [5] § Methods › Behavioral task and training curriculum ↔ main_control.m, lines 217–309 · score 0.67 · whisker hit, mice licked, response window, carefully, pulse, delivered
- [6] § Methods › Quantification and data analysis › Gradient boosted decision tree model ↔ codes/utils/figure1IJ.py, lines 53–97 · score 0.65 · Jaw speed, whisker speed, pupil area, whisker angle, rewarded, mouse
- [7] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ codes/utils/figure4C_G.py, lines 434–535 · score 0.64 · tjM1, tjS1, coefficient, ALM, space, correlation
- [8] § Methods › Behavioral task and training curriculum ↔ update_parameters.m, lines 42–153 · score 0.63 · inter trial interval, response window, detection, weight, ms, threshold
- [9] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ utils_opto/rescue_gui.m, the whole file · a weak match · score 0.61 · brown noise, pink noise, response window, punished, delivered, background
- [10] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ update_parameters.m, lines 1–40 · score 0.61 · brown noise, pink noise, response window, punished, delivered, rewarded
- [11] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ codes/utils/figure1IJ.py, lines 12–51 · score 0.60 · Jaw speed, jaw angle, quiet window, whisker speed, baseline, Figure 1
- [12] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ utils_plots/plot_performance.m, the whole file · a weak match · score 0.59 · alarm rate, hit rate, Lick rates, reward, auditory, stimulus
- [13] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ main_analysis/model_context_behaviour.py, lines 19–145 · score 0.57 · Pupil area, whisker angle, likelihood, subtracted, filtered, threshold
- [14] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ update_parameters.m, lines 287–339 · score 0.56 · background noise, context sounds, context blocks, reward, stimulus, Mice
- [15] § Methods › Implantation of headpost and skull preparation ↔ converters/widefield_to_nwb.py, lines 65–135 · score 0.55 · left hemisphere, widefield imaging, dorsal cortex, optically
- [16] § Methods › Quantification and data analysis › Seed correlations ↔ main_analysis/figure4_analysis.py, lines 149–172 · score 0.55 · tjM1, tjS1, S2, ALM, ROI, RSC
- [17] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ main_analysis/process_deeplabcut_data.py, lines 50–110 · score 0.54 · Pupil area, whisker angle, likelihood, filtered, threshold, timestamps
- [18] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ main_analysis/figure4_analysis.py, lines 149–172 · score 0.53 · tjM1, tjS1, ALM, ROI, RSC, traces
- [19] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ codes/utils/figure1IJ.py, lines 53–97 · score 0.53 · jaw speed, pupil area, whisker angle, licking, Figure 1, mouse
- [20] § Methods › Quantification and data analysis › Gradient boosted decision tree model ↔ main_control.m, lines 217–309 · score 0.52 · correct rejection, context block, variables, hit, window, rewarded
- [21] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ codes/utils/figure3_supp.py, lines 520–599 · score 0.52 · whisker speed, jaw opening, Whisker angle, Vertical, traces, whisker trials
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
Python · 301 lines · 15 KB · MIT · 3 matches
- import gc
- import os
- import seaborn as sns
- import pandas as pd
- import numpy as np
- from scipy.stats import ttest_rel
- import matplotlib.pyplot as plt
- from codes.utils.misc.fig_saving import save_fig
- from codes.utils.misc.table_saving import save_table
- def plot_baseline_differences(side_dlc_data, top_dlc_data, save_path, supp_save_path, figname,
- fig_formats=['png', 'svg']):
- s_path = os.path.join(supp_save_path, 'figure1_supp2')
- if not os.path.exists(s_path):
- os.makedirs(s_path)
- print('Data formatting')
- uncentered_combined_side_data = side_dlc_data.copy(deep=True)
- uncentered_combined_top_data = top_dlc_data.copy(deep=True)
- del side_dlc_data, top_dlc_data
- gc.collect()
- # DATA : processing
- uncentered_combined_side_data['jaw_angle'] = 90 - uncentered_combined_side_data['jaw_angle']
- uncentered_combined_side_data['trial_count'] = (uncentered_combined_side_data['time'].diff().abs() > 1).cumsum()
- trial_counts = uncentered_combined_side_data['trial_count'].to_numpy()
- jaw_y = uncentered_combined_side_data['jaw_y'].to_numpy()
- jaw_speed_vals = np.empty(len(jaw_y), dtype=jaw_y.dtype)
- jaw_speed_vals[0] = np.nan
- same_trial = trial_counts[1:] == trial_counts[:-1]
- jaw_speed_vals[1:] = np.where(same_trial, np.abs(np.diff(jaw_y)), np.nan)
- uncentered_combined_side_data['jaw_speed'] = jaw_speed_vals * 200
- del jaw_speed_vals, trial_counts, jaw_y
- gc.collect()
- uncentered_combined_top_data['whisker_speed'] = uncentered_combined_top_data['whisker_velocity'].abs() * 200
- uncentered_combined_top_data['trial_count'] = (uncentered_combined_top_data['time'].diff().abs() > 1).cumsum()
- # DATA : time selection (quiet window)
- uncentered_combined_side_data = uncentered_combined_side_data[
- uncentered_combined_side_data.time < 0].copy()
- uncentered_combined_top_data = uncentered_combined_top_data[
- uncentered_combined_top_data.time < 0].copy()
- gc.collect()
- # DATA : correct choice
- uncentered_combined_top_data['correct_choice'] = uncentered_combined_top_data['correct_choice'].astype(bool)
- uncentered_combined_side_data['correct_choice'] = uncentered_combined_side_data['correct_choice'].astype(bool)
- # DATA : readable legends
- uncentered_combined_side_data['legend'] = (
- uncentered_combined_side_data['context'] + ' - ' +
- uncentered_combined_side_data['correct_choice'].map({True: 'correct', False: 'incorrect', 1: 'correct', 0: 'incorrect'})
- )
- uncentered_combined_side_data['stim_type'] = uncentered_combined_side_data['trial_type'].str.split('_').str[0]
- uncentered_combined_side_data = uncentered_combined_side_data.loc[
- uncentered_combined_side_data.trial_type.str.contains('trial')]
- uncentered_combined_top_data['legend'] = (
- uncentered_combined_top_data['context'] + ' - ' +
- uncentered_combined_top_data['correct_choice'].map({True: 'correct', False: 'incorrect', 1: 'correct', 0: 'incorrect'})
- )
- uncentered_combined_top_data['stim_type'] = uncentered_combined_top_data['trial_type'].str.split('_').str[0]
- uncentered_combined_top_data = uncentered_combined_top_data.loc[
- uncentered_combined_top_data.trial_type.str.contains('trial')]
- # DATA : final average and merge side and top
- print('Data averaging')
- groupby_cols = ['mouse_id', 'session_id', 'context', 'context_background',
- 'trial_type', 'correct_choice', 'legend', 'stim_type', 'trial_count']
- side_agg = uncentered_combined_side_data.groupby(by=groupby_cols).agg(
- {'jaw_y': 'mean', 'jaw_speed': 'mean', 'pupil_area': 'mean'}).reset_index()
- del uncentered_combined_side_data
- gc.collect()
- top_agg = uncentered_combined_top_data.groupby(by=groupby_cols).agg(
- {'whisker_angle': 'mean', 'whisker_speed': 'mean'}).reset_index()
- del uncentered_combined_top_data
- gc.collect()
- data = side_agg.merge(top_agg[['trial_count', 'whisker_angle', 'whisker_speed']], on='trial_count')
- del side_agg, top_agg
- gc.collect()
- data = data.melt(
- id_vars=['mouse_id', 'session_id', 'context', 'trial_type', 'correct_choice', 'legend', 'stim_type',
- 'trial_count'], value_vars=['jaw_y', 'jaw_speed', 'pupil_area', 'whisker_angle', 'whisker_speed'],
- var_name='bodypart')
- data['correct_choice'] = data.correct_choice.astype(bool)
- data['lick'] = data['legend'].map(
- {'non-rewarded - incorrect': 1, 'non-rewarded - correct': 0, 'rewarded - correct': 1,
- 'rewarded - incorrect': 0}).astype(bool)
- # DATA : only whisker trials
- data = data[data.stim_type == 'whisker'].copy()
- gc.collect()
- data['value'] = pd.to_numeric(data['value'], errors='coerce')
- n_comparisons = 20
- # ── shared stats helper ────────────────────────────────────────────────
- def compute_stats(name, correct, incorrect):
- cv = correct['value'].values.astype(float)
- iv = incorrect['value'].values.astype(float)
- diff = cv - iv
- std_diff = np.std(diff, ddof=1)
- t, p = ttest_rel(cv, iv)
- return {
- 'dof': correct.mouse_id.unique().shape[0] - 1,
- 'mean_correct': correct['value'].mean(),
- 'std_correct': correct['value'].std(),
- 'mean_incorrect': incorrect['value'].mean(),
- 'std_incorrect': incorrect['value'].std(),
- 't': t,
- 'p': np.round(p, 8),
- 'p_corr': p * n_comparisons,
- 'alpha': 0.05,
- 'alpha_corr': 0.05 / n_comparisons,
- 'significant': p * n_comparisons < 0.05,
- 'd_prime': abs(correct['value'].mean() - incorrect['value'].mean()) / std_diff,
- }
- # ───────────────────────────────────────────────────────────────────────
- # CONTEXT EFFECT
- print(' ')
- print('Context effect ... ')
- context_data = data.drop(['trial_type', 'correct_choice', 'legend', 'stim_type', 'lick'], axis=1).groupby(
- by=['mouse_id', 'session_id', 'context', 'bodypart'], as_index=False).agg('mean')
- context_data = context_data.drop('session_id', axis=1).groupby(
- by=['mouse_id', 'context', 'bodypart'], as_index=False).agg('mean')
- stats = []
- for name, group in context_data.groupby(by='bodypart'):
- correct = group.loc[group.context == 'rewarded'].dropna()
- incorrect = group.loc[group.context == 'non-rewarded'].dropna()
- if correct.shape[0] != incorrect.shape[0]:
- correct = correct[correct.mouse_id.isin(incorrect.mouse_id)]
- row = compute_stats(name, correct, incorrect)
- row['bodypart'] = name
- stats.append(row)
- stats = pd.DataFrame(stats)
- save_table(stats, s_path, 'Figure1_supp2BC_context_stats')
- print('Stats done')
- fig, axes = plt.subplots(1, len(context_data.bodypart.unique()), figsize=(12, 3))
- for ax, part in zip(axes.flat, context_data.bodypart.unique()):
- subset = context_data[context_data.bodypart == part].dropna()
- ax.set_title(f"delta {part} \nn = {stats.loc[(stats.bodypart == part), 'dof'].to_numpy()[0] + 1}")
- ax.spines[['top', 'right']].set_visible(False)
- sns.pointplot(subset, x='context', y='value', hue='context', legend=False,
- order=['non-rewarded', 'rewarded'], palette=['#6E188A', '#348A18'],
- estimator='mean', errorbar=('ci', 95), markers='o',
- linestyle='none', dodge=True, ax=ax)
- pivoted = subset.pivot(index='mouse_id', columns='context', values='value').dropna()
- for _, row in pivoted.iterrows():
- ax.plot([0.1, 0.9], row.values, color='gray', alpha=0.4, linewidth=3)
- if stats.loc[stats.bodypart == part, 'significant'].any():
- star_loc = max(ax.get_ylim())
- ax.scatter(.5, stats.loc[(stats.bodypart == part), 'significant'].map(
- {True: 1}).to_numpy() * star_loc * 0.9, marker='*', s=100, c='k')
- ax.margins(x=0.25)
- fig.tight_layout()
- save_fig(fig, s_path, figname + '_supp2BC_context', fig_formats)
- print('Plots done')
- # LICK EFFECT
- print(' ')
- print('Lick effect ...')
- lick_data = data.drop(['trial_type', 'correct_choice', 'legend', 'stim_type', 'context'], axis=1).groupby(
- by=['mouse_id', 'session_id', 'lick', 'bodypart'], as_index=False).agg('mean')
- lick_data = lick_data.drop('session_id', axis=1).groupby(
- by=['mouse_id', 'lick', 'bodypart'], as_index=False).agg('mean')
- stats = []
- for name, group in lick_data.groupby(by='bodypart'):
- correct = group.loc[group.lick == True].dropna()
- incorrect = group.loc[group.lick == False].dropna()
- if correct.shape[0] != incorrect.shape[0]:
- correct = correct[correct.mouse_id.isin(incorrect.mouse_id)]
- row = compute_stats(name, correct, incorrect)
- row['bodypart'] = name
- stats.append(row)
- stats = pd.DataFrame(stats)
- save_table(stats, s_path, 'Figure1_supp2BC_lick_stats')
- print('Stats done')
- fig, axes = plt.subplots(1, len(lick_data.bodypart.unique()), figsize=(12, 3))
- for ax, part in zip(axes.flat, lick_data.bodypart.unique()):
- subset = lick_data[lick_data.bodypart == part].dropna()
- ax.set_title(f"delta {part} \nn = {stats.loc[(stats.bodypart == part), 'dof'].to_numpy()[0] + 1}")
- ax.spines[['top', 'right']].set_visible(False)
- sns.pointplot(subset, x='lick', y='value', hue='lick', legend=False,
- order=[False, True], palette=['#a0a0a0', '#000000'],
- estimator='mean', errorbar=('ci', 95), markers='o',
- linestyle='none', dodge=True, ax=ax)
- pivoted = subset.pivot(index='mouse_id', columns='lick', values='value').dropna()
- for _, row in pivoted.iterrows():
- ax.plot([0.1, 0.9], row.values, color='gray', alpha=0.4, linewidth=3)
- if stats.loc[stats.bodypart == part, 'significant'].any():
- star_loc = max(ax.get_ylim())
- ax.scatter(.5, stats.loc[(stats.bodypart == part), 'significant'].map(
- {True: 1}).to_numpy() * star_loc * 0.9, marker='*', s=100, c='k')
- ax.margins(x=0.25)
- fig.tight_layout()
- save_fig(fig, s_path, figname + '_supp2BC_lick', fig_formats)
- print('Plots done')
- # CONTEXT - LICK INTERACTION EFFECT
- print(' ')
- print('Context - Lick interaction effect ...')
- lick_vs_context_data = data.drop(['trial_type', 'correct_choice', 'legend', 'stim_type'], axis=1).groupby(
- by=['mouse_id', 'session_id', 'context', 'lick', 'bodypart'], as_index=False).agg('mean')
- lick_vs_context_data = lick_vs_context_data.drop('session_id', axis=1).groupby(
- by=['mouse_id', 'context', 'lick', 'bodypart'], as_index=False).agg('mean')
- lick_vs_context_data['legend'] = (
- lick_vs_context_data['context'] + ' - ' +
- lick_vs_context_data['lick'].map({True: 'lick', False: 'no-lick'})
- )
- del data
- gc.collect()
- stats = []
- for name, group in lick_vs_context_data.groupby(by=['bodypart', 'context']):
- correct = group.loc[group.lick == True].dropna()
- incorrect = group.loc[group.lick == False].dropna()
- if correct.shape[0] != incorrect.shape[0]:
- correct = correct[correct.mouse_id.isin(incorrect.mouse_id)]
- row = compute_stats(name, correct, incorrect)
- row['bodypart'] = name[0]
- row['context'] = name[1]
- stats.append(row)
- stats = pd.DataFrame(stats)
- save_table(stats, save_path, 'Figure1IJ_stats')
- print('Stats done')
- palette = {'non-rewarded - no-lick': '#C5A2D0',
- 'non-rewarded - lick': '#6E188A',
- 'rewarded - no-lick': '#ADD0A2',
- 'rewarded - lick': '#348A18'}
- legend_order = ['non-rewarded - no-lick', 'non-rewarded - lick', 'rewarded - no-lick', 'rewarded - lick']
- reference = 'non-rewarded - no-lick'
- norm_df = []
- for i, row in lick_vs_context_data.iterrows():
- mouse_id = row.mouse_id
- bodypart = row.bodypart
- ref_val = lick_vs_context_data.loc[
- (lick_vs_context_data.mouse_id == mouse_id) &
- (lick_vs_context_data.bodypart == bodypart) &
- (lick_vs_context_data.legend == reference), 'value'].to_numpy()
- if len(ref_val) > 0:
- row = row.copy()
- row['value'] = float(row['value']) - float(ref_val[0])
- norm_df += [row]
- norm_df = pd.DataFrame(norm_df)
- norm_df['value'] = pd.to_numeric(norm_df['value'], errors='coerce')
- lick_vs_context_data = norm_df
- fig, axes = plt.subplots(1, len(lick_vs_context_data.bodypart.unique()), figsize=(12, 3))
- for ax, part in zip(axes.flat, lick_vs_context_data.bodypart.unique()):
- ax.set_title(f"delta {part} \nn = {stats.loc[(stats.bodypart == part), 'dof'].unique()[0] + 1}")
- ax.margins(x=0.25)
- ax.spines[['top', 'right']].set_visible(False)
- subset = lick_vs_context_data[lick_vs_context_data.bodypart == part].dropna()
- subset = subset.copy()
- subset['legend'] = subset['context'] + ' - ' + subset['lick'].map({True: 'lick', False: 'no-lick'})
- sns.pointplot(subset, x='legend', y='value', hue='legend',
- order=legend_order, hue_order=legend_order, palette=palette,
- estimator='mean', errorbar=('ci', 95), markers='o',
- linestyle='none', dodge=False, ax=ax)
- legend = ax.get_legend()
- if legend is not None:
- legend.set_visible(False)
- ax.set_xlabel('')
- ax.set_xticklabels([])
- for c in lick_vs_context_data.context.unique():
- no_lick_label = f"{c} - no-lick"
- lick_label = f"{c} - lick"
- pivoted = (subset.loc[subset.context == c]
- .pivot(index='mouse_id', columns='lick', values='value')
- .dropna())
- for _, row in pivoted.iterrows():
- ax.plot([no_lick_label, lick_label], row.values, color='gray', alpha=0.4, linewidth=3)
- is_significant = stats.loc[
- (stats.bodypart == part) & (stats.context == c), 'significant'].values
- if len(is_significant) > 0 and is_significant[0]:
- ax.annotate('*', xy=(lick_label, max(ax.get_ylim()) * 0.9),
- ha='center', va='bottom', fontsize=14, color='k')
- fig.tight_layout()
- save_fig(fig, save_path, figname + 'IJ', fig_formats)
- print('Plots done')
figure1IJ.py at commit 91f04fd, under MIT · at the source
Overview
Abstract
The ability to dynamically adjust a behavioral response to a stimulus depending on context is of critical importance for animals. To investigate the neural basis supporting context-dependent sensory processing, we developed a behavioral task in which mice changed their response to a single whisker deflection according to a continuously present contextual cue. Through unbiased optogenetic inactivation mapping, we found that neuronal activity in sensory and motor cortices contributed to task execution and, interestingly, we uncovered an unexpected role of the retrosplenial cortex (RSC) for contextual integration. Widefield calcium imaging revealed that the RSC was the first dorsal cortical area to show context discrimination in response to whisker stimulation, followed by the whisker motor cortex. Finally, we combined optogenetic inactivation with calcium imaging to define causal context-dependent changes in sensorimotor processing. Our cortex-wide mapping experiments thus begin to define key cortical nodes for context-dependent sensorimotor transformation and highlight an important contribution of RSC.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 21 matches between paragraphs and lines of code.
LSENS-BMI-EPFL/behavior_control
832408ee6f7c4bc4e6e4de6290ca4f04e1ee5a1f, 28 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
41 files, not copied: shown from their source
OSCR keeps no copy of these files: this repository has no license that allows it. The reader above shows each one from its source, fetched by your browser at commit 832408e, when its fingerprint is the one OSCR verified. How this works.
- DetectionGUI.m — MATLAB, 2,917 lines, shown from its source
- calibration_coil.m — MATLAB, 267 lines, shown from its source
- defining_sessions.m — MATLAB, 251 lines, shown from its source
- main_control.m — MATLAB, 486 lines, 2 matches, shown from its source
- manual_reward_delivery.m
— MATLAB, 9 lines, shown from its source - reward_delivery.m — MATLAB, 12 lines, shown from its source
- startup.m — MATLAB, 6 lines, shown from its source
- stop_sessions.m — MATLAB, 277 lines, shown from its source
- update_parameters.m — MATLAB, 1,186 lines, 3 matches, shown from its source
- utils/
compute_stim_proba.m — MATLAB, 23 lines, shown from its source - utils/
get_whisker_stim_amp.m — MATLAB, 101 lines, shown from its source - utils/
get_whisker_weight.m — MATLAB, 15 lines, shown from its source - utils_TTL/
TTL_build_trial_vectors. — MATLAB, 75 lines, shown from its sourcem - utils_TTL/
TTL_stim_compute_do.m — MATLAB, 25 lines, shown from its source - utils_TTL/
TTL_stim_compute_preview — MATLAB, 22 lines, shown from its source.m - utils_TTL/
TTL_stim_compute_starts. — MATLAB, 24 lines, shown from its sourcem - utils_TTL/
ttl_vec_to_edges.m — MATLAB, 23 lines, shown from its source - utils_context/
create_context_backgroun — MATLAB, 12 lines, shown from its sourced_noise.m - utils_context/
get_or_determine_mouse_r — MATLAB, 20 lines, shown from its sourceewarded_context.m - utils_context/
play_context_background. — MATLAB, 24 lines, shown from its sourcem - utils_opto/
draw_new_grid.m — MATLAB, 23 lines, shown from its source - utils_opto/
get_bregma.m — MATLAB, 30 lines, shown from its source - utils_opto/
get_envelope.m — MATLAB, 30 lines, shown from its source - utils_opto/
get_next_grid.m — MATLAB, 138 lines, shown from its source - utils_opto/
get_opto_vec.m — MATLAB, 31 lines, shown from its source - utils_opto/
get_step.m — MATLAB, 19 lines, shown from its source - utils_opto/
get_stim_grid.m — MATLAB, 123 lines, shown from its source - utils_opto/
load_opto_vec.m — MATLAB, 25 lines, shown from its source - utils_opto/
opto_setup.m — MATLAB, 34 lines, shown from its source - utils_opto/
opto_wf_setup.m — MATLAB, 23 lines, shown from its source - utils_opto/
rescue_gui.m — MATLAB, 91 lines, 1 match, shown from its source - utils_opto/
save_opto_config.m — MATLAB, 22 lines, shown from its source - utils_opto/
set_bregma.m — MATLAB, 57 lines, shown from its source - utils_opto/
update_and_save_opto_csv — MATLAB, 21 lines, shown from its source.m - utils_plots/
compute_performance.m — MATLAB, 25 lines, shown from its source - utils_plots/
compute_reward_volume.m — MATLAB, 25 lines, shown from its source - utils_plots/
plot_performance.m — MATLAB, 97 lines, 1 match, shown from its source - utils_savings/
log_continuously.m — MATLAB, 166 lines, shown from its source - utils_savings/
save_session_config.m — MATLAB, 45 lines, shown from its source - utils_savings/
update_and_save_results_ — MATLAB, 19 lines, shown from its sourcecsv.m - README.md — Text, 51 lines, shown from its source
LSENS-BMI-EPFL/NWB_converter
96afc9b049aa887597325d3451eda3216ecf31a7, 27 September 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
35 files, not copied: shown from their source
OSCR keeps no copy of these files: this repository has no license that allows it. The reader above shows each one from its source, fetched by your browser at commit 96afc9b, when its fingerprint is the one OSCR verified. How this works.
- NWB_conversion.py — Python, 251 lines, shown from its source
- NWB_conversion_parallel.
py — Python, 397 lines, shown from its source - continuous_log_analysis.
py — Python, 154 lines, shown from its source - converters/
DLC_to_nwb.py — Python, 171 lines, shown from its source - converters/
behavior_to_nwb.py — Python, 350 lines, shown from its source - converters/
ci_movie_to_nwb.py — Python, 111 lines, shown from its source - converters/
ephys_to_nwb.py — Python, 579 lines, shown from its source - converters/
ephys_to_nwb_test.py — Python, 674 lines, shown from its source - converters/
facemap_to_nwb.py — Python, 88 lines, shown from its source - converters/
images_to_nwb.py — Python, 31 lines, shown from its source - converters/
nwb_saving.py — Python, 59 lines, shown from its source - converters/
subject_to_nwb.py — Python, 95 lines, shown from its source - converters/
suite2p_to_nwb.py — Python, 207 lines, shown from its source - converters/
widefield_to_nwb.py — Python, 201 lines, 2 matches, shown from its source - make_yaml_config.py — Python, 802 lines, shown from its source
- make_yaml_config_GF.py — Python, 423 lines, shown from its source
- metadata_to_yaml.py — Python, 86 lines, shown from its source
- notebooks/
make_ref.py — Python, 5 lines, shown from its source - notebooks/
nwb_widget.ipynb — Jupyter, 23 lines, shown from its source - notebooks/
waveform_check.ipynb — Jupyter, 113 lines, shown from its source - notebooks/
widefield_roi_management — Python, 210 lines, shown from its source.py - session_stitching.py — Python, 280 lines, shown from its source
- utils/
behavior_converter_misc. — Python, 920 lines, shown from its sourcepy - utils/
ci_processing.py — Python, 283 lines, shown from its source - utils/
continuous_processing.py — Python, 867 lines, shown from its source - utils/
dlc_utils.py — Python, 318 lines, shown from its source - utils/
ephys_converter_misc.py — Python, 2,061 lines, shown from its source - utils/
readSLGX.py — Python, 461 lines, shown from its source - utils/
read_sglx.py — Python, 407 lines, shown from its source - utils/
server_paths.py — Python, 678 lines, shown from its source - utils/
sglx_meta_to_coords.py — Python, 683 lines, shown from its source - utils/
tiff_loading.py — Python, 114 lines, shown from its source - utils/
utils_gf.py — Python, 320 lines, shown from its source - utils/
widefield_utils.py — Python, 360 lines, shown from its source - README.md — Text, 43 lines, shown from its source
LSENS-BMI-EPFL/Bech_Dard_process_NWB
212a63103528cdeafb6ebcf90a50235cd2290082, 30 June 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
17 files, not copied: shown from their source
OSCR keeps no copy of these files: this repository has no license that allows it. The reader above shows each one from its source, fetched by your browser at commit 212a631, when its fingerprint is the one OSCR verified. How this works.
- main_analysis/
dandi_formatting.py — Python, 82 lines, shown from its source - main_analysis/
dandi_formatting_check.p — Python, 35 lines, shown from its sourcey - main_analysis/
figure1_analysis.py — Python, 52 lines, shown from its source - main_analysis/
figure1_supp_analysis.py — Python, 403 lines, shown from its source - main_analysis/
figure2_analysis.py — Python, 224 lines, shown from its source - main_analysis/
figure2_supp_analysis.py — Python, 30 lines, shown from its source - main_analysis/
figure2_supp_stats.py — Python, 346 lines, shown from its source - main_analysis/
figure3_analysis.py — Python, 139 lines, shown from its source - main_analysis/
figure3_supp_analysis.py — Python, 113 lines, shown from its source - main_analysis/
figure4_analysis.py — Python, 302 lines, 2 matches, shown from its source - main_analysis/
model_context_behaviour. — Python, 229 lines, 1 match, shown from its sourcepy - main_analysis/
panel_data_format.py — Python, 357 lines, shown from its source - main_analysis/
pixel_correlation_analys — Python, 200 lines, shown from its sourceis.py - main_analysis/
pixel_correlation_proces — Python, 67 lines, shown from its sourcesing.py - main_analysis/
process_deeplabcut_data. — Python, 271 lines, 1 match, shown from its sourcepy - main_analysis/
process_opto_widefield_e — Python, 138 lines, shown from its sourcexamples.py - README.md — Text, 71 lines, shown from its source
LSENS-BMI-EPFL/Bech_Dard_plot_figures
91f04fd782e609e53e800f33009c9b1f815ddf18, 30 June 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
51 files
- codes/
__init__.py — Python, 1 line - codes/
figure_files/ — Python, 1 line__init__.py - codes/
figure_files/ — Python, 86 linesfigure1.py - codes/
figure_files/ — Python, 57 linesfigure1_supp1.py - codes/
figure_files/ — Python, 22 linesfigure1_supp2.py - codes/
figure_files/ — Python, 28 linesfigure1_supp3.py - codes/
figure_files/ — Python, 27 linesfigure2.py - codes/
figure_files/ — Python, 32 linesfigure2_supp1.py - codes/
figure_files/ — Python, 19 linesfigure2_supp2.py - codes/
figure_files/ — Python, 25 linesfigure2_supp3.py - codes/
figure_files/ — Python, 89 linesfigure3.py - codes/
figure_files/ — Python, 41 linesfigure3_supp1.py - codes/
figure_files/ — Python, 22 linesfigure3_supp2.py - codes/
figure_files/ — Python, 16 linesfigure3_supp3.py - codes/
figure_files/ — Python, 31 linesfigure3_supp4.py - codes/
figure_files/ — Python, 27 linesfigure3_supp5.py - codes/
figure_files/ — Python, 27 linesfigure4.py - codes/
utils/ — Python, 25 lines__init__.py - codes/
utils/ — Python, 81 linesfigure1B.py - codes/
utils/ — Python, 104 linesfigure1C.py - codes/
utils/ — Python, 75 linesfigure1D.py - codes/
utils/ — Python, 88 linesfigure1E.py - codes/
utils/ — Python, 92 linesfigure1FG.py - codes/
utils/ — Python, 77 linesfigure1H.py - codes/
utils/ — Python, 301 lines, 3 matchesfigure1IJ.py - codes/
utils/ — Python, 628 lines, 2 matchesfigure1KL.py - codes/
utils/ — Python, 287 linesfigure1_supp.py - codes/
utils/ — Python, 209 linesfigure1_supp3.py - codes/
utils/ — Python, 125 linesfigure2CDE.py - codes/
utils/ — Python, 117 linesfigure2F.py - codes/
utils/ — Python, 355 linesfigure2_supp.py - codes/
utils/ — Python, 28 linesfigure3D.py - codes/
utils/ — Python, 13 linesfigure3E_images.py - codes/
utils/ — Python, 60 linesfigure3E_psth.py - codes/
utils/ — Python, 10 linesfigure3F_images.py - codes/
utils/ — Python, 105 linesfigure3F_psths.py - codes/
utils/ — Python, 130 linesfigure3G.py - codes/
utils/ — Python, 30 linesfigure3H.py - codes/
utils/ — Python, 731 lines, 1 matchfigure3_supp.py - codes/
utils/ — Python, 883 linesfigure4A_B.py - codes/
utils/ — Python, 548 lines, 2 matchesfigure4C_G.py - codes/
utils/ — Python, 9 linesmisc/ __init__.py - codes/
utils/ — Python, 17 linesmisc/ fig_saving.py - codes/
utils/ — Python, 153 linesmisc/ plot_average_widefield_t imecourse.py - codes/
utils/ — Python, 153 linesmisc/ plot_on_allen.py - codes/
utils/ — Python, 224 linesmisc/ plot_on_grid.py - codes/
utils/ — Python, 49 linesmisc/ plot_utils.py - codes/
utils/ — Python, 363 linesmisc/ stats.py - codes/
utils/ — Python, 56 linesmisc/ table_saving.py - LICENSE — License, 21 lines
- README.md — Text, 64 lines
Zenodo 17424306
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
Code availability
Code for data acquisition and behavior control is available on Github (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 5 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 139 scripts, each with its path and the digest of its content;
- 21 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
- doi:10.48324/
dandi.001847/ — at DANDI; found in “Data availability”0.260610.1400 - zenodo:17424305 — at Zenodo; found in DataCite
Data availability
For each imaging session, imaging data, behavioral data, cortical region contours, and calcium traces were combined into a single NWB file. NWB offers a common format for sharing and analyzing neurophysiology data (Rübel et al., 2022). Subsequently, we developed open-source Python scripts to analyze data in the NWB format. The full dataset in NWB format is available on the DANDI archive (https://
The following datasets were generated:
BechP DardRF LebertJ SmithL BisiA RenardA CrochetS PetersenCCH 2026Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformationDANDI10.48
BechP DardRF LebertJ SmithL BisiA RenardA CrochetS PetersenCCH 2026Data set for "Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation"Zenodo10.
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 8 authors, 7 keywords, 10 MeSH terms, 1 funder, 112 references.
Cite
This paper
Bech, P., Dard, R. F., Lebert, J., Smith, L., Bisi, A., Renard, A., Crochet, S., & Petersen, C. C. (2026). Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation. eLife, 14, RP109717. https://
BibTeX
@article{bech2026retrosp
author = {Bech, Pol and Dard, Robin F and Lebert, Jules and Smith, Lana and Bisi, Axel and Renard, Anthony and Crochet, Sylvain and Petersen, Carl CH},
title = {{Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation}},
journal = {eLife},
year = {2026},
month = jun,
volume = {14},
pages = {RP109717},
publisher = {eLife Sciences Publications, Ltd},
issn = {2050-084X},
doi = {10.7554/
url = {https://
pmid = {42372004},
pmcid = {PMC13313688}
}
RIS
TY - JOUR
AU - Bech, Pol
AU - Dard, Robin F
AU - Lebert, Jules
AU - Smith, Lana
AU - Bisi, Axel
AU - Renard, Anthony
AU - Crochet, Sylvain
AU - Petersen, Carl CH
TI - Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation
T2 - eLife
J2 - Elife
PY - 2026
DA - 2026/
VL - 14
SP - RP109717
SN - 2050-084X
PB - eLife Sciences Publications, Ltd
DO - 10.7554/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.7554/
"type": "article-journal",
"title": "Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation",
"container-title": "eLife",
"author": [
{
"family": "Bech",
"given": "Pol"
},
{
"family": "Dard",
"given": "Robin F"
},
{
"family": "Lebert",
"given": "Jules"
},
{
"family": "Smith",
"given": "Lana"
},
{
"family": "Bisi",
"given": "Axel"
},
{
"family": "Renard",
"given": "Anthony"
},
{
"family": "Crochet",
"given": "Sylvain"
},
{
"family": "Petersen",
"given": "Carl CH"
}
],
"container-title-short":
"volume": "14",
"page": "RP109717",
"DOI": "10.7554/
"PMID": "42372004",
"PMCID": "PMC13313688",
"ISSN": "2050-084X",
"publisher": "eLife Sciences Publications, Ltd",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
29
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-026-73622-y [code]
- Contextual gating of whisker-evoked responses by frontal cortex supports flexible decision making.Journal: Nature communicationsIn common: Statistics and Machine Learning Toolbox, mouse, 29 references, 2 authors
- [2] doi:10.1038/s41593-026-02232-0 [code]
- Entorhinal cortex represents task-relevant remote locations independently of CA1.Journal: Nature neuroscienceIn common: Kilosort, Neurodata Without Borders (PyNWB, MatNWB), Numba, 12 other tools, systems, mouse, 1 reference
- [3] doi:10.7554/elife.110588 [code]
- Opening the black box toward a modular approach to spike sorting.Journal: eLifeIn common: Kilosort, Neurodata Without Borders (PyNWB, MatNWB), XGBoost, 10 other tools, mouse, 1 reference
- [4] doi:10.1016/j.isci.2026.116825 [code]
- Social hierarchy shapes behavioral and transcriptional responses to chronic stress and ketamine in male mice.Journal: iScienceIn common: SHAP, XGBoost, Numba, 11 other tools, systems, mouse, 1 reference
- [5] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: SHAP, XGBoost, Numba, 11 other tools, mouse, 1 reference
- [6] doi:10.1038/s41467-026-76581-6 [code]
- Thalamocortical bursts encode reward contingencies and drive associative learning.Journal: Nature communicationsIn common: Kilosort, OpenCV, h5py, 7 other tools, systems, mouse, 4 references
- [7] doi: [code]
- Real-time closed-loop feedback system for mouse mesoscale cortical signal and movement controlJournal: eLifeIn common: imageio, tifffile, Numba, 11 other tools, mouse, 1 reference
- [8] doi:10.1016/j.celrep.2026.117420 [code]
- Neural population dynamics of direct electrical stimulation of neocortex.Journal: Cell reportsIn common: Neurodata Without Borders (PyNWB, MatNWB), imageio, OpenCV, 9 other tools, systems, mouse, 2 references
- [9] doi:10.1038/s41467-026-75347-4 [code]
- Sleep reveals dynamics integrating and segregating movement and stimulus representations in V1.Journal: Nature communicationsIn common: Neurodata Without Borders (PyNWB, MatNWB), imageio, Numba, 8 other tools, systems, mouse, 2 references
- [10] doi:10.1016/j.patter.2026.101590 [code]
- Density-based longitudinal neuron tracking in high-density electrophysiological recordings.Journal: Patterns (New York, N.Y.)In common: Kilosort, imageio, h5py, 9 other tools, 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: 5 repositories of the authors' code, each at its verified commit and with its license, 139 scripts, and 21 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:112c434c5ad1ab9f…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
