OSCR

Ancient feeding-related neuropeptides regulate alloparenting in ants.

Code ↔ Paper

6 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 6 matches · all tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Annotation and analysis of behavioural tracking data ↔ Broodcare_assay_Code_&_Sample_data/Code_3_calcs_&_plots_Transition_Pts.ipynb, the whole file · a weak match · score 1.00 · absolute maximum positions, sliding window, AntMaxDistance, P2 behavioural phases, P1 behavioural phase, inflection point
  2. [2] § Methods › Annotation and analysis of behavioural tracking data ↔ Broodcare_assay_Code_&_Sample_data/Code_4_Calcs_P1dur&P1_P2_Total_prop_twl.ipynb, the whole file · a weak match · score 0.75 · P1 duration, Larva detection, transition point, ants interact, P1 phase, assay
  3. [3] § Age-associated patterns of brood care ↔ Broodcare_assay_Code_&_Sample_data/Code_3_calcs_&_plots_Transition_Pts.ipynb, the whole file · a weak match · score 0.73 · absolute maximum, behavioural phases P1, physically interact, transition point, window, sliding
  4. [4] § Methods › Behavioural tracking ↔ Broodcare_assay_Code_&_Sample_data/Code_1_ELT_antrax_data.ipynb, the whole file · a weak match · score 0.67 · AnTrax, larva position, lost, pandas, tracking, quality
  5. [5] § Age-associated patterns of brood care ↔ Broodcare_assay_Code_&_Sample_data/Code_4_Calcs_P1dur&P1_P2_Total_prop_twl.ipynb, the whole file · a weak match · score 0.64 · Larva detection, transition point, phases P1, ant interacting, assay
  6. [6] § Methods › Behavioural tracking ↔ Broodcare_assay_Code_&_Sample_data/Code_2_Plot_Position_Data.ipynb, the whole file · a weak match · score 0.59 · larva position, assay chamber, matplotlib, seaborn, anTraX, video

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

