Learn R Programming

GWASTools (version 1.18.0)

hetBySnpSex: 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
scan.exclude
An integer vector containing the id's of scans to be excluded.
verbose
Logical value specifying whether to show progress information.

Value

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

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.

See Also

GenotypeData, hetByScanChrom

Examples

Run this code
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)

Run the code above in your browser using DataLab