PyPedal::pyp_io Namespace Reference


Functions

def a_inverse_to_file
def a_inverse_from_file
def dissertation_pedigree_to_file
def dissertation_pedigree_to_pedig_format
def dissertation_pedigree_to_pedig_interest_format
def dissertation_pedigree_to_pedig_format_mask
def pyp_file_header
def pyp_file_footer
def renderTitle
def renderBodyText
def pickle_pedigree
def unpickle_pedigree
def summary_inbreeding
def save_ijk
def load_from_gedcom
def save_from_gedcom
def save_to_gedcom


Function Documentation

def PyPedal::pyp_io::a_inverse_from_file (   inputfile  ) 

a_inverse_from_file() uses the Python pickle system for persistent objects to read the inverse of a relationship matrix from a file.

Parameters:
inputfile The name of the input file.
Returns:
The inverse of a numerator relationship matrix. matrix
Use the Python pickle system for persistent objects to read the inverse of a relationship matrix from a file.

Definition at line 80 of file pyp_io.py.

def PyPedal::pyp_io::a_inverse_to_file (   pedobj,
  ainv = '' 
)

a_inverse_to_file() uses the Python pickle system for persistent objects to write the inverse of a relationship matrix to a file.

Parameters:
pedobj A PyPedal pedigree object.
filetag A descriptor prepended to output file names.
Returns:
True (1) on success, false (0) on failure integer
Use the Python pickle system for persistent objects to write the inverse of a relationship matrix to a file.

Definition at line 51 of file pyp_io.py.

def PyPedal::pyp_io::dissertation_pedigree_to_file (   pedobj  ) 

dissertation_pedigree_to_file() takes a pedigree in 'asdxfg' format and writes is to a file.

Parameters:
pedobj A PyPedal pedigree object.
Returns:
True (1) on success, false (0) on failure integer
dissertation_pedigree_to_file() takes a pedigree in 'asdxfg' format and writes is to
a file.

Definition at line 102 of file pyp_io.py.

def PyPedal::pyp_io::dissertation_pedigree_to_pedig_format (   pedobj  ) 

dissertation_pedigree_to_pedig_format() takes a pedigree in 'asdbxfg' format, formats it into the form used by Didier Boichard's 'pedig' suite of programs, and writes it to a file.

Parameters:
pedobj A PyPedal pedigree object.
Returns:
True (1) on success, false (0) on failure integer
dissertation_pedigree_to_pedig_format() takes a pedigree in 'asdbxfg' format, formats
it into the form used by Didier Boichard's 'pedig' suite of programs, and writes it
to a file.

Definition at line 134 of file pyp_io.py.

def PyPedal::pyp_io::dissertation_pedigree_to_pedig_format_mask (   pedobj  ) 

dissertation_pedigree_to_pedig_format_mask() Takes a pedigree in 'asdbxfg' format, formats it into the form used by Didier Boichard's 'pedig' suite of programs, and writes it to a file. THIS FUNCTION MASKS THE GENERATION ID WITH A FAKE BIRTH YEAR AND WRITES THE FAKE BIRTH YEAR TO THE FILE INSTEAD OF THE TRUE BIRTH YEAR. THIS IS AN ATTEMPT TO FOOL PEDIG TO GET f_e, f_a et al. BY GENERATION.

Parameters:
pedobj A PyPedal pedigree object.
Returns:
True (1) on success, false (0) on failure integer
dissertation_pedigree_to_pedig_format_mask() Takes a pedigree in 'asdbxfg' format,
formats it into the form used by Didier Boichard's 'pedig' suite of programs, and
writes it to a file.  THIS FUNCTION MASKS THE GENERATION ID WITH A FAKE BIRTH YEAR
AND WRITES THE FAKE BIRTH YEAR TO THE FILE INSTEAD OF THE TRUE BIRTH YEAR.  THIS IS
AN ATTEMPT TO FOOL PEDIG TO GET f_e, f_a et al. BY GENERATION.

Definition at line 198 of file pyp_io.py.

def PyPedal::pyp_io::dissertation_pedigree_to_pedig_interest_format (   pedobj  ) 

dissertation_pedigree_to_pedig_interest_format() takes a pedigree in 'asdbxfg' format, formats it into the form used by Didier Boichard's parente program for the studied individuals file.

Parameters:
pedobj A PyPedal pedigree object.
Returns:
True (1) on success, false (0) on failure integer
dissertation_pedigree_to_pedig_interest_format() takes a pedigree in 'asdbxfg' format,
formats it into the form used by Didier Boichard's parente program for the studied
individuals file.

Definition at line 167 of file pyp_io.py.

def PyPedal::pyp_io::load_from_gedcom (   infilename,
  messages = 'verbose',
  standalone = 1,
  missing_sex = 'u',
  missing_parent = 0,
  missing_name = 'Unknown Name',
  missing_byear = '0001',
  debug = 0 
)

load_from_gedcom() reads and parses pedigree data that conform to a subset of the GEDCOM 5.5 specification. Not all valid GEDCOM are supported; unsupported tags are ignored.

Parameters:
infilename The file to which the matrix should be written.
messages Controls output to the screen
standalone Uses logging if called by a NewPedigree method
missing_sex Value assigned to an animal with unknown sex
missing_parent Value assigned to unknown parents
missing_name Name assigned by default
missing_byear VAlue assigned to unknown birth years
debug Flag turning debugging messages on (1) and off (0)
Returns:
A save status indicator (0: failed, 1: success). integer
load_from_gedcom() reads and parses pedigree data that conform to
a subset of the GEDCOM 5.5 specification. Not all valid GEDCOM
are supported; unsupported tags are ignored.

Definition at line 464 of file pyp_io.py.

def PyPedal::pyp_io::pickle_pedigree (   pedobj,
  filename = '' 
)

pickle_pedigree() pickles a pedigree.

Parameters:
pedobj An instance of a PyPedal pedigree object.
filename The name of the file to which the pedigree object should be pickled (optional).
Returns:
A 1 on success, a 0 otherwise. integer
pickle_pedigree() pickles a pedigree.

Definition at line 332 of file pyp_io.py.

def PyPedal::pyp_io::pyp_file_footer (   ofhandle,
  caller = "Unknown PyPedal routine" 
)

pyp_file_footer() writes a footer to a page of PyPedal output.

Parameters:
ofhandle A Python file handle.
caller A string indicating the name of the calling routine.
Returns:
None
pyp_file_footer() writes a footer to a page of PyPedal output.

Definition at line 285 of file pyp_io.py.

def PyPedal::pyp_io::pyp_file_header (   ofhandle,
  caller = "Unknown PyPedal routine" 
)

pyp_file_header() writes a header to a page of PyPedal output.

Parameters:
ofhandle A Python file handle.
caller A string indicating the name of the calling routine.
Returns:
None
pyp_file_header() writes a header to a page of PyPedal output.

Definition at line 269 of file pyp_io.py.

def PyPedal::pyp_io::renderBodyText (   text_string  ) 

renderBodyText() renders page contents (produces HTML output by default).

renderBodyText() renders page contents (produces HTML output by default).

Definition at line 314 of file pyp_io.py.

def PyPedal::pyp_io::renderTitle (   title_string,
  title_level = "1" 
)

renderTitle() renders page titles (produces HTML output by default).

renderTitle() renders page titles (produces HTML output by default).

Definition at line 296 of file pyp_io.py.

def PyPedal::pyp_io::save_from_gedcom (   outfilename,
  assembled 
)

save_from_gedcom() takes pedigree data parsed by load_from_gedcom() and writes it to a text file in an ASD format that PyPedal can easily read.

Parameters:
outfilename The file to which the matrix should be written.
fam2ids Dictionary mapping family IDs to parents and offspring
missing_parent Value assigned to unknown parents
id2name Dictionary mapping IDs to names
id2birth Dictionary mapping IDs to birth years
Returns:
A string containing the pedigree format code. 'xxxx' if there was a problem. string
save_from_gedcom() takes pedigree data parsed by load_from_gedcom() and
writes it to a text file in an ASD format that PyPedal can easily read.

Definition at line 670 of file pyp_io.py.

def PyPedal::pyp_io::save_ijk (   pedobj,
  nrm_filename 
)

save_ijk() saves an NRM to a file in the form "animal A" "animal B" "rAB".

@type pedobj: NewPedigree object
@param pedobj: The pedigree to which the NRM is attached
@type nrm_filename: string
@param nrm_filename: The file to which the matrix should be written.
@rtype: integer
@return: A save status indicator (0: failed, 1: success).

Definition at line 424 of file pyp_io.py.

def PyPedal::pyp_io::save_to_gedcom (   pedobj,
  outfilename 
)

save_to_gedcom() writes a PyPedal NewPedigree object to a file in GEDCOM 5.5 format.

Parameters:
pedobj An instance of a PyPedal NewPedigree object
filename The file to which the matrix should be written
Returns:
A save status indicator (0: failed, 1: success). integer
save_to_gedcom() writes a PyPedal NewPedigree object to a file in
GEDCOM 5.5 format.

Definition at line 702 of file pyp_io.py.

def PyPedal::pyp_io::summary_inbreeding (   f_metadata  ) 

summary_inbreeding() returns a string representation of the data contained in the 'metadata' dictionary contained in the output dictionary returned by pyp_nrm/pyp_inbreeding().

Parameters:
f_metadata Dictionary of inbreeding metadata.
Returns:
A string on success, a 0 otherwise. string
summary_inbreeding() returns a string representation of the data contained in
the 'metadata' dictionary contained in the output dictionary returned by
pyp_nrm/pyp_inbreeding().

Definition at line 397 of file pyp_io.py.

def PyPedal::pyp_io::unpickle_pedigree (   filename = ''  ) 

unpickle_pedigree() reads a pickled pedigree in from a file and returns the unpacked pedigree object.

Parameters:
filename The name of the pickle file.
Returns:
An instance of a NewPedigree object on success, a 0 otherwise. object
unpickle_pedigree() reads a pickled pedigree in from a file and returns the unpacked
pedigree object.

Definition at line 362 of file pyp_io.py.


Generated on Fri Mar 28 14:34:59 2008 for PyPedal by  doxygen 1.5.3