hetBySnpSex: Heterozygosity by SNP and sex

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/hetBySnpSex.R

Description

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

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

GWASTools documentation built on Nov. 8, 2020, 7:49 p.m.