Skip to content

genomicSimulation v0.3

Latest

Choose a tag to compare

@vllrs vllrs released this 25 Jul 06:44

Highlights:

  • Improved local GEBV and GEBV calculation
  • Improved selection of options to see simulation data in R
  • Improved consistency in parameter and function names (old names are still available, for backwards compatibility)
  • Overhauled package vignette

This release would be v0.2.7 in the old numbering scheme, but the numbering scheme is being simplified.

New Features

  • see.optimal.haplotype and see.optimal.possible.haplotype now accept an extra optional parameter unknown.allele, which will be used to represent the optimal allele at markers where there are no known marker effects and so no way to judge which allele is optimal.
  • Added functions see.genetic.map and see.marker.effects which allow the user to view the data behind a MapID or an EffectID as a dataframe in the R environment. (genomicSimulation used to have a private function called send.map. It has been converted into see.genetic.map)
  • genomicSimulation now stores chromosome names in full. These can be seen in the output of see.genetic.map.
  • Added functions change.eff.set.centres and change.eff.set.centres.of.allele, which allow the user to define centring values that will be subtracted from the breeding value contribution of alleles at a particular marker. change.eff.set.centres.of.allele, in particular, is designed for GBLUP marker effects, which should have an allele-frequency factor subtracted from allele counts before they are multiplied to marker effects to get the estimated breeding value.
  • Added functions create.markerblocks and create.markerblocks.from.chrsplit, as well as the corresponding see.markerblocks.
  • Added functions see.local.GEBVs and save.local.GEBVs, which take as input a MarkerBlocks object created by create.markerblocks or similar. The old local GEBV functions save.local.GEBVs.blocks.from.file and save.local.GEBVs.blocks.from.chrsplit are still functional, but now use see.local.GEBVs under the hood.
  • Added function see.GEBVs, for symmetry with see.local.GEBVs. It is a simple wrapper around see.group.data.

Improvements

  • Small improvements in speed of breeding value calculation.
  • save., change. and delete. functions no longer return anything. They used to return 0L.
  • Improved consistency in default parameters for group numbers, map IDs, and effect set IDs. The default value for map ID and effect ID parameters everywhere is now 0, which is interpreted as the oldest currently-active genetic map/marker effect set in the simulation. The default value for group numbers is NA, and (across all functions that take group numbers) NA and 0 are both interpreted as requesting all candidates in the simulation rather than only a specific group. (Not all functions accept requests to use all candidates in the simulation. For those that do not, a 0 or NA group number will still throw an error.)
  • Warnings are now displayed as regular printed output statements that begin with "NOTE! ", rather than as R warning(). This choice comes from a few experiences debugging simulations running in remote environments, where the process was made much more difficult by the fact that warnings were hidden until catastrophic failure.
  • Function names delete.map and delete.effects are now available, to match load.map and load.effects. (The previous deletion function names, delete.recombination.map and delete.effect.set, are still available for backwards compatibility)
  • Functions that accept map1/map2 and cap1/cap2 parameters now also accept map, if neither map1 nor map2 are set, and cap, if neither cap1 or cap2 are set.

Bug Fixes

  • Fix a bug in create.markerblocks.from.chrsplit where too many markers would be allocated to the last block because genetic distances were being cumulatively summed even though they were already cumulative values.
  • SimData.n_groups is no longer decremented if a call is made to delete.group for a group number with zero members (a nonexistent group). While this did not cause errors, it did cause a warning to be shown when calling see.existing.groups.
  • Fix a bug where founder alleles would be blank if a genetic map had been created from the markers in the genotype file during the load.data call.
  • Fix a crash in see.genetic.map when trying to view a genetic map created during a load.data call from the markers in the genotype file.
  • Fix a crash occuring in many simulation functions if they were run after a load.data call where a genotype file was provided, but the genotype file could not be opened or contained zero genotypes.