missingGenotypeByScanChrom: Missing Counts per Scan per Chromosome

View source: R/missingGenotypeByScanChrom.R

missingGenotypeByScanChromR Documentation

Missing Counts per Scan per Chromosome

Description

This function tabulates missing genotype calls for each scan for each chromosome.

Usage

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

Arguments

genoData

GenotypeData object. Chromosomes are expected to be in contiguous blocks.

snp.exclude

A vector of IDs corresponding to the SNPs that should be excluded from the overall missing count.

verbose

Logical value specifying whether to show progress information.

Details

This function calculates the percent of missing genotypes in each chromosome of each scan 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," "snps.per.chr", and "missing.fraction."

missing.counts

A matrix with rows corresponding to the scans and columns indicating unique chromosomes containing the number of missing SNP's for each scan and chromosome.

snps.per.chr

A vector containing the number of non-excluded SNPs for each chromosome.

missing.fraction

A vector containing the fraction of missing counts for each scan over all chromosomes, excluding the Y chromosome for females.

Author(s)

Cathy Laurie

See Also

GenotypeData, missingGenotypeBySnpSex

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 <- missingGenotypeByScanChrom(genoData)
close(genoData)

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