Major changes are listed below. Each release likely contains fiddling with back-end code, updates to latest fwdpp version, etc.
This release enables custom genetic value models to be implemented in Python. To do so, the back-end for C++ genetic values was changed in a way that (hopefully!) future-proofs the API against future changes. The approach taken to allowing Python genetic value types evolved quite a bit during development, so we won’t refer to individual pull requests here. Anyone interested can look at the 0.9.0 milestone on GitHub.
See here for the documentation on Python genetic values.
The C++ back-ends for Gaussian stabilizing selection classes got streamlined without changing the user interface. #547
Manual got overhauled. #543
Snowdrift example (here) reimplemented using
Fixed a back-end bug that could have led to corrupt sample lists for simplification. #536.
Made improvements to memory handling of data structures when simulations end. #537.
Added the three-deme model of Jouganous et al. (2017). See
Stable release. In addition to what is in the previous alpha releases:
This release includes some minor API changes. See the upgrade guide for details.
Second alpha release of 0.8.0:
This is the first alpha release of 0.8.0.
In addition to what is below, this release contains a smattering of build system changes, documentation changes, etc., that are collected under the 0.8.0 milestone on Github.
This release brings Python classes that have been reimplemented using attrs. These changes have a lot of benefits:
A lot of C++ code got removed (yay!) because we can use attrs for the pickling machinery, __repr__, etc..
We now get much nicer __repr__ for all of the types that get sent into instances of
However, these changes required some simplification to the __init__ methods, which meant some API breakage. See the upgrade guide for details.
This release also removes features deprecated in previous releases. #482
Sorting edge tables prior to tree sequence simplification has been replaced by an efficient buffering algorithm. #526.
New demographic models:
Improved warnings about demographic events scheduled to happen before the population’s current generation. #495
Built-in demographic models now return instances of
fwdpy11.demographic_models.DemographicModelDetails. Such instances can be passed as the demography keyword argument to initialize
Changes to implementation of Python classes
C++ back end changes:
Maintenance release and one new feature:
Allow the first generation of a simulation to be preserved. PR #470 See Finishing a simulation with a tree sequence from msprime.
This release include several other improvements to documentation and user interface.
All changes are backwards-compatible, and deprecation warnings are issued when
necessary. See the 0.7.1 milestone on
GitHub for details.
Major feature release allowing mutations to have different effect sizes in different demes.
Temporal samplers now get the correct offspring metadata in simulations with tree sequence recording. #444
fwdpy11.mvDES, which allows multivariate distributions of effect sizes such that mutations have different effect sizes in different demes. See Different effect sizes of mutations in different demes for details. PR #443 PR #452
fwdpy11.GeneticValueToFitnessMapnow records whether or not genetic values are mapped to fitness or are a trait value via
fwdpy11.GeneticValueToFitnessMap.maps_to_trait_value. PR #447
Other changes (see the 0.7.0 milestone on GitHub)
This release deprecates several features that are no longer sensible given that most simulations will use tree sequence recording. You will see warnings pop up if you use these features (or run the unit tests). These features will be removed in 0.8.0.
Many back-end changes to the C++ code simplify things in various places.
Fixes a bug where the timing of updates to stateful genetic values was off by one generation:
This release fixes three bugs. The first two are related to internal details of book-keeping various data structures:
This release changes the migration code to model juvenile migration. These changes simplify the back end and give the same results (in distribution). The relevant PRs are:
This is a maintenance release that clears up a few issues:
The following features are added:
This is a major feature release. The changes include all those listed for the various release candidates (see below) plus the following:
Creating populations from
msprimeinput improved. PR #395
This is the first stable release with support for flexible demographic modeling. See Soft selection with discrete demes for details as well as Isolation-with-migration (IM). Currently, support for different fitness effects in different demes is limited, which will be addressed in 0.7.0. However, this version does support adaptation of quantitative traits to different optima. See Local adaptation of a quantitative trait.
Third release candidate of version 0.6.0!
Kind of a big release:
Fixes a bug in the mechanics of generating offspring metadata. The bug doesn’t affect anyone not using custom “genetic value” calculations. #371
Big reductions in memory requirements for simulations with tree sequence recording. PR #383
Add some pre-computed demographic models, see The demography debugger.
New examples added: Isolation-with-migration (IM)
Many improvements/additions to the test suite and the manual.
This is the same as 0.6.0rc0 except that it is based on a master branch that’s been rebased to have the bug fixes from 0.5.5 included.
Support for demographic events involving discrete demes. This is a release candidate with minimal documentation beyond the examples (see below).
This API change won’t affect anyone because previous versions didn’t support individuals in different demes.
Support for different genetic value functions in different demes. PR #357
Improve how tree sequence nodes are retrieved for “alive” individuals during simulation. PR #344
Changes to the build system and dependencies:
Minimum pybind11 version is 2.4.3
-Weffc++flag is now optional during compilation.
This release fixes a rather serious bug.
The latter is the bad one. For workflows involving simulate, write to file, read in and add neutral mutations, that results may now differ. In practice, we’ve seen few cases where that has happened (1 in about 10,0000 simulations), but the bug was due to not properly populating a lookup table of mutation positions after reading the simulation back in from disk. Thus, there is the chance that the procedure of putting down neutral mutations now differs.
Allow neutral mutations during simulations with tree sequences. PR #328
Add C++ back end and Python classes for discrete demographic events. PR #237
Links in the manual are now validated via CI. PR #331
The following bugs are fixed:
Mutations were not being recycled properly during simulations with tree sequences, resulting in excessive memory consumption. PR #317
The following new features are added:
Allow for preserved samples to be “forgotten” during tree sequence simulations. PR #306. See tstimeseries
Several performance fixes:
Extinct genomes are purged at the end of simulations with tree sequences. PR #319.
Improve algorithm to purge extinct variants at the end of a simulation with tree sequences. PR #318.
Improve performance of mutation counting with ancient samples PR #289.
This release fixes three bugs:
fwdpy11.IndexedEdgeis now exposed to Python. Previously, attempting to access fwdpy11.TableCollection.input_left or fwdpy11.TableCollection.output_right would give an error because the class contained in these lists wasn’t visible. PR #266
Corruption of the samples list using the standalone simplify function. PR #270
The following features are new:
This is an intermediate release as we are still working towards supporting more general demographic models.
Major changes include:
Updating the fwdpp back-end to the pre-release code for fwdpp 0.8.0. Almost none of these changes are “user facing”.
Even though this release changes some of the tree sequence data structures, we are still able to read in files generated by version 0.4.5! (This is actually unit tested.)
Minor changes include:
Minor fixes to packaging of source distrubition.
Add a YCM config file to source repo
Allow mutation and recombination regions to be empty. PR #239.
fwdpy11.VariantIteratormay now skip neutral or selected sites during iteration. The behavior is specified by parameters passed to the class upon construction.
Added position ranges to tree traversal. PR #232.
Changed default type for range arguments for VariantIterator and data matrix generation. PR #233.
Skipping fixations is now optional in
The C++ back-end for population classes was changed to avoid deleting move constructors. PR #231.
This is a major refactoring:
The package is now contained in a single namespace, fwdpy11.
The MlocusPop concept from previous versions is removed, and
fwdpy11.DiploidPopulationis the only population class now.
Many Python class names are changed to reflect that there is only one population type now.
The manual has been rewritten.
The details for this release are best tracked via the cards in Project 9 on GitHub.
Minor bugfix release:
Preserved nodes are now recorded as samples when table collections are saved to tskit
The fwdpp submodule is updated to include fixes to some debugging code
Minor updates to the C++ backend of VariantIterator
Deprecations of note¶
fwdpy11.MlocusPop is tentatively deprecated. The new features described in Method 2: using “genetic map” classes make this class obsolete, but we will await a final verdict pending more testing.
Updates to the fwdpp submodule fix a bug in
fwdpy11.ts.infinite_sites(). Previously, if the genome size was not 1.0, then the number of mutations would be off by a factor of the genome size divided by 1.0. The error was due to a bug upstream in fwdpp.
A bug in how diploid metadata were updated by genetic value types has been fixed. It is unlikely that this bug affected anyone unless they had written custom genetic value calculations where the offspring’s genetic value depended on the parental metadata. PR #173.
Support for multivariate mutational effects¶
PR #164 introduced support for multidimensional mutational effects. This pull request introduced several changes:
The following new types are added:
fwdpy11.MultivariateGaussianEffects, which is a new “region” type
fwdpy11.genetic_values.SlocusPopMultivariateGeneticValueWithMapping, which is a new ABC for multivariate genetic values
fwdpy11.genetic_values.MultivariateGeneticValueToFitnessMap, which is a new ABC mapping multivariate trait values down to a (single) fitness value.
fwdpy11.genetic_values.MultivariateGSS, which is GSS based on the Euclidean distance from multiple optima
fwdpy11.genetic_values.MultivariateGSSmo, which is the multi-dimensional analog to the existing GSSmo
fwdpy11.genetic_values.SlocusMultivariateEffectsStrictAdditive, which is a new genetic value class for pleiotropic traits.
PR #175 adds tracking of genetic values during simulation as numpy
Currently, filling these arrays is only supported for simulations with tree sequence recording.
Changes to the C++ back end:
The API for the C++ class fwdpy11::SlocusPopGeneticValue was slightly changed in order to accommodate the new types. The old operator() is renamed calculate_gvalue().
Analogous changes were made to fwdpy11::MlocusPopGeneticValue.
Change minimum GSL version required to 2.3
Other changes in this release include¶
It may be helpful to look at the following documentation pages:
Improved performance of simulations tracking lots of ancient samples. PR #194
Generalized genetic maps for single-locus simulations. You can now do much of the “multi-locus” stuff with SlocusPop now. PR #189
Tree sequence recording now possible for mulit-locus simulations. PR #185
fwdpy11.ts.simplify()no longer retains ancient samples present in the input by default. To do so, explicitly label any ancient samples to retain as part of the the samples list passed to the function. PR #169
fwdpy11.model_params.ModelParams.nregionsnow defaults to an empty list, which simplifies setup for simulations with tree sequences. b557c41.
When simulating with tree sequences, it is no longer an error to attempt to record ancient samples from the last generation of a simulation. PR #162
Changes to the C++ back-end include:
The genetic value types now store a vector of genetic values. The idea is to generalize the type to handle both uni- and multi- variate genetic values. PR #172
This is a point release fixing some minor packaging problems in 0.2.0.
This release represents major changes to the calclations of genetic values and to how simulations are parameterized. Please see Upgrade path, genetic_values_types, and Setting up the parameters for a simulation for details.
The major feature addition is support for tree sequence recording. See Data structures related to tree sequences and ts for details.
This version breaks pickle format compatibility with files generated with version 0.1.4 and earlier. Sorry, but we had to do it.
GSL >= 2.2 is now required.
cmake is now required to build the package.
Fixed bug in
fwdpy11.util.sort_gamete_keys(). The function was working on a copy, meaning data were not being modified. PR #93
Fix a bug in updating a population’s mutation lookup table. This bug was upstream in fwdpp (fwdpp issue 130). While definitely a bug, I could never find a case where simulation outputs were adversely affected. In other words, simulation output remained the same after the fix, due to the rarity of the bug. PR #98
API changes/new features:¶
Added support for tree sequence recording. PR #142
Populations may now be dumped/loaded to/from files. See
fwdpy11.SlocusPop.load_from_file(). Analagous functions exist for MlocusPop. PR #148
fwdpy11.MlocusPop.sample()now return a
fwdpy11.sampling.DataMatrix. PR #118
fwdpy11.sampling.DataMatrixis refactored to match updates to fwdpp. PR #139
fwdpy11.sampling.matrix_to_sample()now return a tuple with the neutral and selected data, respectively, as the two elements. PR #128
The design of objects related to calculating genetic values is vastly simplified. See genetic_values_types. PR #108
Populations now contain functions to add mutations, replacing previous functions in fwdpy11.util. PR #94
fwdpy11.MlocusPopnow requires that
fwdpy11.MlocusPop.locus_boundariesbe initialized upon construction. PR #96
The mutation position lookup table of a population is now a read-only property. See mpos. PR #103
The mutation position lookup table is now represented as a dict of lists. PR #121
A mutation or fixation can now be rapidy found by its “key”. See
fwdpy11.Population.find_fixation_by_key(). PR #106
Most uses of C’s assert macro are replaced with c++ exceptions. PR #141
The C++ back-end of classes no longer contain any Python objects. PR #114
PR #108 changes the back-end for representing diploids and for calculating genetic values.
Refactored class hierarchy for populations. :pr`85`
The position of extinct variants is set to the max value of a C++ double. PR #105
Replaced std::bind with lambda closures for callbacks. PR #80
Fast exposure to raw C++ buffers improved for population objects. PR #89
Refactored long unit tests. PR #91
The GSL error handler is now turned off when fwdpy11 is imported and replaced with a custom handler to propagate GSL errors to C++ exceptions. PR #140
Population mutation position lookup table changed to an unordered multimap. PR #102
API changes/new features:¶
Population objects have new member functions
sample_ind. These replace
fwdpy11.sampling.sample_separate(), which is now deprecated. For example, see
sample()for more info. (The same member functions exist for all population objects.) PR #62
Improved support for pickling lower-level types. See the unit test file tests/test_pickling.py for examples of directly pickling things like mutations and containers of mutations. PR #55
__main__.py added. The main use is to help writing python modules based on fwdpy11. See developers for details. PR #54
Attributes popdata and popdata_user added to all population objects. PR #52
fwdpy11.SingleLocusDiploid.parental_dataadded as read-only field. PR #51
fwdpy11.MlocusPop.locus_boundariesis now writeable.
fwdpy11.sampling.DataMatrix.selectedare now writeable buffers.
fwdpy11.sampling.DataMatrix.ndim_selectedhave been changed from functions to read-only properties. PR #45
Population objects may now be constructed programatically. See popobjects. PR #36
The numpy dtype for
fwdpy11.Mutationhas been refactored so that it generates tuples useable to construct object instances. This PR also removes some helper functions in favor of C++11 uniform initialization for these dtypes. PR #72
The documentation building process is greatly streamlined. PR #60
Object namespaces have been refactored. The big effect is to streamline the manual. PR #59
Travis CI now tests several Python versions using GCC 6 on Linux. PR #44
fwdpy11.wright_fisher_qtrait.evolve()has been updated to allow “standard popgen” models of multi-locus evolution. This change is a stepping stone to a future global simplification of the API. PR #42
Travis builds are now Linux only and test many Python/GCC combos. PR #38
The method to keep fixations sorted has been updated so that the sorting is by position and fixation time. PR #33
The doctests are now run on Travis. PR #30
Removed all uses of placement new in favor of pybind11::pickle. PR #26.
fwdpy11 are now based on the @firstname.lastname@example.org idiom for safety and code reuse. PR #21
API changes/new features:¶
fwdpy11.Sregionmay now model distrubitions of effect sizes on scales other than the effect size itself. A scaling parameter allows the DFE to be functions of N, 2N, 4N, etc. [PR #16] * Github issues 7, 8, and 9 resolved. All are relatively minor usability tweaks.
Trait-to-fitness mapping functions for quantitative trait simulations now take the entire population, rather than just the generation. This allows us to model things like truncation selection, etc. fa37cb8
Added magic numbers to keep track of compatibility changes to serialization formats.
__str__ changed to __repr__ for region types 2df859d
fwdpy11.model_params now uses try/except rather than isinstance to check that rates are float-like types. 37112a6
Fixed bug in setting the number of loci after deserializing a multi-locus population object. 4e4a547
Fixed bug in
fwdpy11.sampling.DataMatrix.selected()that returned wrong data in best case scenario and could have caused crash in worst case. e715fb7.
Fix bug recording fixation times. If a population was evolved multiple times, fixation times from the later rounds of evolution were incorrect. 9db14d8
The “label” field of a diploid is now initialized upon constructing a population.
API and back-end changes:¶
Custom stateless fitness/genetic value calculations may now be implemented with a minimal amount of C++ code. See customgvalues. a75166d
Custom fitness/genetic value calculations now allowed in pure Python, but they are quite slow (for now). See customgvalues. 5549286
Stateful trait value models enabled for qtrait sims. 161dfce
Refactor evolution functions so that stateful fitness models behave as expected. Enable compiling in a debug mode. Fix bug in operator== for diploid type. a726c05
fwdpy11.util added, providing
Added multi-locus simulation of quantitative traits. fcad8de
Refactoring of type names. 632477c
Refactoring internals of single-region fitness/trait value types. d55d636
Allow selected mutations to be retained in fwdpy11.wright_fisher.evolve_regions_sampler_fitness. dcc1f2f
Note: the refactoring of type names will break scripts based on earlier versions. Sorry, but things are rapidly changing here. Please note that you can reassign class and function names in Python, allowing quick hacks to preserve compatibility:
import fwdpy11 Spop = fwdpy11.SlocusPop
from fwdpy11 import SlocusPop as Spop