qualityScoreByScan: Mean and median quality score for scans

View source: R/qualityScoreByScan.R

qualityScoreByScanR Documentation

Mean and median quality score for scans

Description

This function calculates the mean and median quality score, over all SNPs with a non-missing genotype call, for each scan.

Usage

qualityScoreByScan(intenData, genoData,
                   snp.exclude = NULL,
                   verbose = TRUE)

Arguments

intenData

IntensityData object

genoData

GenotypeData object

snp.exclude

An integer vector containing the id's of SNPs to be excluded.

verbose

Logical value specifying whether to show progress information.

Details

intenData and genoData must have matching snpID and scanID. Y chromosome SNPs are excluded for females. A "sex" variable must be present in the scan annotation slot of intenData or genoData.

Value

The function returns a matrix with the following columns:

mean.quality

A vector of mean quality scores for each scan

median.quality

A vector of median quality scores for each scan.

Author(s)

Cathy Laurie

See Also

IntensityData, GenotypeData, qualityScoreBySnp

Examples

library(GWASdata)
qualfile <- system.file("extdata", "illumina_qxy.gds", package="GWASdata")
qual <- GdsIntensityReader(qualfile)
# need scan annotation with sex
data(illuminaScanADF)
qualData <- IntensityData(qual, scanAnnot=illuminaScanADF)

genofile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
geno <- GdsGenotypeReader(genofile)
genoData <- GenotypeData(geno, scanAnnot=illuminaScanADF)

quality <- qualityScoreByScan(qualData, genoData)
close(qualData)
close(genoData)

smgogarten/GWASTools documentation built on Nov. 10, 2024, 9:54 p.m.