Learn R Programming

GWASTools (version 1.18.0)

hetByScanChrom: Heterozygosity rates by scan and chromosome

Description

This function calculates the fraction of heterozygous genotypes for each chromosome for a set of scans.

Usage

hetByScanChrom(genoData, snp.exclude = NULL, verbose = TRUE)

Arguments

genoData
GenotypeData object. Chromosomes are expected to be in contiguous blocks.
snp.exclude
An integer vector containing the id's of SNPs to be excluded.
verbose
Logical value specifying whether to show progress information.

Value

The result is a matrix containing the heterozygosity rates with scans as rows and chromosomes as columns, including a column "A" for all autosomes.

Details

This function calculates the percent of heterozygous and missing genotypes in each chromosome of each scan given in genoData.

See Also

GenotypeData, hetBySnpSex

Examples

Run this code
file <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
gds <- GdsGenotypeReader(file)
genoData <- GenotypeData(gds)
het <- hetByScanChrom(genoData)
close(genoData)

Run the code above in your browser using DataLab