Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromekelleher committed Nov 27, 2015
2 parents cc9eec5 + 5d766cc commit 7a1b4e0
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 137 deletions.
2 changes: 1 addition & 1 deletion lib/dev.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Development config file
sample_size = 20;
sample_size = 9;
num_loci = 57;
random_seed = 878638576;
# The scaled recombination rate, 4 Ne rho. Note that unlike ms
Expand Down
53 changes: 29 additions & 24 deletions lib/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,41 +406,46 @@ run_simulate(char *conf_file)
if (ret != 0) {
goto out;
}
result = msp_run(msp, DBL_MAX, ULONG_MAX);
if (result < 0) {
ret = result;
goto out;
result = 1;
while (result == 1) {
result = msp_run(msp, DBL_MAX, 1);
if (result < 0) {
ret = result;
goto out;
}
msp_verify(msp);
/* ret = msp_print_state(msp); */
}
ret = msp_print_state(msp);
if (ret != 0) {
goto out;
}
/* Create the tree_sequence from the state of the simulator. */
ret = tree_sequence_create(tree_seq, msp);
if (ret != 0) {
goto out;
}
ret = tree_sequence_generate_mutations(tree_seq,
mutation_params.mutation_rate, mutation_params.random_seed);
if (ret != 0) {
goto out;
}
int j;
for (j = 0; j < 1; j++) {
ret = tree_sequence_dump(tree_seq, output_file, 0);
if (0) {
/* Create the tree_sequence from the state of the simulator. */
ret = tree_sequence_create(tree_seq, msp);
if (ret != 0) {
goto out;
}
tree_sequence_free(tree_seq);
memset(tree_seq, 0, sizeof(tree_sequence_t));
ret = tree_sequence_load(tree_seq, output_file, 0);
ret = tree_sequence_generate_mutations(tree_seq,
mutation_params.mutation_rate, mutation_params.random_seed);
if (ret != 0) {
goto out;
}
}
print_tree_sequence(tree_seq);
print_haplotypes(tree_seq);
if (0) {
int j;
for (j = 0; j < 1; j++) {
ret = tree_sequence_dump(tree_seq, output_file, 0);
if (ret != 0) {
goto out;
}
tree_sequence_free(tree_seq);
memset(tree_seq, 0, sizeof(tree_sequence_t));
ret = tree_sequence_load(tree_seq, output_file, 0);
if (ret != 0) {
goto out;
}
}
print_tree_sequence(tree_seq);
print_haplotypes(tree_seq);
tree_sequence_print_state(tree_seq);
print_newick_trees(tree_seq);
tree_sequence_print_state(tree_seq);
Expand Down
Loading

0 comments on commit 7a1b4e0

Please sign in to comment.