snp.qc: snp.qc

View source: R/snp-match.R

snp.qcR Documentation

snp.qc

Description

Drop SNPs from an annotSnpStats object according to SNP qc summary stats

Usage

snp.qc(x, thr = c(Call.rate = ">0.99", MAF = ">0.03", z.HWE = "<5"))

Arguments

x

annotSnpStats object

thr

named character vector, see Details.

Details

thr must be a named character vector, with names corresponding to column names in the matrix returned by col.summary. The elements of the vector should be character objects. The first character must be '<' or '>' and the remainder, on conversion to as.numeric, gives the threshold for keeping SNPs. z.HWE is special, and applies to abs(z.HWE).

Value

an annotSnpStats object with only SNPs that meet the criteria specified.

Author(s)

Chris Wallace

Examples

X<-example.data(1000,1000)
X
## find rare SNPs with high call rates that do not deviate from HWE
X.rare.qcpass <- snp.qc(X, thr=c(Call.rate=">0.99", MAF="<0.05", z.HWE="<3"))
X.rare.qcpass

chr1swallace/annotSnpStats documentation built on April 18, 2023, 11:22 a.m.