Giter Site home page Giter Site logo

gnmx's Introduction

GNMX

This is the project of Thomas Dooms, Ward Gauderis, Kato Starckx and Lauren Van Nimmen for the course 'Introduction to computational biology' at the University of Antwerp. This forward-time simulation was made with the purpose of investigating the genetic polymorphism phenomenon. The model is based on the paper by Hannes Svardal, Claus Rueffler and Joachim Hermisson. More information can be found in the report (in Dutch).

Configuring the simulation

When in need for more precision, use the 'precision mode' at the top, this will turn the sliders into input boxes which allow for more precision such as 0.001.

The graphs will only plot a subset of the simulated data to keep the simulation real-time. They will automatically remove data after 30 000 ticks, this can be turned off with the 'forget' option.

Manual Installation

This GitHub page contains precompiled releases for both Windows and Linux (as these are the only systems we have at our disposal, a Docker container is also available here). These can be found to the right of the GitHub page. Download the GNMX.zip file for your current OS. When unzipped, this folder contains a backed.exe on Windows just the backend on Linux. There is also a static folder which contains the pre-compiled webassembly for the frontend.

To access the simulation perform the following steps:
1) double-click backend.exe in Windows or run ./backend in Linux
2) go to 'localhost:3030' in the browser. 

Docker

It is possible to run the server as a docker container. Help on installing docker can be found here. Deploying and starting the server can be done with the following command (assuming docker is installed).

docker run -d -p 3030:3030 wardgauderis/gnmx

After this is done, the webpage will be accessible in 'localhost:3030' in the browser.

Known bugs

There are some edge cases we were not able to cleanly handle in time.

  • Setting a population size smaller than the amount of patches results in a crash (as we divide by the patch size).
  • Plots throw away data after 30 000 ticks, when the simulation only has very few individuals only a select amount data points wil be generated every 30 000 ticks. This will cause weird graphs with only a few values.
  • Switching between precision mode and default mode resets the values to their defaults.

Development

This simulation is written in Rust. The program is divided into three crates (or packages). The frontend code, the simulation itself and the server logic.

Compiling this project for your own machine requires a Rust compiler. Use cargo run to do so. How to install rust can be found here

This project uses wasm-pack to compile our Rust frontend code to webassembly. This can be installed with cargo install wasm-pack command. Use the command build --target web --out-name wasm --out-dir ../static in the frontend folder to generate the webassembly and additional files. Be sure to do this before running, otherwise the webassembly will not be found.

Add RUST_LOG=info to your environment variables to get useful insights in the program execution. Use RUST_LOG=debug to see everything that is happening.

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.