Reports - Relationship Matrices

Relationship Matrix - This shows the A matrix for the stud "Roan Gauntlet" from Wrights original 1922 paper on inbreeding, with the "A" matrix values are shown as fractions
Relationship Matrix - This shows the A matrix for the stud "Roan Gauntlet" from Wrights original 1922 paper on inbreeding, with the "A" matrix values are shown as fractions

To view this report, choose Relationship Matrices from the report selector (at the top of the report pane) in the main window.

PedScope will compute and display various relationship matrices, such as the 'NRM' or 'A' matrix of additive genetic relations, between any group of related animals. The matrix is calculated for all of the source animal records, plus a given depth of their ancestors and, optionally, their descendants. The matrix can be saved (i.e. exported) including to spreadsheets.

When the report pane is set to display relationship matrices, several extra pulldown menus are available below the report selector:

Relationship Matrix Upper Controls

  • Ancestry to - here you select the #generations of ancestors of the source animals to be included when calculating the relations.
  • Matrix type - select between Additive, Dominance and Genomic.
  • Include descendants to - here you select the #generations of descendants of the source animals to be included.
  • Show ancestors - this checkbox controls whether the ancestors used in the calculations are to be displayed in the visible matrix. This can be useful when you are interested in the relations between a small number of ancestors, but you don't want the screen cluttered up with a huge matrix showing hundreds or even thousands of their ancestors that have been used in calculating the relationships. Note that turning this option off has no effect on the memory requirements of the calculation (see below).

Below the displayed matrix are some further controls:

Relationship Matrix Lower Controls

  • Order columns by and Order rows by - these let you select the ordering of the rows and columns. The default order is the ordering used internally when computing the matrix, which is an ordering chosen to guarantee that all parents come before (i.e. left/above) their offspring. However you might find it easier to work with the displayed result if the rows/columns are sorted by, e.g., name. Note that changing the ordering will destroy any natural matrix structure e.g. with the additive matrix the diagonal always contains values that are 1 + the inbreeding coefficient. Changing the sort order will obviously mean that no longer holds. Changing the sort order does not recompute the matrix.
  • Transpose - this will swap the rows and columns.
  • Color coded - when this option is turned on, cells will be shaded according to their value. The higher the degree of relationship, the darker the shading. This provides a very quick way to see at a glance where the closest relationships are.
  • Export Matrix - click this button to export the matrix e.g. to a PDF, text or XML file. The XML files generated by PedScope can be directly loaded into Excel and provide a very easy way to transfer a computed matrix.

When showing a relationship matrix the property pane to the right will display the details of the selected cell. Just click a matrix cell to have the details of the row + column animals displayed.

There are various other ways you can customize the display of matrices:

  • On the General tab of the Preferences window you can specify whether coefficients are displayed as numbers, percentages or even fractions. For numbers and percentages you can set the number of decimal places shown.
  • On the General tab of the Document Settings window you can specify the data storage type used internally for the matrix. This can affect both the memory required internally to store the matrix (which can be very large), and the speed of calculation.

Memory Usage: It is important to be aware that computing relationship matrices can require a very large, potentially huge, amount of memory. A relationship matrix contains as many rows and columns as the number of animals, and their ancestors and descendants that you have chosen to display. E.g. lets say you choose to display the additive matrix for 10 particular animals, plus 16 generations of their ancestors. And that once those ancestors have been found, this results in a total of 10,000 animals. A matrix with 10,000 rows and columns contains 100,000,000 cells. If each cell takes, say 8 bytes of storage (typical for a floating point number on many systems), this would be 800 Mb memory. Which is a lot. Whilst the program can (and does) use optimizations where it can to reduce the memory footprint (e.g. relationship matrices are symmetric, which at a stroke halves the memory requirement), it is still very easy to run out of memory. You can see the amount of memory used in the stats line displayed above the property pane when you have a relationship matrix visible. E.g. "N=1,696, memory=6.1Mb" says that the relationship matrix contains 1,696 rows + columns, and occupied 6.1Mb main memory. The program will not crash if you try to use more memory than is available, but it might become very slow or you might see an error message. Note also that if you compute the genomic relationship matrix, this will occupy 4 times as much memory for the same number of animals, because it has 2 rows and 2 columns for each animal.

PedScope is a product of Tenset Technologies Ltd, © 2011-14 All Rights Reserved. v2.4.01, June 2014
Apple, Mac and Macintosh are trademarks of Apple Inc., registered in the U.S. and other countries. Microsoft and Windows are registered trademarks of Microsoft Corporation in the U.S. and/or other countries. Lytebox image popup software ( © Markus Hay, used with permission under the terms of the Creative Commons Attribution-Share Attribution 3.0 license. Siberian Tiger image by S. Taheri, used with permission under the terms of the Creative Commons Attribution-Share Alike 2.5 Generic license. Privacy Policy