SexCheck {SeqSQC} | R Documentation

## Sample gender check with SeqSQC object input file.

### Description

Function to calculate the X chromosome inbreeding coefficient and to predict sample gender.

### Usage

    SexCheck(seqfile, remove.samples = NULL, missing.rate = 0.1,
      ss.cutoff = 300, maf = 0.01, ...)

### Arguments

`seqfile` | SeqSQC object, which includes the merged gds file for study cohort and benchmark.
`remove.samples` | a vector of sample names for removal from sex check. Could be problematic samples identified from previous QC steps, or user-defined samples.
`missing.rate` | to use the SNPs with "<= `missing.rate`" only; if NaN, no threshold. By default, we use `missing.rate = 0.1` to filter out variants with missing rate greater than 10%.
`ss.cutoff` | the minimum sample size (300 by default) to apply the MAF filter. This sample size is the sum of study samples and the benchmark samples of the same population as the study cohort.
`maf` | to use the SNPs with ">= `maf`" if sample size defined in above argument is greater than `ss.cutoff`; otherwise NaN is used by default for no MAF threshold.
`...` | Arguments to be passed to other methods.

### Details

Samples are predicted to be female or male if the inbreeding coefficient is below 0.2, or greater than 0.8, respectively. The samples with discordant reported gender and predicted gender are considered as problematic. When the inbreeding coefficient is within the range of [0.2, 0.8], “0” is shown in the column of `pred.sex` to indicate ambiguous gender, which is not considered as problematic.

### Value

a data frame with sample name, reported gender, x chromosome inbreeding coefficient, and predicted gender.

### Author(s)

Qian Liu qliu7@buffalo.edu

### Examples

    load(system.file("extdata", "example.seqfile.Rdata", package="SeqSQC"))
    gfile <- system.file("extdata", "example.gds", package="SeqSQC")
    seqfile <- SeqSQC(gdsfile = gfile, QCresult = QCresult(seqfile))
    seqfile <- SexCheck(seqfile, remove.samples=NULL, missing.rate=0.1)
    res.sexc <- QCresult(seqfile)$SexCheck
    tail(res.sexc)

[Package SeqSQC version 1.2.0 Index]