MAFdiffSexControl: Test for significantly different minor allele frequency (MAF) between sexes in control samples
Source:R/GXwasR_main_functions.R
MAFdiffSexControl.Rd
With parameters to filter out SNPs and/or flag the SNPs, this function tests for significantly different MAF (p-value < 0.05/no. of SNPs) between sexes in control samples solely for binary phenotypes. Since the disparities may be caused by technical confounding or sample biases for the research cohorts, it is advised that any SNPs in the controls with a sex difference in MAF be carefully evaluated and identified for further examination (Khramtsova et. al., 2023). In autosomal allele frequencies, sex differences are not anticipated.
Usage
MAFdiffSexControl(
DataDir,
ResultDir = tempdir(),
finput,
filterSNP = FALSE,
foutput = NULL
)
Arguments
- DataDir
Character string for the file path of the input PLINK binary files.
- ResultDir
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 with both male and female samples. This file needs to be in
DataDir
.- filterSNP
Boolean value,
TRUE
orFALSE
for filtering out the SNPs or not (i.e., only flagged). The default isFALSE
.- foutput
Character string, specifying the prefix of the output PLINK binary files if filtering option for the SNPs is chosen. The default is NULL.
Value
A list object containing excluded or flagged SNPs. If filterSNP
= TRUE
, the output filtered PLINK binary
files will be produced inside DataDir
.
Examples
DataDir <- GXwasR:::GXwasR_data()
ResultDir <- tempdir()
finput <- "GXwasR_example"
foutput <- "Test_output"
x <- MAFdiffSexControl(DataDir, ResultDir, finput, filterSNP = TRUE, foutput = foutput)
#> ℹ No SNP to be flagged or excluded.