3.2 The PyPedal Object Model

At the heart of PyPedal are four different types of objects. These objects combine data and the code that operate on those data into convenient packages. Although most PyPedal users will only work directly with one or two of these objects it is worthwhile to know a little about each of them. An instance of the NewPedigree class stores a pedigree read from an input file, as well as metadata about that pedigree. The pedigree is a Python list of NewAnimal objects. Information about the pedigree, such as the number and identity of founders, is contained in an instance of the PedigreeMetadata class.

The fourth PyPedal class, NewAMatrix, is used to manipulate numerator relationship matrices (NRM). When working with large pedigrees it can take a long time to compute the elements of a NRM, and having an easy way to save and restore them is quite convenient.

PyPedal also provides LightAnimal and SimAnimal objects. LightAnimals are intended for use with the graph theoretic routines provided in pyp_network and lack many of the attributes of NewAnimal objects, such as names, breeds, and alleleotypes. SimAnimals are intended for internal use only by the pedigree simulation routines.

A detailed explanation of each class is provided in Chapter 6.

See About this document... for information on suggesting changes.