Skip to content

Releases: magnusdv/pedtools

pedtools 2.10.0

01 Feb 16:36

Choose a tag to compare

  • New function addSibling() for adding a sibling to an existing pedigree member.

  • New function isHomozygous() for finding and counting homozygous genotypes in the marker data.

  • New function sameGenotype() for finding and counting markers for which two individuals have the same genotype.

  • New functions expectedHomozygosity() and expectedHeterozygosity() for computing these quantities from allele frequencies (or marker objects).

  • Extracting sub-pedigrees with subset() is now more flexible, allowing disconnected outputs. It also has a new argument missingParents controlling how to handle parents that are not included in the subset.

  • The branch() behaves more intuitively thanks to the improved subset.ped().

  • alleles(x, marker) now accepts multiple markers at once, returning a list of character vectors.

Other

  • father(x, id) and mother(x, id) now output NA when id is a founder in x. (Previously this gave character(0).)

pedtools 2.9.0

28 Oct 07:21

Choose a tag to compare

New features

  • New function extractSingletons().

  • mergePed() can now merge pedigrees with marker data.

  • New function removeGenotypes(), equivalent to (but more intuitive than) setAlleles(..., alleles = 0).

  • getGenotypes() gains argument Xchrom to be used when it is known in advance that all/none markers are on X.

Minor fixes

  • harmoniseMarkers() now checks all marker attributes.
  • In setFounderInbreeding(), supplying values with a named vector now works as intended.
  • getGenotypes is more efficient in cases with many markers.

pedtools 2.8.2

13 Jul 13:02

Choose a tag to compare

  • Extend setSNPs() to handle genotype columns. (Previously, this function could only attach empty SNPs.)

  • Update the default chromosome lengths used in distributeMarkers(), syncing with updates in ibdsim2.

  • New pedigree plot argument proband for adding arrows to selected pedigree members.

  • New plot argument straight for (attempting to use) straight connectors in pedigree plots.

Minor fixes

  • Add debug option for auto-scaling, avoiding excessive messages.
  • Optimise removal of mutation models with setMutmod(..., model = NULL).
  • Allow to remove marker maps with setMap(x, map = NULL).

pedtools 2.8.1

29 Apr 17:24

Choose a tag to compare

New features

  • New function trim() for iterative removal of uninformative (for instance: untyped) pedigree leaves.

  • New function nChildren() returning the number of children for one of more pedigree members.

  • findLoopBreakers() is significantly faster in large pedigrees, due to code improvements in inbreedingLoops().

Other

  • Fixed bug in removeIndividuals() resulting in ill-formed ped lists in some cases.
  • Brush up documentation

pedtools 2.8.0

27 Jan 07:05

Choose a tag to compare

Breaking changes

  • Pedtools previously included igraph in the Suggests field, for the sole purpose of finding loop breakers in pedigrees with marriage loops (in breakLoops()). This functionality has now been replaced with a custom implementation, allowing to drop the igraph dependency. The new method is slightly faster than the previous, but it may select different loop breakers in some cases.

New features

  • New plot argument miscarriage for indicating miscarriages as triangles.

  • New function harmoniseMarkers().

  • New functions niblings() (= nephews & nieces) and piblings() (= aunts & uncles, i.e. siblings of parents).

  • getLocusAttributes() gains argument simplify.

  • In getGenotypes(), allow ids to be a function.

Other

  • Improved error messages in father(), mother() etc.
  • Better handling of ped lists in father(), mother() etc.
  • Remove deprecated offspring(). Use children() instead.

pedtools 2.7.1

08 Sep 12:02

Choose a tag to compare

New features

  • New function swapGenotypes() for swapping the genotypes of two individuals.

  • New plot argument line.main for title placement.

  • cousinPed() and halfCousinPed() gain argument symmetric, which if TRUE gives a symmetric shape when plotted (female line on the left side; male line of the right).

pedtools 2.7.0

28 Jun 12:26

Choose a tag to compare

