Giter Club home page Giter Club logo

jcmc's Introduction

COPASI: biochemical network simulator

COPASI is a software application for simulation and analysis of biochemical networks and their dynamics. COPASI is a stand-alone program that supports models in the SBML standard and can simulate their behavior using ODEs or Gillespie's stochastic simulation algorithm; arbitrary discrete events can be included in such simulations.

COPASI carries out several analyses of the network and its dynamics and has extensive support for parameter estimation and optimization. COPASI provides means to visualize data in customizable plots, histograms and animations of network diagrams. (list of features).

Home page: https://copasi.org | Follow us on Mastodon.

Download COPASI

Precompiled versions of COPASI are available for all operating systems on the COPASI Homepage.

Building COPASI

COPASI's sources are available from our github repository. These sources are written in standard C++ and will compile on Linux, OS X and Windows.

Dependencies

To start compiling COPASI we recommend to use the copasi-dependencies package.The dependency package compiles all the dependencies necessary for COPASI, they include clapack, cppunit, expat, raptor libSEDML, libsbml, SBW as well as the Qt libraries QWT, QWT3D and the Qt MML widget. Instructions for building the dependencies are described here:

Compiling COPASI

Once the dependencies have been built, COPASI is easily compiled using CMake:

git clone https://github.com/copasi/COPASI
mkdir build_copasi
cd build_copasi
cmake -DBUILD_GUI=OFF -DCMAKE_INSTALL_PREFIX=~/copasi -DCOPASI_DEPENDENCY_DIR=../copasi-dependencies/bin ../COPASI
make
make install 

In the above ../copasi-dependencies/bin is the location of the build folder of the compiled copasi-dependencies. The option BUILD_GUI=OFF builds only the command line version of COPASI (aka CopasiSE). To build the graphical frontend (aka CopasiUI), and having Qt 4 or 5 installed, the option would need to be BUILD_GUI=ON. In that case you'd additionally provide an option SELECT_QT=Qt5 (or SELECT_QT=Qt4) for COPASI to look for the Qt libraries. (To help finding the Qt version you selected, you should specify the Qt5_DIR=<dir> variable to point to the lib/cmake/Qt5 directory of the Qt5 installation. Alternatively for Qt4 you can set the QT_DIR=<dir> variable to point to your Qt4 installation.)

The option CMAKE_INSTALL_PREFIX=~/copasi specifies, that COPASI ought to be installed in the current users home directory in a subfolder copasi. The path ../COPASI is the source directory of COPASI that has been created by the git clone command in the first statement.

There are many more compile options available, options for building the language bindings as well as options to enable some experimental features that are not yet available in the stable builds that are released publicly. To view the complete set of options, start the graphical cmake frontend in the continuing from the above command this would be done with:

cmake-gui ../COPASI

The correct version number

The COPASI version number you will see in your application is generated during the build process. For this to work we install git hooks, so it gets updated automatically, by running:

./gitTools/initTools

once from the COPASI source dir (which will set up the paths to astyle, gawk, dos2unix and wget). This helps us keep commits formatted correctly from different operating systems. Once that is set up, a call to:

 ./gitTools/UpdateCopasiVersion

will update the <copasi/CopasiVersion.h> to match that of the selected branch. That

Linking a C++ program against the COPASI API

To link your own program against the COPASI C++ API you would first build COPASI as described above however, with an additional CMake option -DCOPASI_INSTALL_C_API=ON. Thus the full configure / make / install commands from above would be:

git clone https://github.com/copasi/COPASI
mkdir build_copasi
cd build_copasi
cmake -DCOPASI_INSTALL_C_API=ON -DBUILD_GUI=OFF -DCMAKE_INSTALL_PREFIX=~/copasi -DCOPASI_DEPENDENCY_DIR=../copasi-dependencies/bin ../COPASI
make
make install 

Now additionally to the COPASI SE executable being built, also all COPASI header files and the COPASI (static) library will be installed into the CMAKE_INSTALL_PREFIX (thus in the example above header files will end up in ~/copasi/include and libraries in ~/copasi/lib). We also export a CMAKE configuration that you can import for your own CMAKE projects. That way you only need to add a line like:

find_package(libCOPASISE-static CONFIG REQUIRED)

to the CMakeLists.txt file of your project. And later link your project against libCOPASISE-static. This will then automatically link against all the libraries that the COPASISE library was linked against. In order for CMake to find the configuration you would either have to include the lib/cmake folder of your install prefix into your projects CMAKE_PREFIX_PATH variable or specify an option libCOPASISE-static_DIR with the folder of the config file when configuring your project. For the prefix specified above this would be:

-DlibCOPASISE-static_DIR=~/copasi/lib/cmake

The gist of a complete example CMakeList.txt is also available.

Feedback

To submit feedback, or bug reports, please use the COPASI Tracker, or our mailing list.

License

The packages available on this page are provided under the Artistic License 2.0, which is an OSI approved license. This license allows non-commercial and commercial use free of charge.

Git maintenance

Release branches:

  • Naming: Version-$major.$minor

Start release branch

To create a new release branch check out the starting branch which is normally develop:

git checkout develop
git flow release start <name>
git push origin

Finish release branch

To finish a release:

git checkout release/<name>
git flow release finish <name>
git push

Tagging snapshots

In order to tag the latest commit in the current branch as a snapshot execute:

gitTools/UpdateCopasiVersion --registerBuild

The above command will automatically select the next tag of the format: Build-N and push the tag to the upstream repository.

