CHANGELOG

-=========================================================================-
N E M O v2.3.51 [27 Sept 2018]

FIX: segfault when input FSTAT file contained allele '0'; allele '0' not 
     accepted anymore in input genotype files
FIX: names of trait genetic covariance stats for trait 'quanti' corrected
     in stat output files
FIX: parameter with multiple external parameter files specified in the input
     file now correctly treated as a sequential parameter
FIX: output binary files can now be > 2.1GB; however, file format not 
     compatible with older versions of Nemo.
FIX: parameter temporal values correctly reset between different simulations
ADD: dispersal lattice model (dispersal_model 4) now accepts arbitrary 
     number of rows and columns (previously limited to square grids)
ADD: backward mutation rate in deleterious-mutation trait (delet)
ADD: direct setting of mutation fitness effect in deleterious-mutation trait
     with new parameter "delet_effects"; could only be set randomly from a 
     specified distribution so far
ADD: possibility to load random deleterious mutation effects from binary
     source files via parameter "source_parameter_override"
ADD: "source_parameter_override" to set parameter value from binary source
     files, overriding the loading simulation parameter values
ADD: PLINK output file format for neutral markers (.ped, .fam, .map, .bin)
ADD: new warnings at start when nemo finds orphan parameters in the input
     parameter file (i.e., parameters that don't belong to any component)
ADD: possibility to execute an external shell script after each replicates
     instead of after all simulations in a run.
ADD: locus-specific alleles values of quantitative trait now recycled across
     loci if less values than number of loci provided in input
MOD: the fitness effects of the deleterious mutations are now saved in the
     `.log' file of the simulation after being randomly set during setup
MOD: runtime messaging about existing simulation files, and other messages
     have been refreshed and updated
MOD: MPI version and random number generator adjusted for SPRNG v5.0; MPI 
     version fully functional!
     
     
-=========================================================================-
N E M O v2.3.46 [09 Feb 2017]

FIX: recombination between 2 first loci on the genetic map was suppressed 
     if chromosome-wide recombination rates were specified as a round 
     log 10 number in the input file (e.g. ..._recombination_rate 0.001)
FIX: corrected handling of the quadratic fitness option for quantitative 
     trait, a bug existed when several traits were specified
FIX: composite life cycle breed_selection_disperse was ignoring traits not
     under selection -> no inheritance done!
ADD: now possible to save the pedigree information for the whole population
     or for a sample of each patch to a text file ('pop_output...' params)
ADD: now possible to load a population from a pedigree file (from real or 
     simulated pedigrees) and perform genetic simulations (mutation and 
     recombination) across the generations contained in the pedigree file
     (using the 'cross' life cycle event operator)
ADD: new file output to save the whole population distribution of individual
     fitness values when selection is used in the life cycle 
ADD: new file output to save allele frequency changes at diallelic quantitative
     loci in each patch across generations with quanti_freq_output options
ADD: local relative fitness scaling can now be done relative to the maximum
     fitness value in a patch instead of relative to its mean fitness value
MOD: chromosomes may have a variable number of loci on all genetic maps
MOD: configuration file: change of '@' -> '&' to pre-pend the name of 
     external files (files containing large parameter values like matrices)
     to avoid confusion with temporally varying parameters arguments and 
     potential runtime errors.
MOD: the content of the external parameter files is not written to the 
     '.log' and '.bin' files anymore.
     

-=========================================================================-
N E M O v2.3.45 [03 Feb 2016]

FIX: version 2.3.44 introduced a bug in the stat 'adlt/off.Ho' of stat 
     option 'fstat', fixed now.
FIX: initialization of allelic values of quantitative traits in the di-
     allelic model.
MOD: the output data of option 'ntrl_save_freq' has changed with two new
     options 'locus' and 'allele' for per locus or per allele F-stats and 
     per patch heterozygosities. The 'locus' option saves the identity of 
     the major allele at each locus, and its overall and patch specific
     frequencies. The Weir&Cockerham variance components are saved as 
     well, using the same approach as the hierfstat R package, for loci 
     and alleles.
MOD: the tabular output file containing the genotypic information of 
     neutral loci now saves more info on each individual recorded (similar
     to the genotype file of the 'quanti' trait).
MOD: the age class id saved in the FSTAT and GENEPOP files has changed and
     now matches the ids used in other output files with 0 = offspring and
     2 = adult.

-=========================================================================-
N E M O v2.3.0 [13 Jul 2015]

FIX: quanti trait init values were modified between replicates (fixed in 
     2.3.44) (does not concern quanti_init_trait_values of LCE quanti_init)
FIX: delet mutation bitstring copy was corrupted, introducing errors in 
     recombination (fixed in 2.3.43)
ADD: recombination map for most types of the available traits (ntrl, delet, 
     quanti, dmi). This genetic map may hold neutral markers (e.g. SNP) and 
     loci under selection (e.g. QTL) on multiple chromosomes (no sexual
     chromosomes). Locus position can be set explicitly or randomly.
ADD: Dobzhansky-Muller incompatibility loci (DMI trait)
ADD: selection may now act on multiple traits at once (e.g. fitness is the
     result of local adaptation on quantitative traits, survival to delete-
     rious mutations and Dobzhanski-Muller incompatibilities).
ADD: unlimited number of quantitative traits coded by universally pleiotro-
     pic loci (QTL), with several (bi-)allelic and selection models
ADD: the local phenotypic optimum of a quantitative trait can change during 
     a simulation by setting its per-generation rate of change
ADD: input of connectivity matrix and reduced migration matrix for sparse
     landscapes; lead to a large speed-up of computation when number of 
     sub-populations is > 1000 and dispersal is spatially limited.
ADD: initialisation of patch-specific frequency of neutral markers and QTL
ADD: population growth models (for breed_disperse backward-migration model)
ADD: selection acting on female fecundity instead of offspring survival (in
     breed_selection LCE)
ADD: mean fecundity can be patch-specific
ADD: more output formats for neutral marker data (tabular, Genepop)
ADD: more statistics for neutral markers (Dxy)
ADD: "postexec_args" parameter to pass run-specific arguments to post-exec
     script (script externally executed at the end of a run, e.g. R scripts)
ADD: parameter arguments may be written in separate files, referred with 
     '@filename' syntax (useful for large dispersal and environmental matri-
     ces when simulating large landscape grids)
ADD: initial seed of the pseudo-random number generator and the CPU time of
     each simulation are now logged in the simulation *.log file
ADD: more control on the format of the summary statistic file (CSV and more
     compact format to save substantial amount of disk space)
ADD: arguments of sequential and temporal parameters are now processed for
     name expansion; may hold the expansion string '%...'
MOD: introducing reduced migration matrices (internally) for large speed-up
     of dispersal on large landscapes with sparse dispersal matrices
MOD: renaming and addition of many stat recorders, see manual
MOD: trait genotypes can be saved at specific generations during a run
MOD: periodicity of statistic recording can be modified during a run
MOD: do not save the average of summary statistics in the *_bygen.txt files 
     when only one replicate in a simulation
FIX: correctly saves temporal parameters in the simulation *.log file
FIX: general memory management improvement
FIX: of MPI layer, now functions properly again
FIX: of bitwise deleterious-mutations trait under 64bits architectures
FIX: of migration matrix with absorbing borders, rewrote procedures for
     setting migration matrix of 2D lattice models, corrected bug with
     backward matrix

-=========================================================================-
N E M O v2.2.0 [29 Nov 2011]
Users:
ADD: quantitative traits (up to two correlated traits)
ADD: spatially varying selection on quantitative traits
FIX: bug when setting fecundity with normal distribution and large variance
MOD: code improvement in various places

Framework:
MOD: changed the StatRecorder, StatRecBase, and StatHandler::add interfaces
MOD: improvements of the DataTable class

-=========================================================================-
N E M O v2.1.4 [01 Apr 2011]
Users:
FIX: memrory leak in extinction procedure
FIX: problem with file loading leading to crashes
FIX: various benign type-conversion warnings
FIX: problems with file writing when loading too many input files
FIX: memory problem when writing neutral allele freq with pop resize
ADD: option to sample with replacement in the 'cross' LCE
ADD: population stat option 'pedigree'

-=========================================================================-
N E M O v2.1.3 [11 Aug 2010]
Users:
FIX: bug when computing variance components for the Weir&Cockerham Fst 
     estimate. This bug only marginally affected the results obtained so 
     far (< 10^-2 difference).
FIX: both Weir&Cockerham and  Weir&Hill statistics now correctly deal with 
     population extinctions.
FIX: small bug when writing FSTAT files with 100 alleles per locus.
FIX: algorithm for patch shuffling for propagule dispersal was corrupted.
FIX: harvesting by proportion was giving wrong results.
ADD: new option for the 'cross' LCE to cross among and within patches 
     separately.
ADD: Fis (f) and Fit (F) estimates for the Weir&Cockerham stats

-=========================================================================-
N E M O v2.1.2 [15 Aug 2009]
Users:
FIX: bug in source-loading affecting binary and trait input files
ADD: partial cloning; use `mating_proportion' to specify a given proportion 
     of random mating within females (=hermaphrodites)

-=========================================================================-
N E M O v2.1.1 [04 May 2009]
Users:
FIX: in resize, resize_keep_patch now works properly
FIX: breed, males were erroneously kept under selfing and cloning,
     males are not produced anymore at breeding
FIX: default run mode wrongly set to "overwrite" instead of "run"

Framework:
CHG: ongoing changes in the BinaryDataLoader to try and avoid memory
     overload when loading a lot of source files during a simulation

-=========================================================================-
N E M O v2.1.0 [02 Feb 2009]
Users:
FIX: in aging, regulation was performed non-randomly
FIX: lattice models available with backward migration
CHG: regulation is back and acts on all age class in the same way
CHG: polygyny, the alpha male is set randomly
NEW: temporal parameter specifier (@g#), see the manual
NEW: added paramters:
     - simulation::run_mode
     - population::source_file_type, source_fill_age_class,
       source_start_at_replicate
CHG: parameters:
     - boolean parameters accept 1(=true/set) and 0(=false/unset)
     - dispersal_lattice_model -> dispersal_border_model, applies to 
       1D and 2D stepping stone models equally.
     - replicates and generations are now part of the simulation comp.
NEW: output file option for ntrl trait: allele frequencies and variance 
     components (for Weir & Cockerham Fst)
NEW: LCE: resize and crossing
NEW: compressed binary source files are uncompressed/compressed on the
     fly
CHG: stats:
     - weighted.fst -> weighted.fst.matrix for the complete Fst matrix
     - weighted.fst only output the average Fst (Weir&Hill 2002)
NEW: stats:
     - [adlt./off.]fstWC: Weir&Cockerham (1984) Fst estimate (theta)
CHG: output format for deleterious mutation genotypes changed
NEW: added genotype file reader for ntrl and delet traits

Framework:
CHG: SimComponent, LifeCycleEvent, Param, and ParamSet interfaces have
     changed, check the doc!
NEW: added the ParamUpdater, UpdaterService, etc.
CHG: SimManager change to SIMenv
CHG: the replicate and cycle loops have moved to the SimRunner
CHG: too many to list them all, check the source, and please report bugs!


-=========================================================================-
N E M O v2.0.7 [10 Mar 2008]
Bug Fixes:
FIX: in propagule dispersal, propagule patch could be assigned to self
FIX: in partial selfing with random mating, the same individual could
     still be chosen with probability 1/N when chosing a mate.

User level:
NEW: parameter name expansion possible in all string arguments
     throughout the init file, not limited to the filename anymore.
NEW: stat option in pop stats: migrant.perpatch
NEW: Nei's D added to neutral markers' stats
NEW: more mutation effects distributions for deleterious mutations
     (gamma & log-normal)
CHG: mutation parameters for deleterious mutations
CHG: two mutation models for deleterious mutations (checked/un-checked
     algorithms)
CHG: stat options for deleterious mutations and neutral markers (more
     age-specific options)
CHG: stats are now automatically saved for the first and last generations
NEW: viability_selection LCE, base class for selection LCEs, defines the
     basic selection models and parameters.
NEW: composite LCE:
     - breed_disperse: based on breed and disperse, allows for constant
       population sizes (no demographic stochasticity) and backward
       migration (columns of dispersal matrix must sum to one)
     - breed_selection: base on breed and viability_selection, performs
       viability selection on the offspring, faster than having breed
       followed by viability_selection in the life cycle.
     - breed_selection_disperse: inherits from the two previous
       composite LCEs, and thus from breed, disperse and
       viability_selection as well. Fastest algorithm to perform 
       viability selection at the same time as breeding and dispersal 
       provided the mean fitness is high. See manual for details.
CHG: in breed LCE:
     - fecundity models: fixed mean (all females have same fecundity) or
       drawn from Poisson or Gaussian distro
     - sex ratio models: fixed or random
     - added new mating system no.6: random mating with hermaphrodites,
       an individual will self with probability 1/N (Wright-Fisher
       model)
CHG: in disperse_evoldisp, evolution of dispersal rate can be limited to
     one sex only while the other one disperses at a constant rate
CHG: in aging, affects all age classes! Thus also moves the offspring to
     the adult age class. Must be placed after disperse in the life 
     cycle to get any migration!!
CHG: in regulation, acts on the adult age class only
CHG: in extinction:
     - allows for partial extinction, i.e. harvesting of the population
       where only a portion of the individuals are removed randomly
     - added extinction threshold and patch-specific rates of
       extinction/harvesting
     - the harvesting sizes can be drawn from different random
       distributions

Framework:
CHG: many changes in most LCEs and in base classes as well, check the
CVS server.

-=========================================================================-
N E M O v2.0.6 [06 Jun 2007]
Bug Fixes:
FIX: in recombination of the neutral markers, first locus
     not properly set.
FIX: number of fixed neutral mutations were not correctly
     computed.
FIX: patch age counter was not correctly set between
     replicates.

User level:
NEW: block comments in init file (manual p10)
NEW: sequential matrix arguments (manual p11)
NEW: format argument for name expansion of the sequential
     parameter values (manual p13)
NEW: the patch-specific and locus-specific Fst values can be
     saved to a separate file (manual p33)
CHG: renamed "ntrl_genot_dir" and "ntrl_genot_logtime" to
     "ntrl_output_dir" and "ntrl_output_logtime" (manual pp33-34)
CHG: in FSTAT output file, added patch of origin of the
     individuals (manual pp34-35)
CHG: individuals are now drawn without replacement from the
     source population when the population is loaded in
     non-preserve mode.

Framework:
CHG: in the way the neutral marker sequence is coded, allows
     for faster recombination algorithm.

-=========================================================================-
N E M O v2.0.5 [09 Apr 2007]
Bug Fixes:
FIX: heterosis not correctly computed due to brocken code in v2.0.4
FIX: nested root directory when existing filename is reset by user at
     runtime 
FIX: stat output file corruption with pop extinction in v2.0.4
FIX: pop extinction if the 'aging' LCE is placed after the 'disperse'
     LCE, this is fixed
FIX: the argument values of parameter 'ntrl_init_model' were reversed
     compared to doc values

User level:
ADD: pop specific Fst stats (within and between patches), see manual p33!
CHG: in FSTAT output file, last column of dataset contains pedigree class
     instead of ID number. Added "locus" names for the three last columns,
     check doc pp32-33.
CHG: the use of the 'disperse_onepatch' LCE is deprecated from now on
CHG: in the way the age classes are used, check manual section 2.3

Framework:
CHG: Handler::init() now returns void, was bool before.
CHG: in LCE_Disperse and LCE_Regulation, individuals are put back in the
     offspring containers after dispersal. Regulation moves individuals from 
     offspring to adult age class. Migrant counters set in dispersal classes
     not regulation one.
ADD: more functionalities in TMatrix. Moved code out of param.h to tmatrix.h.
ADD: metapop::flush() family of functions
ADD: in Individual: added matings and realized fecundities accessors.
CHG: FileHandler::init() split into init() and ifExists().

-=========================================================================-
N E M O v2.0.4 [21 Mar 2007]
Bugfixes:
FIX: number of lethal equivalents were incorrectly computed under the
     continous model for the deleterious mutations trait (bug since
     version 2.0.1).
FIX: bad values for viabilities computed for the deleterious mutations
     trait under the continous model (since version 2.0.2).
FIX: performance improvment of recombination algorithm of the
     deleterious mutations, includes fast free recombination as found in
     version 2.0.1.
FIX: the deleterious mutations effect and dominance values now set from
     binary source file when loading a pop from a source file under the
     continous model.
FIX: output stats for the option "popperpatch" were wrong in version
     2.0.3.
FIX: crash when "dispersal_matrix" was specified.
FIX: dispersal matrix for lattice model 2 (reflective) is now properly set.
FIX: in user manual, comment about the meaning of the "mating_proportion" 
     parameter might have been misleading, check it out!

User level:
ADD: "root_dir" and "random_seed" params in simulation component.
ADD: "ntrl_init_model" param in the neutral trait (see doc for details).
ADD: cloning mating system in the breed LCEs ("mating_system" option 5).
ADD: "survival" stats option for the deleterious mutations trait.
ADD: stat "patch.avrg.age" in stat option "pop" and "age.patchi" in
     "popperpatch".
CHG: the replicate stat output file (".txt") is now written at the end of 
     each replicate (in append mode) not at the end of the simulation.
CHG: "dispersal_matrix" parameter now has precedence over the "dispersal_
     model" and "dispersal_rate" parameters. "dispersal_model" is not a 
     mandatory parameter anymore.
CHG: in the install procedure, the makefile is set to build the executable
     only. The library may be built separately with `make lib'.

Framework:
ADD: template classes for stats and files handlers: Even/TraitStatHandler
     and Event/TraitFileHandler.
CHG: for clarity, some members of the (Event/Trait)Stat/FileHandler 
     classes have been renamed with the _SH/_FH prefix (e.g. 
     _FHLinkedTrait and _FHLinkedTraitIndex for _theTrait and _TTidx).
CHG: LifeCycleEvent::_linkedTraitIndex and LifeCycleEvent::_linkedTraitType
     have been renamed to LifeCycleEvent::_LCELinkedTraitIndex and 
     LifeCycleEvent::_LCELinkedTraitType.
CHG: extended TMatrix design (in param.h), some renaming as well 
     (set->reset). Uses the GSL to set and get to/from a GSL matrix and 
     invert the matrix.
CHG: class Patam does not have a TMatrix* member anymore. Funcs get_matrix 
     and parse_matrix require a TMatrix* argument now, this prevents 
     potential memory leaks.
CHG: modified the init procedure of the random generator; done through 
     RAND::init().
CHG: in file services and handlers due to addition of root_dir.
CHG: in Individual; replaced _isSelfed by _pedigreeClass with five 
     pedigree classes. Changed matings and realized fecundity counters 
     accordingly. Added setter and getter.
CHG: in Patch; removed DeadDispers and DeadOffsprg counters. Added age tag 
     of a patch = time since last extinction (set in LCE_Aging::execute()).
CHG: in IndFactory; added purgeRecyclingPOOL(), added accessor to trait 
     prototypes. The individual pedigree class is now set in 
     makeNewIndividual (was previously set in makeOffsprg).
CHG: moved LCE_StatFH funcs from filehandler.cc to LCEmisc.cc
CHG: moved bitstring class declaration and definitions out of 
     ttdeletmutation_bitstring.h
CHG: renaming of the mating functions in LCEbreed.h
