level_function: level_function

Description Usage Arguments Value Examples

View source: R/all.R

Description

Removes all SNPs that only have one level in it

Usage

1
level_function(SNPs,MAF = 0.01)

Arguments

SNPs

The standardized SNP data where the columns take on the values of 0 or 1

MAF

The minor allele frequency at which to drop SNPs. Default is set to 0.01, meaning if the minor allele occurs less than 1 percent of the time in a given SNP, that given SNP will be dropped from the dataset.

Value

SNPs

The SNP matrix where columns that were either all 1's or all 0's are removed

SNPs_Dropped

A true/false vector with length ncol(SNPs), where the TRUE's indicate that the column was not dropped and the FALSE's indicate that the column was dropped

Examples

1
2
3
4
5
6
7
8
9
data("vignette_lm_dat")
Y <- vignette_lm_dat$Phenotype
SNPs <- vignette_lm_dat[,-1]
SNPs <- standardize(SNPs = SNPs,method = "major-minor",number_cores = 1)
list1 <- aggregate_SNPs(SNPs = SNPs, Y = Y)
SNPs <- list1[[1]]
Y <- list1[[2]]

level_function(SNPs, MAF = .01)

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