8.5.2 How else can I export a NRM to a file?

Numerator relationship matrices may be exported to a text file in ``ijk format'', where each line is of the form ``animal_A animal_B rAB'' using the pyp_io.save_ijk() function. Diagonal entries are $ 1 + f_a$, where $ f_a$ is the animal's coefficient of inbreedin.
example = pyp_newclasses.loadPedigree(options)
# Save the NRM to a file in ijk format.
# Don't forget to set the filename.
pyp_io.save_ijk(example,'nrm_ijk.txt')
Suppose that the example above produces the following file:
$ head nrm_ijk.txt
4627 4627 1.125
4627 0832 0.0
4627 5538 0.5
...
In order to get $ f_a$ for animal 4627 you need to find the corresponding diagonal element and subtract 1 from it:

$\displaystyle f_a = 1.125 - 1.0 = 0.125
$

The coefficient of relationship between 4627 and 5538 is $ 0.5$ (4627 is probably a parent of 5538). Note that the file nrm_ijk.txt will include only the diagonal and upper off-diagonal elements of the NRM, and should have $ n + n(n+1)/2$ lines.
See About this document... for information on suggesting changes.