Synchronization properties in C. elegans: Relating behavioral circuits to structural and functional neuronal connectivity.
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] § 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] § 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] § 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] § 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] § 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] § 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] § 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
- function [Labels,Model] = wsbm(E,R_Struct,varargin)
- %WSBM find latent community structure in weighted networks.
- %
- % WSBM is the main driver program for finding community structure,
- % inferring the vertex-labels and edge-bundle parameters of a
- % Weighted Stochastic Block Model (WSBM).
- % This algorithm infers the parameters by approximating a posterior
- % distribution using an iterative variational Bayes algorithm.
- % See Aicher, Jacobs, Clauset (2013) for the theoretical derivation of
- % the algorithm
- %
- % Syntax:
- % [Labels] = wsbm(E)
- % [Labels] = wsbm(E,k)
- % [Labels, Model] = wsbm(...,'ParaName',ParaValue)
- %
- % Examples:
- % Raw_Data = generateEdges();
- % % Default
- % [Labels] = wsbm(Raw_Data);
- % % Infer 2 Groups
- % [Labels] = wsbm(Raw_Data,2);
- % % Change W_Distr to Exp
- % [Labels] = wsbm(Raw_Data,2,'W_Distr','Exp');
- % % Run Code in Parallel
- % [Labels] = wsbm(Raw_Data,2,'parallel',1);
- % % Ignore E_Distr
- % [Labels] = wsbm(Raw_Data,2,'E_Distr','None');
- % [Labels] = wsbm(Raw_Data,2,'alpha',0);
- % % Increase the number of trials
- % [Labels] = wsbm(Raw_Data,2,'numTrials','500');
- % % Multiple changes at once
- % [Labels] = wsbm(Raw_Data,2,'W_Distr','Exp','alpha',0,'parallel',1);
- % See WSBMDemo.m for more examples
- %
- % Inputs:
- % E - an m by 3 network edge list (parent,child,weight)
- % (If E is an n by n network adjacency matrix, then it will be
- % converted into an edge list by ADJ2EDG)
- % k - number of blocks (k = 4 default)
- %
- % Outputs:
- % Labels - a n by 1 vector of edge labels (using the MAP estimates)
- % - Ties are broken randomly (with a warning message)
- % Model - a MATLAB structure for advanced output
- %
- % For more information, try 'type wsbm.m'
- %
- % Copyright 2013-2014 Christopher Aicher
- %
- % This program is free software: you can redistribute it and/or modify
- % it under the terms of the GNU General Public License as published by
- % the Free Software Foundation, either version 3 of the License, or
- % (at your option) any later version.
- % This program is distributed in the hope that it will be useful,
- % but WITHOUT ANY WARRANTY; without even the implied warranty of
- % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- % GNU General Public License for more details.
- % You should have received a copy of the GNU General Public License
- % along with this program. If not, see <http://www.gnu.org/licenses/>.
- %
- % See also SETUP_DISTR, INSTALLMEXFILES, WSBMDEMO, CALC_LOGEVIDENCE
- % WSBM
- % Version 1.0 | December 2013 | Christopher Aicher
- %
- %
- % ADVANCED INPUT/OUTPUT:
- % -Advanced Inputs: 'ParaName' - ParaValue * indicates default
- % --Model Inputs:
- % 'W_Distr' - edge-weight distr ('Normal' *)
- % 'E_Distr' - edge-existence distr ('Bernoulli' *)
- % To select a distribution type it's name:
- % Weighted distributions:
- % Bernoulli, Binomial, Poisson, Normal, LogNormal,
- % Exponential, Pareto, None,
- % Edge distributions:
- % Bernoulli, Binomial, Poisson, None, DC (Degree Corrected)
- % See SETUP_DISTR for more information
- % 'R_Struct' - kxk matrix of the block structure.
- % 'alpha' - para in [0,1]. 0 only weight, 0.5* both, 1 only existence
- % --Inference Options:
- % 'numTrials' - number of trials with different random initial conditions
- % 'algType' - 'vb'* naive bayes, 'bp' belief propagation
- % 'networkType' - 'dir'* directed,'sym' = symmetric,'asym' = asymmetric
- % 'nanType' - 'missing'* nans are missing, 'nonedge' = nans are nonedge
- % 'mainMaxIter' - Maximum number of iterations in main_loop
- % 'mainTol' - Minimum (Max Norm) convergence tolerance in main_loop
- % 'muMaxIter' - Maximum number of iterations in mu_loop
- % 'muTol' - Minimum (Max Norm) convergence tolerance in mu_loop
- % --Extra Options:
- % 'verbosity' - 0 silent, 1* default, 2 verbose, 3 very verbose
- % 'parallel' - boolean, run in parallel? 0* No (Need Parallel ToolBox)
- % 'save' - boolean, save temp results? 0* No
- % 'outputpath' - string to where to save temp results (Only if save = 1)
- % 'seed' - seed for algtype (mu_0 or mes_0) (Sets numTrials = 1)
- % 'mexfile' - boolean, run using MEX files? 1* Yes (Need MEX Files)
- % --Prior Options:
- % 'mu_0' - kxn matrix prior vector for vertex-label parameters(sums to 1)
- %
- % -Advanced Outputs:
- % 'Model' - struct with the following fields
- % 'name' - name of model <W_Distr-E_Distr-R_Struct>
- % 'Data' - struct with Data related variables
- % 'W_Distr' - struct from SETUP_DISTR
- % 'E_Distr' - struct from SETUP_DISTR
- % 'R_Struct' - struct with edge-bundle (R) variables
- % 'Para' - struct with inferred hyperparamters (tau,mu) and parameter
- % estimates (theta)
- % 'Options' - struct with inference option information
- % 'Flags' - struct with convergence flags
- %
- %
- % For an overview see the README.txt file
- %
- %-------------------------------------------------------------------------%
- % WSBM CODE
- %-------------------------------------------------------------------------%
- % Call wsbm_driver.m
- if nargin > 1,
- Model = wsbm_driver(E,R_Struct,varargin{:});
- else
- Model = wsbm_driver(E);
- end
- Labels = Model.Para.mu';
- [n,k] = size(Labels);
- if sum(sum(Labels >= 1/k-10^-3)) > n
- fprintf('Breaking %u Ties Randomly\n',sum(sum(Labels >= 1/k-10^-3,2) > 1));
- e = [zeros(size(Labels,1),1) cumsum(Labels,2)];
- e(:,end) = 1; e(e>1) = 1;
- Labels = diff(e,1,2);
- Labels = mnrnd(1,Labels);
- end
- [~,Labels] = max(Labels,[],2);
- %-------------------------------------------------------------------------%
- % END OF WSBM CODE
- %-------------------------------------------------------------------------%
- %EOF
wsbm.m at commit 5604e1e, no license · at the source
Overview
- Complexity Science Group, Department of Physics and Astronomy, University of Calgary, Calgary, Alberta, Canada
- Hotchkiss Brain Institute, University of Calgary, Calgary, Alberta, Canada
- Department of Computer Science, University of Calgary, Calgary, Alberta, Canada
- Alberta Children’s Hospital Research Institute, University of Calgary, Calgary, Alberta, Canada
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
5604e1eb62c16d923835e475ea6b42565bd535ce, 25 February 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
24 files
- Main_matlab_codes/
actual_oscillation.m , MATLAB, 60 lines - Main_matlab_codes/
community_detection_matl , MATLAB, 102 linesab.m - Main_matlab_codes/
find_correlation_matrice , MATLAB, 89 liness.m - Main_matlab_codes/
fit_wsbm.m , MATLAB, 99 lines, 1 match - Main_matlab_codes/
fit_wsbm_mode.m , MATLAB, 190 lines, 1 match - Main_matlab_codes/
patterns_generate.m , MATLAB, 167 lines - Main_matlab_codes/
patterns_identify.m , MATLAB, 162 lines - Python_codes/
draw_c_elegans_network.i , Jupyter, 180 linespynb - Python_codes/
draw_patterns.ipynb , Jupyter, 183 lines - Python_codes/
draw_subnetwork_from_mat , Jupyter, 384 lines, 1 matchlab_data.ipynb - Supporting_matlab_functi
ons/ , MATLAB, 47 linesAdj2Edg.m - Supporting_matlab_functi
ons/ , MATLAB, 43 lines, 1 matchConductance_ODE.m - Supporting_matlab_functi
ons/ , MATLAB, 58 linesEdg2Adj.m - Supporting_matlab_functi
ons/ , MATLAB, 59 linesFind_Hopf_Bifurcation_St epper.m - Supporting_matlab_functi
ons/ , MATLAB, 92 lines, 1 matchRun_Model.m - Supporting_matlab_functi
ons/ , MATLAB, 48 linesThreshold_Voltage.m - Supporting_matlab_functi
ons/ , MATLAB, 164 linesbiwsbm.m - Supporting_matlab_functi
ons/ , MATLAB, 161 linescalc_logEvidence.m - Supporting_matlab_functi
ons/ , MATLAB, 114 linesfcn_comm_motifs.m - Supporting_matlab_functi
ons/ , MATLAB, 378 linesgenlouvain.m - Supporting_matlab_functi
ons/ , MATLAB, 233 linesiterated_genlouvain.m - Supporting_matlab_functi
ons/ , MATLAB, 612 linessetup_distr.m - Supporting_matlab_functi
ons/ , MATLAB, 142 lines, 2 matcheswsbm.m - README.md, Text, 53 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:
- 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://
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://
BibTeX
@article{sar2026synchron
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/
url = {https://
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/
VL - 22
IS - 9
SP - e1014152
SN - 1553-734X
PB - PLOS
DO - 10.1371/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1371/
"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":
"volume": "22",
"issue": "9",
"page": "e1014152",
"DOI": "10.1371/
"PMID": "42743376",
"PMCID": "PMC13588538",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://
"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 reportsIn common: C. elegans, 18 references
- [2] doi:10.1038/s41593-026-02257-5 [code]
- Neural sequences underlying directed turning in Caenorhabditis elegans.Journal: Nature neuroscienceIn common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 9 references
- [3] 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 biologyIn common: C. elegans, 7 references
- [4] 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 communicationsIn common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 4 references
- [5] 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 sciencesIn common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 4 references
- [6] doi:10.1038/s41586-026-10348-3 [code]
- An enteric neuron ionotropic receptor regulates salt stress resistance.Journal: NatureIn common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 3 references
- [7] doi:10.1038/s41467-026-72710-3 [code]
- A modular multi-color fluorescence microscope for simultaneous tracking of cellular activity and behavior.Journal: Nature communicationsIn common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 3 references
- [8] 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: eLifeIn common: C. elegans, 4 references - [9] doi:10.1038/s41467-026-75352-7 [code]
- Mechanosensory encoding of surface mechanics optimizes locomotion.Journal: Nature communicationsIn common: pandas, SciPy, Matplotlib, 1 other tool, C. elegans, 2 references
- [10] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: Optimization Toolbox, NetworkX, Statistics and Machine Learning Toolbox, 4 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.
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, 23 scripts, and 7 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:b1d7c3dc5054b667…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
