Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple compartments / populations and genome transfer #32

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

brj1
Copy link

@brj1 brj1 commented Nov 3, 2020

This long overdue pull request adds the ability to use multiple compartments in simulations and genome transfer between compartments. To implement this, I had to change the upper level program flow of SANTA-SIM substantially to go use my new santa.simulator.compartments.Compartment class. However, I ensured that the software is still backwards compatible.

Genome transfer is implemented via a transfer probability matrix where the probabilities are constant ( or dependant on a fitness function. Genome transfer can also be done at specified times using the TimedTransfer class.

Compartments and the Transfer options can be specified in the XML specification file. An option to include the last time of genome transfer can be added to a sequence name when sampling alignments. There is an example at examples/HIV-1_latent.xml.

Other changes:

  • added a shuffle and nextBinomial functions to santa.simulator.Random to preserve usage of the input random seed
  • added a copy function for Genome classes
  • added no NoFitnessFunction which is a fitness function with 0 fitness.
  • added ClonalExpansionSelector which implements birth-death growth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant