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/lbgfs2022/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: 2022-11-11 05:21:35 (pvr)
LS0tCnRpdGxlOiBMaXZlc3RvY2sgQnJlZWRpbmcgYW5kIEdlbm9taWNzIC0gTm90ZWJvb2sgNAphdXRob3I6IFBldGVyIHZvbiBSb2hyCmRhdGU6ICcyMDIyLTEwLTE0JwpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKcGFyYW1zOgogIGRvY3R5cGU6CiAgICBsYWJlbDogRG9jdW1lbnQgVHlwZQogICAgdmFsdWU6IHNvbHV0aW9uCiAgICBjaG9pY2VzOgogICAgLSBleGVyY2lzZQogICAgLSBzb2x1dGlvbgogICAgLSBub3RlYm9vawogIGlzb25saW5lOgogICAgbGFiZWw6IE9ubGluZSAoeS9uKQogICAgdmFsdWU6IHRydWUKICAgIGNob2ljZXM6CiAgICAtIHRydWUKICAgIC0gZmFsc2UKLS0tCgoKCmBgYHtyIHNldHVwLCBpbmNsdWRlPUZBTFNFfQprbml0cjo6b3B0c19jaHVuayRzZXQoZWNobyA9IFRSVUUpC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