A homecage operant paradigm reveals behavioral dynamics of social motivation in mice.
The 10 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
- [1] § Results › Identification of social seeking vs. exploration trials ↔ Code/ChenFigureS2.ipynb, lines 35 to 163 · score 0.66 · post hoc, Bonferroni correction, empty cage, S2A, pairwise, ANOVA · Report a mismatch
- [2] § Results › The homecage social operant test ↔ Code/ChenFigure1.ipynb, lines 49 to 182 · score 0.66 · active pokes, empty cage, door opened, Cohen, social stimulus, sex · Report a mismatch
- [3] § Results › Identification of social seeking vs. exploration trials ↔ Code/ChenFigure1.ipynb, lines 49 to 182 · score 0.65 · pairwise post hoc, Bonferroni correction, empty cage, social stimulus, bars, day · Report a mismatch
- [4] § Results › Identification of social seeking vs. exploration trials ↔ Code/ChenFigureS2.ipynb, lines 35 to 163 · score 0.64 · post hoc, Bonferroni correction, empty cage, social stimulus, pairwise, bars · Report a mismatch
- [5] § STAR★Methods › Method details › Homecage social operant assay ↔ SocialDoorInstructions/Arduino_code/Code_variants/SocialDoor_Touch_080525/a_Header.h, the whole file · a weak match · score 0.62 · SD cards, touching, door opening, track, social door, active · Report a mismatch
- [6] § STAR★Methods › Method details › Quantification of daily rhythms of feeding ↔ SocialDoorInstructions/Arduino_code/For FED3 user/src/FED3.cpp, lines 1163 to 1245 · score 0.60 · pellet retrieval, SD card, logged, dispensed, FED3, social · Report a mismatch
- [7] § STAR★Methods › Method details › Homecage social operant assay ↔ SocialDoorInstructions/Arduino_code/For FED3 user/src/FED3.cpp, lines 140 to 266 · score 0.59 · pellet dispenser, pulse, retrieved, ports, ms, triggered · Report a mismatch
- [8] § Results › Identification of social seeking vs. exploration trials ↔ SocialDoorInstructions/doordata_process.ipynb, lines 1374 to 1459 · score 0.52 · proximity traces, Nonreciprocal interactions, door opening, window, Classification, Seeking · Report a mismatch
- [9] § Results › Identification of social seeking vs. exploration trials ↔ SocialDoorInstructions/doordata_process.ipynb, lines 1327 to 1412 · score 0.52 · proximity traces, Nonreciprocal interactions, door opening, window, Classification, Seeking · Report a mismatch
- [10] § Results › The homecage social operant test ↔ Code/ChenFigureS5.ipynb, lines 33 to 174 · score 0.50 · empty cage, Cohen, social stimulus, ANOVA, extinction, sex · 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 · 166 lines · 6 KB · CC-BY-4.0 · 2 matches
- # %% [markdown]
- # <a href="https://colab.research.google.com/github/yiruchen4/Chen2025/blob/main/Code/ChenFigureS4.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
- # %%
- # @title Importe libraries and functions
- !pip install pingouin > /dev/null 2>&1
- import numpy as np
- import pandas as pd
- import seaborn as sns
- from scipy.interpolate import interp1d
- import matplotlib.pyplot as plt
- from matplotlib.ticker import MaxNLocator
- import pingouin as pg
- import os
- import warnings
- from scipy.stats import ttest_rel
- warnings.filterwarnings("ignore")
- def add_sig_line(ax, x1, x2, y, p_val, h=1):
- if p_val < 0.0001:
- stars = '****'
- elif p_val < 0.001:
- stars = '***'
- elif p_val < 0.01:
- stars = '**'
- elif p_val < 0.05:
- stars = '*'
- else:
- return
- ax.plot([x1, x2], [y + h, y + h], lw=1.2, c='darkgray')
- ax.text((x1 + x2) / 2, y + h + 1.5, stars, ha='center', va='center', fontsize=11, fontweight='bold')
- # %%
- # @title Figure S2A-B
- # Load and preprocess data
- df_a = pd.read_csv(r"https://raw.githubusercontent.com/yiruchen4/Chen2026/main/Data/data_FigureS2a.csv")
- df_b = pd.read_csv(r"https://raw.githubusercontent.com/yiruchen4/Chen2026/main/Data/data_FigureS2b.csv")
- # Color palettes and orders
- custom_palette = {"Seeking": "slateblue", "Exploring": "hotpink"}
- interaction_order = ["Seeking", "Exploring"]
- mode_order = ["empty", "social"]
- # Create combined figure with 2:1 ratio
- fig = plt.figure(figsize=(10, 3.5), dpi=600)
- gs = fig.add_gridspec(1, 2, width_ratios=[3, 1.5])
- # === LEFT PLOT: Time-course ===
- ax1 = fig.add_subplot(gs[0, 0])
- xtick_positions = range(-60, 61, 24)
- xtick_labels = [1, 2, 3, 4, 5, 6]
- ax1.axvspan(-72, 0, color='orange', alpha=0.15)
- ax1.axvspan(0, 72, color='deepskyblue', alpha=0.15)
- sns.lineplot(data=df_a, x="hoursfloor", y="event", hue="behavior",
- errorbar='se', palette=custom_palette,
- hue_order=interaction_order, ax=ax1)
- for start in range(-66, 73, 24):
- ax1.axvspan(start, start + 12, color="grey", alpha=0.3)
- ax1.set_xticks(xtick_positions)
- ax1.set_xticklabels(xtick_labels, fontsize=13)
- ax1.set_yticks(ax1.get_yticks())
- ax1.tick_params(axis="y", which="both", left=True, right=False, labelsize=13)
- ax1.yaxis.set_major_locator(MaxNLocator(nbins=4, integer=True))
- ax1.set_xlabel("Day", fontsize=13)
- ax1.set_ylabel("Number of events", fontsize=13)
- ax1.text(0.275, 1.025, "Empty cage", fontsize=13, color='orange', transform=ax1.transAxes, ha='center')
- ax1.text(0.735, 1.025, "Social stimulus", fontsize=13, color='deepskyblue', transform=ax1.transAxes, ha='center')
- legend1 = ax1.legend(title=f'N = {len(df_a["device_number"].unique())}', title_fontsize=13, loc="upper left", frameon=False, fontsize=13)
- legend1.get_title().set_alpha(0.5)
- sns.despine(ax=ax1)
- # === RIGHT PLOT: Bar and Strip ===
- ax2 = fig.add_subplot(gs[0, 1])
- sns.barplot(data=df_b, x="behavior", y="event", hue="mode",
- errorbar="se", capsize=0.15,
- order=interaction_order, hue_order=mode_order,
- palette={"empty": "#FFE5B4", "social": "#BFEFFF"},
- ax=ax2)
- sns.stripplot(data=df_b, x="behavior", y="event", hue="mode",
- dodge=True, jitter=False, palette=['black']*4,
- alpha=0.25, size=8, zorder=2,
- order=interaction_order, hue_order=mode_order,
- legend=False, ax=ax2)
- # Connect dots
- x_positions = {"Seeking": 0, "Exploring": 1}
- for interaction in df_b["behavior"].unique():
- subset = df_b[df_b["behavior"] == interaction]
- empty = subset[subset["mode"] == "empty"].reset_index(drop=True)
- social = subset[subset["mode"] == "social"].reset_index(drop=True)
- for i in range(len(empty)):
- ax2.plot(
- [x_positions[interaction] - 0.2, x_positions[interaction] + 0.2],
- [empty.loc[i, "event"], social.loc[i, "event"]],
- color="gray", alpha=0.5, linewidth=1.2, zorder=4
- )
- for interaction in df_b["behavior"].unique():
- subset = df_b[df_b["behavior"] == interaction]
- empty_data = subset[subset["mode"] == "empty"]["event"].reset_index(drop=True)
- social_data = subset[subset["mode"] == "social"]["event"].reset_index(drop=True)
- _, p_value = ttest_rel(empty_data, social_data)
- y_max = subset["event"].max()
- x_center = x_positions[interaction]
- print(f'{interaction} paired t-test p-value:')
- print(f'{p_value:.8f}')
- add_sig_line(ax2, x_center - 0.2, x_center + 0.2, y_max, p_value, h=4)
- # We'll keep only relevant columns
- df_anova = df_b[["device_number", "mode", "behavior", "event"]].copy()
- # Run repeated measures ANOVA with two within-subject factors: mode and behavior
- aov = pg.rm_anova(dv="event", within=["mode", "behavior"], subject="device_number", data=df_anova, detailed=True)
- print('ANOVA result:')
- print(aov)
- # Make sure you're using the right data
- df_posthoc = df_b[["device_number", "mode", "behavior", "event"]].copy()
- # Create a new column combining mode and behavior
- df_posthoc["condition"] = df_posthoc["mode"] + "_" + df_posthoc["behavior"]
- # Run post-hoc pairwise comparisons with correction
- pairwise = pg.pairwise_tests(
- data=df_posthoc,
- dv="event",
- within="condition",
- subject="device_number",
- padjust="bonf", # Bonferroni correction
- # effsize="cohen"
- )
- # Display results
- print("Post-hoc pairwise comparison with correction:")
- with pd.option_context('display.float_format', '{:.9f}'.format):
- print(pairwise[["A", "B", "T", "p-corr"]])
- # Final formatting
- ax2.set_ylabel("Average events per day", fontsize=14)
- ax2.set_xlabel("")
- ax2.set_xticklabels([label.capitalize() for label in interaction_order], fontsize=14)
- ax2.set_yticks(ax2.get_yticks())
- ax2.tick_params(axis="y", which="both", left=True, right=False, labelsize=13)
- ax2.yaxis.set_major_locator(MaxNLocator(5))
- sns.despine(ax=ax2)
- handles, labels = ax2.get_legend_handles_labels()
- ax2.legend('',frameon=False)
- ax2.legend(title_fontsize=13, handles=handles[:2], labels=["Empty", "Social"],
- fontsize=13, frameon=False, loc="upper right")
- plt.tight_layout()
- plt.show()
- # %%
ChenFigureS2.ipynb, under CC-BY-4.0 · at the source
Overview
- Department of Psychiatry, School of Medicine, Washington University in St. Louis, St. Louis, MO 63110, USA
- Intellectual and Developmental Disabilities Research Center, Washington University in St. Louis, St. Louis, MO 63108, USA
Abstract
We present an open-source, homecage-based social operant paradigm that enables continuous, multi-day measurement of social motivation in mice without experimenter intervention. In this task, a nose-poke response triggers an automated door that provides controlled access to a social partner in an adjacent cage. Using this system, we demonstrate that operant responding is specifically driven by access to a social partner and reveals robust daily rhythms of social motivation across the circadian cycle. We further show that social seeking in this task is sensitive to pharmacological manipulation of dopamine signaling. By combining operant rigor with continuous homecage monitoring, this method increases ecological validity, temporal resolution, and scalability, providing a flexible platform for studying social motivation and its neural regulation in both basic and disease-relevant contexts.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 10 matches between paragraphs and lines of code.
Zenodo 18748340
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
17 files
- Code/
ChenFigure1.ipynb , Jupyter, 185 lines, 2 matches - Code/
ChenFigure2.ipynb , Jupyter, 276 lines - Code/
ChenFigure3.ipynb , Jupyter, 223 lines - Code/
ChenFigure4.ipynb , Jupyter, 609 lines - Code/
ChenFigure5.ipynb , Jupyter, 209 lines - Code/
ChenFigureS1.ipynb , Jupyter, 24 lines - Code/
ChenFigureS2.ipynb , Jupyter, 166 lines, 2 matches - Code/
ChenFigureS3.ipynb , Jupyter, 185 lines - Code/
ChenFigureS4.ipynb , Jupyter, 699 lines - Code/
ChenFigureS5.ipynb , Jupyter, 178 lines, 1 match - SocialDoorInstructions/
Arduino_code/ , C/C++, 54 linesArduino_code/ SocialDoor_102225/ a_Header.h - SocialDoorInstructions/
Arduino_code/ , C/C++, 52 linesArduino_code/ SocialDoor_prox_on_allti me_020326/ a_Header.h - SocialDoorInstructions/
Arduino_code/ , C/C++, 81 lines, 1 matchCode_variants/ SocialDoor_Touch_080525/ a_Header.h - SocialDoorInstructions/
Arduino_code/ , C++, 1,828 lines, 2 matchesFor FED3 user/ src/ FED3.cpp - SocialDoorInstructions/
Arduino_code/ , C/C++, 252 linesFor FED3 user/ src/ FED3.h - SocialDoorInstructions/
doordata_process.ipynb , Jupyter, 1,463 lines, 1 match - README.md, Text, 3 lines
Zenodo 18748341
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
16 files
- Code/
ChenFigure1.ipynb , Jupyter, 185 lines - Code/
ChenFigure2.ipynb , Jupyter, 276 lines - Code/
ChenFigure3.ipynb , Jupyter, 223 lines - Code/
ChenFigure4.ipynb , Jupyter, 609 lines - Code/
ChenFigure5.ipynb , Jupyter, 209 lines - Code/
ChenFigureS1.ipynb , Jupyter, 24 lines - Code/
ChenFigureS2.ipynb , Jupyter, 166 lines - Code/
ChenFigureS3.ipynb , Jupyter, 185 lines - Code/
ChenFigureS4.ipynb , Jupyter, 699 lines - Code/
ChenFigureS5.ipynb , Jupyter, 178 lines - SocialDoorInstructions/
Arduino_code/ , C/C++, 54 linesArduino_code/ SocialDoor_102225/ a_Header.h - SocialDoorInstructions/
Arduino_code/ , C/C++, 81 linesCode_variants/ SocialDoor_Touch_080525/ a_Header.h - SocialDoorInstructions/
Arduino_code/ , C++, 1,828 linesFor FED3 user/ src/ FED3.cpp - SocialDoorInstructions/
Arduino_code/ , C/C++, 252 linesFor FED3 user/ src/ FED3.h - SocialDoorInstructions/
doordata_process.ipynb , Jupyter, 1,416 lines, 1 match - README.md, Text, 3 lines
The paper's code and data availability statement is in the Data section.
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;
- 31 scripts, each with its path and the digest of its content;
- 10 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
- github.com/
yiruchen4/ , at github.com; found in the Zenodo archive recordchen2026
Data and code availability
• Processed data have been deposited at Zenodo: https://
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Materials availability
This study did not generate new unique reagents.
The design of the social door, a list of required materials, a detailed construction protocol, and annotated scripts for data processing and analysis have been deposited at Zenodo: https://
Reproduced under the paper's license (CC BY-NC), 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, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 8 keywords, 10 MeSH terms, 4 funders, 29 references, 5 RRIDs.
Cite
This paper
Chen, Y., Maloney, S. E., & Kravitz, A. V. (2026). A homecage operant paradigm reveals behavioral dynamics of social motivation in mice. Cell reports methods, 6(4), 101374. https://
BibTeX
@article{chen2026homecag
author = {Chen, Yiru and Maloney, Susan E. and Kravitz, Alexxai V.},
title = {{A homecage operant paradigm reveals behavioral dynamics of social motivation in mice}},
journal = {Cell reports methods},
year = {2026},
month = mar,
volume = {6},
number = {4},
pages = {101374},
publisher = {Elsevier},
issn = {2667-2375},
doi = {10.1016/
url = {https://
pmid = {41916298},
pmcid = {PMC13107048}
}
RIS
TY - JOUR
AU - Chen, Yiru
AU - Maloney, Susan E.
AU - Kravitz, Alexxai V.
TI - A homecage operant paradigm reveals behavioral dynamics of social motivation in mice
T2 - Cell reports methods
J2 - Cell Rep Methods
PY - 2026
DA - 2026/
VL - 6
IS - 4
SP - 101374
SN - 2667-2375
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "A homecage operant paradigm reveals behavioral dynamics of social motivation in mice",
"container-title": "Cell reports methods",
"author": [
{
"family": "Chen",
"given": "Yiru"
},
{
"family": "Maloney",
"given": "Susan E."
},
{
"family": "Kravitz",
"given": "Alexxai V."
}
],
"container-title-short":
"volume": "6",
"issue": "4",
"page": "101374",
"DOI": "10.1016/
"PMID": "41916298",
"PMCID": "PMC13107048",
"ISSN": "2667-2375",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
30
]
]
}
}
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-024-52294-6 [code]
- Sex differences in neural representations of social and nonsocial reward in the medial prefrontal cortex.Journal: Nature communicationsIn common: mouse, 6 references
- [2] doi:10.1016/j.crmeth.2026.101421 [code]
- EthoPy provides an accessible platform for reproducible behavioral neuroscience.Journal: Cell reports methodsIn common: seaborn, scikit-learn, pandas, 3 other tools, methods / tools, mouse, 2 references
- [3] doi:10.1002/advs.202518450 [code]
- A Brain-Wide Atlas of Astrocytic Oxytocin Receptors Reveals a Glial Basis for Nucleus Accumbens Modulation of Affiliative Behavior.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: Pingouin, statsmodels, seaborn, 4 other tools, mouse, 1 reference
- [4] doi:10.1016/j.crmeth.2023.100504
- A comprehensive assay of social motivation reveals sex-specific roles of autism-associated genes and oxytocin.Journal: Cell reports methodsIn common: mouse, 5 references
- [5] doi:10.7554/elife.91765 [code]
- Post-ejaculatory inhibition of female sexual drive via heterogeneous neuronal ensembles in the medial preoptic area.Journal: eLifeIn common: statsmodels, seaborn, scikit-learn, 4 other tools, mouse, 1 reference
- [6] doi:10.7554/elife.77411 [code]
- The role of anterior insular cortex inputs to dorsolateral striatum in binge alcohol drinking.Journal: eLifeIn common: statsmodels, seaborn, scikit-learn, 4 other tools, mouse, 1 reference
- [7] doi:10.1016/j.ynstr.2022.100501 [code]
- Prebiotic supplementation modulates selective effects of stress on behavior and brain metabolome in aged mice.Journal: Neurobiology of stressIn common: statsmodels, seaborn, scikit-learn, 4 other tools, mouse, 1 reference
- [8] doi:10.1016/j.isci.2026.114694 [code]
- Dissociating neural circuits of social and prosocial reward in rat helping behavior.Journal: iScienceIn common: statsmodels, seaborn, scikit-learn, 4 other tools, 1 reference
- [9] doi:10.1038/s41467-024-52769-6 [code]
- Diminished circadian and ultradian rhythms of human brain activity in pathological tissue in vivo.Journal: Nature communicationsIn common: statsmodels, seaborn, scikit-learn, 4 other tools, 1 reference
- [10] doi:10.1371/journal.pbio.3002343
- Optogenetic and chemogenetic approaches reveal differences in neuronal circuits that mediate initiation and maintenance of social interaction.Journal: PLoS biologyIn common: 5 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, 31 scripts, and 10 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:4cb39de4ae981f98…
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.1016/j.crmeth.2026.101374)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1016/j.crmeth.2026.101374.svg
:target: https://openscicode.org/badge/doi/10.1016/j.crmeth.2026.101374
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.crmeth.2026.101374"><img src="https://openscicode.org/badge/doi/10.1016/j.crmeth.2026.101374.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->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)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
