Description Usage Arguments Details Value See Also Examples
Creates a list of the most likely genotypes at each locus, and the most likely whole-profile genotype.
1 2 | get.likely.genotypes(hypothesis,params,results,
posterior=FALSE,joint=FALSE,prob=ifelse(joint==FALSE,0.1,0.05))
|
hypothesis |
Hypothesis object created by either
|
params |
Parameters object created by
|
results |
Results object returned by |
posterior |
Logical indicating whether to return all genotype probabilities, rather than just the most likely. |
joint |
Logical indicating whether or not to return joint genotypes and probabilities. If FALSE, marginal genotypes and probabilities are returned instead. |
prob |
Probability threshold for single-locus genotype probabilities. Defaults to 0.1 if returning marginal probabilities, and 0.05 if returning joint probabilities. |
Either joint or marginal genotypes and genotype probabilities
are given. Locus-specific genotypes are only given if their probabilty
exceeds prob
. The most likely whole-profile genotype is given,
regardless of the probability threshold at each locus. Joint
probabilities give the probability of a multi-contributor genotype,
whereas marginal probabilities give the probability of a single
contributor, summing over all the possible genotypes for all other
contributors.
locusSpecific |
Locus genotypes and probabilities which are
greater than |
topGenotype |
Most likely whole-profile genotype for all
contributors if |
defence.hypothesis, prosecution.hypothesis, optimisation.params,DEoptimLoop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ## Not run:
# datapath to example files
datapath = file.path(system.file("extdata", package="likeLTD"),"hammer")
# File paths and case name for allele report
admin = pack.admin.input(
cspFile = file.path(datapath, 'hammer-CSP.csv'),
refFile = file.path(datapath, 'hammer-reference.csv'),
caseName = "hammer",
kit= "SGMplus"
)
# Enter arguments
args = list(
nUnknowns = 1,
doDropin = FALSE,
ethnic = "EA1",
adj = 1,
fst = 0.02,
relatedness = c(0,0)
)
# Create hypotheses
hypP = do.call(prosecution.hypothesis, append(admin,args))
hypD = do.call(defence.hypothesis, append(admin,args))
# Get parameters for optimisation
paramsP = optimisation.params(hypP)
paramsD = optimisation.params(hypD)
# Run optimisation
# n.steps set for demonstration purposes
results = evaluate(paramsP, paramsD, n.steps=1)
# get most likely marginal genotypes under defence
get.likely.genotypes(hypD,paramsD,results$Def)
# get most likely joint genotypes under defence
get.likely.genotypes(hypD,paramsD,results$Def,joint=TRUE)
# get full posterior likelihoods
get.likely.genotypes(hypD,paramsD,results$Def,posterior=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.