Dissociable roles of prefrontal plasticity in decision-making strategy and execution of habitual behavior.
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 · 176 lines · 4.2 KB · MIT
- # %%
- import pandas as pd
- import numpy as np
- import os
- import glob
- import openpyxl
- # %%
- path = r"data/sample1"
- outpath = os.path.join(path, "result")
- if os.path.exists(outpath):
- pass
- else:
- os.mkdir(outpath)
- fpath = os.path.join(path, "C.csv")
- wpath = os.path.join(path, "Events.csv")
- # %%
- df_in = pd.read_csv(fpath, index_col=0)
- # %%
- df_w = pd.read_csv(wpath)
- # %%
- # Unit ID
- df_f_id = df_in.iloc[:,0]
- df_f_id = df_f_id.drop_duplicates()
- l_id = df_f_id.T.tolist()
- # %%
- df_w_entry_all = df_w.iloc[:,0]
- df_w_entry_all = df_w_entry_all.dropna(how="all")
- list_w_entry_all = df_w_entry_all.tolist()
- list_w_entry_all = [i for i in list_w_entry_all if i != 0]
- # %%
- ### Rewarded Entry
- df_w_entry = df_w.iloc[:,1]
- df_w_entry = df_w_entry.dropna(how="all")
- l_entry = df_w_entry.T.tolist()
- l_entry = [i for i in l_entry if i != 0]
- # %%
- # Rewarded Entry End
- df_w_entryend = df_w.iloc[:,4]
- df_w_entryend = df_w_entryend.dropna(how="all")
- l_entryend = df_w_entryend.T.tolist()
- l_entryend = [i for i in l_entryend if i != 0]
- # %%
- df_w_press_all = df_w.iloc[:,2]
- df_w_press_all = df_w_press_all.dropna(how="all")
- list_w_press_all = df_w_press_all.tolist()
- # %%
- ### Press initiation
- df_w_press = df_w.iloc[:,3]
- df_w_press = df_w_press.dropna(how="all")
- l_press_init = df_w_press.tolist()
- l_press_init = [i for i in l_press_init if i != 0]
- for entry in list_w_entry_all:
- pre = entry - 17
- post = entry
- for press in l_press_init:
- if press > pre and press < post:
- l_press_init.remove(press)
- # %%
- ### Press end
- l_press_end =[]
- for press in l_press_init:
- for press2 in list_w_press_all:
- if press2-press > 17:
- press_end = list_w_press_all[list_w_press_all.index(press2)-1]
- l_press_end.append(press_end)
- break
- # %%
- ### SD normalized
- ### Rewarded Entry Whole
- df_e_add = pd.DataFrame()
- l_entry2 = []
- for i in range(len(l_entry)):
- l_entry2.append(int(l_entry[i]))
- l_entry2 = l_entry2[:-1]
- for entry in l_entry2:
- number = l_entry2.index(entry)
- e_end = l_entryend[number]
- f_pre1 = entry - 18 #Enter the desired number of frames.
- f_post1 = e_end + 1 #Enter the desired number of frames.
- l_e = []
- l_e_index = []
- for ID in l_id:
- # Variables
- df_ID_r = df_in.query("unit_id == @ID")
- df_ID = df_ID_r["frame"]
- df_ID_r = df_ID_r["C"]
- df_ID_z = ((df_ID_r)/ (df_ID_r.std()))
- df_ID = pd.concat([df_ID, df_ID_z], axis=1)
- df_add1 = df_ID.query("frame > @f_pre1 & frame < @f_post1")
- df_add1 = df_add1.reset_index()
- df_add1_n = df_add1["C"]
- l_e.append(df_add1_n[17:].mean())
- l_e_index.append("Mean_" + str(ID))
- else:
- sr_e = pd.Series(l_e, index = l_e_index)
- df_e_add = pd.concat([df_e_add, pd.DataFrame([sr_e])], axis=0)
- else:
- df_e_add = df_e_add.T
- df_e_add.columns = l_entry2
- spath_e = os.path.join(outpath, "Entry_result.xlsx")
- df_e_add.to_excel(spath_e)
- # %%
- ### SD normalized
- ### Press
- df_p_add = pd.DataFrame()
- l_press_i = []
- l_press_e = []
- for i in range(len(l_press_end)):
- l_press_e.append(int(l_press_end[i]))
- l_press_i.append(int(l_press_init[i]))
- for press in l_press_i:
- number = l_press_i.index(press)
- p_end = l_press_end[number]
- f_pre1 = press - 35 #Enter the desired number of frames.
- f_post1 = p_end + 18 #Enter the desired number of frames.
- l_p = []
- l_p_index = []
- for ID in l_id:
- df_ID_r = df_in.query("unit_id == @ID")
- df_ID = df_ID_r["frame"]
- df_ID_r = df_ID_r["C"]
- df_ID_z = ((df_ID_r)/ (df_ID_r.std()))
- df_ID = pd.concat([df_ID, df_ID_z], axis=1)
- df_add1 = df_ID.query("frame > @f_pre1 & frame < @f_post1")
- df_add1 = df_add1.reset_index()
- df_add1_n = df_add1["C"]
- l_p.append(df_add1_n[17:].mean())
- l_p_index.append("Mean_" + str(ID))
- else:
- sr_p = pd.Series(l_p, index = l_p_index)
- df_p_add = pd.concat([df_p_add, pd.DataFrame([sr_p])], axis=0)
- else:
- df_p_add = df_p_add.T
- df_p_add.columns = l_press_i
- spath_e2 = os.path.join(outpath, "Press_result.xlsx")
- df_p_add.to_excel(spath_e2)
FIg5&7_Event_extraction.ipynb at commit 2c6a061, under MIT · at the source
Overview
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above.
Nozomi-Asaoka/Custom-code-for-Asaoka-et-al-2026
2c6a0619548ce23514943ee7c35ab83d8bbc3e20, 3 July 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
5 files
- FIg5&
7_Event_extraction.ipynb , Jupyter, 176 lines - Fig7_Classification.ipyn
b , Jupyter, 79 lines - Fig7_Clustering.ipynb, Jupyter, 48 lines
- LICENSE, License, 21 lines
- README.md, Text, 40 lines
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: Nozomi-Asaoka/
Custom-code-for-Asaoka-e t-al-2026
Read it in the paper: doi.org/10.1038/s41467-026-75706-1.
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:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 3 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- 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
No dataset and no data link were found in the paper.
Data availability statement
The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it says that the data are available on request
Read it in the paper: doi.org/10.1038/s41467-026-75706-1.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 2 keywords, 10 MeSH terms, 9 funders, 77 references, 1 RRID.
Cite
This paper
Asaoka, N., Pagano, D., & Hayashi, Y. (2026). Dissociable roles of prefrontal plasticity in decision-making strategy and execution of habitual behavior. Nature communications, 17(1), 6822. https://
BibTeX
@article{asaoka2026disso
author = {Asaoka, Nozomi and Pagano, Diane and Hayashi, Yasunori},
title = {{Dissociable roles of prefrontal plasticity in decision-making strategy and execution of habitual behavior}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {6822},
publisher = {Nature Portfolio},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42509234},
pmcid = {PMC13408161}
}
RIS
TY - JOUR
AU - Asaoka, Nozomi
AU - Pagano, Diane
AU - Hayashi, Yasunori
TI - Dissociable roles of prefrontal plasticity in decision-making strategy and execution of habitual behavior
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 6822
SN - 2041-1723
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Dissociable roles of prefrontal plasticity in decision-making strategy and execution of habitual behavior",
"container-title": "Nature communications",
"author": [
{
"family": "Asaoka",
"given": "Nozomi"
},
{
"family": "Pagano",
"given": "Diane"
},
{
"family": "Hayashi",
"given": "Yasunori"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "6822",
"DOI": "10.1038/
"PMID": "42509234",
"PMCID": "PMC13408161",
"ISSN": "2041-1723",
"publisher": "Nature Portfolio",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
27
]
]
}
}
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.7554/elife.106032 [code]
- Neural signatures of model-based and model-free reinforcement learning across prefrontal cortex and striatum.Journal: eLifeIn common: scikit-learn, pandas, SciPy, 2 other tools, cognitive, 6 references
- [2] doi:10.1371/journal.pcbi.1012383 [code]
- Understanding dual process cognition via the minimum description length principle.Journal: PLoS computational biologyIn common: Matplotlib, NumPy, cognitive, 7 references
- [3] doi:10.1038/s41467-025-63542-8
- Parallel neuronal structural plasticity with memory trace formation in the orbitofrontal cortex.Journal: Nature communicationsIn common: mouse, 7 references
- [4] doi:10.1038/s41398-024-02731-3
- Amelioration of obsessive-compulsive disorder by intracellular acidification of cortical neurons with a proton pump inhibitor.Journal: Translational psychiatryIn common: mouse, 3 references, author Nozomi Asaoka
- [5] doi:10.1016/j.isci.2022.105818 [code]
- Lack of action monitoring as a prerequisite for habitual and chunked behavior: Behavioral and neural correlates.Journal: iScienceIn common: 6 references
- [6] doi:10.1371/journal.pone.0279841 [code]
- Distinct cortico-striatal compartments drive competition between adaptive and automatized behavior.Journal: PloS oneIn common: pandas, SciPy, Matplotlib, 1 other tool, cognitive, 5 references
- [7] doi:10.1038/s41593-024-01633-3 [code]
- Closed-loop recruitment of striatal interneurons prevents compulsive-like grooming behaviors.Journal: Nature neuroscienceIn common: pandas, Matplotlib, NumPy, mouse, 5 references
- [8] doi:10.1016/j.isci.2023.108002 [code]
- Development and cadherin-mediated control of prefrontal corticostriatal projections in mice.Journal: iScienceIn common: pandas, SciPy, Matplotlib, 1 other tool, mouse, 5 references
- [9] doi:10.1038/s41467-025-62190-2 [code]
- Mechanisms and interventions promoting healthy frontostriatal dynamics in obsessive-compulsive disorder.Journal: Nature communicationsIn common: scikit-learn, pandas, SciPy, 2 other tools, 4 references
- [10] doi:10.1038/s41586-025-09885-0 [code]
- Evidence accumulation from experience and observation in the cingulate cortex.Journal: NatureIn common: scikit-learn, pandas, SciPy, 2 other tools, 4 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: 1 repository of the authors' code, each at its verified commit and with its license, 3 scripts, and 0 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:1a0d4ca9e084f70c…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41467-026-75706-1)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-75706-1.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-75706-1
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-75706-1"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-75706-1.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
