MVP.Data: MVP.Data: To prepare data for MVP package Author: Xiaolei...

View source: R/MVP.Data.r

MVP.DataR Documentation

MVP.Data: To prepare data for MVP package Author: Xiaolei Liu, Lilin Yin and Haohao Zhang Build date: Aug 30, 2016 Last update: Sep 12, 2018

Description

MVP.Data: To prepare data for MVP package Author: Xiaolei Liu, Lilin Yin and Haohao Zhang Build date: Aug 30, 2016 Last update: Sep 12, 2018

Usage

MVP.Data(
  fileMVP = NULL,
  fileVCF = NULL,
  fileHMP = NULL,
  fileBed = NULL,
  fileNum = NULL,
  fileMap = NULL,
  filePhe = NULL,
  fileInd = NULL,
  fileKin = NULL,
  filePC = NULL,
  out = "mvp",
  sep.num = "\t",
  auto_transpose = TRUE,
  sep.map = "\t",
  sep.phe = "\t",
  sep.kin = "\t",
  sep.pc = "\t",
  type.geno = "char",
  pheno_cols = NULL,
  SNP.impute = "Major",
  maxLine = 10000,
  pcs.keep = 5,
  verbose = TRUE,
  ncpus = NULL,
  ...
)

Arguments

fileMVP

Genotype in MVP format

fileVCF

Genotype in VCF format

fileHMP

Genotype in hapmap format

fileBed

Genotype in PLINK binary format

fileNum

Genotype in numeric format; pure 0, 1, 2 matrix; m * n, m is marker size, n is sample size

fileMap

SNP map information, there are three columns, including SNP_ID, Chromosome, and Position

filePhe

Phenotype, the first column is taxa name, the subsequent columns are traits

fileInd

Individual name file

fileKin

Kinship that represents relationship among individuals, n * n matrix, n is sample size

filePC

Principal components, n*npc, n is sample size, npc is number of top columns of principal components

out

prefix of output file name

sep.num

seperator for numeric file.

auto_transpose

Whether to automatically transpose numeric genotypes, the default is True, which will identify the most one of the rows or columns as a marker, If set to False, the row represents the marker and the column represents the individual.

sep.map

seperator for map file.

sep.phe

seperator for phenotype file.

sep.kin

seperator for Kinship file.

sep.pc

seperator for PC file.

type.geno

type parameter in bigmemory, genotype data. The default is char, it is highly recommended *NOT* to modify this parameter.

pheno_cols

Extract which columns of the phenotype file (including individual IDs)

SNP.impute

"Left", "Middle", "Right", or NULL for skip impute.

maxLine

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

pcs.keep

how many PCs to keep

verbose

whether to print detail.

ncpus

The number of threads used, if NULL, (logical core number - 1) is automatically used

...

Compatible with DEPRECATED parameters.

Value

NULL Output files: genotype.desc, genotype.bin: genotype file in bigmemory format phenotype.phe: ordered phenotype file, same taxa order with genotype file map.map: SNP information k.desc, k.bin: Kinship matrix in bigmemory format pc.desc, pc.bin: PC matrix in bigmemory format Requirement: fileHMP, fileBed, and fileNum can not input at the same time

Examples


bfilePath <- file.path(system.file("extdata", "02_bfile", package = "rMVP"), "mvp")
opts <- options(rMVP.OutputLog2File = FALSE)

MVP.Data(fileBed=bfilePath, out=tempfile("outfile"), ncpus=1)

options(opts)


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