removedUnmapProbes: Remove SNPs not in the chip annotation file

View source: R/genotypeInfoUpdate.R

removedUnmapProbesR Documentation

Remove SNPs not in the chip annotation file

Description

Check if all SNPs are included in the chip annotation file. If some of the input SNPs are not included, then remove them.

Usage

removedUnmapProbes(
  plink,
  inputPrefix,
  chipAnnoFile,
  chipType,
  outputPrefix,
  outputSNPfile
)

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

a pure text file that stores the chip annotation information.

chipType

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

outputPrefix

the prefix of the output PLINK binary files.

outputSNPfile

a pure text file that stores the SNP IDs, one per line, which are not mapped to the chip annotation file.

Details

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

Value

The output text file contains the removed SNP IDs, one per line. The PLINK binary files after removing unmapped 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" ## Specify the input PLINK file prefix
outputSNPfile <- "1_07_removedUnmapProbes"   
## Not run: Requires an executable program PLINK, e.g.
## plink <- "/home/tools/plink"
## removedUnmapProbes(plink, inputPrefix, chipAnnoFile, chipType, 
##                    outputPrefix, outputSNPfile)

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