removedSnpMissPostImp: Remove SNPs after post imputation

View source: R/phasingImpute.R

removedSnpMissPostImpR Documentation

Remove SNPs after post imputation

Description

Remove SNPs which have a non missing value for less than a predefined number of instances.

Usage

removedSnpMissPostImp(
  plink,
  inputPrefix,
  missCutoff,
  outRemovedSNPfile,
  outRetainSNPfile,
  outputPrefix
)

Arguments

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.

missCutoff

the cutoff of the least number of instances for a SNP that is not missing. The default is 20.

outRemovedSNPfile

the output file of SNPs with pre-defined missing values that are removed.

outRetainSNPfile

the output file of SNPs that are retained.

outputPrefix

the prefix of the PLINK binary files.

Value

The PLINK binary files after post imputation quality control and a pure text file contains SNPs with pre-defined missing values.

Author(s)

Junfang Chen

Examples

## In the current working directory
bedFile <- system.file("extdata", "alignedData.bed", package="Gimpute")
bimFile <- system.file("extdata", "alignedData.bim", package="Gimpute") 
famFile <- system.file("extdata", "alignedData.fam", package="Gimpute")
system(paste0("scp ", bedFile, " ."))   
system(paste0("scp ", bimFile, " ."))   
system(paste0("scp ", famFile, " ."))    
inputPrefix <- "alignedData" 
outputPrefix <- "removedSnpMissPostImp" 
## Not run: Requires an executable program PLINK, e.g.
## plink <- "/home/tools/plink"
## removedSnpMissPostImp(plink, inputPrefix, missCutoff=20, 
##                       outRemovedSNPfile, outRetainSNPfile, outputPrefix)
## 

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