OSCR

Synchronization properties in C. elegans: Relating behavioral circuits to structural and functional neuronal connectivity.

Code ↔ Paper

7 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 7 matches · 5 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Materials and methods › Single-compartment membrane model of C. elegans ↔ Supporting_matlab_functions/Conductance_ODE.m, the whole file · a weak match · score 0.81 · synaptic activity variable, leakage potential, reversal potential, Gap junctions, sigmoid, rise
  2. [2] § Materials and methods › Single-compartment membrane model of C. elegans ↔ Supporting_matlab_functions/Run_Model.m, the whole file · a weak match · score 0.80 · synaptic activity variable, leakage potential, reversal potential, sigmoid, rise, width
  3. [3] § Materials and methods › Correlation based functional community detection ↔ Python_codes/draw_subnetwork_from_matlab_data.ipynb, lines 174–228 · score 0.70 · original correlation matrix, Pearson correlation, sorted matrix, MATLAB, block, weighted
  4. [4] § Results › Functional communities (FCs) ↔ Supporting_matlab_functions/wsbm.m, the whole file · a weak match · score 0.68 · edge existence, latent community structures, edge weights, algorithm, WSBM, networks
  5. [5] § Results › Functional communities (FCs) ↔ Main_matlab_codes/fit_wsbm_mode.m, lines 1–122 · score 0.58 · co occurrence matrix, edge weights, algorithm, nodes, WSBM, partitions
  6. [6] § Materials and methods › Correlation based functional community detection ↔ Supporting_matlab_functions/wsbm.m, the whole file · a weak match · score 0.53 · weighted stochastic block, MATLAB, WSBM, model, matrix
  7. [7] § Materials and methods › Correlation based functional community detection ↔ Main_matlab_codes/fit_wsbm.m, the whole file · a weak match · score 0.51 · co occurrence matrix, Pearson correlation, WSBM, Neurons

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

MATLAB · 142 lines · 5.9 KB · no license · 2 matches

  1. function [Labels,Model] = wsbm(E,R_Struct,varargin)
  2. %WSBM find latent community structure in weighted networks.
  3. %
  4. % WSBM is the main driver program for finding community structure,
  5. % inferring the vertex-labels and edge-bundle parameters of a
  6. % Weighted Stochastic Block Model (WSBM).
  7. % This algorithm infers the parameters by approximating a posterior
  8. % distribution using an iterative variational Bayes algorithm.
  9. % See Aicher, Jacobs, Clauset (2013) for the theoretical derivation of
  10. % the algorithm
  11. %
  12. % Syntax:
  13. % [Labels] = wsbm(E)
  14. % [Labels] = wsbm(E,k)
  15. % [Labels, Model] = wsbm(...,'ParaName',ParaValue)
  16. %
  17. % Examples:
  18. % Raw_Data = generateEdges();
  19. % % Default
  20. % [Labels] = wsbm(Raw_Data);
  21. % % Infer 2 Groups
  22. % [Labels] = wsbm(Raw_Data,2);
  23. % % Change W_Distr to Exp
  24. % [Labels] = wsbm(Raw_Data,2,'W_Distr','Exp');
  25. % % Run Code in Parallel
  26. % [Labels] = wsbm(Raw_Data,2,'parallel',1);
  27. % % Ignore E_Distr
  28. % [Labels] = wsbm(Raw_Data,2,'E_Distr','None');
  29. % [Labels] = wsbm(Raw_Data,2,'alpha',0);
  30. % % Increase the number of trials
  31. % [Labels] = wsbm(Raw_Data,2,'numTrials','500');
  32. % % Multiple changes at once
  33. % [Labels] = wsbm(Raw_Data,2,'W_Distr','Exp','alpha',0,'parallel',1);
  34. % See WSBMDemo.m for more examples
  35. %
  36. % Inputs:
  37. % E - an m by 3 network edge list (parent,child,weight)
  38. % (If E is an n by n network adjacency matrix, then it will be
  39. % converted into an edge list by ADJ2EDG)
  40. % k - number of blocks (k = 4 default)
  41. %
  42. % Outputs:
  43. % Labels - a n by 1 vector of edge labels (using the MAP estimates)
  44. % - Ties are broken randomly (with a warning message)
  45. % Model - a MATLAB structure for advanced output
  46. %
  47. % For more information, try 'type wsbm.m'
  48. %
  49. % Copyright 2013-2014 Christopher Aicher
  50. %
  51. % This program is free software: you can redistribute it and/or modify
  52. % it under the terms of the GNU General Public License as published by
  53. % the Free Software Foundation, either version 3 of the License, or
  54. % (at your option) any later version.
  55. % This program is distributed in the hope that it will be useful,
  56. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  57. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  58. % GNU General Public License for more details.
  59. % You should have received a copy of the GNU General Public License
  60. % along with this program. If not, see <http://www.gnu.org/licenses/>.
  61. %
  62. % See also SETUP_DISTR, INSTALLMEXFILES, WSBMDEMO, CALC_LOGEVIDENCE
  63. % WSBM
  64. % Version 1.0 | December 2013 | Christopher Aicher
  65. %
  66. %
  67. % ADVANCED INPUT/OUTPUT:
  68. % -Advanced Inputs: 'ParaName' - ParaValue * indicates default
  69. % --Model Inputs:
  70. % 'W_Distr' - edge-weight distr ('Normal' *)
  71. % 'E_Distr' - edge-existence distr ('Bernoulli' *)
  72. % To select a distribution type it's name:
  73. % Weighted distributions:
  74. % Bernoulli, Binomial, Poisson, Normal, LogNormal,
  75. % Exponential, Pareto, None,
  76. % Edge distributions:
  77. % Bernoulli, Binomial, Poisson, None, DC (Degree Corrected)
  78. % See SETUP_DISTR for more information
  79. % 'R_Struct' - kxk matrix of the block structure.
  80. % 'alpha' - para in [0,1]. 0 only weight, 0.5* both, 1 only existence
  81. % --Inference Options:
  82. % 'numTrials' - number of trials with different random initial conditions
  83. % 'algType' - 'vb'* naive bayes, 'bp' belief propagation
  84. % 'networkType' - 'dir'* directed,'sym' = symmetric,'asym' = asymmetric
  85. % 'nanType' - 'missing'* nans are missing, 'nonedge' = nans are nonedge
  86. % 'mainMaxIter' - Maximum number of iterations in main_loop
  87. % 'mainTol' - Minimum (Max Norm) convergence tolerance in main_loop
  88. % 'muMaxIter' - Maximum number of iterations in mu_loop
  89. % 'muTol' - Minimum (Max Norm) convergence tolerance in mu_loop
  90. % --Extra Options:
  91. % 'verbosity' - 0 silent, 1* default, 2 verbose, 3 very verbose
  92. % 'parallel' - boolean, run in parallel? 0* No (Need Parallel ToolBox)
  93. % 'save' - boolean, save temp results? 0* No
  94. % 'outputpath' - string to where to save temp results (Only if save = 1)
  95. % 'seed' - seed for algtype (mu_0 or mes_0) (Sets numTrials = 1)
  96. % 'mexfile' - boolean, run using MEX files? 1* Yes (Need MEX Files)
  97. % --Prior Options:
  98. % 'mu_0' - kxn matrix prior vector for vertex-label parameters(sums to 1)
  99. %
  100. % -Advanced Outputs:
  101. % 'Model' - struct with the following fields
  102. % 'name' - name of model <W_Distr-E_Distr-R_Struct>
  103. % 'Data' - struct with Data related variables
  104. % 'W_Distr' - struct from SETUP_DISTR
  105. % 'E_Distr' - struct from SETUP_DISTR
  106. % 'R_Struct' - struct with edge-bundle (R) variables
  107. % 'Para' - struct with inferred hyperparamters (tau,mu) and parameter
  108. % estimates (theta)
  109. % 'Options' - struct with inference option information
  110. % 'Flags' - struct with convergence flags
  111. %
  112. %
  113. % For an overview see the README.txt file
  114. %
  115. %-------------------------------------------------------------------------%
  116. % WSBM CODE
  117. %-------------------------------------------------------------------------%
  118. % Call wsbm_driver.m
  119. if nargin > 1,
  120. Model = wsbm_driver(E,R_Struct,varargin{:});
  121. else
  122. Model = wsbm_driver(E);
  123. end
  124. Labels = Model.Para.mu';
  125. [n,k] = size(Labels);
  126. if sum(sum(Labels >= 1/k-10^-3)) > n
  127. fprintf('Breaking %u Ties Randomly\n',sum(sum(Labels >= 1/k-10^-3,2) > 1));
  128. e = [zeros(size(Labels,1),1) cumsum(Labels,2)];
  129. e(:,end) = 1; e(e>1) = 1;
  130. Labels = diff(e,1,2);
  131. Labels = mnrnd(1,Labels);
  132. end
  133. [~,Labels] = max(Labels,[],2);
  134. %-------------------------------------------------------------------------%
  135. % END OF WSBM CODE
  136. %-------------------------------------------------------------------------%
  137. %EOF

wsbm.m at commit 5604e1e, no license · at the source

Overview

