-
Notifications
You must be signed in to change notification settings - Fork 1
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
Kingman prototype #1
Open
JereKoskela
wants to merge
6
commits into
jeromekelleher:master
Choose a base branch
from
JereKoskela:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f4f9481
Added prototype for panmictic simulation phase
fdc2695
Added prototype for panmictic simulation phase
9d173c0
Minor style updates
de372cb
Minor style tweaks
a3152a9
Removed unnecessary files
484e1be
Separated out spatial and ARG simulations
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,6 +191,11 @@ read_sim_config(sim_t *self, const char *filename) | |
fatal_error("simulate_pedigree is a required parameter"); | ||
} | ||
self->simulate_pedigree = tmp; | ||
if (config_lookup_int(config, "simulate_kingman", &tmp) | ||
== CONFIG_FALSE) { | ||
fatal_error("simulate_kingman is a required parameter"); | ||
} | ||
self->simulate_kingman = tmp; | ||
if (config_lookup_int(config, "num_parents", &tmp) | ||
== CONFIG_FALSE) { | ||
fatal_error("num_parents is a required parameter"); | ||
|
@@ -233,12 +238,18 @@ read_sim_config(sim_t *self, const char *filename) | |
&self->max_time) == CONFIG_FALSE) { | ||
fatal_error("max_time is a required parameter"); | ||
} | ||
|
||
|
||
if (config_lookup_float(config, "recombination_probability", | ||
&self->recombination_probability) == CONFIG_FALSE) { | ||
fatal_error("recombination_probability is a required parameter"); | ||
} | ||
if (config_lookup_float(config, "rho", | ||
&self->rho) == CONFIG_FALSE) { | ||
fatal_error("rho is a required parameter"); | ||
} | ||
if (config_lookup_float(config, "Ne", | ||
&self->Ne) == CONFIG_FALSE) { | ||
fatal_error("Ne is a required parameter"); | ||
} | ||
|
||
self->event_classes = read_events(config, &self->num_event_classes); | ||
read_sample(self, config); | ||
|
@@ -270,6 +281,10 @@ run_sim(const char *config_file) | |
} | ||
not_done = ret != 0; | ||
} | ||
if(self->simulate_kingman == 1) { | ||
ret = sim_setup_arg(self); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to check these return values for errors: |
||
ret = sim_simulate_arg(self); | ||
} | ||
|
||
ret = sim_print_state(self, 2); | ||
if (ret != 0) { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space needed here - if (..)