Learn R Programming

coala (version 0.7.2)

get_outgroup: Getters for coalescent models

Description

Getters for coalescent models

Usage

get_outgroup(model)

get_outgroup_size(model, for_sim = FALSE)

get_sample_size(model, for_sim = FALSE)

get_features(model)

get_parameter_table(model)

get_parameter(model)

get_locus_length(model, locus = NULL, group = NULL, total = TRUE)

get_populations(model)

get_locus_length_matrix(model)

get_locus_number(model, group = NA, ignore_variation = FALSE)

get_population_individuals(model, pop, zero_indexed = FALSE, haploids = TRUE)

get_summary_statistics(model)

Arguments

model

The coalescent model from which aspects are returned

for_sim

If true, the sample size used internally for the simulation will be reported rather than the number of actual samples. The numbers can be unequal for the simulation of unphased data.

locus

The number of the locus.

group

The group of loci.

total

If FALSE, the length of loci in a trio will be reported individually. If TRUE the sum of the loci"s length will be reported. This does not affect non-trio loci.

ignore_variation

For internal use. Will likely be removed soon.

pop

The population for which aspects are returned

zero_indexed

If true, the names of the populations are started from 0 instead of from 1.

haploids

If TRUE, the function always returns all haploids from the population, even if the model is polyploid.

Functions

  • get_outgroup(): Returns the population that is marked as outgroup

  • get_outgroup_size(): Returns the number of samples in the outgroup

  • get_sample_size(): Returns a vector containing the number of haploids sampled per population. This is the default ordering of individuals used by coala.

  • get_parameter_table(): Returns the ranged parameters of a model as a data.frame

  • get_parameter(): Returns the ranged parameters of a model

  • get_locus_length(): Returns the length of the loci in a locus group

  • get_populations(): Returns a vector of populations in the model

  • get_locus_length_matrix(): Returns a matrix with detailed length information about the loci in the model.

  • get_locus_number(): Returns the number of loci in a locus group

  • get_population_individuals(): Returns the index of the individuals of one population. Ignores outgroups, so that it can be used for indexing segregating sites.

  • get_summary_statistics(): Returns the summary statistics in the model

Author

Paul Staab