Skip to main content
. 2020 Jan 6;6:e243. doi: 10.7717/peerj-cs.243
## Set parameters for hypothetical species ##
> N<-100 # total number of sampled individuals
> Hstar<-10 # total number of haplotypes
> probs<-rep(1/Hstar, Hstar) # equal haplotype frequency
### Run simulations ###
> HACSObj<-HACHypothetical(N = N, Hstar = Hstar, probs = probs) # call helper function
# set seed here if desired, e.g., set.seed(12345)
> HAC.simrep(HACSObj)
Simulating haplotype accumulation...
===============================================================================— 100%
—Measures of Sampling Closeness —
Mean number of haplotypes sampled: 10
Mean number of haplotypes not sampled: 0
Proportion of haplotypes sampled: 1
Proportion of haplotypes not sampled: 0
Mean value of N*: 100
Mean number of specimens not sampled: 0
Desired level of haplotype recovery has been reached
———- Finished. ———-
The initial guess for sampling sufficiency was N = 100 individuals
The algorithm converged after 1 iterations and took 3.637 s
The estimate of sampling sufficiency for p = 95% haplotype recovery is N* = 100 individuals ( 95% CI: 100-100 )
The number of additional specimens required to be sampled for p = 95% haplotype recovery is N* - N = 0 individuals