Git Product home page Git Product logo

fwdpp's People

Contributors

kvnloo avatar molpopgen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fwdpp's Issues

Add "one-stop-shop" sugar header

Currently, the sugar layer is a set of headers that must be individually included.

Add a fwdpp/sugar.hpp that includes fwdpp/sugar/sugar.hpp that includes everything.

This will add convenience at the cost of compilation becoming more resource-intensive, but "power users" will still be able to pick and choose specific features and include them manually.

OSX/clang compatibility broken by "mutation keys return pair of key/count in sampler, to aid downstream filtering"

It looks like cxx11 compatibility was broken by ff696cb.

Before this commit, the build is successful with cxx11, but after this commit I have to set libstdcxx or the build fails on macOS (test on 10.10, 10.11, and 10.12) with the following error:

	/usr/bin/clang++ -std=c++11 -stdlib=libc++ -DHAVE_CONFIG_H -I. -I..   -F/usr/local/Frameworks  -w -pipe -march=native -mmacosx-version-min=10.11 -O2 -MT integration/sugar_matrixTest.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_matrixTest.o integration/sugar_matrixTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from integration/sugar_matrixTest.cc:9:
In file included from ../fwdpp/sugar/matrix.hpp:76:
../fwdpp/sugar/matrix_details.hpp:161:17: error: no matching constructor for initialization of 'std::vector<std::size_t>' (aka 'vector<unsigned long>')
                std::vector<std::size_t>(n.begin(), n.end()),
                ^                        ~~~~~~~~~~~~~~~~~~

Full build log here: https://gist.github.com/ilovezfs/e32657c623110767e9093932f28eb773

Fixations not sorted in output from "sugar" sampling functions.

There is a bug in sugar/sampling/sampling_details.hpp. The function add_fixations gets called, adding mutations to end of samples. Those samples never get sorted, which can cause problems in subsequent analyses that depend on the samples being sorted.

Add hooks for boost::serialization for "sugar" types

Add boost::serialization capability for the data types in fwdpp/sugar. This can be done w/o adding a dependency on boost for the library itself, and should have benefits, like enabling simulations to use MPI via boost::mpi.

Bug in KTfwd::fwdpp_internal::gamete_cleaner for "multi-locus" simulations.

This function removes fixations from gametes according to various policies (e.g., all fixations, neutral variants only, etc.). This function was re-factored in fwdpp 0.4.7 with a much faster implementation. However, this implementation is incorrect for simulations using the multi-locus API.

The logic error results in fixations not being reliably pruned from gametes at this step. However, they later get (correctly) tagged for recycling. This combo results in bizarre situations like mutations in locus "i" having a position that should only be possible in locus "j".

The bug was found via integration testing, which amounted to running the example multi-locus program in debug mode.

This bug does not affect simulations using the standard single-region API, which is the most widely used. Thus, packages like fwdpy are unaffected.

Improve tutorial for multilocus API

The details of how to implement a fitness function need more work. The type names get a little bit abstract, and a more concrete example is needed.

minor bug in fitness_models.hpp

fitness_models.hpp - Line 81:
if( !g1->smutations.empty() && g2->smutations.empty() )

instead of:
if( g1->smutations.empty() && g2->smutations.empty() )

Refactor KTfwd::traits

Issues #45 brings up some aesthetic issues with how type traits are implemented. They should be cleaned up and cues taken from the C++17 additions to the standard library's type traits. This basically involves some renaming and adding template aliases for convenience.

In addressing the issue described above, I discovered that a lot of the type traits fail to do their job. Many will fail to compile when provided "bad" or incorrect types rather than have SFINAE result in a static type that can be evaluated. This issue is turning into a "refactor the type traits part of fwdpp".

Add locus boundary info to multilocus population type

It is handy to have information on the positional boundaries of each region. Such data should be part of KTfwd::sugar::multiloc.

Adding this data can be used to simplify some of the sugar/samling.hpp API, too.

Update additive_diploid and multiplicative_diploid to facilitate calculation of trait values vs. fitness

fwdpp was initially designed with "standard pop gen" models in mind, meaning a direct mapping from genotype to fitness. However, the library is seeing more and more use in simulating quantitative traits, which brings up an issue. Currently, additive_diploid returns std::max(0., 1 + site_dependent_fitness()(...)), where ... is a bunch of details. This return value inherently assumes that the function is being used to calculate fitness, which is bounded to be a non-negative double. However, it would be easy to modify the function to allow any value to be returned when a trait is being simulated. Further, this change can be made silently, meaning that the current interpretation of additive_diploid remains unchanged. In other words, this does not break the API, but rather enhances its flexibility.

