There are a number of identification attributes associated with animal objects in PyPedal pedigrees. A description of those fields, as well as their default values, is provided in Table 6.1. This section describes the data structures provided for mapping between various animal IDs. Table 7.1 lists the four structures provided for ID mapping and lists the default values for pedigrees with integral (asd formats) and string (ASD formats) IDs. Renumbered PyPedal pedigree objects store animal objects in a list that is typically indexed by renumbered ID. When animal IDs are strings (see 3.5.1) they are hashed to an integer and the original ID is stored in a name field. In renumbered pedigrees the original ID is stored and replaced by a renumbered ID.
7.2 Animal Identification and Cross-References
Once your pedigree is renumbered it is quite easy to see how these maps can be used to convert between various IDs. The maps mean that you don't have to worry about renumbered IDs and can continue to think about your animals in terms of their original IDs, whether they be ID numbers or names. Consider the Newfoundland pedigree presented in Figure 9.4 - it is much more convenient to think about the dog named Kaptn Kvols von Widdersdorf, rather than the dog whose name was hashed to the ID 5523557808241831142 amd renumbered to 48. For example, suppose you wanted to determine his coefficient of inbreeding. It is simple to do using the maps:
example.namemap['Kaptn Kvols von Widdersdorf'] returns the original ID assigned to the name, while example.idmap[...] converts from the original ID to the renumbered ID. This sort of ID/name mapping is sued in a number of places in PyPedal, such as in the three generation pedigree routine in the pyp_reports module.
>>> example = pyp_newclasses.loadPedigree(optionsfile='newfoundland.ini')
>>> newf_f = pyp_nrm.inbreeding(example)
>>> print newf_f['fx'][example.idmap[example.namemap['Kaptn Kvols von Widdersdorf']]]
Note that if an animal has its original ID as its name, which is the default when integral IDs and no animal names are provided, the name is changed to the renumbered ID when the pedigree is renumbered.
See About this document... for information on suggesting changes.
Animal identification and cross-references.
SPMamp; asd format
& ASD format
& Key & Value & Key & Value & Key & Value