This function organizes higher-level information for creating variants from gene trees output from coalescent simulations.

vars_gtrees(obj = NULL, fn = NULL)

Arguments

obj

Object containing gene trees. This can be one of the following: (1) A single list with a trees field inside. This field must contain a set of gene trees for each sequence. (2) A list of lists, each sub-list containing a trees field of length 1. The top-level list must be of the same length as the number of sequences. Defaults to NULL.

fn

A single string specifying the name of the file containing the ms-style coalescent output with gene trees. Defaults to NULL.

Value

A vars_gtrees_info object containing information used in create_variants to create haploid variants. This class is just a wrapper around a list of NEWICK tree strings, one for each gene tree.

Details

Using the obj argument is designed after the trees fields in the output from the scrm and coala packages. (These packages are not required to be installed when installing jackalope.) To get gene trees, make sure to add + sumstat_trees() to the coalmodel for coala, or make sure that "-T" is present in args for scrm.

If using an output file from a command-line program like ms/msms, add the -T option.