removedSnpHWEauto: Hardy Weinberg Equilibrium test for autosomal SNPs

View source: R/genotypeQC.R

removedSnpHWEautoR Documentation

Hardy Weinberg Equilibrium test for autosomal SNPs

Description

Remove autosomal SNPs deviating from Hardy Weinberg Equilibrium (HWE).

Usage

removedSnpHWEauto(
  groupLabel,
  plink,
  inputPrefix,
  pval = 1e-06,
  outputPvalFile,
  outputSNPfile,
  outputPrefix
)

Arguments

groupLabel

a string value indicating the outcome label: "control", or, "case" or "caseControl" for both existing groups. For more details, see getGroupLabel.

plink

an executable program in either the current working directory or somewhere in the command path.

inputPrefix

the prefix of the input PLINK binary files.

pval

the p-value cutoff for controlling HWE test in either control or case subjects. Only autosomal SNPs are considered. The default value is 0.000001.

outputPvalFile

the output pure text file that stores autosomal SNPs and their sorted HWE p-values.

outputSNPfile

the output pure text file that stores the removed SNPs, one per line.

outputPrefix

the prefix of the output PLINK binary files.

Value

The output PLINK binary files after HWE test on the autosome.

Author(s)

Junfang Chen

See Also

removedSnpFemaleChrXhweControl, getGroupLabel.

Examples

 
## In the current working directory
bedFile <- system.file("extdata", "genoUpdatedData.bed", package="Gimpute")
bimFile <- system.file("extdata", "genoUpdatedData.bim", package="Gimpute") 
famFile <- system.file("extdata", "genoUpdatedData.fam", package="Gimpute")
system(paste0("scp ", bedFile, bimFile, famFile, " ."))  
groupLabel <- "control"
inputPrefix <- "genoUpdatedData" ## Specify the input PLINK file prefix 
outputPvalFile <- "2_11_snpHwePvalAuto.txt"
outputSNPfile <- "2_11_snpRemovedHweAuto.txt" 
outputPrefix <- "2_11_removedSnpHweAuto" 
## Not run: Requires an executable program PLINK, e.g.
## plink <- "/home/tools/plink"
## removedSnpHWEauto(groupLabel, plink, inputPrefix, pval=0.000001,
##                   outputPvalFile, outputSNPfile, outputPrefix)

transbioZI/Gimpute documentation built on April 10, 2022, 4:20 a.m.