Giter Club home page Giter Club logo

symbulationemp's Introduction

Symbulation Logo

Symbulation is an artificial life software tool for agent-based modeling of the evolution of biological symbiosis, which can occur along the spectrum between parasitism and mutualism.

CI codecov DOI Documentation Status GitHub contributors

Try out our browser-based GUI. See our documentation at https://symbulation.readthedocs.io.

Interested in starting a new project with Symbulation? We have a cookiecutter template here: https://github.com/anyaevostinar/SymbulationProjectTemplate.

Symbulation is built with the Empirical platform and the cookiecutter includes our recommended directory layout and example analysis files.

Usage

Install the latest Cookiecutter:

pip install -U cookiecutter

Generate an Symbulation project:

cookiecutter https://github.com/anyaevostinar/SymbulationProjectTemplate.git

Move into the new project directory and the SymbulationEmp directory and make:

cd SymbulationProject/SymbulationEmp
make

Make any changes that you wish to the file SymSettings.cfg and then run:

./symbulation_default

By default, your data will be output to the files HostVals_data__SEED10.data and SymVals_data__SEED10.data.

We recommend that you copy your symbulation executable to your Data folders:

cp symbulation_default ../Data/sample_treatment
cd ../Data/sample_treatment

You can then use the provided Python script to run several replicates:

python3 simple_repeat.py

You can also then use the provided Python script to transform your data into a format more easily used by R:

cd ../../Analysis/sample_treatment
python3 munge_data.py

And then open our provided R script SampleAnalysis.R in R, set your working directory to the Analysis directory and then run all lines to observe the effect of vertical transmission rate on the interaction value evolved.

Created part of my free logo at LogoMakr.com.

symbulationemp's People

Contributors

acameron13 avatar anyaevostinar avatar apm0816 avatar carogorm avatar dorchens avatar emilydolson avatar k-johnson-horrigan avatar lilithhafner avatar mercere99 avatar mkmmnn avatar naalit avatar piperwelch avatar qinyi2000 avatar renztim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

symbulationemp's Issues

Systematics manager crashes with seg fault at end

When phylogeny tracking is on, Symbulation crashes with a seg fault during the final clean-up. This is due to some messy stuff in the sequencing of the destructors. Basically, what happens is the following:

  1. The SymWorld destructor is called.
  2. In the SymWorld destructor, we delete the symbiont systematics manager.
  3. Once the SymWorld destructor is done, we automatically go into the destructor for its base class (emp::world).
  4. The base class destructor goes through the population and deletes each host.
  5. The host destructor goes through the host's symbionts and deletes each of them.
  6. The symbiont destructor tries to grab the symbiont systematics manager and notify it that this symbiont should be removed.
  7. The systematics manager has already been deleted, so this produces a seg fault.

I'm not sure what the best way to fix this is. I came up with some possible solutions, but they're all kind of unpleasant:

  • The symbiont systematics manager could get moved to some sort of scope that lives outside the SymWorld
  • We could add an extra check in the symbiont destructor that confirms that the systematics manager has not been deleted yet (it's annoying to have to do that check every time a symbiont is deleted just to avoid this one problem at the very end of the run, though)
  • We could move the code that notifies the systematics manager that the symbiont has died to SetDead. Is that reliably called every time a Symbiont dies? If so, this is probably the best option.

Add tags to Catch tests

Catch supports tags as a second argument to TEST_CASE which then allows running just the tests with that tag. These need to be added to all existing tests.

Add test for SymLimit

Add a test that makes sure that when the number of symbionts is at the sym limit, the symbionts in the host vector do not change (not just the number but the actual objects, since there is no ousting allowed)

MakeNew function for organisms

Several methods in the various organism classes need to be overwritten by subclasses so that the correct type of organism is created, leading to a lot of repeated code that will be difficult to maintain. A function "MakeNew" that does the instantiation of the class will resolve that issue and allow for more inheritance.

Docs

The docs:

  • don't mention the cookiecutter Github things
  • don't mention R studio - add some guidance on installing R
  • symbulation vs symbulation-default in simple repeat
  • version of emdsk is wrong -- should be 1.38.48
  • don't need to cd into web, can use "make serve"
  • collecting data has some issues
  • creating a new mode should be flushed out
  • library API index is malformed
  • Add guidance on how the plot generated by ggplot can be interpreted and the big takeaways from the papers so far
  • Guide on the settings/things to try next/how to make more changes to them
  • What the future/next steps are for code development, what we are hoping people might try adding
  • pip3 instead of pip depending on setup

MoveFreeSym replicated code

Identical if statements for MoveFreeSym in both Symbiont and Phage process. There should be a method created for this so the method can be called instead of repeating code. Existing test for Symbiont process will need to be changed with a new test added for the new method. @K-Johnson-Horrigan can you do this?

Tests for symbulation.cc

The old end_to_end tests are difficult to maintain, need to figure out a better way of testing the main setup code

PGGHost.h documentation

PGGHost is lacking in documentation. Each function should be given an input/output/purpose and the instance variables should be given a purpose.

Improvements to the WebGui

Mutation Rate - slider goes from 0-10 when it should go from 0-1.

Horiz Trans - Docs mention 0 and 1, but the GUI is a switch.

PGGSym.h documentation

PGGSym is lacking in documentation. Each function should be given an input/output/purpose and the instance variables should be given a purpose.

Data file names automatically including Seed

Change the file name creation in symbulation.cc to automatically include the seed, rather than relying on the user to add the seed to the filename on the command line or in SymSettings

Organism.h documentation

Organism.h should have documentation. For each function, there should be some documentation that points out the class(es) that the function should be called for.

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.