# NOT RUN {
## Simulate some allele frequencies:
freqs <- simAlleleFreqs()
m <- 2
n0 <- sapply(freqs, function(px){
peaks = unique(sample(length(px),
size = 2 * m,
replace = TRUE,
prob = px))
return(length(peaks))
})
## Compute P(m|n0) for m=1,...,4 and the sampled n0
pContrib(n0=n0,probs=freqs,m.max=4)
# }
Run the code above in your browser using DataLab