Heterozygosity by SNP and sex

Share:

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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.