GithubHelp home page GithubHelp logo

sebastiaanram / artistoo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ingewortel/artistoo

0.0 0.0 0.0 27.46 MB

CPM implementation in pure javascript (Node module)

License: MIT License

JavaScript 90.50% Makefile 0.10% Shell 0.24% HTML 7.60% CSS 1.57%

artistoo's Introduction

Artistoo (Artificial Tissue Toolbox)

Implements a simple Cellular Potts Model in JavaScript. Code includes the extension for cell migration published in

Ioana Niculescu, Johannes Textor, Rob J. de Boer: Crawling and Gliding: A Computational Model for Shape-Driven Cell Migration PLoS Computational Biology 11(10): e1004280 http://dx.doi.org/10.1371/journal.pcbi.1004280

Note: Artistoo was formerly called CPMjs.

Documentation Inline docs

You can find full documentation of available methods here, or have a look at the manual for tutorials to get started. Alternatively, see below for a brief description and a list of examples.

How it works

This code has been ported over from our older "cpm" repository. This is now an ES6 module, which is compiled trough "rollup" for use in the browser. Users who wish to use this version of Artistoo can use the compiled code in the build/ folder as it is; there is no need to compile anything. See below for examples and how to use them.

Developers can extend the code with their own modules; documentation will follow later (see the Makefile).

Browser examples

Artistoo can be used to create interactive simulations in the webbrowser. We have implemented several examples showing various processes that can be simulated with a CPM; see the links below. (Please note that these examples may not work properly in Internet Explorer).

We have the following examples for web-browser CPMs (see also examples/html):

We also have a few examples of plain cellular automata (CAs):

Node examples

Simulations can also be run from the command line using nodejs. The first time you do this, you have to install several dependencies. Go to the base folder of this package and run

npm install

which will automatically install the dependencies as supplied in the package.json file.

Here's an example of how to run the node script:

cd examples/node
node run-ActModel.js

This may give an error the first time, because the script is trying to store images of the simulation to a file output/img/ActModel which does not exist. Create this directory and try again:

mkdir -p output/img/ActModel
node run-ActModel.js

This will print some output to the console; typically the centroid of each cell at each timepoint. See the node script and the Simulation class for details.

To create a movie, run:

mkdir -p output/mp4
ffmpeg -r 60 -f image2 -i output/img/ActModel/ActModel-t%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p output/mp4/ActModel.mp4

artistoo's People

Contributors

ingewortel avatar jtextor avatar navanhalem avatar ankurankan avatar dependabot[bot] avatar

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.