SNP_QC: Do quality control of SNP data downloaded from TCGAbiolinks

View source: R/SNP.R

SNP_QCR Documentation

Do quality control of SNP data downloaded from TCGAbiolinks

Description

Do quality control of SNP data downloaded from TCGAbiolinks

Usage

SNP_QC(
  snpData,
  geon = 0.02,
  mind = 0.02,
  maf = 0.05,
  hwe = 1e-06,
  miss = "NoCall"
)

Arguments

snpData

data.frame of SNP data downloaded from TCGAbiolinks

geon

filters out all variants with missing call rates exceeding the provided value (default 0.02) to be removed

mind

filters out all samples with missing call rates exceeding the provided value (default 0.02) to be removed

maf

filters out all variants with minor allele frequency below the provided threshold

hwe

filters out all variants which have Hardy-Weinberg equilibrium exact test p-value below the provided threshold

miss

character of miss value

Value

data.frame

Examples

# use demo data
snpDf <- matrix(sample(c("AA", "Aa", "aa"), 100, replace = TRUE), 10, 10)
snpDf <- as.data.frame(snpDf)
sampleGroup <- sample(c("A", "B"), 10, replace = TRUE)
result <- SNP_QC(snpDf)

huerqiang/GeoTcgaData documentation built on March 21, 2024, 1:42 a.m.