standardize: standardize

Description Usage Arguments Value Examples

View source: R/all.R

Description

Standardize the SNPs to the 0-1 scale

Usage

1
standardize(SNPs,method=c("major-minor","alphabetical"),number_cores)

Arguments

SNPs

The SNP dataset with columns of the values A, C, T, and G

method

The method in which to standarize. If "major-minor" is selected then the major allele gets the value 1 and the minor allele gets the value 0. If "alphabetical" is selected the first allele alphabetically gets a value of 0 and the second allele alphabetically gets the value of 1.

number_cores

The number of cores on which to parallize over.

Value

Returns a matrix of SNPs with the same dimension as th input, the columns are now defined as 0 and 1's.

Examples

1
2
3
4
5
data("vignette_lm_dat")
Y <- vignette_lm_dat$Phenotype
SNPs <- vignette_lm_dat[,-1]

standardize(SNPs = SNPs,method = "major-minor",number_cores = 1)

GWAS.BAYES documentation built on Nov. 8, 2020, 7:47 p.m.