|
|
|
A Manual for use of PyPedal
A software package for pedigree analysis |
|
|
|
11.1.1 Defining the Problem
Before you open your editor and begin writing code you need to clearly define your problem. Answering a few questions can
help you do this:
- What output do I want from my routine?
- What calculations do I need to perform?
- What input do I need to give my routine in order to perform those calculations?
- Are there any PyPedal routines that already do something similar?
The last question is as important as the others -- if there is already a PyPedal routine that does similar calculations
you can use it as a starting point. Code reuse is a great idea.
The problem that will motivate the rest of this section sounds very tricky, but is not really so bad because we are going to
reuse a lot of code. I want to create a routine for drawing pedigrees that color nodes (animals) based on their importance as
measured by their connectedness to other animals in the pedigree. After a brief review of the contents of the Module Template
in Section 11.2, I will present a detailed solution to this problem in Section
11.3.
Release 2.0.3, documentation updated on November 29, 2005
Revised May 15, 2012.
See About this document... for information on suggesting changes.