HACSim (version 1.0.1)

HACReal: Set up an object to simulate haplotype accumulation curves for a real species

Description

Helper function which creates an object containing necessary information to run a simulation of haplotype accumulation for a real species of interest

Usage

HACReal(perms = 10000, p = 0.95, conf.level = 0.95, 
subsample = FALSE, prop = NULL, progress = TRUE, filename = NULL)

Arguments

perms

Number of permutations (replications)

p

Proportion of haplotypes to recover

conf.level

Desired confidence level for gaphical output and interval estimation

subsample

Is a subsample of DNA sequences desired?

prop

If subsample = TRUE, the proportion of DNA sequences to subsample

progress

Should iteration output be printed to the R console?

filename

Name of file where simulation results are to be saved

Value

An object with 13 elements that can be passed to HAC.simrep

Examples

Run this code
# NOT RUN {
    ## Simulate real species ##
    # outputs file called "output.csv"
    HACSObj <- HACReal(filename = "output") 
    
    ## Simulate real species - subsampling ##
    # subsamples 25% of DNA sequences
    HACSObj <- HACReal(subsample = TRUE, prop = 0.25, conf.level = 0.95, 
    filename = "output") 
    
    ## Simulate real species and all parameters changed - subsampling ##
    HACSObj <- HACReal(perms = 10000, p = 0.90, subsample = TRUE, 
    prop = 0.15, conf.level = 0.99, filename = "output")
# }

Run the code above in your browser using DataLab