Proposed change:

  1. Add a std::function<double(double)> to additive_diploid and multiplicative_diploid. This function takes the return value of site_dependent_fitness and "does the right thing".
  2. Add a constructor taking a std::function<double(double)> whose default is the current behavior. For example:
//new constructor
additive_diploid(std::function<double(double)> f = [](const double v)->double { return std::max(0.,1.+v);}) :
make_return_value{std::move(f)}
{
}

The default in the above matches the current behavior (fitness).

The analogous closure for a trait value calculation would be:

[](const double d)->double{return d;}

The call operators would have to be modified to call this function.

Assertion failed for small # of generation in Python examples

Here is minimal working example:

import fwdpp_boost_python

SEED=10
gsl_rng=fwdpp_boost_python.GSLrng(SEED)
NSAM=20
N=500
# Assertion failed: (this->m_holder.m_size > n), function operator[], file /usr/local/include/boost/container/vector.hpp, line 1488
GENS=970
# Success
#GENS=971
THETA=50
RHO=THETA
mu=THETA/(4.*N)
r=RHO/(4.*N)

XX=fwdpp_boost_python.evolve(gsl_rng,N,GENS,mu,r)
XX.sfs=fwdpp_boost_python.sfs(gsl_rng,XX,NSAM)

print(XX.sfs)

Odd sample sizes

The function KTfwd::ms_sample can return the incorrect sample size when an odd sample size is requested.

common_ind.hpp

The version of examples/common_ind.hpp in 0.3.0 has incorrect typedefs for the serialized population types. The example programs all still work b/c the serialization calls are all to lower-lever fwdpp functions.

boost::python compatibility

fwdpp 0.3.2 may KTfwd::GSLrng_t non-copyable.

boost::python modules require that the C++ types being exposed are copyable.

Hence, python compatibility is currently broken.

I will see if a fix is possible.

Everything is A-OK as far as Rcpp/R is concerned, though...

Likely bug in "sugar" code.

This is a bit informal, but here's the scoop:

While working on the next release, I noticed that Hudson and Kaplan's Rmin (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1462432/) was not coming out right for neutral simulations with recombination.

I checked previous versions of the library, and 0.2.9 "is fine" but 0.3.0 shows this problem. 0.3.0 is also when the example programs switched from using the original interface to using the new "sugar" interface, which streamlines setting up simulations, etc.

