Coder Social home page Coder Social logo

na_for_systems_bio's Introduction

Network Analysis for System Biology

input data

The routines listed below take several csv files as inputs.

  • interactions.csv : defines the network topology in terms of nodes (proteins) and edges (rates)
  • rates.csv : rate definitions for network
  • substrates.csv : node concentrations

Examples for these can be found in ./input/

Object Scripts

network.py

substrate.py

rate.py:

Summary

The rate class acts as a data store for information that pertains to a proportionality constant governing interaction between substrates

Attributes

identifier: str
    - a key unique to a rate and can be used to refer to one specific rate
    - required
value: float
    - substrate object of the substrate whose value will change in this interaction between two substrates
    - required
fixed: boolean
    - this boolean informs the software of whether this rate will be pliable if the user decides to find optimal parameters using the fit function in network
    - optional; default False
bounds: list of length 2
    - this is a set of bounds that the rate is allowed to be between and is important in network parameter tuning/fitting if the user decides to use the fit function
    - optional; defaut [1, 10]
bounds_type: data type for bounds ("int", or "real")
    - this is the data type of the bounds for the rate, these define whether the rates will be integers or float when undergoing the fitting process if the user chooses
    - optional; default "int"

Methods

__init__():
        initialize the appropriate rate objects and inform of any exceptions
update_rate():
        adjust the value of the rate; required for finding optimal network parameters; will store abs value since rates could be negative or positive depending on the interaction used in

interaction.py:

Summary

The interaction class acts as a data store for parameters and rules that govern how two substrates in the network are affected.

Attributes

identifier: str
    - a key unique to an interaction between two substrates and can be used to refer to an interaction
    - required
affected: Substrate
    - substrate object of the substrate whose value will change in this interaction between two substrates
    - required
effector: Substrate
    - substrate object of the substrate whose value will produce the change in the affected substrate's value
    - required
rate: Rate
    - rate object whose value acts as the proportionality constant between the affected and effector substrates
    - required
effect: int (-1, 1, None)
    - if effect is -1, then the relationship between the substrate effector and affected is inverse meaning that as the effector substrates grows, the affected substrate falls; vice versa for effect of 1; None should only be used if the rate between the two substrates is the intrinsic phophorylation or dephosphoylation rates of the affected substrate and there is no feedback mechanism at play (no dissociation and hill coefficients)
    - optional in special cases (see logic in __init__ function)
dissociation: Rate
    - rate object that encodes the 50% dissociation rate of two substrates; include if the interaction follows a feedback regulation mechanism; this package utilizes a goodwin oscillator mechanism to establish positive and negative feedback relationships; for more information see: https://pubmed.ncbi.nlm.nih.gov/32212037/
    - optional
hill_coefficient: Rate
    - rate object that encodes the multiplicity of the two substrates (number of binding sites required); include if the interaction follows a feedback regulation mechanism; this package utilizes a goodwin oscillator mechanism to establish positive and negative feedback relationships; for more information see: https://pubmed.ncbi.nlm.nih.gov/32212037/
    - optional

Methods

__init__():
        initialize the appropriate interaction objects and inform of any exceptions
update_rate():
        adjust the rate of the interaction; required for finding optimal network parameters
get_interaction_paramters():
        obtain all associated rates for the interaction of interest

For more information, check doc strings of each function individually.

Processing Scripts

  • parse.py: Contains rate, substrate, interaction parsing functions. These will take in the associated csvs and creates lists of rate, substrate, and interaction objects for the network object. For information about how to use these functions please look into file.

Evaluation Scripts

  • score.py: This script contains a function that will calculate the unexplained error of the model. This function takes in the predictions, ground truths, list of substrate names that encode the order of the prediction columns and optional objective function. The function will by default calculate mean square error but can be changed if pass through a objective function with inputs of a single prediction and associated truth and output of a cost.

Experimental Scripts

  • model_fitting_and_evaluation.py:
    • This script creates a network object with the requested inputs and in return finds an optimal solution to network kinetic rates and compares the mean square error before and after fitting. This script also manually validates the model on other small datasets.
    • How to run:
      python3 model_fitting_and_evaluation.py [-h] -s SUBSTRATES -r RATES -i INTERACTIONS [-f FITTING] [-a ARGUMENTS]
                                     [-o OUTPUT] [-p PARAMETERS] [-m MULTI] [-n NUMBER] [-t [TOPLOT ...]]
      
    • To get information on these parameters:
      python3 model_fitting_and_evaluation.py -h
      
  • generate_samples.py:
    • This script creates a network object with the requested inputs and in return creates a "n" number of samples with external stimuli and internal network states as features/attributes and phagocytosis/microsphere uptake rates as outputs.
    • How to run:
     python3 generate_samples.py [-h] -s SUBSTRATES -r RATES -i INTERACTIONS [-o OUTPUT] [-p PARAMETERS] [-n NUMBER]
                            [-m MULTIPROCESS]	
    
    • To get information on these parameters:
     python3 generate_samples.py -h
    
  • [your_requirements].py:
    • You can design your own experiments. The network object has various toolings available to customize an analysis and generate data that can be graphed and manipulated for custom analysis.

Inputs

Model Scripts

Experimental Scripts

Requirements

  • numpy
  • pandas
  • matplotlib
  • scipy
  • tqdm
  • joblib
  • geneticalgorithm2

na_for_systems_bio's People

Contributors

rsethi21 avatar huskeypm avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

huskeypm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.