Skip to contents

This function combines the two genotype datasets based on either common SNPs or all the SNPs between them.

Usage

MergeRegion(
  DataDir,
  ResultDir,
  finput1,
  finput2,
  foutput,
  use_common_snps = TRUE
)

Arguments

DataDir

A character string for the file path of the input PLINK binary files.

ResultDir

A character string for the file path where all output files will be stored. The default is tempdir().

finput1

Character string, specifying the prefix of the first input PLINK binary files.

finput2

Character string, specifying the prefix of the first input PLINK binary files.

foutput

Character string, specifying the prefix of the output PLINK binary files if filtering option for the SNPs is chosen. The default is "FALSE".

use_common_snps

Boolean value, TRUE or FALSE, specifying to use common SNPs for merging or to use all the SNPs.

Value

NULL

The output PLINK files will be saved in ResultDir.

Author

Banabithi Bose

Examples

DataDir <- GXwasR:::GXwasR_data()
ResultDir <- tempdir()
finput1 <- "GXwasR_example"
finput2 <- "GXwasR_example_imputed"
foutput <- "Test_output"
y <- MergeRegion(DataDir, ResultDir, finput1, finput2, foutput, use_common_snps = TRUE)
#>  Merging is done using the common SNPs between the input genotype files.
#>  Plink files with merged regions are in /var/folders/d6/gtwl3_017sj4pp14fbfcbqjh0000gp/T//RtmpO7c0S8 prefixed as Test_output