Learn R Programming

GWASTools (version 1.18.0)

qualityScoreByScan: 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
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.

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.

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.

See Also

IntensityData, GenotypeData, qualityScoreBySnp

Examples

Run this code
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)

Run the code above in your browser using DataLab