Skip to content
Reproduce the results from Gerard et al. (2018)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Analysis
Data
Output
.gitignore
README.Rmd
README.md
geno_bib.bib
makefile

README.md

Reproducing Results of Gerard et al. (2018)

DOI

Introduction

This repository contains code to reproduce the empirical evaluations of Gerard et al. (2018). The new methods can be found in the updog package on CRAN.

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:

sessionInfo()
## R version 3.5.0 (2018-04-23)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.5 LTS
## 
## Matrix products: default
## BLAS: /usr/local/lib/R/lib/libRblas.so
## LAPACK: /usr/local/lib/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] parallel  stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] fitPoly_3.0.0    updogAlpha_1.0.1 gridExtra_2.3    ggthemes_4.0.0  
##  [5] rmutil_1.1.1     updog_1.0.1      forcats_0.3.0    stringr_1.3.1   
##  [9] dplyr_0.7.4      purrr_0.2.5      readr_1.1.1      tidyr_0.8.0     
## [13] tibble_1.4.2     ggplot2_3.0.0    tidyverse_1.2.1 
## 
## loaded via a namespace (and not attached):
##  [1] reshape2_1.4.3            haven_1.1.1              
##  [3] lattice_0.20-35           colorspace_1.3-2         
##  [5] htmltools_0.3.6           yaml_2.1.19              
##  [7] rlang_0.2.1               pillar_1.2.2             
##  [9] foreign_0.8-70            glue_1.2.0               
## [11] withr_2.1.2               modelr_0.1.2             
## [13] readxl_1.1.0              bindrcpp_0.2.2           
## [15] foreach_1.4.4             bindr_0.1.1              
## [17] plyr_1.8.4                munsell_0.4.3            
## [19] gtable_0.2.0              cellranger_1.1.0         
## [21] rvest_0.3.2               codetools_0.2-15         
## [23] psych_1.8.4               evaluate_0.10.1          
## [25] knitr_1.20                RcppArmadillo_0.8.600.0.0
## [27] doParallel_1.0.11         broom_0.4.4              
## [29] Rcpp_0.12.17              scales_0.5.0             
## [31] backports_1.1.2           jsonlite_1.5             
## [33] mnormt_1.5-5              hms_0.4.2                
## [35] digest_0.6.15             stringi_1.2.2            
## [37] grid_3.5.0                rprojroot_1.3-2          
## [39] cli_1.0.0                 tools_3.5.0              
## [41] magrittr_1.5              lazyeval_0.2.1           
## [43] crayon_1.3.4              pkgconfig_2.0.1          
## [45] xml2_1.2.0                lubridate_1.7.4          
## [47] iterators_1.0.9           assertthat_0.2.0         
## [49] rmarkdown_1.9             httr_1.3.1               
## [51] rstudioapi_0.7            R6_2.2.2                 
## [53] nlme_3.1-137              compiler_3.5.0

I've also only tried this out on Ubuntu.

If you find a bug, please create an issue.

Instructions

To reproduce the results in Gerard et al. (2018), 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

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:

devtools::install_github("dcgerard/updog", 
                         ref = "76c72eb717e18061576fc20b3c07f9da71b67263")

Please follow the directions here to install ebg.

Get Data

Place KDRIsweetpotatoXushu18S1LG2017.vcf.gz in the Data folder. The direct url is: ftp://ftp.kazusa.or.jp/pub/sweetpotato/GeneticMap/

Run Make

To reproduce all of the results in Gerard et al. (2018), simply run make from the terminal. To reproduce the real-data analysis, run

make sweet_potato

To reproduce the simulations, run

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:

Note on SuperMASSA

The source is available for SuperMASSA, but it isn't too well documented, so I used the web application version during the empirical data analysis. As such, I've committed the inputs and fits in the Output folder. If you want to generate these fits, you'll have to do it manually.

References

Gerard, David, Luis Felipe Ventorim Ferrão, Antonio Augusto Franco Garcia, and Matthew Stephens. 2018. “Harnessing Empirical Bayes and Mendelian Segregation for Genotyping Autopolyploids from Messy Sequencing Data.” bioRxiv. Cold Spring Harbor Laboratory. doi:10.1101/281550.

You can’t perform that action at this time.