Many functions (both in nadiv and from other programs) dealing with
pedigrees must first sort a pedigree such that individuals appear in the ID
column in rows preceding where they appear in either the Dam or Sire
column. Further, these functions and programs require that all individuals
in the dam and sire columns of a pedigree also have an entry in the ID
column. This function easily prepares data sets to accommodate these
requirements using a very fast topological sorting algorithm.
NOTE: more columns than just a pedigree can be passed in the pedigree
argument. In the case of missing founders, these columns are given NA
values for all rows where founders have been added to the pedigree. The
entire object supplied to pedigree
is ordered, ensuring that all
information remains connected to the individual
Missing parents (e.g., base population) should be denoted by either 'NA',
'0', or '*'.
When a non-null argument is given to gender
, dams without an entry in
the ID column (that are subsequently added to the pedigree) are given the
gender designated for other dams (and similarly for sires).
The check
argument performs checks on the format of the pedigree
supplied to try and identify any issues regarding the notation of missing
values and validity of the basic pedigree for further processing.