Repository navigation
genomicSimulation v0.2.6
In brief:
Improvements to all input and output functions, to give users more control of the data they receive, as well as some bug fixes and under-the-hood improvements.
New Features
- Added ability to override the automatically detected file layout details in
load.dataandload.genotypesusing the new functiondefine.matrix.format.details, so that files whose format is incorrectly detected are not prevented from being loaded. see.group.datacan now be called with multiple groups. The results from each group will be concatenated. This allows you to replace lines likec(see.group.data(group1,"BV"),see.group.data(group2,"BV"))withsee.group.data(c(group1,group2),"BV").- When accessing candidate names using
see.group.data(i.e., for data.type = "N" or "P1" or "P2"), a missing name is no longer substituted with the candidate's pedigree ID. Instead, the name of a candidate with no name is rendered as an NA_character_. The old behaviour made it possible to accidentally pass string-typed pedigree IDs tomake.targeted.crosses, and bugs could then result frommake.targeted.crossesattempting to parse these as names. - Added ability to directly observe the pedigree IDs of parents using
see.group.datausing data.type = "P1D" or "P2D". see.group.gene.datacan now be called with multiple groups. The columns from each group will be concatenated.- Column names and row names of the matrix returned by
see.group.gene.datanow reflect genotype names and genetic marker names respectively. - Missing alleles in the matrix returned by
see.group.gene.dataare now visible (previously, they would cause issues with sometimes hiding non-missing alleles, due to being represented internally by the null character '\0'). make.targeted.crossesnow skips invalid pairings, instead of stopping execution at the first invalid pairing it finds. If any pairings were skipped, it will print a debug message listing the number of invalid pairings detected.- The orientation of the output matrix of
save.allele.countscan now be chosen, as has previously been possible only withsave.genotypes. - Save-as-you-go saving of breeding values calculated using a non-default set of marker effects is now possible. The
save.gebvparameter ofmake.-prefixed functions now takes the identifier for a marker effect set, instead of a logical value. The default behaviour (not saving any breeding values) has not changed.
Improvements
- No longer
Dependson packagefs.fsis only used if file paths are used that contain tildes~needing to be expanded to home directories. - Use of superseded progression function names (eg.
cross.combinationsformake.targeted.crosses) now produces warnings. The function names were superseded from v0.2.5 onwards. see.group.dataandsee.group.gene.datanow raise a warning, instead of an error, when there are no group members allocated to the group(s) they access.see.group.data,see.group.gene.data,delete.group, andcombine.groupsno longer raise an error when the group numbers passed are of numeric type instead of integer type. Instead, as long as the numbers are whole numbers, they perform the type conversion. Likewise,make.targeted.crossesno longer raises an error when it is passed parent indexes that are of numeric type instead of integer type, as long as the numbers are whole numbers. Likewise,make.random.crosses,make.all.unidirectional.crosses,self.n.timesandmake.doubled.haploidsno longer raise an error when the group numbers or map IDs passed are of numeric type instead of integer type, as long as the numbers are whole numbers.break.group.into.bucketsnow accepts integer bucket sizes even if they are not in R integer vector format.- Functions which accept vectors of integers (eg.
break.group.into.buckets,make.group,change.label.to.values) provide more meaningful error messages when passed a character vector instead. - Vignette and function docs edited for better clarity around compatible input file formats and function name changes made in v0.2.5
- Under-the-hood improvements and simplifications of the genotype matrix input file layout detection systems.
- Under-the-hood improvements and simplifications of the file saving output functions.
- File saving output functions with multiple possible output formats (
save.genotypes&save.pedigrees) now prefer a logical/boolean parameter to select the output format, the same way as the underlying C library does, instead of needing to memorise format strings. The old string parameters will still be accepted, so no need to modify old code. - Changed name of
startIndexparameter ofchange.label.to.valuestoskipto avoid confusion with genomicSimulation internal indexes (see.group.data(data.type="X")), which are not valid inputs to this function. The old parameter name is still accepted, so no need to modify old code. - More informative error message when calling
break.group.by.GEBVon a nonexistent group. - Clarified in documentation which progression functions accept a vector of genetic map IDs, and which only accept a single genetic map.
Bug Fixes
- In
load.dataorload.genotypes, the number of markers per genotype that were successfully loaded is now accurately reflected in the printed log messages. Previously, these functions incorrectly printed out the total number of markers in the stored genetic map while claiming it was the number of markers in the genotype file that had been accurately matched to that map. - Patched a couple of memory leaks in the underlying C library.
- Fixed a crash in
make.cloneswithinherit.names = TRUEwhen genotypes being cloned had no names. - Fix an infinite loop in
make.random.crosses.betweenwhen both groups had breeding usage caps and one of the {caps x group sizes} was exactly the number of requested offspring. - The
give.names=TRUEsetting inmake.-prefixed functions no longer adds the unexpected prefix "NA" to names when noname.prefixis specified. If noname.prefixis specified, the names given will be identical to the pedigree IDs of the genotypes.