This function organizes higher-level information for creating variants from gene trees output from coalescent simulations. Note that all gene trees must be rooted and binary.
vars_gtrees(obj = NULL, fn = NULL) write_gtrees(gtrees, out_prefix)
obj | Object containing gene trees.
This can be one of the following:
(1) A single |
---|---|
fn | A single string specifying the name of the file containing
the |
gtrees | A |
out_prefix | Prefix for the output file of gene trees.
The extension will be |
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, which you can view (but not change) using the object's
trees()
method.
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 either of these packages, I encourage you to cite them. For citation
information, see output from citation("scrm")
or citation("coala")
.
If using an output file from a command-line program like ms
/msms
,
add the -T
option.
write_gtrees
: Write gene trees to ms-style output file.