Description Usage Arguments Author(s) Examples
View source: R/getLogLikelihoodGivenRelation.R
Compute logLik of genotypes of person 1 given genotypes of person 2 and assumed relation between the two persons (expressed with transition probability matrix; as returned with 'makeTransitionMatrix').
1 2 | getLogLikelihoodGivenRelation(bGenotype1, bGenotype2,
TransitionMatrix, q)
|
bGenotype1 |
blurred genotype of person 1 |
bGenotype2 |
blurred genotype of person 2 |
TransitionMatrix |
transition probability matrix |
q |
vector of effect allele frequencies |
Yurii Aulchenko
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require(GenABEL.data)
data(srdta)
# select 10 first SNPs
df <- srdta[,1:10]
# compute effect allele freq
EAF <- summary(gtdata(df))$"Q.2"
# get genotypes of first 2 people
g1 <- as.numeric(df[1:2,])
# blur all genotypes of person 1; use HWE to infer missing
bg1 <- blurGenotype(g1[1,],q=EAF)
# blur all genotypes of person 2; use HWE to infer missing
bg2 <- blurGenotype(g1[2,],q=EAF)
# generate sib-sib transision matrices
trss <- makeTransitionMatrix(EAF,nmei=c(2,2))
getLogLikelihoodGivenRelation(bg1,bg2,trss,EAF)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.