Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughjonesd/why-natural-selection
Code for the paper "Human capital mediates natural selection in contemporary humans"
https://github.com/hughjonesd/why-natural-selection
economics fertility genetics natural-selection
Last synced: 2 months ago
JSON representation
Code for the paper "Human capital mediates natural selection in contemporary humans"
- Host: GitHub
- URL: https://github.com/hughjonesd/why-natural-selection
- Owner: hughjonesd
- Created: 2020-05-14T07:36:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T14:09:13.000Z (about 2 years ago)
- Last Synced: 2024-10-09T09:40:47.640Z (3 months ago)
- Topics: economics, fertility, genetics, natural-selection
- Language: R
- Homepage:
- Size: 70.8 MB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# why-natural-selection
Code for the paper "Human capital mediates natural selection in
contemporary humans" by Abdel Abdellaoui and David Hugh-Jones.# The paper
The published version is in *Behavior Genetics* 52(4), available at https://link.springer.com/article/10.1007/s10519-022-10107-w
The current version is available at https://github.com/hughjonesd/why-natural-selection/blob/master/why-natural-selection.pdf.
# BGA poster
The BGA poster is available [here](https://github.com/hughjonesd/why-natural-selection/blob/master/BGA%20poster.pdf).
# To download
From your command line, run:
```
git clone https://github.com/hughjonesd/import-ukbb-data.git
git clone https://github.com/hughjonesd/why-natural-selection.git
```# The data
Data is stored separately. To get UK Biobank data you'll need to
make an application to UK Biobank (or join our application). Other data is
publicly available, so we can share it.We also use weights from
Alten, Sjoerd van, Benjamin W Domingue, Titus Galama, and Andries Marees. 2021.
“The Effects of Demographic-Based Selection Bias on GWAS Results in the UK Biobank.”Thank you to Sjoerd and coauthors for their kindness in providing these!
You'll need their code to recreate the weights.# To run
1. Start R within the project directory. This should automatically
download the `{renv}` package.2. Run `renv::restore()` to download the appropriate R packages.
3. Edit directory locations in `_drake.R`.
4. Within R, run
```r
r_make()
```This will take some time to run, depending on your machine. It will rebuild
the PDF `why-natural-selection.pdf`.