Code &amp; Data -- Alternative Ways of Computing the Numerator Relationship Matrix
Creators: name: Nilforooshan, Mohammad Ali
name: Garrick, Dorian
name: Harris, Bevin
Publisher: name: figshare
Year: 2021
Subjects: subject: 70201 Animal Breeding
subject: FOS: Animal and dairy science
subject: 60411 Population, Ecological and Evolutionary Genetics
subject: FOS: Biological sciences
subject: Genetics

description: The provided materials are the data and the code to create and analyse the data, used in the published study <i>"Alternative Ways of Computing the Numerator Relationship Matrix"</i>. The numerator relationship matrix is denoted as <b>A</b>. Below, a short description is given to each file.<br><b>* AiterD.R:</b> Contains R function AiterD for a method of calculating <b>A</b> that involves updating <b>D</b><sub>0</sub> (see getD0.R) to <b>D</b> (as defined by Thompson (1977)).<b>* buildEC2.sh:</b> Shell script used for making EC2 instances with desired specifications.<b>* copyPC2EC2.txt:</b> Shell script code used to copy files from PC to the EC2 instance.<b>* fbs.R:</b> Contains R function fbs for matrix solving using the forward &amp; backward substitution method.<b>* getAvec.R:</b> Contains R functions getAvec and vec.ext (called by getAvec). The getAvec function is for creating and storing <b>A</b> in a lower triangle packed storage format.<b>* getD.R:</b> Contains R function getD for calculating vector <b>d</b>, where <b>D</b> = diag(<b>d</b>) and <b>D</b> is as defined by Thompson (1977).<b>* getD0.R:</b> Contains R function getD0 for calculating vector <b>d</b><sub>0</sub>, where <b>D</b><sub>0</sub> = diag(<b>d</b><sub>0</sub>) and <b>D</b><sub>0</sub> is the first prior for <b>D</b>. This function is called by function AiterD.<b>* getLp.R:</b> Contains R function getLp for calculating <b>L</b>', where <b>L</b> is as defined by Henderson (1975).<b>* getTInv.R:</b> Contains R function getTInv for calculating <b>T</b><sup>-1</sup>.<b>* getTp.R:</b> Contains R function getTp for calculating <b>T</b>', where <b>T</b> is as defined by Thomspon (1977).<b>* iterGen.R:</b> Contains R function iterGen for iteration by generation method of calculating <b>A</b>.<b>* objectsize.R:</b> Contains R code for measuring the object size of different matrices for PED1 (see ped1.csv), PED2 (see ped2.csv) and PED3 (see ped3.csv).<b>* pcg.R:</b> Contains R function pcg for the PCG algorithm.<b>* pcgAi.R:</b> Contains R function pcgAi, which is a wrapper of function pcg for solving <b>A</b><sup>-1</sup> for the columns of <b>A</b>.<b>* ped1.csv:</b> A simulated pedigree (PED1) of 20000 individuals with a litter size of 1 (other specifications are mentioned in the article).<b>* ped2.csv:</b> A simulated pedigree (PED2) of 20000 individuals with a litter size of 2 (other specifications are mentioned in the article).<b>* ped3.csv:</b> A simulated pedigree (PED3) of 20000 individuals with a litter size of 4 (other specifications are mentioned in the article).<b>* ped4.csv:</b> A simulated pedigree (PED4) of 20000 individuals with a litter size of 2 (other specifications are mentioned in the article).<b>* README.md:</b> Gives a short description about the process.<b>* rmse.R:</b> Contains R function rmse for calculating RMSE between a pair of variables, and R code to loop over several calculated <b>A</b> matrices to calculate their RMSE.<b>* run_c54XL.sh:</b> Contains the Shell script to run on a c5.4xlarge EC2 instance.<b>* run_r58XL.sh:</b> Contains the Shell script to run on a r5.8xlarge EC2 instance.<b>* run_r5L.sh:</b> Contains the Shell script to run on a r5.large EC2 instance.<b>* run_t2.sh:</b> Contains the Shell script to run on t2.small and t2.medium EC2 instances.<b>* simped.R:</b> Contains R code for simulating PED1, PED2, PED3 and PED4.<b>* solveAi.R:</b> Contains R functions solveAi for solving <b>A</b><sup>-1</sup> for columns of <b>A</b>.<b>* tabularA.R:</b> Contains R functions tabularA for the Tabular method (vectorised calculations) of calculating <b>A</b>.<b>* TDTp.R:</b> Contains R functions TDTp for calculating <b>A</b> based on the method of Thompson (1977).<b>* TDTp2.R:</b> Contains R functions TDTp2 for calculating <b>A</b> based on the method of Thompson (1977), using (<b>T</b><sup>-1</sup>)<sup>-1</sup> instead of <b>T</b>.