Chapter 6 rMVP data formatting

6.1 Genotypic and phenotypic data in rMVP format

For GWAS we are using the rMVP package (Yin et al. 2020). More information about the R package can be found here.

The genotypic and phenotypic data can be formatted in one step using the code below. This chunk of code also calculates the kinship matrix, principle components, and saves genotypic data as a filebacked matrix which is a memory efficient way of storing the data and prevents the need for the entire matrix to be loaded into RAM. For the size of the subset data it won’t be a major performace difference, but with larger datasets it is extremely beneficial.

Load packages

Set working directory to where subset hapmap file is in workshop materials

Prepare data in rMVP format


Yin, Lilin, Haohao Zhang, Zhenshuang Tang, Jingya Xu, Dong Yin, Zhiwu Zhang, Xiaohui Yuan, et al. 2020. RMVP: Memory-Efficient, Visualize-Enhanced, Parallel-Accelerated Gwas Tool.