Skip to content

evanpeikon/systems_biology

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧬 Overview

This repository contains assorted programs and functions for using numerical methods, modeling, and solving common problems in systems biology.

🧬 Numerical Methods

Numerical methods are techniques for finding approximate solutions to mathematicaal problems that may not have exact solutions. Additionally, numerical methods generally rely on iterative precedures and discretization to produce a sequence of approximations that converge to a true solution, and as a result they are particuarly helpful for solving differential equations, optimization problems, and systems of equations where traditional algebraic methods are not possible, or are impractical.

Below you'll find a list of numerical methods for which I've provided functions to carry out. Additional numerical methods will be added to this repository over time.

  • Gauss Elimination is a mathematical procedure used to solve systems of linear equations by transforming the system's augmented matrix into row-echelon form (and then reduced row-echelon form) through a series of row operations. This method systematically eliminates variables to find the solution for each unknown in the system.
  • Euler's method is a numerical technique for solving ordinary differential equations (ODEs) by approximating solutions through iterative steps, where the next value is computed using the current value and the derivative at that point. - This method can be used to solve ODEs by updating the dependent variable based on its rate of change, as demonstrated here or it can be used to simulate physical processes, as demonstrated here
  • Runge-Kutta 4th Order Method (RK4) is a more accurate method for solving ODEs compared to Euler's method. RK4 reduces error by taking a weighted average of slopes at different points within the interval, and it's known for it's balance between accuracy and computational efficiency.
  • Root Finding Methods:
    • The quadratic formula $x = \frac{-b±\sqrt{b^2-4ac}}{2a}$ is used to solve functions of the form $f(x) = ax^2+bx+c=0$. The values calculated with this formula are called roots and they represent values of $x$ that make the function equal 0. Although the quadratic formula helps you identify roots for simple functions of the form $f(x) = ax^2+bx+c=0$. there are many functions for which the root cannot be determined as easily. For this reason, other numerical methods, provide more effcient means of obtaining the answer(s). Below you'll find code for multiple bracketing and open methods used to identify roots:
  • Optimization Methods:
    • Golden Section Search is an optimization algorithm used to find the minimum (or maximum) of a unimodal function within a specified interval. It iteratively narrows the search range by dividing the interval using the golden ratio, reducing the number of function evaluations needed to identify the optimal point.
    • Brent's Optimization Method is a hybrid algorithm that combines the robustness of bracketing methods (such as golden-section search) with the speed of parabolic interpolation to find the minimum of a function. It efficiently switches between these techniques to converge quickly and accurately, especially for unimodal functions.
    • Optimal Steepest Descent is an iterative optimization technique that moves in the direction of the negative gradient (steepest descent) of a function to minimize it. At each step, it computes the optimal step size that minimizes the function along the current search direction, ensuring more efficient convergence than standard gradient descent.
  • Regression Methods:
    • Simple Linear Regression is a statistical method used to model the relationship between a dependent variable and one or more independent variables by fitting a linear equation to observed data.
    • Least Squares Regression is a method used in linear regression to estimate the best-fitting line by minimizing the sum of the squared differences (residuals) between observed values and predicted values. This approach finds the line that best represents the relationship between an independent variable and a dependent variable.
    • Multiple Linear Regression is a statistical method used to model the relationship between one dependent variable and two or more independent variables by fitting a linear equation. The goal is to predict the dependent variable by minimizing the differences between observed values and the values predicted by the linear model, often using least squares estimation.
    • Polynomial Regression is a type of regression analysis in which the relationship between the independent variable and the dependent variable is modeled as an nth-degree polynomial. This approach allows for the modeling of non-linear relationships by fitting a polynomial equation to the data, providing greater flexibility than simple linear regression.
  • Newton's Interpolating Polynomial is a method for estimating values of a function using a set of known data points by constructing a polynomial that passes through those points. It employs divided differences to efficiently build the polynomial and allows for incremental updates when new data points are added.

🧬 Systems Biology

Below you'll find a list of programs and functions for solving common problems in systems biology. Additional methods will be added to this repository over time.

  • Modeling Signaling Pathways
    • Modeling pathways using ordinary differential equations (ODEs) involves representing the dynamic behavior of biological processes by defining how variables change over time. These ODE systems can be solved computationally, allowing for the visualization of the system's evolution through charting the variables' trajectories.
  • Susceptible-Infected-Recovered (SIR) model
    • The Susceptible-Infected-Recovered (SIR) model is a basic compartmental model in epidemiology used to describe the spread of infectious diseases. It divides a population into three groups: susceptible (S), infected (I), and recovered (R), and uses differential equations to track the transitions between these compartments over time, providing insights into disease dynamics and potential control strategies.
  • Lotka-Volterra model
    • The Lotka-Volterra model, also known as the predator-prey model, describes the interaction between two species in an ecosystem: one as a predator and the other as prey. It uses a system of differential equations to model the cyclical dynamics of predator and prey populations, showing how their populations fluctuate over time based on their interactions.
  • Binomial Mutations Calculator
    • A binomial process is related to the binomial distribution, which describes the number of successes in a fixed number of independent trials, each with the same probability of success. This code calculates the probability of observing exactly k mutations in n DNA bases, given a mutation rate p, using the binomial distribution formula.
  • Poisson Mutation Calculator
    • A Poisson process is related to the Poisson distribution, which describes the number of events occurring within a fixed interval of time or space, where these events happen independently of each other and at a constant average rate. This code calculates the probability of observing exactly k mutations given an average mutation rate λ, using the Poisson distribution formula.
  • Dynamical System Modeling
    • A dynamical system is a framework used to understand and predict how the behavior of complex systems evolve and change over time. At its core, a dynamical system consists of a finite set of variables, each representing a quantity of interest, and a predefined set of rules that govern how these variables change over time. By defining a set of variables and their evolutionary rules, we can capture the essence of dynamic phenomena and gain insights into their future states, which can be used to model a wide range of systems. For example, in biology dynamical systems may be used to model population dynamics, disease spread, and interactions between specifies, while in economics they may be used to represent market dynamics, the evolution of stock prices, and the behavior of economic indicators.
  • Markov Chains
    • A Markov chain is a type of dynamical system where the exact state of the variables isn't known for sure, so they are expressed as probabilities. These systems are called stochastic processes because their future states depend on both predictable factors and inherent randomness.

About

Assorted functions for performing numerical methods and solving common problems in systems biology

Resources

License

Stars

30 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages