Getting data into and out of programs, while extremely important to end-users, is often challenging. PyPedal is able to load pedigrees from, and save them to, from a number of different sources. A list of supported input and output methods may be found in Table 4.1.
It has evolved over time that the input methods are implemented as cases of "pedsource" in the NewPedigree::load() method, while output methods are implemented as individual methods of NewPedigree. While it is quite straightforward to add new methods for pedigree output, it is trickier to add new input sources. The greater difficulty in adding new input sources is largely attributable to the mysterious workings of the NewPedigree::preprocess() method, which walks through input line-by-line to load the pedigree and perform a number of integrity checks. Once the data are loaded into a NewPedigree object it is easy to output them because there is no need to check the integrity of the pedigree and relationships among the records in the pedigree. If you want to implement a new input source the sanity-saving way to go is to get the data into a list that you can pass to preprocess(); preprocess() can then walk the list as it would walk through the lines of an input file.
PyPedal input and output methods.
Direction & Source & Description
Database operations are discussed in their own section at the end of this chapter.
See About this document... for information on suggesting changes.