Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation.
The 21 matches · 2 of them tie a paragraph to a whole file without 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 to 535 · score 0.88 · StandardScaler, variance explained, principal component, stim trials, catch trials, pivoted · Report a mismatch
- [2] § Methods › Quantification and data analysis › Gradient boosted decision tree model ↔ codes/utils/figure1KL.py, lines 215 to 300 · score 0.78 · log loss, Optuna, Hyperparameter, minimized, rounds, optimization · Report a mismatch
- [3] § Methods › Calcium imaging ↔ converters/widefield_to_nwb.py, lines 65 to 135 · score 0.75 · Hamamatsu Orca, jRGECO1a, dorsal cortex, SynchronousTrigger, excitatory, exposure · Report a mismatch
- [4] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ codes/utils/figure1KL.py, lines 302 to 423 · score 0.67 · feature perturbation, SHAP, interventional, interaction, prediction, model · Report a mismatch
- [5] § Methods › Behavioral task and training curriculum ↔ main_control.m, lines 217 to 309 · score 0.67 · whisker hit, mice licked, response window, carefully, pulse, delivered · Report a mismatch
- [6] § Methods › Quantification and data analysis › Gradient boosted decision tree model ↔ codes/utils/figure1IJ.py, lines 53 to 97 · score 0.65 · Jaw speed, whisker speed, pupil area, whisker angle, rewarded, mouse · Report a mismatch
- [7] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ codes/utils/figure4C_G.py, lines 434 to 535 · score 0.64 · tjM1, tjS1, coefficient, ALM, space, correlation · Report a mismatch
- [8] § Methods › Behavioral task and training curriculum ↔ update_parameters.m, lines 42 to 153 · score 0.63 · inter trial interval, response window, detection, weight, ms, threshold · Report a mismatch
- [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 · Report a mismatch
- [10] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ update_parameters.m, lines 1 to 40 · score 0.61 · brown noise, pink noise, response window, punished, delivered, rewarded · Report a mismatch
- [11] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ codes/utils/figure1IJ.py, lines 12 to 51 · score 0.60 · Jaw speed, jaw angle, quiet window, whisker speed, baseline, Figure 1 · Report a mismatch
- [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 · Report a mismatch
- [13] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ main_analysis/model_context_behaviour.py, lines 19 to 145 · score 0.57 · Pupil area, whisker angle, likelihood, subtracted, filtered, threshold · Report a mismatch
- [14] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ update_parameters.m, lines 287 to 339 · score 0.56 · background noise, context sounds, context blocks, reward, stimulus, Mice · Report a mismatch
- [15] § Methods › Implantation of headpost and skull preparation ↔ converters/widefield_to_nwb.py, lines 65 to 135 · score 0.55 · left hemisphere, widefield imaging, dorsal cortex, optically · Report a mismatch
- [16] § Methods › Quantification and data analysis › Seed correlations ↔ main_analysis/figure4_analysis.py, lines 149 to 172 · score 0.55 · tjM1, tjS1, S2, ALM, ROI, RSC · Report a mismatch
- [17] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ main_analysis/process_deeplabcut_data.py, lines 50 to 110 · score 0.54 · Pupil area, whisker angle, likelihood, filtered, threshold, timestamps · Report a mismatch
- [18] § Methods › Quantification and data analysis › Figure-specific analysis methods ↔ main_analysis/figure4_analysis.py, lines 149 to 172 · score 0.53 · tjM1, tjS1, ALM, ROI, RSC, traces · Report a mismatch
- [19] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ codes/utils/figure1IJ.py, lines 53 to 97 · score 0.53 · jaw speed, pupil area, whisker angle, licking, Figure 1, mouse · Report a mismatch
- [20] § Methods › Quantification and data analysis › Gradient boosted decision tree model ↔ main_control.m, lines 217 to 309 · score 0.52 · correct rejection, context block, variables, hit, window, rewarded · Report a mismatch
- [21] § Results › Rapid behavioral adaptation to sensory stimuli in a changing context ↔ codes/utils/figure3_supp.py, lines 520 to 599 · score 0.52 · whisker speed, jaw opening, Whisker angle, Vertical, traces, whisker trials · 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
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
- DetectionGUI.m, MATLAB, 2,917 lines
- calibration_coil.m, MATLAB, 267 lines
- defining_sessions.m, MATLAB, 251 lines
- main_control.m, MATLAB, 486 lines, 2 matches
- manual_reward_delivery.m
, MATLAB, 9 lines - reward_delivery.m, MATLAB, 12 lines
- startup.m, MATLAB, 6 lines
- stop_sessions.m, MATLAB, 277 lines
- update_parameters.m, MATLAB, 1,186 lines, 3 matches
- utils/
compute_stim_proba.m , MATLAB, 23 lines - utils/
get_whisker_stim_amp.m , MATLAB, 101 lines - utils/
get_whisker_weight.m , MATLAB, 15 lines - utils_TTL/
TTL_build_trial_vectors. , MATLAB, 75 linesm - utils_TTL/
TTL_stim_compute_do.m , MATLAB, 25 lines - utils_TTL/
TTL_stim_compute_preview , MATLAB, 22 lines.m - utils_TTL/
TTL_stim_compute_starts. , MATLAB, 24 linesm - utils_TTL/
ttl_vec_to_edges.m , MATLAB, 23 lines - utils_context/
create_context_backgroun , MATLAB, 12 linesd_noise.m - utils_context/
get_or_determine_mouse_r , MATLAB, 20 linesewarded_context.m - utils_context/
play_context_background. , MATLAB, 24 linesm - utils_opto/
draw_new_grid.m , MATLAB, 23 lines - utils_opto/
get_bregma.m , MATLAB, 30 lines - utils_opto/
get_envelope.m , MATLAB, 30 lines - utils_opto/
get_next_grid.m , MATLAB, 138 lines - utils_opto/
get_opto_vec.m , MATLAB, 31 lines - utils_opto/
get_step.m , MATLAB, 19 lines - utils_opto/
get_stim_grid.m , MATLAB, 123 lines - utils_opto/
load_opto_vec.m , MATLAB, 25 lines - utils_opto/
opto_setup.m , MATLAB, 34 lines - utils_opto/
opto_wf_setup.m , MATLAB, 23 lines - utils_opto/
rescue_gui.m , MATLAB, 91 lines, 1 match - utils_opto/
save_opto_config.m , MATLAB, 22 lines - utils_opto/
set_bregma.m , MATLAB, 57 lines - utils_opto/
update_and_save_opto_csv , MATLAB, 21 lines.m - utils_plots/
compute_performance.m , MATLAB, 25 lines - utils_plots/
compute_reward_volume.m , MATLAB, 25 lines - utils_plots/
plot_performance.m , MATLAB, 97 lines, 1 match - utils_savings/
log_continuously.m , MATLAB, 166 lines - utils_savings/
save_session_config.m , MATLAB, 45 lines - utils_savings/
update_and_save_results_ , MATLAB, 19 linescsv.m - README.md, Text, 51 lines
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
- NWB_conversion.py, Python, 251 lines
- NWB_conversion_parallel.
py , Python, 397 lines - continuous_log_analysis.
py , Python, 154 lines - converters/
DLC_to_nwb.py , Python, 171 lines - converters/
behavior_to_nwb.py , Python, 350 lines - converters/
ci_movie_to_nwb.py , Python, 111 lines - converters/
ephys_to_nwb.py , Python, 579 lines - converters/
ephys_to_nwb_test.py , Python, 674 lines - converters/
facemap_to_nwb.py , Python, 88 lines - converters/
images_to_nwb.py , Python, 31 lines - converters/
nwb_saving.py , Python, 59 lines - converters/
subject_to_nwb.py , Python, 95 lines - converters/
suite2p_to_nwb.py , Python, 207 lines - converters/
widefield_to_nwb.py , Python, 201 lines, 2 matches - make_yaml_config.py, Python, 802 lines
- make_yaml_config_GF.py, Python, 423 lines
- metadata_to_yaml.py, Python, 86 lines
- notebooks/
make_ref.py , Python, 5 lines - notebooks/
nwb_widget.ipynb , Jupyter, 23 lines - notebooks/
waveform_check.ipynb , Jupyter, 113 lines - notebooks/
widefield_roi_management , Python, 210 lines.py - session_stitching.py, Python, 280 lines
- utils/
behavior_converter_misc. , Python, 920 linespy - utils/
ci_processing.py , Python, 283 lines - utils/
continuous_processing.py , Python, 867 lines - utils/
dlc_utils.py , Python, 318 lines - utils/
ephys_converter_misc.py , Python, 2,061 lines - utils/
readSLGX.py , Python, 461 lines - utils/
read_sglx.py , Python, 407 lines - utils/
server_paths.py , Python, 678 lines - utils/
sglx_meta_to_coords.py , Python, 683 lines - utils/
tiff_loading.py , Python, 114 lines - utils/
utils_gf.py , Python, 320 lines - utils/
widefield_utils.py , Python, 360 lines - README.md, Text, 43 lines
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
- main_analysis/
dandi_formatting.py , Python, 82 lines - main_analysis/
dandi_formatting_check.p , Python, 35 linesy - main_analysis/
figure1_analysis.py , Python, 52 lines - main_analysis/
figure1_supp_analysis.py , Python, 403 lines - main_analysis/
figure2_analysis.py , Python, 224 lines - main_analysis/
figure2_supp_analysis.py , Python, 30 lines - main_analysis/
figure2_supp_stats.py , Python, 346 lines - main_analysis/
figure3_analysis.py , Python, 139 lines - main_analysis/
figure3_supp_analysis.py , Python, 113 lines - main_analysis/
figure4_analysis.py , Python, 302 lines, 2 matches - main_analysis/
model_context_behaviour. , Python, 229 lines, 1 matchpy - main_analysis/
panel_data_format.py , Python, 357 lines - main_analysis/
pixel_correlation_analys , Python, 200 linesis.py - main_analysis/
pixel_correlation_proces , Python, 67 linessing.py - main_analysis/
process_deeplabcut_data. , Python, 271 lines, 1 matchpy - main_analysis/
process_opto_widefield_e , Python, 138 linesxamples.py - README.md, Text, 71 lines
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.1101/2025.10.31.685738 [code]
- Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformationJournal: bioRxiv (preprint)In common: Statistics and Machine Learning Toolbox, systems, 80 references, 2 authors
- [2] 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
- [3] doi:10.7554/elife.97602 [code]
- Cell class-specific long-range axonal projections of neurons in mouse whisker-related somatosensory cortices.Journal: eLifeIn common: systems, mouse, 20 references, 2 authors
- [4] doi:10.1016/j.heliyon.2024.e37831 [code]
- Dopamine dynamics in nucleus accumbens across reward-based learning of goal-directed whisker-to-lick sensorimotor transformations in mice.Journal: HeliyonIn common: systems, mouse, 15 references, 2 authors
- [5] doi:10.1371/journal.pone.0287174
- Membrane potential dynamics of excitatory and inhibitory neurons in mouse barrel cortex during active whisker sensing.Journal: PloS oneIn common: systems, mouse, 16 references, 2 authors
- [6] doi:10.1038/s41467-026-70762-z [code]
- Anterior and posterior retrosplenial cortex form distinct visuospatial circuits in the mouse.Journal: Nature communicationsIn common: imageio, tifffile, OpenCV, 8 other tools, systems, mouse, 10 references
- [7] doi:10.1016/j.celrep.2024.113991 [code]
- Tactile processing in mouse cortex depends on action context.Journal: Cell reportsIn common: h5py, statsmodels, seaborn, 6 other tools, systems, mouse, 13 references
- [8] doi:10.7554/elife.94167 [code]
- Pan-cortical 2-photon mesoscopic imaging and neurobehavioral alignment in awake, behaving mice.Journal: eLifeIn common: Neurodata Without Borders (PyNWB, MatNWB), imageio, tifffile, 12 other tools, mouse, 6 references
- [9] doi:10.7554/elife.92620 [code]
- Rule-based modulation of a sensorimotor transformation across cortical areas.Journal: eLifeIn common: Statistics and Machine Learning Toolbox, systems, mouse, 14 references
- [10] doi:10.1038/s41586-025-09235-0 [code]
- A brain-wide map of neural activity during complex behaviour.Journal: NatureIn common: XGBoost, tifffile, scikit-image, 8 other tools, mouse, 8 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 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.7554/elife.109717)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.7554/elife.109717.svg
:target: https://openscicode.org/badge/doi/10.7554/elife.109717
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.7554/elife.109717"><img src="https://openscicode.org/badge/doi/10.7554/elife.109717.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".
- LSENS-BMI-EPFL/behavior_control: README.md on GitHub
- LSENS-BMI-EPFL/NWB_converter: README.md on GitHub
- LSENS-BMI-EPFL/Bech_Dard_process_NWB: README.md on GitHub
- LSENS-BMI-EPFL/Bech_Dard_plot_figures: README.md on GitHub
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
