PyPedal::pyp_classes::Animal Class Reference

The Animal() class is holds animals records read from a pedigree file. More...

List of all members.

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


Detailed Description

The Animal() class is holds animals records read from a pedigree file.

A simple class to hold animals records read from a pedigree file.

Definition at line 34 of file pyp_classes.py.


Member Function Documentation

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.

Parameters:
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)
Returns:
An instance of an Animal() object populated with data object
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.

Parameters:
self Reference to the current Animal() object
Print 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.

Parameters:
self Reference to the current Animal() object
Return 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

Parameters:
self Reference to the current Animal() object
Trap 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.

Parameters:
self Reference to the current Animal() object
Returns:
A padded ID number that is supposed to be unique across animals integer
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.


The documentation for this class was generated from the following file:

Generated on Thu May 1 12:33:43 2008 for PyPedal by  doxygen 1.5.5