Learn R Programming

GWASTools (version 1.18.0)

qualityScoreBySnp: Mean and median quality score for SNPs

Description

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

Usage

qualityScoreBySnp(intenData, genoData, scan.exclude = NULL, block.size = 5000, verbose = TRUE)

Arguments

intenData
genoData
GenotypeData object
scan.exclude
An integer vector containing the id's of scans to be excluded.
block.size
Number of SNPs to be read from intenData and genoData at once.
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 snp.
median.quality
A vector of median quality scores for each snp.

Details

intenData and genoData must have matching snpID and scanID.

See Also

IntensityData, GenotypeData, qualityScoreByScan

Examples

Run this code
qualfile <- system.file("extdata", "illumina_qxy.gds", package="GWASdata")
qual <- GdsIntensityReader(qualfile)
qualData <- IntensityData(qual)

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

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

Run the code above in your browser using DataLab