removedExclProbe: Remove improper SNPs

View source: R/genotypeInfoUpdate.R

removedExclProbeR Documentation

Remove improper SNPs

Description

Remove SNPs that may be duplicated, or with unexpected SNP names.

Usage

removedExclProbe(plink, inputPrefix, excludedProbeIdsFile, 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.

excludedProbeIdsFile

a pure text file that stores the SNP IDs, one per line, which need to be removed. If it is null, then no SNPs are removed.

outputPrefix

the prefix of the output PLINK binary files.

Details

excludedProbeIdsFile should be defined in a plain text file in advance. Improper SNPs such as AFFX, cnvi etc.. with unexpect format must be excluded.

Value

The output PLINK binary files after removing unwanted SNP IDs.

Author(s)

Junfang Chen

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")
excludedProbeIdsFile <- system.file("extdata", "excludedProbeIDs.txt",
                                    package="Gimpute")
system(paste0("scp ", bedFile, bimFile, famFile, " ."))
inputPrefix <- "controlData" ## Specify the input PLINK file prefix
outputPrefix <- "1_06_removedExclProbe" 
## Not run: Requires an executable program PLINK, e.g.
## plink <- "/home/tools/plink"
## removedExclProbe(plink, inputPrefix, excludedProbeIdsFile, outputPrefix)

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