Skip to content

Commit

Permalink
Merge pull request #20 from kr-colab/determin_check
Browse files Browse the repository at this point in the history
bug fix from deterministic sweep set up check
  • Loading branch information
andrewkern authored Jul 3, 2020
2 parents e056bfe + 23901ee commit 4e38bd5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions discoal_multipop.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,14 @@ int main(int argc, const char * argv[]){

if(breakPoints[k] - lastBreak > 0){
printf("[%d]",breakPoints[k] - lastBreak);
printTreeAtSite(tempSite);
printf("%g\n",allNodes[findRootAtSite(breakPoints[k])]->time);
//printTreeAtSite(tempSite);
lastBreak = breakPoints[k];
}
}
printf("[%d]",nSites- lastBreak);
printTreeAtSite(1.0 - (1.0/nSites));
printf("%g\n",allNodes[findRootAtSite(1.0-(1.0/nSites))]->time);
//printTreeAtSite(1.0 - (1.0/nSites));

}
else{
Expand Down Expand Up @@ -662,16 +664,16 @@ void getParameters(int argc,const char **argv){
selCheck = 1;
}
if(events[i].type == 'n'){
nChangeCheck = 1;
nChangeCheck += 1;
}
}
if(selCheck == 1){
if(recurSweepMode == 1){
printf("Error with event specification: a single sweep event has been found but recurrentSweep mode has been specified\n");
exit(666);
}
if(nChangeCheck==1 && sweepMode=='d'){
printf("Error with event specification: you chose 1 or more population size changes with a determinstic sweep. Please us -ws flag instead\n");
if(nChangeCheck > 1 && sweepMode=='d'){
printf("Error with event specification: you chose 1 or more population size changes with a deterministic sweep. Please us -ws flag instead\n");
exit(666);
}
if(softSweepMode == 1 && partialSweepMode == 1){
Expand Down

0 comments on commit 4e38bd5

Please sign in to comment.