New features

  • plot.ped() gains a new argument, spouseOrder, to specify the display order of spouses.

  • readPed() and as.ped() now include a addMissingFounders argument, supporting pedigree files where (some or all) founders are not explicitly listed (i.e., entries in the fid or mid columns that do not appear in the id column).

  • readPed() and as.ped() now also feature a sexCodes argument, accommodating pedigree files where sex is indicated by codes other than the standard 0 (unknown), 1 (male), 2 (female).

  • reorderPed() has improved flexibility, allowing the reordering of a subset of the pedigree.

  • selfingPed() now accepts a vector of ID labels as the first argument. (Previously, only the number of selfings could be given.)

  • The plotting argument showEmpty, controlling the appearance of missing genotypes, now accepts a function, e.g. leaves().

Other changes

  • getComponent() behaves better when the pedigree has only one component.

  • ped() checks for illegal sex entries earlier than before, thus avoiding certain (rare) problems.

  • Brush up on code and documentation.

pedtools 2.6.0

01 Apr 16:02

Choose a tag to compare

This is a large release with several new features, including a few (relatively minor) breaking changes.

Breaking changes

  • In pedigree plots, long labels are now automatically folded to an approximate width of 12 characters by default. Use the new argument foldLabs to adjust the folding width, or to switch off folding (foldLabs = FALSE).

  • When adding children or parents to a pedigree, the default labelling of new individuals has been simplified. The new labels are now always the smallest integers not already in use. (Previous versions used "NN_1", "NN_2", etc for pedigrees with non-numeric labels.)

  • labels(x) now always returns a character vector, also when x is a list of pedigrees. Use labels(x, unlist = FALSE) to retain the old behaviour.

New features

  • addChildren(x, ...), and its companions addSon() and addDaughter(), now works across components of x, when x is a list of pedigrees. For instance, this now works as expected: singletons(1:2, sex = 1:2) |> addSon(1:2).

  • New function addChild() is similar to addSon() and addDaughter(), but allows the sex to be set programmatically, also to sex = 0.

  • plot.ped() gains argument textAnnot allowing highly customisable text annotations around and inside pedigree symbols.

  • ancestors(), descendants(), commonAncestors() and commonDescendants() gain a new argument maxGen limiting the analysis to the given number of generations.

  • transferMarkers() gains the argument checkAttrs for checking consistency of marker attributes across pedigree components.

  • New function .setSNPfreqs() for modifying allele frequencies when all markers are biallelic. (Experimental; not yet exported.)

Bug fixes

  • addSon() and addDaughter() now fail more gracefully if a parent ID is duplicated.

  • Fixed regression error in selectMarkers().

pedtools 2.5.0

05 Nov 11:15

Choose a tag to compare

New features

  • New functions maskPed() and unmaskPed() for anonymising pedigree data, and restoring them.

  • New function setAlleleLabels() for changing the allele labels of a marker.

  • The .pedScaling() gains arguments autoScale and minsize.

  • readPed() gains argument colSkip, useful e.g., when reading .ped files with an AFF column.

  • The relabel() function for relabelling individuals now allows the argument new to be a function, taking the old labels as input. For instance, relabel(x, toupper) gives upper-case labels for everyone.

Bug fixes

  • Preserve the class attribute of MARKERS when subsetting.

pedtools 2.4.0

03 Oct 07:05

Choose a tag to compare

New features

  • The plot() method now handles general (unnested) lists of ped objects. This means that, for instance, with x = list(nuclearPed(1), cousinPed(1), singleton(1)), the command plot(x) simply works. Previously all ped lists had to be handled by plotPedList(). (This is still needed for finer control of each component, and with nested lists.)

  • nMarkers() and hasMarkers() have a new argument compwise for more detailed output for ped lists.

  • linearPed(0) now produces a singleton (instead of an error).

  • setAfreq() now automatically updates the mutation model of the affected marker, if present.

  • readFreqDatabase() now accepts frequency files using the long format of MERLIN.

  • readFreqDatabase() gains a logical argument scale1, which, if TRUE, scales all vectors to sum 1.