Public Member Functions | |
def | __init__ |
__init__() initializes an Animal() object. | |
def | printme |
printme() prints a summary of the data stored in the Animal() object. | |
def | stringme |
stringme() returns a summary of the data stored in the Animal() object as a string. | |
def | trap |
trap() checks for common errors in Animal() objects | |
def | pad_id |
pad_id() takes an Animal ID, pads it to fifteen digits, and prepends the birthyear (or 1950 if the birth year is unknown). | |
Public Attributes | |
animalID | |
renumberedID | |
sireID | |
damID | |
gen | |
igen | |
sex | |
by | |
fa | |
founder | |
sons | |
daus | |
unks | |
paddedID | |
ancestor | |
name | |
breed | |
alleles | |
pedcomp | |
age | |
alive |
A simple class to hold animals records read from a pedigree file.
Definition at line 34 of file pyp_classes.py.
def PyPedal::pyp_classes::Animal::__init__ | ( | self, | ||
animalID, | ||||
sireID, | ||||
damID, | ||||
gen = '0' , |
||||
by = 1900 , |
||||
sex = 'u' , |
||||
fa = 0. , |
||||
name = 'u' , |
||||
alleles = ['' , |
||||
breed = 'u' , |
||||
age = -999 , |
||||
alive = -999 | ||||
) |
__init__() initializes an Animal() object.
self | Reference to the current Animal() object | |
animalID | Animal ID number | |
sireID | Sire ID number | |
damID | Dam ID number | |
gen | Generation to which the animal belongs | |
by | Birthyear of the animal | |
sex | Sex of the animal (m|f|u) | |
fa | Coefficient of inbreeding of the animal | |
name | Name of animal | |
alleles | A two-element array of strings, which represent allelotypes. | |
breed | Breed of animal | |
age | Age of animal | |
alive | Status of animal (alive or dead) |
Initialize an animal record.
Definition at line 53 of file pyp_classes.py.
def PyPedal::pyp_classes::Animal::printme | ( | self | ) |
printme() prints a summary of the data stored in the Animal() object.
self | Reference to the current Animal() objectPrint the contents of an animal record - used for debugging. |
Definition at line 91 of file pyp_classes.py.
def PyPedal::pyp_classes::Animal::stringme | ( | self | ) |
stringme() returns a summary of the data stored in the Animal() object as a string.
self | Reference to the current Animal() objectReturn the contents of an animal record as a string. |
Definition at line 119 of file pyp_classes.py.
def PyPedal::pyp_classes::Animal::trap | ( | self | ) |
trap() checks for common errors in Animal() objects
self | Reference to the current Animal() objectTrap common errors in pedigree file entries. |
Definition at line 167 of file pyp_classes.py.
def PyPedal::pyp_classes::Animal::pad_id | ( | self | ) |
pad_id() takes an Animal ID, pads it to fifteen digits, and prepends the birthyear (or 1950 if the birth year is unknown).
The order of elements is: birthyear, animalID, count of zeros, zeros.
self | Reference to the current Animal() object |
Take an Animal ID, pad it to fifteen digits, and prepend the birthyear (or 1950 if the birth year is unknown)
Definition at line 185 of file pyp_classes.py.