removedDoubleProbes: Remove duplicated SNPs

View source: R/genotypeInfoUpdate.R

removedDoubleProbesR Documentation

Remove duplicated SNPs

Description

Remove duplicated SNPs that have same rs-names or duplicated genomic position.

Usage

removedDoubleProbes(
  plink,
  inputPrefix,
  chipAnnoFile,
  chipType,
  outputSNPdupFile,
  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.

chipAnnoFile

an input chip annotation file. If the chip annotation file is not available for your study, it can be downloaded from http://www.well.ox.ac.uk/~wrayner/strand/.

chipType

a string name defines the type of the chip annotation file: 'SNPIDstudy', and 'rsIDstudy'. The detail is described in prepareAnnoFile4affy.

outputSNPdupFile

a pure text file that stores the duplicated SNP IDs, which are detected by the use of the chip annotation file.

outputPrefix

the prefix of the output PLINK binary files.

Details

Duplicated SNPs have two levels of meaning: 1.) SNPs have same rs-names but different versions of SNP ID in chip annotation file. e.g. SNP-A IDs for Affymetrix chip. 2.) SNPs with duplicated genomic position: the combination of base pair position and chromosomal location.

Value

The output PLINK binary files after removing duplicated SNP IDs.

Author(s)

Junfang Chen

See Also

prepareAnnoFile4affy

Examples

## In the current working directory
bedFile <- system.file("extdata", "controlData.bed", package="Gimpute")
bimFile <- system.file("extdata", "controlData.bim", package="Gimpute") 
famFile <- system.file("extdata", "controlData.fam", package="Gimpute")
chipAnnoFile <- system.file("extdata", "chipAnno.txt", package="Gimpute")
system(paste0("scp ", bedFile, bimFile, famFile, " ."))
inputPrefix <- "controlData"     
chipType <- "rsIDstudy"
outputSNPdupFile <- "snpDup.txt"
outputPrefix <- "removedDoubleProbes"
## Not run: Requires an executable program PLINK, e.g.
## plink <- "/home/tools/plink"
## removedDoubleProbes(plink, inputPrefix, chipAnnoFile,
##                     chipType, outputSNPdupFile, outputPrefix)

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