hetBySnpSex {GWASTools} | R Documentation

## Heterozygosity by SNP and sex

### Description

This function calculates the percent of heterozygous genotypes for males and females for each SNP.

### Usage

    hetBySnpSex(genoData, scan.exclude = NULL,
                verbose = TRUE)

### Arguments

`genoData` | `GenotypeData` object
`scan.exclude` | An integer vector containing the id's of scans to be excluded.
`verbose` | Logical value specifying whether to show progress information.

### Details

This function calculates the percent of heterozygous genotypes for males and females for each SNP given in `genoData`. A "sex" variable must be present in the scan annotation slot of `genoData`.

### Value

The result is a matrix containing the heterozygosity rates with snps as rows and 2 columns ("M" for males and "F" for females).

### Author(s)

Cathy Laurie

### See Also

`GenotypeData`, `hetByScanChrom`

### Examples

    library(GWASdata)
    file <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
    gds <- GdsGenotypeReader(file)

    # need scan annotation with sex
    data(illuminaScanADF)
    genoData <-  GenotypeData(gds, scanAnnot=illuminaScanADF)

    het <- hetBySnpSex(genoData)
    close(genoData)

[Package GWASTools version 1.33.3 Index]