Building API documentation

To build the API documentation doxygen can be used. here the command line for generating the documentation after a git checkout:

PROJECT_NUMBER=4.40.278 doxygen -x COPASI.doxyfile > Doxyfile && doxygen

This will fix the version number of the generated files to the one specified in the environment variable and generate a local Doxygen file with which it runs doxygen. The resulting documentation is placed in ./doc/html.

To update it on the copasi.github.io project you'd run from the copasi.github.io folder:

pushd ./static/API_Documentation/
rm -rf ./*
git commit -a -m " - removed old documentation"
cp -R ../../../COPASI/doc/html/* .
git add . 
git commit -a -m " - add documentation for COPASI 4.40.278"
git push

jcmc's People

Contributors

cashaffer avatar tcjones avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jcmc's Issues

Connection edge movement and style

Connection edges should not be able to be dragged once they have been created.

Connection edges should not have arrows showing their direction. The direction is implied by the connection source and target port type.

Developer's manual

We need a manual for new developers (and to remember infrasructural stuff for the rest of us). It should include things like:

  • How to get the necessary components of the tool chain (like make, cmake) for various platforms (Linux, Windows, Mac)
  • How to make distributions, how to compile, etc.

The next question is how to "distribute" the manual. Since it is for developers, it does not necessarily have to be a document included in the distribution. One good option would be to use the Wiki right here (notice the button up at the top of this page, right next to "issues").

Should coordinate with Alida to do something similar for both MSMB and AC.

Connection Edges

Implement edges that connect the ports together. These edges are represented as "replaced elements" in the SBML annotations.

Saved Status

  1. The user should know if the current Module has been saved.
  2. When the user tries to close/exit, prompt the user if the Module has not been saved .

Port Dragging

Improve the visual feedback while dragging a port. Make the port stay on its boundary when being dragged. This allows the user to see exactly where the port will land when dropped.

Submodule Definition List

When the user attempts to load a submodule, display the internal submodule definitions in a tree structure. This should look similar to the TreeView panel.

Port Connections

Currently edges connect to the center of a port.

Change this so the edges connect to a specific entry/exit area on the port.

Module Definition Name Change

When multiple instances of a module definition exist, attempting to change the definition name should present the user with a prompt.

Species and Module Quantity name change

When a Species or Module Quantity name is changed in the ModelBuilder section, the name is not updated throughout the entire ContainerModule.

The name should be updated:
-on VisibleVariables or Equivalences shown on the DrawingBoard
-in the PortsPanel of the ModelBuilder under the RefName column

Distribution infrastructure

We have the beginnings of a distribution for developers, in terms of cloning this repository and following the directions in the README (and eventually the developer's manual in Issue #1). Separate from that, we need a distribution for users. However, we might consider rolling this into a more general distribution that includes MSMB. We want to use equivalent technology to COPASI (and eventually we would want AC distributed with COPASI).

Implement intermediate species for submodule to submodule connections

If two submodules are connected by an edge, an intermediate species should be created to link the submodules together.

For example:
Module1 is created. Submodule1 and Submodule2 are created within Module1. An output port is created on Submodule1 called S_out1_port. An input port is created on Submodule2 called S_in1_port. When a connection edge is created between S_out1_port and S_in1_port, an intermediate species should be created called intermediate1. The species intermediate1 will be created in Module1. The species intermediate1 will not be displayed on the drawing board and will not be displayed in the tables. It will be listed in the SBML.

Equivalence Node: Multiple Connections

Once an equivalence node has been created, any new connections from an equivalence port already connected to the equivalence node will automatically be re-routed through the equivalence node.

External Files

Implement the import and export of external model definitions.

Edge removal between Port and VisibleVariable/Equivalence

Currently, the user can remove the edge connecting a ContainerModule Port to its assigned VisibleVariable/Equivalence. This results in an invalid state because all Ports must reference a Species or Module Quantity.

Do not allow the user to remove the edge connecting a ContainerModule Port to its assigned VisibleVariable/Equivalence. Instead, inform the user as to why this action is not allowed.

Port Dragging

Improve the visual feedback while dragging a port. Make the port stay on its boundary when being dragged. This allows the user to see exactly where the port will land when dropped.

Species and Global Quantity Focus

When a Visible Variable or Equivalence Node is selected in the drawing board, the appropriate Species or Global Quantity is highlighted in the MSMB panel.

When a Species or Global Quantity is selected in the MSMB panel, the appropriate Visible Variable or Equivalence Node is highlighted in the drawing board.

CMake

Update the CMake files so it works.

Port removal

When removing a Port in a Submodule, if the Port has Connections on the next hierarchical level up, inform the user with a prompt before removing the Port and Connections.

SBML Export

When exporting a Module into SBML format, only the first level of submodules are exported (aka the active Module's children). Submodules need to be recursively called so everything (including the children of submodules) is exported into SBML format.

MSMB issue

MSMB using the new COPASI libraries is not running.
MSMB using the old COPASI libraries is running, but the old COPASI libraries conflict with libSBML.

Try to modify MSMB so it runs with the new COPASI libraries.

Port to Port connections

When a Port to Port connection is created, an intermediate species/global variable is created. The intermediate variable is a visible variable on the graph and also created in the MSMB panel.

Visible Variable

Incoming connections: 0 or 1
Incoming connection should be represented by a dashed line.
Outgoing connections: 1 or more
Outgoing connections should be represented by solid lines.

The species or global variable represented by the Visible Variable should be seen in the MSMB panel.

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.