options = {}
options['messages'] = 'verbose'
options['renumber'] = 0
options['counter'] = 5
options['pedfile'] = 'new_lacy.ped'
options['pedformat'] = 'asd'
options['pedname'] = 'Lacy Pedigree'
example = pyp_newclasses.loadPedigree(options)
A single PyPedal program may be used to read one or more pedigrees. Each pedigree that you read must be passed its own dictionary of options. The easiest way to do this is by creating a dictionary with global options. You can then customize the dictionary for each pedigree you want to read. Once you have created a PyPedal pedigree by calling pyp_newclasses.NewPedigree(options) you can change the options dictionary without affecting that pedigree because it has a separate copy of those options stored in its kw attribute. The following code fragment demonstrates how to read two pedigree files using the same dictionary of options.
options = {}
options['messages'] = 'verbose'
options['renumber'] = 0
options['counter'] = 5
if __name__ == '__main__':
# Read the first pedigree
options['pedfile'] = 'new_lacy.ped'
options['pedformat'] = 'asd'
options['pedname'] = 'Lacy Pedigree'
example1 = pyp_newclasses.loadPedigree(options)
# Read the second pedigree
options['pedfile'] = 'new_boichard.ped'
options['pedformat'] = 'asdg'
options['pedname'] = 'Boichard Pedigree'
example2 = pyp_newclasses.loadPedigree(options)
All pedigree options other than pedfile and pedformat have default values. If you provide a value that is invalid the option will revert to the default. In most cases, a message to that effect will also be placed in the log file.