LoopDetect_for_Matlab

A MATLAB package for detecting positive and negative feedback loops in ordinary differential equation models.

Example Workflow Function Documentation GitHub Repository

LoopDetect_for_Matlab detects feedback loops, also called cycles or circuits, in ordinary differential equation (ODE) models. A feedback loop is a path from one model variable back to itself without visiting any other variable more than once.

For each detected loop, the package reports the variables forming the loop, the loop length, and whether the loop is positive or negative. An upper limit on the number of returned loops can be specified to reduce runtime.

The package was developed using MATLAB R2019b. It uses base MATLAB functions and does not require additional MATLAB toolboxes.

Example workflow from ODE model to detected feedback loops

Example feedback-loop detection workflow: POSm4 model scheme, ODE model, and detected loops classified by length and sign.

Quickstart

Download and unzip the repository. Open MATLAB and either navigate to the downloaded folder or add the folder to the MATLAB path.

The following example reports up to 10 feedback loops for an ODE system defined by func_POSm4, evaluated at the variable values s_star.

s_star = [1, 1, 1, 1]';

klin = ones(1, 8);
knonlin = [2.5, 3];
t = 0;

loop_list = find_loops_vset(@(x) func_POSm4(t, x, klin, knonlin), s_star, 10);

% Return the full list of detected feedback loops, up to 10
loop_list{1}

% Return only the first loop
first_loop = loop_list{1}.loop{1}
The ODE function passed to find_loops_vset must depend only on the variable values. Any additional parameters, including time, must be fixed beforehand.

Documentation

Example workflow

Step-by-step workflow showing how to compute feedback loops from an ODE model.

Open workflow HTML

Function documentation

Automatically generated documentation for the MATLAB function files.

Open function index

PDF workflow

Printable version of the workflow documentation.

Open workflow PDF

Other implementations

Related implementations of LoopDetect are available for other programming languages.

R version Python version

Reporting issues

If you notice a bug, unclear documentation, or unexpected behavior, please report it through the GitHub repository issue tracker or contact the maintainer by email.

License

All code is licensed under the GNU GPLv3.

LoopDetect_for_Matlab
Copyright © 2020 Katharina Baum.