molpopgen / fwdpp

fwdpp is a C++ template library for implementing efficient forward-time population genetic simulations
http://fwdpp.readthedocs.io
GNU General Public License v3.0
27 stars 11 forks source link

matrix_test fails for ancient samples #217

Closed molpopgen closed 5 years ago

molpopgen commented 5 years ago

Working on #216, I discovered that commands like this fail:

./wfts --N 1000 --theta 1000 --rho 1000 --seed 42 --mu 5e-3 --mean -33  --gc 100  --ansam 10 --sampling_interval 666 --matrix_test

This only affects the dev branch and is not a bug in master or any stable releases.

molpopgen commented 5 years ago

The culprit is almost certainly how sample lists are initialized in a marginal_tree. Error would have been introduce in #207.

molpopgen commented 5 years ago

There are multiple issues initializing this class introduced in #207 that are only revealed when ancient samples are in play.

One subtle error is that sample groups are not properly forwarded for the case of ancient samples.

molpopgen commented 5 years ago

Via a manual bisection:

733524a works 89b2b49 works 95a7b26 causes the problem

molpopgen commented 5 years ago

The bug occurs in two places. The first is described above. The second occurs at 3341aff, but appears in a preceding commit (36f7a56) where the details for matrix generation were abstracted into a class.