row.summary {snpStats} | R Documentation |
Summarize rows or columns of a snp matrix
Description
These function calculates summary statistics of each row or column of
call rates and heterozygosity for each row of a an
object of class "SnpMatrix"
or "XSnpMatrix"
Usage
row.summary(object)
col.summary(object, rules = NULL, uncertain = TRUE)
Arguments
object |
genotype data as a SnpMatrix-class or
XSnpMatrix-class object
|
rules |
An object of class
"ImputationRules" . If
supplied, the rules coded in this object are used, together with
the snp genotype data in
object , to generate imputed SNPs. The column summary of these
imputed data are then returned
|
uncertain |
If TRUE uncertain genotypes are used in
calculation of allele and genotype frequencies (by scoring as
posterior expectations). Otherwise, and for Hardy-Weinberg tests,
they are ignored
|
Value
row.summary |
returns a data frame with rows corresponding to rows of the input object
and with columns/elements:
Call.rate: Proportion of SNPs called
Certain.calls: Proportion of called SNPs with certain calls
Heterozygosity: Proportion of called SNPs which are
heterozygous
Uncertain calls are ignored for calculating the heterozygosity.
|
col.summary |
returns a data frame with rows corresponding to columns of the input object
and with columns/elements:
Calls: The number of valid calls
Call.rate: The proportion of genotypes called
Certain.calls: Proportion of called SNPs with certain calls
RAF: The "risk" allele (allele B ) frequency
MAF: The minor allele frequency
P.AA: The frequency of homozygous genotype 1 (A/A)
P.AB: The frequency of heterozygous genotype 2 (A/B)
P.BB: The frequency of homozygous genotype 3 (B/B)
z.HWE: A z-test for Hardy-Weinberg equilibrium
For objects of class "XSnpMatrix" , the following
additional columns are returned:
P.AY: The frequency of allele A in males
P.BY: The frequency of allele B in males
Calls.female: The number of valid calls in females (only
these calls are used in the z-test for HWE)
|
Note
The current version of row.summary
does not deal with the X chromosome
differently, so that males are counted as homozygous.
Author(s)
David Clayton dc208@cam.ac.uk
Examples
data(testdata)
rs <- row.summary(Autosomes)
summary(rs)
cs <- col.summary(Autosomes)
summary(cs)
cs <- col.summary(Xchromosome)
summary(cs)
[Package
snpStats version 1.42.0
Index]