rc2 -- Major inbreeding() bugfix

The relationship metadata returned by pyp_metrics/
inbreeding() are not guaranteed to be correct when
method = 'vanraden' is used. This is because
inbreeding_vanraden() uses a speed-up when there
are full-sibs in the pedigree to avoid
repeating calculations. The metadata should be
pretty accurate for pedigrees with few or no
full-sibs. The summary statistics will not be very
accurate in the case of pedigrees that contain
lots of full-sibs. I'm not sure that this is so
much a bug as an optimization tradeoff.

Fixed a bug in pyp_metrics/inbreeding() and
pyp_metrics/inbreeding_vanraden() so that non-zero
averages are correctly calculated.

Fixed a minor bug in
pyp_metrics/inbreeding_vanraden() so that the
correct relationship count is returned.

Fixed pyp_newclasses/NewAMatrix::load() so that it
uses correct keyword arguments for NumPy rather
than Numarray.

Fixed a dictionary lookup error in

Removed pyp_newclasses/NewAMatrix::info() because
I misunderstood just what numpy.info() was

pyp_metrics/relationship() now checks the pedigree
to see if it has an attached NRM; if so,
relationship() will look up the coefficient of
relationship rather than extracting pedigrees and
calling fast_a_matrix(). This should buy a little
performance by avoiding unnecessary

When output is requested pyp_nrm/inbreeding() will
now write original IDs to the file of the pedigree
format contains 'asd' or names if the pedigree
format contains 'ASD', which makes it much
easier to match output to animals in ASD
pedigrees, for in which original IDs are
meaningful only internally.

Changed the default value of the cleanmaps
parameter of pyp_nrm/inbreeding_vanraden() from 0
to 1; this means that ID maps created for
inbreeding calculations will be deleted, rather
than left lying around.

Fixed a very nasty misplaced-parenthesis bug in
pyp_nrm/fast_a_matrix() that affected animals with
both parents unknown. Thanks to Dan Cieslak for
bringing this to my attention. Fixed the same bug
in pyp+nrm/fast_partial_a_matrix(), which was
derived from fast_a_matrix().

Fixed a bug in pyp_metrics/descendants() that
prevented all offspring from being properly

NewPedigree::simulate() now uses numpy.random for
generating random variates rather than the random

Fixed a bug in pyp_metrics/mating_coi_group() in
which only the last mating was retained for an
individual because the group of matings was stored
in a dictionary keyed by animals. The fix required
an API change such that mating_coi_group() now
takes a list of matings of the form
"parent1_parent2", rather than a dictionary. Also
fixed a few other small bugs in the function.

Added a new chapter to the manual, 'Working with

Fixed a small bug in NewPedigree::addanimal()
('userfield' not in missing dictionary).

Posted by John B. Cole 2008-03-11