chrWiseSplit: Split genome-wide genotyping data into chromosome-wide PLINK...

View source: R/phasingImpute.R

chrWiseSplitR Documentation

Split genome-wide genotyping data into chromosome-wide PLINK binary files.

Description

Split the whole genome genotyping data chromosome-wise; allow parallel computating for all chromosomes.

Usage

chrWiseSplit(plink, inputPrefix, chrXPAR1suffix, chrXPAR2suffix, nCore = 25)

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 before splitting.

chrXPAR1suffix

if chromosome 25 is available and with PAR1, then generate the suffix with X_PAR1 for chrX_PAR1.

chrXPAR2suffix

if chromosome 25 is available and with PAR2, then generate the suffix with X_PAR2 for chrX_PAR2.

nCore

the number of cores used for parallel computation. The default value is 25.

Details

If chromosome 25 is also available, namely the pseudo-autosomal region of chromosome X, then further split chr25 (PAR or Chr_XY) into PAR1 and PAR2 according to the genomic coordination GRCh37 from https://en.wikipedia.org/wiki/Pseudoautosomal_region. The locations of the PARs within GRCh37 are: PAR1 X 60001 2699520; PAR2 X 154931044 155260560.

Value

The output PLINK binary files for each chromosome with the same prefix as the inputPrefix but appended with the chromosome codes, and possibly also the logical value for the pseudo-autosomal region (PAR) indicating if PAR exists in the input genotyping data or not.

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"
chrXPAR1suffix <- "X_PAR1"
chrXPAR2suffix <- "X_PAR2"
## Not run: Requires an executable program PLINK, e.g.
## plink <- "/home/tools/plink"
## chrWiseSplit(plink, inputPrefix, chrXPAR1suffix, chrXPAR2suffix, nCore)

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