FilterSNP: Filter out SNPs.
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()
.- finput
Character string, specifying the prefix of the input PLINK binary files.
- foutput
Character string, specifying the prefix of the output PLINK binary files if the filtering option for the SNPs is chosen. The default is "FALSE".
- SNPvec
R dataframe with SNP names to be excluded.
- extract
Boolean value,
TRUE
orFALSE
, specifying whether to extract the snps or discard the snps. The default isFALSE
.
Examples
DataDir <- GXwasR:::GXwasR_data()
ResultDir <- tempdir()
SNPvec <- c("rs6529954", "rs12858640", "rs5962098")
finput <- "GXwasR_example"
foutput <- "Filter_Test"
FilterSNP(DataDir, ResultDir, finput, foutput, SNPvec = SNPvec, extract = TRUE)
#> ℹ 3 SNPs are extracted
#> ✔ Plink files with extracted SNPs are in /var/folders/d6/gtwl3_017sj4pp14fbfcbqjh0000gp/T//RtmpO7c0S8 prefixed as Filter_Test
#> NULL