KinMix | R Documentation |
Create a DNA mixture model, with possibly related contributors.
KinMix(data,k,C,database,K=character(0),reference.profiles = NULL,
contribs=NULL,typed.gts=NULL,IBD=NULL,targets=NULL,pars=NULL,mle=FALSE,
dir=character(0),domainnamelist=NULL,
load=FALSE,write=FALSE,dyes=NULL,
triangulate=TRUE,compile=TRUE,compress=TRUE,use.order=TRUE)
data |
A list containing one |
k |
Number of contributors. |
C |
A list of thresholds, one for each mixture. |
database |
A data.frame containing at least variables |
K |
Names of reference profiles; these can be chosen freely, but should match (possibly only a subset of) the names specified by the reference profiles. |
reference.profiles |
A data.frame containing allele counts for each reference profile, if not specified in |
contribs |
vector of character tags identifying contributors to the mixture |
typed.gts |
list of named genotype profiles |
IBD |
IBD pattern distribution, or any object accepted as an argument to |
targets |
vector of character tags identifying individuals related according to |
pars |
optionally, a |
mle |
logical: should |
dir |
Location of network files if loading or saving the networks. |
domainnamelist |
Names of marker-wise network files (without hkb-extension). Default is the set of markers. |
load |
Read networks from disk? |
write |
Save networks as hkb files? |
dyes |
A list containing a list of dyes indexed by markers |
triangulate |
Triangulate the networks? Default is to triangulate the network using a good elimination order. |
compile |
Compile the networks? |
compress |
Compress the network? Defaults to |
use.order |
Should the default elimination order be used for triangulation? Otherwise the "total.weight" heuristic for triangulation in Hugin is used. |
Generalises DNAmixture
to allow relatedness as in rpt.IBD
An object of class DNAmixture
. This contains amongst other things
markers |
The joint set of markers used for the mixtures specified. |
domains |
For models involving unknown contributors,
a list containing one Bayesian network ( |
data |
A list containing for each marker the combined allele frequencies,
peak heights, and reference profiles as produced by |
It may also contain
mle |
Maximum likelihood estimates of the peak height model parameters |
logL |
log-likelihood of model evaluated at |
[DNAmixturesLite]{DNAmixture}
data(test2data)
## Fit 2-person mixture - baseline model
mixD<-DNAmixture(list(epg),k=2,C=list(0.001),database=db)
pars<-mixpar(rho=list(2),eta=list(100),xi=list(0.1),phi=list(c(U1=0.7,U2=0.3)))
baseline<-logL(mixD)(pars)
baseline
mixD<-DNAmixture(list(epg),k=2,C=list(0.001),database=db)
pars<-mixpar(rho=list(2),eta=list(100),xi=list(0.1),phi=list(c(U1=0.7,U2=0.3)))
mlD <- mixML(mixD, pars)
print(mlD$mle)
pars<-mlD$mle
baseline<-logL(mixD)(pars)
baseline
## Fit 2-person mixture model in which contributor 1 is parent of a typed individual Cgt
mixD<-KinMix(list(epg),k=2,C=list(0.001),database=db,
contribs=c('F'),typed.gts=list(C=Cgt),IBD='parent-child',targets=c('F','C'),
pars=pars)
log10LR<-(mixD$logL-baseline)/log(10)
cat('log10 LR',log10LR,'\n')
## Fit 2-person mixture model in which contributor 1 is father of a typed individual Cgt
## with mother Mgt
mixD<-KinMix(list(epg),k=2,C=list(0.001),database=db,
contribs=c('F'),typed.gts=list(M=Mgt,C=Cgt),IBD='trio',targets=c('F','M','C'),
pars=pars)
log10LR<-(mixD$logL-baseline)/log(10)
cat('log10 LR',log10LR,'\n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.