PyPedal::pyp_newclasses::LightAnimal Class Reference

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

List of all members.

Public Member Functions

def __init__
 __init__() initializes a LightAnimal() object.
def printme
 printme() prints a summary of the data stored in the LightAnimal() object.
def stringme
 stringme() returns a summary of the data stored in the LightAnimal() object as a string.
def dictme
 dictme() returns a summary of the data stored in the NewAnimal() object as a dictionary.
def trap
 trap() checks for common errors in LightAnimal() 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).
def string_to_int
 string_to_int() takes an Animal/Sire/Dam ID as a string and returns a hash.

Public Attributes

 animalID
 originalID
 sireID
 damID
 sex
 by
 paddedID


Detailed Description

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

It is a much simpler object than the NewAnimal() object and is intended for use with the graph theoretic routines in pyp_network. The only attributes of these objects are: animal ID, sire ID, dam ID, original ID, birth year, and sex.

The LightAnimal() class holds animals records read from a pedigree file. It
is a much simpler object than the NewAnimal() object and is intended for use
with the graph theoretic routines in pyp_network. The only attributes of these
objects are: animal ID, sire ID, dam ID, original ID, birth year, and sex.A simple class to
hold animals records read from a pedigree file.

Definition at line 2069 of file pyp_newclasses.py.


Member Function Documentation

def PyPedal::pyp_newclasses::LightAnimal::__init__ (   self,
  locations,
  data,
  mykw 
)

__init__() initializes a LightAnimal() object.

Parameters:
locations A dictionary containing the locations of variables in the input line.
data The line of input read from the pedigree file.
Returns:
An instance of a LightAnimal() object populated with data object
__init__() initializes a LightAnimal() object.

Definition at line 2083 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::LightAnimal::printme (   self  ) 

printme() prints a summary of the data stored in the LightAnimal() object.

Parameters:
self Reference to the current LightAnimal() object
Print the contents of an animal record - used for debugging.

Definition at line 2137 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::LightAnimal::stringme (   self  ) 

stringme() returns a summary of the data stored in the LightAnimal() object as a string.

Parameters:
self Reference to the current LightAnimal() object
Return the contents of an animal record as a string.

Definition at line 2153 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::LightAnimal::dictme (   self  ) 

dictme() returns a summary of the data stored in the NewAnimal() object as a dictionary.

Parameters:
self Reference to the current NewAnimal() object
Return the contents of an animal record in a dictionary.

Definition at line 2172 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::LightAnimal::trap (   self  ) 

trap() checks for common errors in LightAnimal() objects

Parameters:
self Reference to the current LightAnimal() object
Trap common errors in pedigree file entries.

Definition at line 2192 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::LightAnimal::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 LightAnimal() 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 1900
if the birth year is unknown).  The order of elements is: birthyear, animalID,
count of zeros, zeros.

Definition at line 2211 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::LightAnimal::string_to_int (   self,
  idstring,
  mymaxint = 9223372036854775807 
)

string_to_int() takes an Animal/Sire/Dam ID as a string and returns a hash.

Convert a string to an integer.

Definition at line 2230 of file pyp_newclasses.py.


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

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