Jupyter notebook · 137 lines · 7.3 KB · GPL-3.0 · 2 matches

  1. # %% [markdown]
  2. # ##### **Code for determing the transition points betwen phases P1 and P2 for every ant in the experiment.**
  3. # ##### This script requires the files 'timedata_C*.csv', PositionData_C*.csv' and 'stats_corrected.csv' resulting from Code_1, Code_2, and manual correction of 'larva_detect_frame' if required.
  4. #
  5. # ##### *Note: any missing values in the input files will cause this script to error. However, in Code_1, missing values are reliably replaced in 'timedata_C\*\.csv' files, so all* *subsequent steps should run without error.*
  6. # %%
  7. import pandas as pd
  8. import numpy as np
  9. import matplotlib.pyplot as plt
  10. import glob
  11. from natsort import natsorted
  12. #define path to the data files
  13. path = '/Users/Alex/Desktop/Broodcare_assay_Code_&_Sample_data/antrax/analysis/'
  14. #define the save path for the output files
  15. save_path = '/Users/Alex/Desktop/Broodcare_assay_Code_&_Sample_data/antrax/analysis/'
  16. #creates an empty array to store the transition points between phase P1 and P2
  17. transpoints = np.array([])
  18. #creates an empty array to store the Ant id
  19. ant_id = np.array([])
  20. #Load all the data:
  21. #trueLarvaDet contains the frame number of the true larva detection for each ant from the 'stats_corrected.csv' file
  22. trueLarvaDet = np.loadtxt(path + 'stats_corrected.csv', delimiter=',', skiprows=1, usecols = 7)
  23. #creates array of filenames (str) from the given directory, in this case the PositionData_C*.csv files
  24. #glob.glob orders the files in non-natural way, so the natsorted command fixes the ordering
  25. #such that natural indexing can be used to generate PositionData filenames correctly linked to the PositionData_n.csv's
  26. fnames = glob.glob(path + 'PositionData_C*.csv')
  27. sfnames = natsorted(fnames)
  28. #creates array of filenames (str) from the given directory, in this case the timedata_C*.csv files
  29. #glob.glob orders the files in non-natural way, so the natsorted command fixes the ordering
  30. #such that natural indexing can be used to generate PositionData filenames correctly linked to the timedata_n.csv's
  31. fnames2 = glob.glob(path + 'timedata_C*.csv')
  32. sfnames2 = natsorted(fnames2)
  33. # The following code is the main loop that determines the transition points between phase P1 and P2, and plots the data.
  34. # We defined the P1 behavioral phase as the period beginning with larva detection and continuing while the ant remains mostly in physical contact with the larva,
  35. # irrespective of whether the ant is carrying the larva around the assay chamber or remaining in one location. Larva carrying did not consistently occur across
  36. # all assays or conditions, and it was therefore collapsed into the P1 phase. The P2 phase was defined as the period when the ant begins to leave the larva
  37. # and subsequently spends most of its time exploring the assay chamber away from the larva. Phase P2 continued until the end of the video recording.
  38. # To determine the transition points, first, beginning from the frame of true larva detection, we apply a 200 frame (40 second) sliding window over
  39. # the ant’s PositionData in which we calculate the difference between the ant’s absolute minimum and absolute maximum positions.
  40. # We ignore the ant’s PositionData in frames when the ant wass physically interacting with or carrying the larva to only capture PositionData
  41. # from frames when the ant was away from the larva. We save these values as the “AntMaxDistance”. We then smooth the AntMaxDistance data by applying a second,
  42. # 400 frame (80 second) sliding window in which we average the measures. We then calculated the first inflection point of the smoothed AntMaxDistance data
  43. # (i.e., the frame at which the data first exceeds half of the absolute maximum value of the smoothed data) and defined this frame as
  44. # the Transition Point between the P1 and P2 behavioral phases.
  45. # The code below calculates the AntMaxDistance and Transition Points between P1 and P2 for each ant in the experiment.
  46. # The code also plots the smoothed AntMaxDistance data and the Transition Point for each ant.
  47. i=0
  48. for x in sfnames:
  49. file = sfnames[i] #current PositionData_C*.csv file
  50. file2 = sfnames2[i] #current timedata_C*.csv file
  51. #set the ant_id
  52. ant_id = np.append(ant_id, 'C'+str(i+1))
  53. #load data from current files
  54. A = np.loadtxt(file, delimiter=',', skiprows=1, usecols = (2)) #loads the 'ant-position (mm)' data from the current PositionData_C*.csv file
  55. interacting = np.loadtxt(file2, delimiter=',', skiprows=1, usecols = (5)) #loads the 'interacting' data from the current timedata_C*.csv file
  56. #Calculte the AntMaxDistance
  57. #Note, this takes the data staring from the frame of true larva detection
  58. window=200
  59. c = np.array([])
  60. for j in range(int(trueLarvaDet[i]),len(A)-window, 1):
  61. b = A[j:j+window]
  62. Amin = np.amin(b)
  63. Amax = np.amax(b)
  64. if interacting[j] == 0:
  65. maxdistance = Amax - Amin
  66. else:
  67. maxdistance = (np.absolute(1-np.ma.average(interacting[j:j+window]))) * (Amax - Amin)
  68. #maxdistance = (Amax - Amin)
  69. c = np.append(c, maxdistance)
  70. #save the AntMaxDistance data to a csv file.
  71. np.savetxt(save_path + 'AntMaxDistance_' + str(i+1) + '.csv', c, fmt='%f', delimiter=',',
  72. header ='Ant max distance')
  73. #smooth the AntMaxDistance data
  74. f = np.array([])
  75. for y in range(0, len(c)-window, 1):
  76. g = np.average(c[y:y+400])
  77. f = np.append(f, g)
  78. #define the Transistion Point
  79. # Note the transition point is saved with respect to the frame of true larva detection = 0. To put the transition point in terms of the actual frame number, add the true larva detection frame number to the transition point.
  80. # The transition point is the first frame where the smoothed AntMaxDistance exceeds half of the maximum value of the smoothed AntMaxDistance.
  81. halfmax = np.amax(f)/2
  82. if halfmax == 0:
  83. halfmaxindex = 0
  84. transpoints = np.append(transpoints, 0)
  85. else:
  86. halfmaxindex = np.argwhere(f>halfmax)
  87. transpoints = np.append(transpoints, (halfmaxindex[0]))
  88. #define variable max_x as the index of the maximum value in the array f (smoothed AntMaxDistance)
  89. max_x = np.argmax(f)
  90. #define variable max_y as the maximum value in the array f (smoothed AntMaxDistance)
  91. max_y = np.amax(f)
  92. #plot the smoothed AntMaxDistance data and the Transition Point.
  93. # Note that the plot will show frame 0 as the frame of true larva detection.
  94. plt.figure(1)
  95. plt.title('Transition point Ant_C' + str(i+1))
  96. plt.plot(f, linewidth=1, color='black')
  97. #plot a single point at max_x, max_y. set the size of the point to 10, and color to red
  98. plt.plot(max_x, max_y, 'ro', markersize=10)
  99. if halfmax != 0 :
  100. plt.vlines(halfmaxindex[0], 0, 30, colors='red')
  101. plt.ylabel('Sliding average of maximum distance \n between ant and larva (mm)')
  102. plt.xlabel('Frames')
  103. plt.ylim(0, 30)
  104. #set the x axis to be the range of the array f set the step to be 18000 frames
  105. plt.xticks(np.arange(0, len(f), step=18000))
  106. plt.savefig(save_path + 'TransitionPoint_C' + str(i+1) + '.pdf')
  107. plt.show()
  108. i+=1
  109. #put the ant_id and transition points into a dataframe
  110. df = pd.DataFrame({'Ant_id': ant_id, ',Transition_points (in reference to larva_detect = frame 0)': transpoints})
  111. #save the dataframe to a csv file
  112. df.to_csv(save_path + 'TransitionPoints.csv', index=False)

