removedParentIdsMiss: Reset paternal and maternal codes

View source: R/genotypeQC.R

removedParentIdsMissR Documentation

Reset paternal and maternal codes

Description

Reset paternal and maternal codes of non-founders if parents not present. Replace the paternal ID and maternal ID of subjects (childs) by the value zero if the paternal ID and the maternal ID do not belong to any subject (parent) with the same family ID as the child.

Usage

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

outputPrefix

the prefix of the output PLINK binary files.

Details

Do make sure that all your family relationships are correct in your input data before applying this function. By default, if parental IDs are provided for a sample, they are not treated as a founder even if neither parent is in the dataset. With no modifiers, –make-founders clears both parental IDs whenever at least one parent is not in the dataset, and the affected samples are now considered as founders.

Value

The output PLINK binary files.

Author(s)

Junfang Chen

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, " ."))  
inputPrefix <- "genoUpdatedData" 
outputPrefix <- "2_07_removedParentIdsMiss" 
## Not run: Requires an executable program PLINK, e.g.
## plink <- "/home/tools/plink"
## removedParentIdsMiss(plink, inputPrefix, outputPrefix)

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