Learn R Programming

rMVP (version 0.99.14.1)

MVP: MVP, Memory-efficient, Visualization-enhanced, Parallel-accelerated

Description

Object 1: To perform GWAS using General Linear Model (GLM), Mixed Linear Model (MLM), and FarmCPU model Object 2: To calculate kinship among individuals using Varaden method Object 3: Estimate variance components using EMMA, FaST-LMM, and HE regression Object 4: Generate high-quality figures

Usage

MVP(phe, geno, map, K=NULL, nPC.GLM=NULL, nPC.MLM=NULL, nPC.FarmCPU=NULL,
         CV.GLM=NULL, CV.MLM=NULL, CV.FarmCPU=NULL, REML=NULL, priority="speed", 
         ncpus=detectCores(logical = FALSE), vc.method=c("BRENT", "EMMA", "HE"), 
         method=c("GLM", "MLM", "FarmCPU"), method.sub="reward", 
         method.sub.final="reward", method.bin="static", bin.size=c(5e5,5e6,5e7), 
         bin.selection=seq(10,100,10), maxLoop=10, permutation.threshold=FALSE, 
         permutation.rep=100, bar=TRUE, 
         col=c("dodgerblue4","olivedrab4","violetred","darkgoldenrod1","purple4"), 
         file.output=TRUE, file="jpg", dpi=300, threshold=0.05)

Arguments

phe

phenotype, n * 2 matrix, n is sample size

geno

Genotype in bigmatrix format; m * n, m is marker size, n is sample size

map

SNP map information, SNP name, Chr, Pos

K

Kinship, Covariance matrix(n * n) for random effects, must be positive semi-definite

nPC.GLM

number of PCs added as fixed effects in GLM

nPC.MLM

number of PCs added as fixed effects in MLM

nPC.FarmCPU

number of PCs added as fixed effects in FarmCPU

CV.GLM

covariates added in GLM

CV.MLM

covariates added in MLM

CV.FarmCPU

covariates added in FarmCPU

REML

a list contains ve and vg

priority

speed or memory

ncpus

number of cpus used for parallel

vc.method

methods for estimating variance component("EMMA" or "GEMMA")

method

the GWAS model, "GLM", "MLM", and "FarmCPU", models can be selected simutaneously, i.e. c("GLM", "MLM", "FarmCPU")

method.sub

method.sub.final method used in substitution process

method.sub.final

method used in substitution process, five options: 'penalty', 'reward', 'mean', 'median', or 'onsite'

method.bin

EMMA or FaSTLMM

bin.size

window size in genome

bin.selection

a vector, how many windows selected

maxLoop

maximum number of iterations

permutation.threshold

if use a permutation cutoff or not (bonferroni cutoff)

permutation.rep

number of permutation replicates

bar

if TRUE, the progress bar will be drawn on the terminal

col

for color of points in each chromosome on manhattan plot

file.output

whether to output files or not

file

figure formats, "jpg", "tiff"

dpi

resolution for output figures

threshold

a cutoff line on manhattan plot, 0.05/marker size

Value

a m * 2 matrix, the first column is the SNP effect, the second column is the P values Output: MVP.return$map - SNP map information, SNP name, Chr, Pos Output: MVP.return$glm.results - p-values obtained by GLM method Output: MVP.return$mlm.results - p-values obtained by MLM method Output: MVP.return$farmcpu.results - p-values obtained by FarmCPU method

Details

Build date: Aug 30, 2017 Last update: Dec 14, 2018

Examples

Run this code
# NOT RUN {
phePath <- system.file("extdata", "07_other", "mvp.phe", package = "rMVP")
phenotype <- read.table(phePath, header=TRUE)
print(dim(phenotype))
genoPath <- system.file("extdata", "06_mvp-impute", "mvp.imp.geno.desc", package = "rMVP")
genotype <- attach.big.matrix(genoPath)
print(dim(genotype))
mapPath <- system.file("extdata", "07_other", "mvp.map", package = "rMVP")
map <- read.table("mvp.map" , head = TRUE)
mvp <- MVP(phe=phenotype, geno=genotype, map=map, 
  method=c("GLM", "MLM", "FarmCPU"), file.output=FALSE, ncpus=1)
str(mvp)
# }

Run the code above in your browser using DataLab