Problem 1: QTL Data

Estimate genotypic values \(a\) and \(d\) and predict breeding values for all animals using the QTL-data given under:

https://charlotte-ngs.github.io/lbgfs2023/data/p1_qtl_1_loci.csv

Your Solution

  • Start by re-formatting the paternal and maternal alleles into a genotype
  • Use a linear regression to estimate genotypic values
  • Predict breeding values for all animals

Problem 2: Increase Effects of Genotype on Phenotype

Change the phenotypic records in the above given dataset such that the QTL explains \(50%\) of the genetic variation when a heritability of \(0.45\) is assumed. It is assumed that the QTL acts purely additively, hence the genotypic value of the heterozygotes can be set to \(d=0\).

Show the results as a scatter plot of all phenotypic values for the QTL genotypes.

Your Solution

  • Compute the genetic variance that can be attributed to the QTL based on the phenotypic variance on the heritability and on the amount of variation explained by the QTL.
  • Read the data and convert the paternal and the maternal alleles to QTL-genotypes
  • Compute allele frequencies
  • Compute the genotypic value \(a\) from the QTL variance
  • Add genotypic value to the phenotypes according to the QTL-Genotype
  • Fit regression of new phenotypes on genotypes
  • Show the results with plots

Latest Changes: 2023-10-13 09:09:07 (pvr)

LS0tCnRpdGxlOiBMaXZlc3RvY2sgQnJlZWRpbmcgYW5kIEdlbm9taWNzIC0gTm90ZWJvb2sgNQphdXRob3I6IFBldGVyIHZvbiBSb2hyCmRhdGU6ICcyMDIzLTEwLTEzJwpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKcGFyYW1zOgogIGRvY3R5cGU6CiAgICBsYWJlbDogRG9jdW1lbnQgVHlwZQogICAgdmFsdWU6IHNvbHV0aW9uCiAgICBjaG9pY2VzOgogICAgLSBleGVyY2lzZQogICAgLSBzb2x1dGlvbgogICAgLSBub3RlYm9vawogIGlzb25saW5lOgogICAgbGFiZWw6IE9ubGluZSAoeS9uKQogICAgdmFsdWU6IHRydWUKICAgIGNob2ljZXM6CiAgICAtIHRydWUKICAgIC0gZmFsc2UKLS0tCgoKCmBgYHtyIHNldHVwLCBpbmNsdWRlPUZBTFNFfQprbml0cjo6b3B0c19jaHVuayRzZXQoZWNobyA9IFRSVUUpCmBg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