MVP: MVP, Memory-efficient, Visualization-enhanced,...

View source: R/MVP.r

MVPR Documentation

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,
  maxLine = 10000,
  ncpus = detectCores(logical = FALSE),
  vc.method = c("BRENT", "EMMA", "HE"),
  method = c("GLM", "MLM", "FarmCPU"),
  maf = NULL,
  p.threshold = NA,
  QTN.threshold = 0.01,
  method.bin = "static",
  bin.size = c(5e+05, 5e+06, 5e+07),
  bin.selection = seq(10, 100, 10),
  maxLoop = 10,
  permutation.threshold = FALSE,
  permutation.rep = 100,
  memo = NULL,
  outpath = getwd(),
  col = c("#4197d8", "#f8c120", "#413496", "#495226", "#d60b6f", "#e66519", "#d581b7",
    "#83d3ad", "#7c162c", "#26755d"),
  file.output = TRUE,
  file.type = "jpg",
  dpi = 300,
  threshold = 0.05,
  verbose = TRUE
)

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

maxLine

the number of markers handled at a time, smaller value would reduce the memory cost

ncpus

number of cpus used for parallel

vc.method

methods for estimating variance component("EMMA" or "HE" or "BRENT")

method

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

maf

the threshold of minor allele frequency to filter SNPs in analysis

p.threshold

if all p values generated in the first iteration are bigger than p.threshold, FarmCPU stops

QTN.threshold

in second and later iterations, only SNPs with lower p-values than QTN.threshold have chances to be selected as pseudo QTNs

method.bin

'static' or 'FaST-LMM'

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

memo

Character. A text marker on output files

col

for color of points in each chromosome on manhattan plot

file.output

whether to output files or not

file.type

figure formats, "jpg", "tiff"

dpi

resolution for output figures

threshold

a cutoff line on manhattan plot, 0.05/marker size

verbose

whether to print detail.

tmppath

the path of the temporary file

Details

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

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

Author(s)

Lilin Yin, Haohao Zhang, and Xiaolei Liu

Examples


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", "06_mvp-impute", "mvp.imp.geno.map", package = "rMVP")
map <- read.table(mapPath , head = TRUE)

opts <- options(rMVP.OutputLog2File = FALSE)

mvp <- MVP(phe=phenotype, geno=genotype, map=map, maxLoop=3,
  method=c("GLM", "MLM", "FarmCPU"), file.output=FALSE, ncpus=1)
str(mvp)

options(opts)


XiaoleiLiuBio/MVP documentation built on Sept. 27, 2024, 7:44 a.m.