Skip to content

pedtools 2.2.0

Compare
Choose a tag to compare
@magnusdv magnusdv released this 05 Jun 06:44
· 118 commits to master since this release

New features

  • plot.ped() gains new arguments fill, lty, lwd and hatchDensity.

  • The pedprobr function setMutationModel() has been moved to pedtools and renamed to setMutmod(). Unlike its predecessor, this has a new argument update, allowing to update existing models (i.e., leaving unspecified parameters unchanged) instead of creating new models from scratch.

  • generations() have been rewritten, with a new parameter what controlling what the function computes: Possible values of what are "max" (default; return only the number of generations in the pedigree), "compMax" (if pedigree has several components, return the generation number of each), "indiv" (individual generation numbering as in the plot) or "depth" (individual generation numbering defined by length of the longest chain up to a founder).

  • In swapSex() and setSex(), the ids parameter may now be the name of a selector function operating on the input pedigree. This is convenient when piping; for example, x |> setSex(ids = leaves, sex = 0) sets unknown sex for all leaves of x.

  • print.ped() is more pipe-friendly, returning the ped object invisibly (not the data frame, as before).

  • addMarker() gains argument locusAttr.

Bug fixes

  • Fixed a bug in randomPed(), which caused the function to run out of mating options sometimes.

  • The pedigree plot alignment fails in some cases (see mayoverse/kinship2#13). When this happens the plot method reverts to DAG mode and gives a warning.