I have confirmed that compiling diploid_ind.cc from 0.2.9 (again, this doesn't use the "sugar" code to implement a simulation) against fwdpp's dev branch gives the correct distribution of Rmin. This observation puts the bug somewhere in the sugar code, so now I have to track that down.

Metapopulation bug #2

When a copy of the parents is made, the current code in master reads (diploid_functions_ind_based.tcc, metapop version of sample_diploid):

decltype(_diploids) parents(_diploids);

It looks like this was a failed attempt at being clever, resulting in the type of parents being a non-const reference to diploids, meaning that updating the diploids updates the parents, too.

sugar/serialization.hpp

When "deserializing" from gzip files using KTfwd::gzdeserialize, parameters are passed by address rather than reference.

Incorrect use of std::lower_bound

In fwdpp 0.3.2, mutation- and recombination- related functions were changed to use std::lower_bound instead of std::upper_bound during searches. This resulted in a tricky bug that we have discovered. In cases with very large mutation rates, there is a chance that a mutation position equals a recombination breakpoint position. When such events happen, that site gets "dropped" from the recombinant gamete, and thus one copy of the mutation is lost. The result is slightly too few segregating sites and incorrect numbers of effective recombination events (R_min, etc., calculated from samples).

We believe that this has been fixed (by switching back to upper_bound), but pushing to github is pending further testing.

Reorganize code

The source code names for the main library are a bit clunky, and it can be tricky to find where some of the implementations are. The reason for this is that earlier versions of the library were split into gamete- and individual- based modules. Given that this is no longer the case, it may be time for a reorganization. I think this is possible w/o affecting programs depending on the library, as they generally will not include header files except via fwdpp/diploid.hh

Dispatch to gamete_cleaner is not working properly.

Each generation, a decision is made re: removing or not removing fixed mutations from gametes. Currently, only the latter is supported, due to a mistake in dispatching the policy to the gamete_cleaner function.

Fixing this bug has revealed some other issues, like the absence of an overload of KTfwd::update_mutations that doesn't mark fixed variants for recycling.

Simplify extensions/regions.hpp.

There's some needless complexity in that header.

  • Change discrete_mut_model::make_mut to discrete_mut_model::operator() to make intention more clear.
  • Attempt to get rid of the funky function signatures by replacing them with their std::function equivalents.
  • Fix library overview documentation, which has const in the signature for recycling bins, which is incorrect.

gsl error: number of events must be a positive integer

Running release 0.1.8, but same bug occurs on branch master. Using bneck_selection example, with command line:

bneck_selection 1500 18 12 18 -0.0000001 0.1 1000 500 10000 80 20 1 12596106
/home/jri/src/fwdpp/examples/bneck_selection 1500 18 12 18 -0.0000001 0.1 1000 500 10000 80 20 1 12596106

which returns the error:

gsl: discrete.c:228: ERROR: number of events must be a positive integer
Default GSL error handler invoked.
[1] 20520 abort (core dumped) /home/jri/src/fwdpp/examples/bneck_selection 1500 18 12 18 -0.0000001 0.1 100

When I run same command line, but drop ngens to 500 it runs (but fails with same error at 999).

fwdpp fails internal test for yosemite macOs

Hello,
I updated the version 0.5.6 in formulae of fwdpp for the homebrew and Jenkins fails tests for macOs version yosemite

See log.


failed: brew install --verbose --build-bottle homebrew/science/fwdpp
Stacktrace

        ==> Installing fwdpp from homebrew/science
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20170802-6187-1of7l0u.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-science/fwdpp.rb --build-bottle --verbose
==> Downloading https://github.com/molpopgen/fwdpp/archive/0.5.6.tar.gz
Already downloaded: /Users/brew/Library/Caches/Homebrew/fwdpp-0.5.6.tar.gz
==> Verifying fwdpp-0.5.6.tar.gz checksum
tar xzf /Users/brew/Library/Caches/Homebrew/fwdpp-0.5.6.tar.gz
==> ./configure --prefix=/usr/local/Cellar/fwdpp/0.5.6
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/private/tmp/fwdpp-20170802-6189-wwfykr/fwdpp-0.5.6/missing: Unknown `--is-lightweight' option
Try `/private/tmp/fwdpp-20170802-6189-wwfykr/fwdpp-0.5.6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether clang understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of clang... gcc3
checking for an ANSI C-conforming const... yes
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking dependency style of clang++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether clang++ supports C++11 features by default... no
checking whether clang++ supports C++11 features with -std=c++11... yes
checking how to run the C++ preprocessor... clang++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking Sequence/SimData.hpp usability... yes
checking Sequence/SimData.hpp presence... yes
checking for Sequence/SimData.hpp... yes
checking gsl/gsl_rng.h usability... yes
checking gsl/gsl_rng.h presence... yes
checking for gsl/gsl_rng.h... yes
checking gsl/gsl_randist.h usability... yes
checking gsl/gsl_randist.h presence... yes
checking for gsl/gsl_randist.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking boost/test/unit_test.hpp usability... yes
checking boost/test/unit_test.hpp presence... yes
checking for boost/test/unit_test.hpp... yes
checking for gzungetc in -lz... yes
checking for cblas_dgemm in -lgslcblas... yes
checking for gsl_blas_dgemm in -lgsl... yes
checking for main in -lsequence... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating fwdpp/version.hpp
config.status: creating fwdpp/Makefile
config.status: creating fwdpp/internal/Makefile
config.status: creating fwdpp/tags/Makefile
config.status: creating fwdpp/sugar/Makefile
config.status: creating fwdpp/sugar/poptypes/Makefile
config.status: creating fwdpp/sugar/gsl/Makefile
config.status: creating fwdpp/sugar/sampling/Makefile
config.status: creating fwdpp/experimental/Makefile
config.status: creating fwdpp/extensions/Makefile
config.status: creating examples/Makefile
config.status: creating testsuite/Makefile
config.status: creating experimental_examples/Makefile
config.status: creating src/Makefile
config.status: creating doc/fwdpp.doxygen
config.status: creating config.h
config.status: executing depfiles commands
==> make
make  all-recursive
Making all in fwdpp
Making all in internal
make[3]: Nothing to be done for `all'.
Making all in tags
make[3]: Nothing to be done for `all'.
Making all in sugar
Making all in gsl
make[4]: Nothing to be done for `all'.
Making all in poptypes
make[4]: Nothing to be done for `all'.
Making all in sampling
make[4]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all-am'.
Making all in experimental
make[3]: Nothing to be done for `all'.
Making all in extensions
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in examples
depbase=`echo diploid_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT diploid_ind.o -MD -MP -MF $depbase.Tpo -c -o diploid_ind.o diploid_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo diploid_binaryIO_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT diploid_binaryIO_ind.o -MD -MP -MF $depbase.Tpo -c -o diploid_binaryIO_ind.o diploid_binaryIO_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo diploid_gzbinaryIO_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT diploid_gzbinaryIO_ind.o -MD -MP -MF $depbase.Tpo -c -o diploid_gzbinaryIO_ind.o diploid_gzbinaryIO_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo diploid_fixed_sh_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT diploid_fixed_sh_ind.o -MD -MP -MF $depbase.Tpo -c -o diploid_fixed_sh_ind.o diploid_fixed_sh_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo migsel_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT migsel_ind.o -MD -MP -MF $depbase.Tpo -c -o migsel_ind.o migsel_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo migsel_split_ind_list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT migsel_split_ind_list.o -MD -MP -MF $depbase.Tpo -c -o migsel_split_ind_list.o migsel_split_ind_list.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo bneck_selection_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT bneck_selection_ind.o -MD -MP -MF $depbase.Tpo -c -o bneck_selection_ind.o bneck_selection_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo diploid_ind_2locus.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT diploid_ind_2locus.o -MD -MP -MF $depbase.Tpo -c -o diploid_ind_2locus.o diploid_ind_2locus.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo K_linked_regions_multilocus.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT K_linked_regions_multilocus.o -MD -MP -MF $depbase.Tpo -c -o K_linked_regions_multilocus.o K_linked_regions_multilocus.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo K_linked_regions_extensions.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT K_linked_regions_extensions.o -MD -MP -MF $depbase.Tpo -c -o K_linked_regions_extensions.o K_linked_regions_extensions.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo HOC_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT HOC_ind.o -MD -MP -MF $depbase.Tpo -c -o HOC_ind.o HOC_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
clang++  -g -O2 -std=c++11   -o diploid_ind diploid_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o diploid_binaryIO_ind diploid_binaryIO_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o diploid_gzbinaryIO_ind diploid_gzbinaryIO_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o diploid_fixed_sh_ind diploid_fixed_sh_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o migsel_ind migsel_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o migsel_split_ind_list migsel_split_ind_list.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o bneck_selection_ind bneck_selection_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o diploid_ind_2locus diploid_ind_2locus.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o HOC_ind HOC_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o K_linked_regions_multilocus K_linked_regions_multilocus.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o K_linked_regions_extensions K_linked_regions_extensions.o  -lgsl -lgslcblas -lz  -lsequence
Making all in testsuite
make[2]: Nothing to be done for `all'.
Making all in experimental_examples
depbase=`echo sex_limited_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT sex_limited_ind.o -MD -MP -MF $depbase.Tpo -c -o sex_limited_ind.o sex_limited_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo diploid_fixed_sh_ind.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..  -Wall -W -I. -DNDEBUG -std=c++11  -g -O2 -std=c++11 -MT diploid_fixed_sh_ind.o -MD -MP -MF $depbase.Tpo -c -o diploid_fixed_sh_ind.o diploid_fixed_sh_ind.cc &&\
	mv -f $depbase.Tpo $depbase.Po
clang++  -g -O2 -std=c++11   -o sex_limited_ind sex_limited_ind.o  -lgsl -lgslcblas -lz  -lsequence
clang++  -g -O2 -std=c++11   -o diploid_fixed_sh_ind diploid_fixed_sh_ind.o  -lgsl -lgslcblas -lz  -lsequence
Making all in src
depbase=`echo fwdppConfig.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11 -I.. -g -O2 -std=c++11 -MT fwdppConfig.o -MD -MP -MF $depbase.Tpo -c -o fwdppConfig.o fwdppConfig.cc &&\
	mv -f $depbase.Tpo $depbase.Po
clang++ -I.. -g -O2 -std=c++11   -o fwdppConfig fwdppConfig.o  
make[2]: Nothing to be done for `all-am'.
==> make check
Making check in fwdpp
Making check in internal
make[2]: Nothing to be done for `check'.
Making check in tags
make[2]: Nothing to be done for `check'.
Making check in sugar
Making check in gsl
make[3]: Nothing to be done for `check'.
Making check in poptypes
make[3]: Nothing to be done for `check'.
Making check in sampling
make[3]: Nothing to be done for `check'.
make[3]: Nothing to be done for `check-am'.
Making check in experimental
make[2]: Nothing to be done for `check'.
Making check in extensions
make[2]: Nothing to be done for `check'.
make[2]: Nothing to be done for `check-am'.
Making check in examples
make[1]: Nothing to be done for `check'.
Making check in testsuite
make  unit/fwdpp_unit_tests unit/extensions_unit_tests unit/sugar_unit_tests integration/sugar_integration_tests integration/extensions_integration_tests
depbase=`echo unit/fwdpp_unit_tests.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/fwdpp_unit_tests.o -MD -MP -MF $depbase.Tpo -c -o unit/fwdpp_unit_tests.o unit/fwdpp_unit_tests.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/mutateTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/mutateTest.o -MD -MP -MF $depbase.Tpo -c -o unit/mutateTest.o unit/mutateTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/gameteTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/gameteTest.o -MD -MP -MF $depbase.Tpo -c -o unit/gameteTest.o unit/gameteTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/utilTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/utilTest.o -MD -MP -MF $depbase.Tpo -c -o unit/utilTest.o unit/utilTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/type_traitsTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/type_traitsTest.o -MD -MP -MF $depbase.Tpo -c -o unit/type_traitsTest.o unit/type_traitsTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/recombinationTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/recombinationTest.o -MD -MP -MF $depbase.Tpo -c -o unit/recombinationTest.o unit/recombinationTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/demographyTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/demographyTest.o -MD -MP -MF $depbase.Tpo -c -o unit/demographyTest.o unit/demographyTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/siteDepFitnessTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/siteDepFitnessTest.o -MD -MP -MF $depbase.Tpo -c -o unit/siteDepFitnessTest.o unit/siteDepFitnessTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/serializationTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/serializationTest.o -MD -MP -MF $depbase.Tpo -c -o unit/serializationTest.o unit/serializationTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/ms_samplingTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/ms_samplingTest.o -MD -MP -MF $depbase.Tpo -c -o unit/ms_samplingTest.o unit/ms_samplingTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/mlocusCrossoverTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/mlocusCrossoverTest.o -MD -MP -MF $depbase.Tpo -c -o unit/mlocusCrossoverTest.o unit/mlocusCrossoverTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/gamete_cleanerTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/gamete_cleanerTest.o -MD -MP -MF $depbase.Tpo -c -o unit/gamete_cleanerTest.o unit/gamete_cleanerTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/extensions_unit_test.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/extensions_unit_test.o -MD -MP -MF $depbase.Tpo -c -o unit/extensions_unit_test.o unit/extensions_unit_test.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/extensions_regionsTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/extensions_regionsTest.o -MD -MP -MF $depbase.Tpo -c -o unit/extensions_regionsTest.o unit/extensions_regionsTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/extensions_callbacksTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/extensions_callbacksTest.o -MD -MP -MF $depbase.Tpo -c -o unit/extensions_callbacksTest.o unit/extensions_callbacksTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/sugar_unit_tests.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/sugar_unit_tests.o -MD -MP -MF $depbase.Tpo -c -o unit/sugar_unit_tests.o unit/sugar_unit_tests.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/sugar_GSLrngTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/sugar_GSLrngTest.o -MD -MP -MF $depbase.Tpo -c -o unit/sugar_GSLrngTest.o unit/sugar_GSLrngTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/sugar_samplingTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/sugar_samplingTest.o -MD -MP -MF $depbase.Tpo -c -o unit/sugar_samplingTest.o unit/sugar_samplingTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/sugar_add_mutationTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/sugar_add_mutationTest.o -MD -MP -MF $depbase.Tpo -c -o unit/sugar_add_mutationTest.o unit/sugar_add_mutationTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/sugar_change_neutralTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/sugar_change_neutralTest.o -MD -MP -MF $depbase.Tpo -c -o unit/sugar_change_neutralTest.o unit/sugar_change_neutralTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/sugar_generalmutTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/sugar_generalmutTest.o -MD -MP -MF $depbase.Tpo -c -o unit/sugar_generalmutTest.o unit/sugar_generalmutTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo unit/sugar_generalmut_vecTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT unit/sugar_generalmut_vecTest.o -MD -MP -MF $depbase.Tpo -c -o unit/sugar_generalmut_vecTest.o unit/sugar_generalmut_vecTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/sugar_integration_tests.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/sugar_integration_tests.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_integration_tests.o integration/sugar_integration_tests.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/sugar_metapop_custom_diploidTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/sugar_metapop_custom_diploidTest.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_metapop_custom_diploidTest.o integration/sugar_metapop_custom_diploidTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/sugar_metapopTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/sugar_metapopTest.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_metapopTest.o integration/sugar_metapopTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/sugar_multilocusTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/sugar_multilocusTest.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_multilocusTest.o integration/sugar_multilocusTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/sugar_singlepop_custom_diploidTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/sugar_singlepop_custom_diploidTest.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_singlepop_custom_diploidTest.o integration/sugar_singlepop_custom_diploidTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/sugar_singlepopTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/sugar_singlepopTest.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_singlepopTest.o integration/sugar_singlepopTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/sugar_matrixTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/sugar_matrixTest.o -MD -MP -MF $depbase.Tpo -c -o integration/sugar_matrixTest.o integration/sugar_matrixTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/extensions_integration_tests.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/extensions_integration_tests.o -MD -MP -MF $depbase.Tpo -c -o integration/extensions_integration_tests.o integration/extensions_integration_tests.cc &&\
	mv -f $depbase.Tpo $depbase.Po
depbase=`echo integration/extensions_regionsIntegrationTest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	clang++ -DHAVE_CONFIG_H -I. -I..   -std=c++11  -g -O2 -std=c++11 -MT integration/extensions_regionsIntegrationTest.o -MD -MP -MF $depbase.Tpo -c -o integration/extensions_regionsIntegrationTest.o integration/extensions_regionsIntegrationTest.cc &&\
	mv -f $depbase.Tpo $depbase.Po
clang++  -g -O2 -std=c++11   -o unit/fwdpp_unit_tests unit/fwdpp_unit_tests.o unit/mutateTest.o unit/gameteTest.o unit/utilTest.o unit/type_traitsTest.o unit/recombinationTest.o unit/demographyTest.o unit/siteDepFitnessTest.o unit/serializationTest.o unit/ms_samplingTest.o unit/mlocusCrossoverTest.o unit/gamete_cleanerTest.o  -lgsl -lgslcblas -lz 
clang++  -g -O2 -std=c++11   -o unit/extensions_unit_tests unit/extensions_unit_test.o unit/extensions_regionsTest.o unit/extensions_callbacksTest.o  -lgsl -lgslcblas -lz 
clang++  -g -O2 -std=c++11   -o unit/sugar_unit_tests unit/sugar_unit_tests.o unit/sugar_GSLrngTest.o unit/sugar_samplingTest.o unit/sugar_add_mutationTest.o unit/sugar_change_neutralTest.o unit/sugar_generalmutTest.o unit/sugar_generalmut_vecTest.o  -lgsl -lgslcblas -lz 
clang++  -g -O2 -std=c++11   -o integration/sugar_integration_tests integration/sugar_integration_tests.o integration/sugar_metapop_custom_diploidTest.o integration/sugar_metapopTest.o integration/sugar_multilocusTest.o integration/sugar_singlepop_custom_diploidTest.o integration/sugar_singlepopTest.o integration/sugar_matrixTest.o  -lgsl -lgslcblas -lz 
clang++  -g -O2 -std=c++11   -o integration/extensions_integration_tests integration/extensions_integration_tests.o integration/extensions_regionsIntegrationTest.o  -lgsl -lgslcblas -lz 
make  check-TESTS
PASS: unit/extensions_unit_tests
FAIL: unit/fwdpp_unit_tests
PASS: unit/sugar_unit_tests
PASS: integration/extensions_integration_tests
PASS: integration/sugar_integration_tests
============================================================================
Testsuite summary for fwdpp 0.5.6
============================================================================
# TOTAL: 5
# PASS:  4
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See testsuite/test-suite.log
Please report to https://github.com/molpopgen/fwdpp
============================================================================
make[3]: *** [test-suite.log] Error 1
make[2]: *** [check-TESTS] Error 2
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

==> Formula
Tap: homebrew/science
Path: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-science/fwdpp.rb
==> Configuration
HOMEBREW_VERSION: 1.3.0-15-g2ad03b8
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 2ad03b8eb30ca69bf4b45c1cfc1ca619e49b9a04
Last commit: 28 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core/
Core tap HEAD: 9165540c6cb317ab724a26c41299bc72ae1e65c3
Core tap last commit: 7 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit nehalem
Homebrew Ruby: 2.0.0-p481
Clang: 7.0 build 700
Git: 2.5.4 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_131
macOS: 10.10.5-x86_64
Xcode: 7.2.1
CLT: 7.2.0.0.1.1447826929
X11: 2.7.11 => /opt/X11
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
MACOSX_DEPLOYMENT_TARGET: 10.10
PKG_CONFIG_PATH: /usr/local/opt/gsl/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.10
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/super:/usr/local/opt/gsl/bin:/usr/local/opt/libsequence/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: homebrew/science/fwdpp 0.5.6 did not build
Logs:
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/00.options.out
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/01.configure
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/01.configure.cc
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/02.make
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/02.make.cc
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/03.make
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/03.make.cc
     /Users/brew/Jenkins/workspace/Homebrew Science Pull Requests/version/yosemite/logs/fwdpp/config.log
READ THIS: https://docs.brew.sh/Troubleshooting.html

Make multi-locus/region API for recombination more flexible

The current scheme for multi-locus evolution requires the following:

  1. A const double * representing between-locus recombination rates
  2. A single "between-locus recombination function".

The between locus recombination function would typically have one of the two following forms:

//No. x-overs b/w loci i and i+1 are Poisson-distributed
[](const gsl_rng * r, const double d)
{
return gsl_ran_poisson(r,d);
}

or

//Loci i and i+1 are d cM apart
[](const gsl_rng * r, const double d)
{
return gsl_ran_binomial(r,d,1);
}

Ideally, one should be able to mix these types of processes.

The proposal is that the API get reduced to take a single argument of the following type:

std::vector<std::function<unsigned(void)>>;

This change would allow much more flexibility. For example, we can have a 3-locus system with two tightly-linked and one unlinked locus:

std::vector<std::function<unsigned(void)>> interlocus_rec{
std::bind(gsl_ran_poisson,r,1e-5), 
std::bind(gsl_ran_binomial,r,0.5,1)
};

when the RNG returns 0

The GSL function gsl_rng_uniform returns a double on the 1/2-open interval [0,1). This can lead to problems when you are asking if (gsl_rng_uniform(r) <= a/(a+b)) and the rate/probability assigned to event type "a" is 0.

This affects fwdpp/sugar/infsites.hpp, and possibly other areas of the code. An audit of the code is needed.

Bug in sampling

Neutral mutations with sample frequencies exactly equal to one-half the sample size are being dropped because of an incorrect check when removing fixed variants. This only affects the output when attempting to remove fixed variants.

Metapopulation bug

Gamete counts are getting to be >= sum(deme sizes), which is a bug

To replicate:

  1. run ./configure to generate config.h
  2. cd examples.
  3. g++ -DHAVE_CONFIG_H -I. -I.. -Wall -W -I. -std=c++11 -g -std=c++11 -o migsel_ind migsel_ind.cc -lboost_system -lsequence -lgsl -lgslcblas -lz
  4. ./migsel_ind 1000 10 1 10 0.01 0.01 1 0 0 100000 50 outfile 101

GSLrng_t should have deleted copy constructor

The current implementation allows copy-construction from a const reference. This can lead to side effects when objects are passed by value to functions.

I believe this design was due to some limitation w/Cython, but it really should be done away with. If anyone needs this type in Cython, redefine it as needed.

Make sample_diploid more generic

The current model in the main library is the standard Wright-Fisher model of a population with no separate sexes, and selection is implicitly soft selection.

This is fixable by extending the current sample_diploid to take a set of "rules" abstracting:

  1. How fitnesses are calculated
  2. How parents are chosen
  3. Updating some (user-defined) properties of offspring based on the properties of the parents.

In 0.3.1, I included an overload of sample_diploid in fwdpp/experimental/sample_diploid.hpp that allows for these custom rules. I included experimental_examples/sex_limited_ind.cc to show how custom rules may be constructed in order to implement a model with separate sexes and sex-specific effects of mutations on fitness.

These ideas will be merged into the main library once I am satisfied that:

  1. The API is ok
  2. Performance is not adversely affects for the standard Wright-Fisher model.

Testing so far suggests that that performance is unaffected, meaning that the API is the main question.

Ideally, this enhancement will be provided for all overloads of sample_diploid at the same time in a future release of the library.

Fitness function dispatch could use improvement

The current implementation (fwdpp/internal/diploid_fitness_dispatch.hpp) is only really suitable for single-region, single-deme simulations. This limitation makes some planned expansions to the library difficult to implement by preventing SFINAE techniques to be used with other population types.

fixations in KTfwd::sample_separate

Two overloads of sample_separate in sugar/sampling.hpp fail to include mutation from the population's vector of fixations when removeFixed is set to false.

Metapopulation performance

In fwdpp <= 0.3.1, gametes in a metapopulation are stored as vector<list> gametes, which is something that the individual-based simulations inherited from the old gamete-baed code. However, over a lot of the relevant parameter space, it is more efficient to simply use list.

Thanks to @vancleve for pointing this out.

A fix is in the works that will not change the simulation output but will:

  1. break API compatibility with previous library versions
  2. break binary file format compatibility with previous library versions.

Improve API for gamete_lookup_table

The data type in fwdpp/internal/gamete_lookup_table.hpp should be modified:

  • take objects to look up/use to update, instead of data from those objects

The current design means that the type cannot be specialized by a user who thinks they can out-perform the default type. The current design also means there are multiple places for me to edit while making & testing changes.

fwdpp fails internal tests. New gsl.

https://github.com/Homebrew/homebrew-science/pull/5859
Hello,
gsl was recently updated and now brew install fwdpp -s fails.

There is a log:

=========================================

Running 31 test cases...
integration/sugar_matrixTest.cc(236): fatal error: in "singlepop_hapmatrix_GSL_behavior": critical check v.matrix.size1 == 0 has failed [260 != 0]

*** 1 failure is detected in the test module "sugar_integration_tests" ```
 

Metapopulation bug #3

Removal of extinct mutations from gametes is done at the wrong point in the code for individual-based metapopulation simulations.

Serializing generalmut<N> and generalmut_vec

The operator() in fwdpp/sugar/serialization.hpp for these mutation types are missing const specifier. Thus, attempts to serialize populations with these mutation types will fail to compile.

Given that these types are not widely-used right now (only released in 0.4.3), I won't do a new release with a fix. Rather, this will be fixed upstream and rolled into the next release, which will have a lot of other changes, too...

Update tutorial for multilocus simulations

The current tutorial is limited for the case of the number of loci being determined at run-time. Specifically, the lambda expressions shown can lead to things like segmentation faults and/or incorrect values. I need an example where the lambdas capture by copy.

Error in adding fixations to "multi-locus" sims in "sugar" layer

In fwdpp/sugar/sampling.hpp, the functions KTfwd::sample and KTfwd::sample_separate have a bug when adding fixed variants into a sample. Polymorphisms that are fixed in the sample are ok, but "true" fixed variants (e.g., variants at frequency 1) are added to both loci.

Naive install fails

Just following the documentation of 'README.md', the call to 'configure' fails in the release version.

Creating a fresh clone:

p230198@fwn-biol-132-102:~/GitHubs$ git clone https://github.com/molpopgen/fwdpp.git
Cloning into 'fwdpp'...
remote: Counting objects: 4626, done.
remote: Total 4626 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (4626/4626), 4.14 MiB | 1.48 MiB/s, done.
Resolving deltas: 100% (2881/2881), done.
Checking connectivity... done.

Going into the folder:

p230198@fwn-biol-132-102:~/GitHubs$ cd fwdpp/

Calling configure there fails:

p230198@fwn-biol-132-102:~/GitHubs/fwdpp$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/p230198/GitHubs/fwdpp/missing: Unknown `--is-lightweight' option
Try `/home/p230198/GitHubs/fwdpp/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for an ANSI C-conforming const... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking boost/container/vector.hpp usability... yes
checking boost/container/vector.hpp presence... yes
checking for boost/container/vector.hpp... yes
checking boost/container/list.hpp usability... yes
checking boost/container/list.hpp presence... yes
checking for boost/container/list.hpp... yes
checking boost/test/unit_test.hpp usability... yes
checking boost/test/unit_test.hpp presence... yes
checking for boost/test/unit_test.hpp... yes
checking boost/pool/pool_alloc.hpp usability... yes
checking boost/pool/pool_alloc.hpp presence... yes
checking for boost/pool/pool_alloc.hpp... yes
checking boost/unordered_set.hpp usability... yes
checking boost/unordered_set.hpp presence... yes
checking for boost/unordered_set.hpp... yes
checking boost/functional/hash.hpp usability... yes
checking boost/functional/hash.hpp presence... yes
checking for boost/functional/hash.hpp... yes
checking Sequence/SimDataIO.hpp usability... no
checking Sequence/SimDataIO.hpp presence... no
checking for Sequence/SimDataIO.hpp... no
configure: error: Sequence/SimDataIO.hpp not found. libsequence (www.molpopgen.org) >= 1.7.8 required.

sugar1_custom.cc

This unit test fails to compile when standard library containers are used. It compiles fine with boost containers.

On my Ubuntu system the failure to compile occurs using gcc 4.9.2 and clang++ 3.6.

Refactor use of intermediate containers during recombination/mutation

The current code base makes use of two allocated vectors for mutation keys. Currently, they are only used to store the results of recombination events. Then, when mutation happens, a new set of vectors is allocated.

However, it is possible to make more efficient use of these "intermediate" containers. The branch dev_fewer_allocations is currently working on this.

The result is a big reduction in peak RAM use and run time for the case where mutation and recombination rates are both > 1 (per diploid, per generation).

Con: this requires changing the order in which the random number generator is called. Thus, the output will change for a given RNG seed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.