Authors: Gourab Kumar Sar1, Andrew Patton1, Emma Towlson1,2,3,4, Jörn Davidsen1,2
  1. Complexity Science Group, Department of Physics and Astronomy, University of Calgary, Calgary, Alberta, Canada
  2. Hotchkiss Brain Institute, University of Calgary, Calgary, Alberta, Canada
  3. Department of Computer Science, University of Calgary, Calgary, Alberta, Canada
  4. Alberta Children’s Hospital Research Institute, University of Calgary, Calgary, Alberta, Canada
Institutions: University of Calgary (Canada)
Journal: PLoS computational biology, volume 22, issue 9, article e1014152
Dates: received 20 March 2026; accepted 26 August 2026; published online 15 September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pcbi.1014152 · PMID 42743376 · PMCID PMC13588538 · OpenAlex W7213319572
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: C. elegans (organism)
Methods: Connectivity, Single-unit activity, calcium imaging
MeSH: Behavior, Animal*, Caenorhabditis elegans*, Models, Neurological*, Nerve Net*, Neurons*, Animals, Computational Biology, Computer Simulation, Connectome, Electrical Synapses, Locomotion (* major topic)
Journal subjects: Biology and Life Sciences, Cell Biology, Cellular Types, Animal Cells, Neurons, Neuroscience, Cellular Neuroscience, Psychology, Behavior, Social Sciences, Cell Physiology, Junctional Complexes, Gap Junctions, Anatomy, Nervous System, Synapses, Medicine and Health Sciences, Physiology, Electrophysiology, Neurophysiology, Motor Neurons, Research and Analysis Methods, Animal Studies, Experimental Organism Systems, Model Organisms, Caenorhabditis Elegans, Animal Models, Organisms, Eukaryota, Animals, Invertebrates, Nematoda, Caenorhabditis, Zoology, Cognitive Science, Cognitive Psychology, Perception, Sensory Perception, Brain Mapping, Connectomics, Neuroanatomy
Topic: Genetics, Aging, and Longevity in Model Organisms (Aging, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: Natural Sciences and Engineering Research Council of Canada (RGPIN/05221-2020, RGPIN-2021-02949); UCalgary’s VPR Postdoctoral Match-Funding Program; Alberta Graduate Excellence Scholarship; Alberta Innovates Graduate Student Scholarship
Citations: not cited yet (Europe PMC); 87 references in the paper

Abstract

A central question in neuroscience is how neural processing generates or encodes behavior. Caenorhabditis elegans is well suited to addressing this question, given its compact nervous system and near-complete structural connectome. Despite this, findings from previous studies remain inconclusive. While some have shown that the connectome can robustly encode specific behaviors such as locomotion, others report that functional connectivity can be reconfigured across behaviors. We aim to understand the relationship between structural connectivity, functional connectivity and biological behavior in silico by using an experimentally motivated computational model leveraging the structural connectome. Stimulation of specific neurons in the model induces oscillatory neural responses, enabling us to infer neuronal functional connectivity. Functional connectivity is found to be stronger among some neurons, allowing us to identify functional communities. We find that electrical synapses play a critical role in determining functional communities, and the resulting mesoscale functional architecture is predominantly gap junctionally assortative. Furthermore, comparison with behavioral circuits shows that locomotion circuits are largely segregated into distinct functional communities while other circuits are more distributed across multiple functional communities. We also observe that stimulation of neurons belonging to these distributed circuits elicits a more synchronized neuronal response compared to stimulation of neurons within the more segregated circuits. This is consistent with the presence of behavioral patterns that originate in one circuit and terminate in another (e.g., chemosensation leading to locomotion), such that stimulation of one circuit can activate the other and eventually result in a synchronized response. We also find a large repertoire of chimera-like synchronization patterns upon stimulation of certain sensory circuits (chemosensation, mechanosensation) indicating high dynamical flexibility. Overall, our results demonstrate that while certain behaviors are governed by functionally segregated circuits, others emerge from the synchronization of multiple functional communities, which are, to begin with, influenced by the underlying structural connectivity.

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 7 matches between paragraphs and lines of code.

gourab-sar/C-elegans-synchronization

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 5604e1eb62c16d923835e475ea6b42565bd535ce, 25 February 2026
Languages: MATLAB (20), Jupyter (3)
Size: 31 files, 23 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README, 3 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (3 files), NumPy (3 files), SciPy (3 files), NetworkX (2 files), Optimization Toolbox (1 file), Statistics and Machine Learning Toolbox (1 file), pandas (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
24 files

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:

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

No dataset and no data link were found in the paper.

Data Availability

The open C. elegans data we used in this study were not collected by us and are described in https://doi.org/10.1098/rstb.1986.0056, https://doi.org/10.1371/journal.pcbi.1001066 and can be obtained from WormAtlas https://www.wormatlas.org/. The computational model used in this study is described in https://doi.org/10.1103/PhysRevE.89.052805. Our own code is available here: https://github.com/gourab-sar/C-elegans-synchronization.

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, issue, pages, dates, 4 authors, 11 MeSH terms, 4 funders, 81 references.

Cite

This paper

Sar, G. K., Patton, A., Towlson, E., & Davidsen, J. (2026). Synchronization properties in C. elegans: Relating behavioral circuits to structural and functional neuronal connectivity. PLoS computational biology, 22(9), e1014152. https://doi.org/10.1371/journal.pcbi.1014152

BibTeX

@article{sar2026synchronization,
author = {Sar, Gourab Kumar and Patton, Andrew and Towlson, Emma and Davidsen, Jörn},
title = {{Synchronization properties in C. elegans: Relating behavioral circuits to structural and functional neuronal connectivity}},
journal = {PLoS computational biology},
year = {2026},
month = sep,
volume = {22},
number = {9},
pages = {e1014152},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/journal.pcbi.1014152},
url = {https://doi.org/10.1371/journal.pcbi.1014152},
pmid = {42743376},
pmcid = {PMC13588538}
}

RIS

TY - JOUR
AU - Sar, Gourab Kumar
AU - Patton, Andrew
AU - Towlson, Emma
AU - Davidsen, Jörn
TI - Synchronization properties in C. elegans: Relating behavioral circuits to structural and functional neuronal connectivity
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/09/15
VL - 22
IS - 9
SP - e1014152
SN - 1553-734X
PB - PLOS
DO - 10.1371/journal.pcbi.1014152
UR - https://doi.org/10.1371/journal.pcbi.1014152
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pcbi.1014152",
"type": "article-journal",
"title": "Synchronization properties in C. elegans: Relating behavioral circuits to structural and functional neuronal connectivity",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Sar",
"given": "Gourab Kumar"
},
{
"family": "Patton",
"given": "Andrew"
},
{
"family": "Towlson",
"given": "Emma"
},
{
"family": "Davidsen",
"given": "Jörn"
}
],
"container-title-short": "PLoS Comput Biol",
"volume": "22",
"issue": "9",
"page": "e1014152",
"DOI": "10.1371/journal.pcbi.1014152",
"PMID": "42743376",
"PMCID": "PMC13588538",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pcbi.1014152",
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
15
]
]
}
}

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/s41598-026-54384-5
Optimization of connectome weights for a neural network model generating both forward and backward locomotion in C. elegans.
Journal: Scientific reports
In common: C. elegans, 18 references
[2] doi:10.1038/s41593-026-02257-5 [code]
Neural sequences underlying directed turning in Caenorhabditis elegans.
Journal: Nature neuroscience
In common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 9 references
[3] doi:10.1371/journal.pcbi.1014214 [code]
Evolutionary Kuramoto dynamics unravels origins of chimera states in neural populations.
Journal: PLoS computational biology
In common: C. elegans, 7 references
[4] doi:10.1186/s12915-026-02641-4
Signed motif analysis of the Caenorhabditis elegans neuronal network reveals positive feedforward and negative feedback loops.
Journal: BMC biology
In common: C. elegans, 7 references
[5] doi:10.1038/s41467-026-72709-w [code]
An epifluorescence microscope design for naturalistic behavior and cellular activity in freely moving Caenorhabditis elegans.
Journal: Nature communications
In common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 4 references
[6] doi:10.1098/rstb.2024.0461 [code]
Shallow recurrent decoders for neural and behavioural dynamics.
Journal: Philosophical transactions of the Royal Society of London. Series B, Biological sciences
In common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 4 references
[7] doi:10.1038/s41586-026-10348-3 [code]
An enteric neuron ionotropic receptor regulates salt stress resistance.
Journal: Nature
In common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 3 references
[8] doi:10.1038/s41467-026-72710-3 [code]
A modular multi-color fluorescence microscope for simultaneous tracking of cellular activity and behavior.
Journal: Nature communications
In common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 3 references
[9] doi:10.7554/elife.102309 [code]
Dimorphic neural network architecture prioritizes sexual-related behaviors in male &lt;i&gt;Caenorhabditis elegans&lt;/i&gt;.
Journal: eLife
In common: C. elegans, 4 references
[10] doi:10.1038/s41467-026-75352-7 [code]
Mechanosensory encoding of surface mechanics optimizes locomotion.
Journal: Nature communications
In common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

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.