Code to calculate identity coefficients for any pedigree