Code_3_calcs_&_plots_Transition_Pts.ipynb at commit 8eaab73, under GPL-3.0 · at the source

Overview

Authors: Alexander Paul1,2, Tomas Kay1, Ivan Lacroix1, Vikram Chandra1,3, Asaf Gal1, Patrick K Piekarski1,2, Stephany Valdés-Rodríguez1,2, Amelia L Ritger1,4, Katelyn S Lee1,5, Kip D Lacy1,6, Daniel J C Kronauer1,2
  1. Laboratory of Social Evolution and Behaviour, The Rockefeller University, New York, NY USA
  2. Howard Hughes Medical Institute, The Rockefeller University, New York, NY USA
  3. Present Address: Department of Organismic and Evolutionary Biology, Museum of Comparative Zoology, Harvard University, Cambridge, MA USA
  4. Present Address: Department of Ecology, Evolution, and Marine Biology, University of California, Santa Barbara, Santa Barbara, CA USA
  5. Present Address: Department of Mechanical Engineering, Columbia University, New York, NY USA
  6. Present Address: Zuckerman Mind Brain Behavior Institute, Columbia University, New York, NY USA
Institutions: Howard Hughes Medical Institute (United States); Rockefeller University (United States); Harvard University (United States); University of California, Santa Barbara (United States); Columbia University (United States); Mortimer B. Zuckerman Mind Brain Behavior Institute (United States)
Journal: Nature, volume 656, issue 8129, pages 948-956
Dates: received 26 March 2025; accepted 1 June 2026; published online 8 July 2026; in print 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41586-026-10747-6 · PMID 42420453 · PMCID PMC13518240 · OpenAlex W7167699892
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: other (organism)
Methods: Statistics, Evoked potentials, fMRI & imaging, Connectivity
Keywords: Social behaviour, Social evolution
MeSH: Ants*, Feeding Behavior*, Nesting Behavior*, Neuropeptides*, Aging, Animals, Brain, Social Behavior (* major topic)
Topic: Neurobiology and Insect Physiology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 108 references in the paper

Abstract

Alloparental care and division of labour are hallmarks of insect societies1. Social insect workers typically care for brood within the nest when they are young and transition to foraging outside the nest as they age2–5. This provides a powerful paradigm to study the neural basis of parenting and age-related behavioural change. Although previous work has interrogated aspects of these dynamics6–14, the underlying neural and molecular mechanisms remain poorly understood. Here, using an unbiased pharmacological screen of neuropeptides, we show that two ancestral regulators of feeding, neuropeptide F (NPF) and allatostatin A (AstA), modulate brood-care behaviour in the clonal raider ant. Through functional manipulations, we show that NPF increases brood-care behaviour, whereas AstA has the opposite effect. Furthermore, we find that the levels of NPF and AstA in the brain change naturally as ants age, suggesting that these changes underlie the age-related changes in brood-care behaviour. Finally, we show that, as in solitary species15,16, NPF and AstA remain sensitive to nutritional state, and nutritional state affects brood-care behaviour accordingly. Our results reveal that evolution has co-opted molecular mechanisms that regulated feeding ancestrally to enable cooperative brood care and age-associated division of labour.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 6 matches between paragraphs and lines of code.

Social-Evolution-and-Behavior/Paul_Kay_Kronauer_2026

License: GPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 8eaab73cb6e13fb794128df8ed24deb539c3b02c, 28 April 2026
Languages: Jupyter (5), R (1)
Size: 888 files, 6 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, 5 notebooks
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (5 files), pandas (5 files), Matplotlib (4 files), seaborn (2 files), ggplot2 (1 file), ggpubr (1 file), h5py (1 file), patchwork (1 file), rstatix (1 file), SciPy (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
8 files

Code availability

Code used for behavioural analysis and sample datasets is available via GitHub (https://github.com/Social-Evolution-and-Behavior/Paul_Kay_Kronauer_2026).

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 6 scripts, each with its path and the digest of its content;
  • 6 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

Data availability

All data are included with the publication as Supplementary Information. Source data are provided with this paper.

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 2, 28 September 2026

  • Publisher: n/a → Nature Portfolio

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 11 authors, 2 keywords, 8 MeSH terms, 97 references.

Cite

This paper

Paul, A., Kay, T., Lacroix, I., Chandra, V., Gal, A., Piekarski, P. K., Valdés-Rodríguez, S., Ritger, A. L., Lee, K. S., Lacy, K. D., & Kronauer, D. J. C. (2026). Ancient feeding-related neuropeptides regulate alloparenting in ants. Nature, 656(8129), 948-956. https://doi.org/10.1038/s41586-026-10747-6

BibTeX

@article{paul2026ancient,
author = {Paul, Alexander and Kay, Tomas and Lacroix, Ivan and Chandra, Vikram and Gal, Asaf and Piekarski, Patrick K and Valdés-Rodríguez, Stephany and Ritger, Amelia L and Lee, Katelyn S and Lacy, Kip D and Kronauer, Daniel J C},
title = {{Ancient feeding-related neuropeptides regulate alloparenting in ants}},
journal = {Nature},
year = {2026},
month = jul,
volume = {656},
number = {8129},
pages = {948--956},
publisher = {Nature Portfolio},
issn = {0028-0836},
doi = {10.1038/s41586-026-10747-6},
url = {https://doi.org/10.1038/s41586-026-10747-6},
pmid = {42420453},
pmcid = {PMC13518240}
}

RIS

TY - JOUR
AU - Paul, Alexander
AU - Kay, Tomas
AU - Lacroix, Ivan
AU - Chandra, Vikram
AU - Gal, Asaf
AU - Piekarski, Patrick K
AU - Valdés-Rodríguez, Stephany
AU - Ritger, Amelia L
AU - Lee, Katelyn S
AU - Lacy, Kip D
AU - Kronauer, Daniel J C
TI - Ancient feeding-related neuropeptides regulate alloparenting in ants
T2 - Nature
J2 - Nature
PY - 2026
DA - 2026/07/08
VL - 656
IS - 8129
SP - 948
EP - 956
SN - 0028-0836
PB - Nature Portfolio
DO - 10.1038/s41586-026-10747-6
UR - https://doi.org/10.1038/s41586-026-10747-6
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41586-026-10747-6",
"type": "article-journal",
"title": "Ancient feeding-related neuropeptides regulate alloparenting in ants",
"container-title": "Nature",
"author": [
{
"family": "Paul",
"given": "Alexander"
},
{
"family": "Kay",
"given": "Tomas"
},
{
"family": "Lacroix",
"given": "Ivan"
},
{
"family": "Chandra",
"given": "Vikram"
},
{
"family": "Gal",
"given": "Asaf"
},
{
"family": "Piekarski",
"given": "Patrick K"
},
{
"family": "Valdés-Rodríguez",
"given": "Stephany"
},
{
"family": "Ritger",
"given": "Amelia L"
},
{
"family": "Lee",
"given": "Katelyn S"
},
{
"family": "Lacy",
"given": "Kip D"
},
{
"family": "Kronauer",
"given": "Daniel J C"
}
],
"container-title-short": "Nature",
"volume": "656",
"issue": "8129",
"page": "948-956",
"DOI": "10.1038/s41586-026-10747-6",
"PMID": "42420453",
"PMCID": "PMC13518240",
"ISSN": "0028-0836",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41586-026-10747-6",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
8
]
]
}
}

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.3389/fgene.2026.1818975
Clock-related neuropeptides in <i>Acyrthosiphon pisum</i>.
Journal: Frontiers in genetics
In common: other, 10 references
[2] doi:10.1038/s41467-026-76675-1 [code]
Long-read proteogenomic atlas of human neuronal differentiation reveals isoform diversity informing neurodevelopmental risk mechanisms.
Journal: Nature communications
In common: rstatix, h5py, ggpubr, 8 other tools
[3] doi:10.1016/j.cell.2026.05.026 [code]
The critical role of the endogenous immune compartment after CAR T cell therapy in recurrent GBM.
Journal: Cell
In common: rstatix, h5py, ggpubr, 8 other tools
[4] doi:10.1038/s41586-026-10629-x [code]
Whole-genome duplication shaped cell-type evolution in the vertebrate brain.
Journal: Nature
In common: rstatix, ggpubr, patchwork, 7 other tools, other
[5] doi:10.1002/imt2.70163 [code]
Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.
Journal: iMeta
In common: rstatix, ggpubr, patchwork, 7 other tools
[6] doi:10.1093/bioinformatics/btag592 [code]
Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.
Journal: Bioinformatics (Oxford, England)
In common: rstatix, ggpubr, patchwork, 7 other tools
[7] doi:10.1073/pnas.2609132123 [code]
A human lysosomal storage disorder toolkit for decoding proteome landscapes in cortical-like and dopaminergic-like induced neurons.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: rstatix, ggpubr, patchwork, 7 other tools
[8] doi:10.1162/imag.a.1245 [code]
Towards precision EEG connectomics: Evaluating the benefits of dense sampling.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: rstatix, ggpubr, patchwork, 7 other tools
[9] doi:10.1038/s41586-026-10735-w [code]
Distributed control circuits across a brain-and-cord connectome.
Journal: Nature
In common: ggpubr, patchwork, ggplot2, 6 other tools, 1 reference
[10] doi:10.1038/s41467-026-76939-w [code]
HIPPIE: a generative model for electrophysiological analysis across species, technologies, and modalities.
Journal: Nature communications
In common: h5py, ggpubr, patchwork, 7 other tools

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.

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.