sim

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2025 License: BSD-2-Clause Imports: 19 Imported by: 0

Documentation

Overview

Package sim implements a command to simulate a phylogenetic tree and its biogeographic data.

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.Command{
	Usage: `sim [-o|--output <file>]
	[--trees <number>] [--terms <range>] [-p|--particles <number>]
	[--name <string>]
	--age <range> --lambda <range> <project-file>`,
	Short: "simulate data",
	Long: `
Command sim creates one or more random trees with its biogeographic data.

The argument of the command is a PhyGeo project file, used to define the plate
motion model, the landscape model, and the values for the pixel priors.

The flag --age is required and provides the range of the root age. The range
can be a single number (all simulations will have the same age) or a range
separated by a comma; for example, "66,251" will simulate trees selecting root
ages between 251 and 66 million years.

By default, 100 trees will be created. Use the flag --trees to define a
different number of trees.

By default, each tree will have between 40 and 80 terminals. Use the flag
--terms to define a range. The range can be a single number (all simulated
trees will have the indicated number of terminals) or a range separated by a
comma; for example, "40,80" defines the default range.

Trees will be simulated using a Yule process, with the speciation rate defined
as spRate = (ln(terms) - ln(2)) / rootAge.

The flag --lambda is required and provides the range of the concentration
parameter. The range can be a single number (all simulations will have the
same concentration parameter) or a range separated by a comma: for example
"0,100" will simulate diffusion with concentration parameters between 0 and
100.

By default, 100 particles will be simulated for the stochastic mapping. The
number of particles can be changed with the flag --particles, or -p. By
default, the particles that make the range will be spread around the centroid
of the distribution, using a spherical normal of lambda 100. Use the flag
--spread to change the spreading of the particles.

By default, trees will be named as "random-<number>". Use the flag --name to
set a different tree name prefix.

	`,
	SetFlags: setFlags,
	Run:      run,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL