Skip to content
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

Improve API for offspring generation/data recording with tree sequences. #178

Merged
merged 159 commits into from
Dec 15, 2018
Merged
Changes from 1 commit
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
21a303a
Start on implementation of offspring generation function for slocuspop.
molpopgen Dec 5, 2018
d85def7
implement next steps of generate_offspring
molpopgen Dec 5, 2018
f362398
crude skeleton in place
molpopgen Dec 5, 2018
dc9d50a
Implement *some* API simplification. Make notes about the API black
molpopgen Dec 5, 2018
fb9529e
ignore gcov output files
molpopgen Dec 6, 2018
827a435
Change implementation of mutate_recombine to use begin/end non-member
molpopgen Dec 6, 2018
77b45cb
use wrapped_range to avoid new temp container
molpopgen Dec 6, 2018
44dfdae
Move wrapped_range into its own header.
molpopgen Dec 6, 2018
d3c8417
add unit test for fwdpp::wrapped_range
molpopgen Dec 6, 2018
8d31093
wrapped range now compatible with range-based for loops
molpopgen Dec 6, 2018
9e3610e
1. Reduce responsibility of new function to only generating offspring
molpopgen Dec 6, 2018
14bfa80
change namespace for populatuon tag
molpopgen Dec 6, 2018
f445c55
Fix several errors in the interface revealed by testing.
molpopgen Dec 6, 2018
865aff9
Update evolve_generation to use fwdpp::ts::generate_offspring.
molpopgen Dec 6, 2018
42b079b
update wfts.cc to new API
molpopgen Dec 6, 2018
da677d9
remove unused code
molpopgen Dec 6, 2018
37165c3
update spatialts.cc to new API
molpopgen Dec 6, 2018
976d804
add TODO
molpopgen Dec 6, 2018
630e78e
add documentation
molpopgen Dec 6, 2018
af1a754
add detail namespace and more documentation
molpopgen Dec 6, 2018
3ee1e0e
start in implementation of generate_offspring for multi-locus simulat…
molpopgen Dec 6, 2018
9db0209
Add details for multi-locus implementation of ts::generate_offspring.
molpopgen Dec 7, 2018
f039fd6
edits for readability
molpopgen Dec 7, 2018
c336f40
add TODO
molpopgen Dec 7, 2018
eacc8b1
add new example file (copy/paste of wfts.cc)
molpopgen Dec 7, 2018
99473b8
Break API for constructing mlocuspop. Attempting to use
molpopgen Dec 7, 2018
98f2cb1
start modifying example
molpopgen Dec 8, 2018
1c35431
update non-ts example to initialize locus boundaries
molpopgen Dec 8, 2018
28c78c7
Further simplification of mlocuspop constructor.
molpopgen Dec 8, 2018
3c76efc
update tests and tests fixtures
molpopgen Dec 8, 2018
cbec371
update construction of population
molpopgen Dec 8, 2018
375db5b
add zero_out_gametes
molpopgen Dec 8, 2018
503d877
Add new internal header. Use zero_out_gametes in ts evolve function
molpopgen Dec 8, 2018
0cd7a4b
Update gamete_counts in ts::generate_offspring.
molpopgen Dec 8, 2018
a9b823c
do not update gamete counts in main loop
molpopgen Dec 8, 2018
7c867ec
Fixes to genetic parameter object construction. These changes fix
molpopgen Dec 8, 2018
9042d2f
various syntax fixes
molpopgen Dec 8, 2018
2a36bd4
more syntax fixes
molpopgen Dec 8, 2018
6e92899
faux mutation model in place for multi-locus ts example
molpopgen Dec 8, 2018
514e6bf
implement multi-locus mutation model vector
molpopgen Dec 8, 2018
0b47543
add check on number of loci
molpopgen Dec 8, 2018
e4f9050
initialize offspring before filling in genotypes
molpopgen Dec 8, 2018
e43920d
fix copy/paste error
molpopgen Dec 8, 2018
599d178
reduce code redundancy
molpopgen Dec 9, 2018
141a0cc
change index variable to be less confusing
molpopgen Dec 9, 2018
f2e9597
mark detail functions as inline
molpopgen Dec 9, 2018
7d5587a
add files for tree sequence test suite
molpopgen Dec 9, 2018
6c2f40d
add empty test file with dummy fixture
molpopgen Dec 9, 2018
7b54d50
add typedef for rng based on mersenne twister
molpopgen Dec 9, 2018
b0c1c9c
develop the test fixture and start writing tests
molpopgen Dec 9, 2018
05f0b11
check total number of muts in pop
molpopgen Dec 9, 2018
52e8833
assert all new variants are singletons in test
molpopgen Dec 9, 2018
c76700b
check mutation positions (again) in test
molpopgen Dec 9, 2018
bdd260b
Fix errors in multilocus_update revealed by unit tests.
molpopgen Dec 9, 2018
82a5ab6
start working on test of recording data to tables
molpopgen Dec 9, 2018
1457d28
Add default constructor to multilocus_multiplicative to satisfy older…
molpopgen Dec 10, 2018
7834490
add cap to breakpoints
molpopgen Dec 10, 2018
7a9ae44
Add assertions re: final value expected in breakpoints for edge recor…
molpopgen Dec 10, 2018
4325992
test mutation table size after recording
molpopgen Dec 10, 2018
2af6ef0
Fix error in recording and add test of simplified output.
molpopgen Dec 10, 2018
e7bd1d0
Add fwdpp::mendel and update fwdpp::genetic_parameters to hold a type
molpopgen Dec 10, 2018
fd0f3ff
Update ts::generate_offspring to use the gamete_swapper member of the
molpopgen Dec 10, 2018
9c1383a
Update fixture to control initial parent gamete swapping.
molpopgen Dec 10, 2018
71d1a1e
Use std::remove_reference to assist compilers with return type
molpopgen Dec 10, 2018
c3f12b8
fix formatting
molpopgen Dec 10, 2018
5b855e8
move fixture into its own header
molpopgen Dec 10, 2018
bea059d
add new tests of multilocus rec using new fixture
molpopgen Dec 11, 2018
39e12cc
Comment out a block of code that is interfering wiht unit testing.
molpopgen Dec 11, 2018
4bb6480
minor formatting
molpopgen Dec 11, 2018
a84a892
More unit tests of multi-locus recombination, based on the fixture
molpopgen Dec 11, 2018
f31440c
add mutating of parents functionality into fixture
molpopgen Dec 11, 2018
5118898
Test transmission of mutations from parent to offspring
molpopgen Dec 11, 2018
485e3d1
minor formatting
molpopgen Dec 11, 2018
3f879a6
add assertion in discrete_rec_model
molpopgen Dec 11, 2018
a4af25e
check specific contents of gamete in test
molpopgen Dec 11, 2018
485bf1d
check specific contents of gamete in test
molpopgen Dec 11, 2018
bfe0973
unload a lot of the new fixture into a .cc file
molpopgen Dec 11, 2018
7136057
remove unneeded include statement
molpopgen Dec 11, 2018
30b73f5
add a .cc file for fixtures/sugar_fixtures
molpopgen Dec 11, 2018
6a41874
use nloci to set up mutation and recombination rates in test
molpopgen Dec 11, 2018
1301db7
split failing test into two parts
molpopgen Dec 11, 2018
7828647
add PASSPOINT and simplify generation of genetic value function
molpopgen Dec 11, 2018
ac6a7c5
check size of recombination models
molpopgen Dec 11, 2018
b9be86c
cleanup fixture so that we are closer to being able to edit w/o forci…
molpopgen Dec 11, 2018
7ace1fb
Fixed bug in fixture. The issue was trying to capture a temporary
molpopgen Dec 11, 2018
5246cd7
more cleanup of the fixture, moving stuff from .hpp to .cc
molpopgen Dec 11, 2018
cae54fe
move another fixture function to .cc file from .hpp
molpopgen Dec 11, 2018
bd1da1a
add another static const member variable to test fixture
molpopgen Dec 11, 2018
8813dfc
refactor test to make better use of fixture
molpopgen Dec 11, 2018
65f4f76
removed unused typedef
molpopgen Dec 11, 2018
79b2a78
Change logic of multilocus updating to always start from the first
molpopgen Dec 11, 2018
2b1933e
clean up tests
molpopgen Dec 12, 2018
45c022b
Add test of swapping second parent
molpopgen Dec 12, 2018
c23b9fb
check breakpoint contents
molpopgen Dec 12, 2018
f7df5db
store multiple sets of parameters in fixture
molpopgen Dec 12, 2018
678586c
Document the fundamental logic of the test fixture.
molpopgen Dec 12, 2018
f4131c0
fix error in fixture dox
molpopgen Dec 12, 2018
5e6bb23
fix unit tests (so they now fail) based on expected fixture outputs
molpopgen Dec 12, 2018
5965d59
move expected breakpoints into fixture
molpopgen Dec 12, 2018
ce66590
Move the recording of breakpoints b/w loci to where we apply
molpopgen Dec 12, 2018
180d300
fix expected edge table size in unit tests
molpopgen Dec 12, 2018
bbbf7c0
add fixture functions for checking that expected mutations positions …
molpopgen Dec 12, 2018
81c40a5
Add comment
molpopgen Dec 12, 2018
d0b4f37
Add comment
molpopgen Dec 12, 2018
97da775
update notes re: where we are in terms of testing
molpopgen Dec 12, 2018
b5b91a6
include guardes for fixture header
molpopgen Dec 12, 2018
a94b994
test for transmission of variants through simplification
molpopgen Dec 12, 2018
87f40ac
test mutation counting after a single transmission
molpopgen Dec 12, 2018
446c206
fix formatting of comments
molpopgen Dec 12, 2018
82c6aa2
start moving common functions for tree sequence examples to separate …
molpopgen Dec 12, 2018
e68f2e8
update build files
molpopgen Dec 12, 2018
0ac1dc7
mark ts::detail_outgoing_leaf_counts overload inline
molpopgen Dec 12, 2018
bdc7db3
offload the boost options stuff to common file
molpopgen Dec 12, 2018
dd38174
trim the number of includes a bit
molpopgen Dec 12, 2018
7194481
update wfmlts to use the common code files
molpopgen Dec 12, 2018
e92011c
move more example code to common files
molpopgen Dec 12, 2018
97a6267
move sfs writing to common files
molpopgen Dec 12, 2018
6fa9dc4
update typedefs
molpopgen Dec 12, 2018
0b83a79
mark_multiple_roots is now inline
molpopgen Dec 12, 2018
3d9e11c
move mutation dropping to common files
molpopgen Dec 12, 2018
06e30e9
further reduce diffs b/w two example programs
molpopgen Dec 12, 2018
0b436e9
change interlocus recombination process to binomial
molpopgen Dec 13, 2018
f9a812c
add new intra- and inter- locus recombination parameters to fixture
molpopgen Dec 13, 2018
3addf70
check that breakpoints from new parameters come out as expected
molpopgen Dec 13, 2018
22b872e
test edges for new parameters
molpopgen Dec 13, 2018
2187799
add test for transmission of parental mutations for new rec params
molpopgen Dec 13, 2018
8ebd0d2
test transmission of parental mutations w/new params and old fwdpp_in…
molpopgen Dec 13, 2018
486af99
use fixture params rather than output of make_params
molpopgen Dec 13, 2018
ab675fa
move make_params fxns to private
molpopgen Dec 13, 2018
d7f42a5
tests for return value of swapped status
molpopgen Dec 13, 2018
f74e47e
add detailed test of gamete contents
molpopgen Dec 13, 2018
e5069a9
add fixture function to apply mutations to all gametes of both parents
molpopgen Dec 13, 2018
b12ffed
remove parts of new test that need replacing
molpopgen Dec 13, 2018
1ca7f2c
test transmission from complex case
molpopgen Dec 13, 2018
6be3387
implement new test of simplification. THIS ONE FAILS AND MAY HOLD THE…
molpopgen Dec 13, 2018
f09b935
test transmission of mutations through tree sequences using more comp…
molpopgen Dec 13, 2018
9ca1c3b
move where we set up w/in locus recombination
molpopgen Dec 13, 2018
67ad401
fix size of interlocus recombination function container
molpopgen Dec 14, 2018
342e8c9
interlocus rec rate now a static global
molpopgen Dec 14, 2018
ca86b0b
add option to suppress recombination b/w loci
molpopgen Dec 14, 2018
c53a6a4
explain params a bit better ;)
molpopgen Dec 14, 2018
c07cbfc
add check one edge boundaries for case of zero recombination
molpopgen Dec 14, 2018
d7a4768
validate mutation positions after each generation
molpopgen Dec 14, 2018
a14efae
assert non-zero gamete counts in diploids
molpopgen Dec 14, 2018
f162784
add debug check on gamete counts
molpopgen Dec 14, 2018
22f70a3
add some debugging code to print out data structures
molpopgen Dec 14, 2018
4491fe4
throw exception if sentinel value is missing from breakpoints
molpopgen Dec 14, 2018
7a4a8b3
move nloci option out of common code for ts examples
molpopgen Dec 14, 2018
7905997
add option to multi-locus ts example to not swap parent gametes durin…
molpopgen Dec 14, 2018
df40ae6
move the debugging code around to see what happens during simplification
molpopgen Dec 14, 2018
2496ddb
add some more debugging blocks
molpopgen Dec 14, 2018
a7f4f46
add option to add exactly one mutation to each locus for all offspring
molpopgen Dec 14, 2018
bdee08b
check growth in number of mutations
molpopgen Dec 14, 2018
f790f25
remove cout
molpopgen Dec 14, 2018
b17b9d6
Add new debug function and us it in tree sequence example programs
molpopgen Dec 15, 2018
9636218
Fix bug in zero_out_gametes for multi-locus pops. The erroneous code
molpopgen Dec 15, 2018
6af6a10
mark gamete_base constructor explicit
molpopgen Dec 15, 2018
0a7fb93
remove debugging code
molpopgen Dec 15, 2018
cb83551
add details of this PR to the change log
molpopgen Dec 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mark gamete_base constructor explicit
molpopgen committed Dec 15, 2018
commit 6af6a101db08a688ea030509c27f0acea41dab1f
2 changes: 1 addition & 1 deletion fwdpp/forward_types.hpp
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ namespace fwdpp
\param icount The number of occurrences of this gamete in the
population
*/
gamete_base(const uint_t &icount) noexcept
explicit gamete_base(const uint_t &icount) noexcept
: n(icount), mutations(mutation_container()),
smutations(mutation_container())
{