missingGenotypeBySnpSex: Missing Counts per SNP by Sex

View source: R/missingGenotypeBySnpSex.R

missingGenotypeBySnpSexR Documentation

Missing Counts per SNP by Sex

Description

For all SNPs for each sex tabulates missing SNP counts, allele counts and heterozygous counts.

Usage

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

Arguments

genoData

GenotypeData object.

scan.exclude

A vector containing the scan numbers of scans that are to be excluded from the total scan list.

verbose

Logical value specifying whether to show progress information.

Details

This function calculates the fraction of missing 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

This function returns a list with three components: "missing.counts," "scans.per.sex," and "missing.fraction."

missing.counts

A matrix with one row per SNP and one column per sex containing the number of missing SNP counts for males and females, respectively.

scans.per.sex

A vector containing the number of males and females respectively.

missing.fraction

A vector containing the fraction of missing counts for each SNP, with females excluded for the Y chromosome.

Author(s)

Cathy Laurie, Stephanie Gogarten

See Also

GenotypeData, missingGenotypeByScanChrom

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)

missingRate <- missingGenotypeBySnpSex(genoData)
close(genoData)

smgogarten/GWASTools documentation built on May 18, 2024, 1:19 a.m.