-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
93 lines (67 loc) · 3.77 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
title: "Reproducing Results of Gerard et al. (2018)"
bibliography: "geno_bib.bib"
output: github_document
---
[![DOI](https://zenodo.org/badge/94825101.svg)](https://zenodo.org/badge/latestdoi/94825101)
# Introduction
This repository contains code to reproduce the empirical evaluations
of @gerard2018genotyping. The new methods can be found in the
[updog](https://cran.r-project.org/package=updog) package on CRAN.
```{r, echo=FALSE, results="hide", message=FALSE, warning=FALSE}
liblist <- list("tidyverse", "updog", "rmutil", "parallel", "parallel", "ggthemes", "gridExtra", "updogAlpha", "fitPoly")
lapply(liblist, require, character.only = TRUE)
```
If you are having trouble reproducing these results, it might be that you need to update some of your R packages. These are the versions that I used:
```{r}
sessionInfo()
```
I've also only tried this out on Ubuntu.
If you find a bug, please create an
[issue](https://github.com/dcgerard/reproduce_genotyping/issues).
# Instructions
To reproduce the results in @gerard2018genotyping, you need to (1) download and install the appropriate packages, (2) obtain the appropriate data, (3) run `make`, and (4) get coffee.
## Install Packages
To install the needed R packages, run the following in R
```{r, eval = FALSE}
install.packages(c("updog", "tidyverse", "rmutil", "snow", "parallel",
"ggthemes", "gridExtra", "devtools", "fitPoly"))
devtools::install_github("dcgerard/updogAlpha")
```
If the most recent CRAN version of `updog` doesn't seem to work, you can retry with the version that I last used to reproduce these results:
```{r, eval = FALSE}
devtools::install_github("dcgerard/updog",
ref = "76c72eb717e18061576fc20b3c07f9da71b67263")
```
Please follow the directions [here](https://github.com/pblischak/polyploid-genotyping/tree/master/ebg) to install `ebg`.
## Get Data
Place [KDRIsweetpotatoXushu18S1LG2017.vcf.gz](https://github.com/dcgerard/KDRIsweetpotatoXushu18S1LG2017) in the Data folder. The direct url is: <https://github.com/dcgerard/KDRIsweetpotatoXushu18S1LG2017/raw/main/KDRIsweetpotatoXushu18S1LG2017.vcf.gz>
## Run Make
To reproduce all of the results in @gerard2018genotyping, simply run
`make` from the terminal. To reproduce the real-data analysis, run
``` bash
make sweet_potato
```
To reproduce the simulations, run
``` bash
make simulations
```
## Get Coffee
The simulations should take a few hours. You should get some coffee. Here is a list of some of my favorite places:
* Washington, D.C.
- [Politics and Prose](https://www.yelp.com/biz/politics-and-prose-washington)
- [Colony Club](https://www.yelp.com/biz/colony-club-washington)
* Chicago
- [Sawada Coffee](https://www.yelp.com/biz/sawada-coffee-chicago)
- [Plein Air Cafe](https://www.yelp.com/biz/plein-air-cafe-and-eatery-chicago-2)
* Seattle
- [Bauhaus Ballard](https://www.yelp.com/biz/bauhaus-ballard-seattle)
- [Cafe Solstice](https://www.yelp.com/biz/cafe-solstice-seattle)
* Columbus
- [Yeah, Me Too](https://www.yelp.com/biz/yeah-me-too-columbus)
- [Fox in the Snow](https://www.yelp.com/biz/fox-in-the-snow-cafe-columbus-2)
- [Stauf's Coffee Roasters](https://www.yelp.com/biz/staufs-coffee-roasters-columbus-2)
- [Caffe Apropos](https://www.yelp.com/biz/caff%C3%A9-apropos-columbus-2)
# Note on SuperMASSA
The [source](https://bitbucket.org/orserang/supermassa) is available for SuperMASSA, but it isn't too well documented, so I used the [web application](http://statgen.esalq.usp.br/SuperMASSA/) version during the empirical data analysis. As such, I've committed the inputs and fits in the [Output](https://github.com/dcgerard/reproduce_genotyping/tree/master/Output/supermassa_formatted_data) folder. If you want to generate these fits, you'll have to do it manually.
# References