<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/predicting-height-based-on-dna-mutations/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://privefl.github.io/blog/predicting-height-based-on-dna-mutations/"> Florian Privé</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<section>
<p>In this post, I show some results of predicting height based on DNA mutations. This analysis aims at reproducing the analysis <a rel="nofollow" href="https://doi.org/10.1534/genetics.118.301267" target="_blank">of this paper</a> using <a rel="nofollow" href="https://doi.org/10.1093/bioinformatics/bty185" target="_blank">my own analysis tools in</a>.</p>
<p>I use a new dataset composed of 500,000 adults from UK, and genotyped over hundreds of thousands of DNA positions. This dataset is called <a rel="nofollow" href="https://www.ukbiobank.ac.uk/" target="_blank">the UK biobank</a>, and also provide some baseline characteristics such as sex and birth date, which are useful for predicting height.</p>
<div>
<h2>Model</h2>
<div>
<h3>Data</h3>
<p>After some quality control and filtering, I end up with a dataset composed of 394,436 individuals genotyped over 564,148 DNA positions. This results in a matrix that counts the number of mutations (0, 1, or 2) for a given individual (observation) and a given DNA position (variable). Even if I can store each element of this matrix using one byte only, this results in ~200 GB of data.</p>
<p>I use 20,000 individuals as test set, and the rest as training set.</p>
</div>
<div>
<h3>Baseline model</h3>
<p>Before using DNA mutations, let us make a model with only two variables:</p>
<ul>
<li>sex</li>
<li>birth date (year and month)</li>
</ul>
<pre><code>Coefficients:
               Estimate Std. Error  t value Pr(>|t|)    
(Intercept)  154.503399   0.091744 1684.075   &lt;2e-16 ***
date           0.157243   0.001749   89.920   &lt;2e-16 ***
sexMale       13.436380   0.132919  101.087   &lt;2e-16 ***
date:sexMale  -0.003000   0.002544   -1.179    0.238    </code></pre>
<p>So basically, <strong>men are ~13.4 cm taller than women in average</strong>. There is also an effect due to societal changes (“Flynn Effects”) that results in <strong>people being 1 cm taller in average every ~6 years</strong> (I don’t mean people getting older, but people being born more recently).</p>
<div>
<img alt="Base prediction of height based on sex and birth date." src="https://i0.wp.com/privefl.github.io/blog/images/UKB-base-pred.png?w=80%25&ssl=1" data-recalc-dims="1">
<p>
Base prediction of height based on sex and birth date.
</p>
</div>
</div>
<div>
<h3>Model when adding tens of thousands of DNA mutations</h3>
<p>Because of the size of the data and because effects of mutations are usually very small and additive, I use a linear model with lasso penalty to take into account many but not all DNA mutations (as in the paper I linked above).</p>
<div>
<img alt="Final prediction of height based on DNA mutations, sex and birth date." src="https://i1.wp.com/privefl.github.io/blog/images/UKB-final-pred.png?w=80%25&ssl=1" data-recalc-dims="1">
<p>
Final prediction of height based on DNA mutations, sex and birth date.
</p>
</div>
<p><strong>Predicted height correlates with actual height at 65.5% for women and 65% for men</strong>; 61.8% and 61.4% if using DNA mutations only (without birth date). Note that it is estimated that prediction based on DNA mutations only could achieve a correlation of 70% at most.</p>
<div>
<img alt="Residuals from baseline and final predictions of height." src="https://i0.wp.com/privefl.github.io/blog/images/UKB-residuals.png?w=80%25&ssl=1" data-recalc-dims="1">
<p>
Residuals from baseline and final predictions of height.
</p>
</div>
<p>So, with this model combining sex, birth date and DNA mutations, <strong>predictions are precise within 8 cm for 90% of people and within 4 cm for 60% of people</strong>.</p>
</div>
</div>
<div>
<h2>Conclusion</h2>
<p>The UK biobank contains lots of information that could be used to predict e.g. people height. There are also some information about e.g. environmental factors that could be useful to predict height. <strong>Tell me if you have any idea</strong> and I’ll try to add new variables to the current model.</p>
</div>
</section>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://privefl.github.io/blog/predicting-height-based-on-dna-mutations/"> Florian Privé</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/jqfiyKMyiQU" height="1"></a></div>