check.marker(data, snpsubset, idsubset, callrate = 0.95, perid.call=0.95, extr.call = 0.1, extr.perid.call = 0.1, het.fdr = 0.01, ibs.threshold = 0.95, ibs.mrk = 2000, ibs.exclude="both", maf, p.level = -1, fdrate = 0.2, odds = 1000, hweidsubset, redundant = "no", minconcordance = 2.0, qoption = "bh95", imphetasmissing = TRUE, XXY.call=0.8, intermediateXF = c(0.5, 0.5))
data
data
redundant
for details. Note that if "minconcordance" < 1
the program will take much longer time to runcheck.marker-class
summary.snp.data
.
At the second step of the iterative procedure,
per-person statistics, such call rate within
a person, heterozygosity and and between-person statistics
(identity by state across a random sample of markers) are generated,
using perid.summary
and ibs
functions.
Heterozygosity and IBS are estimated using only autosomal data.
If IBS is over ibs.threshold for a pair, one person from the
pair is added to the ibsfail list and excluded from the idok list.
At the second step, only the markers passing the first step are used. The procedure is applied recursively till no further markers and people are eliminated.
check.trait
,
ibs
,
summary.snp.data
,
perid.summary
,
plot.check.marker
,
summary.check.marker
,
redundant
,
HWE.show
,
check.marker-class
# usual way
require(GenABEL.data)
data(ge03d2c)
# truncate the data to make the example faster
ge03d2c <- ge03d2c[seq(from=1,to=nids(ge03d2c),by=2),seq(from=1,to=nsnps(ge03d2c),by=2)]
# many errors
mc0 <- check.marker(ge03d2c)
# take only people and markers passing QC
fixed0 <- ge03d2c[mc0$idok,mc0$snpok]
# major errors fixed, still few males are heterozygous for X-chromsome markers
mc1 <- check.marker(fixed0)
# fix minor X-chromosome problems
fixed1 <- Xfix(fixed0)
# no errors
mc2 <- check.marker(fixed1)
summary(mc2)
# ready to use fixed1 for analysis
# let us look into redundancy
require(GenABEL.data)
data(srdta)
mc <- check.marker(data=srdta,ids=c(1:300),call=.92,perid.call=.92)
names(mc)
mc$nohwe
mc <- check.marker(data=srdta@gtdata[,1:100],call=0.95,perid.call=0.9,
maf=0.02,minconcordance=0.9,fdr=0.1,redundant="all",ibs.mrk=0)
summary(mc)
HWE.show(data=srdta,snps=mc$nohwe)
plot(mc)
Run the code above in your browser using DataLab