Learn R Programming

phylosim (version 3.0.5)

Simulate.PhyloSim: Run a simulation according to a PhyloSim object

Description

Run a simulation according to a PhyloSim object.

The phylo object and the root sequence must be set before attempting to run a simulation. Also the bigRate of the root sequence must not be NA or zero, so at least one sane Process object must be attached to the root sequence object.

Usage

# S3 method for PhyloSim
Simulate(this, quiet=FALSE, ...)

Arguments

this

A PhyloSim object.

quiet

TRUE or FALSE (default).

...

Not used.

Value

The PhyloSim object (invisible).

See Also

For more information see PhyloSim.

Examples

Run this code
# NOT RUN {
	# Create a PhyloSim object.
	# Provide the phylo object
	# and the root sequence.
	sim<-PhyloSim(
		name="TinySim",
		phylo=rcoal(3),
		root.seq=NucleotideSequence(string="ATGC",processes=list(list(JC69())))
	);
	# Run the simulation
	Simulate(sim);
	# Print the resulting sequences
	sim$sequences
	# Print the resulting alignment
	sim$alignment
 
# }

Run the code above in your browser using DataLab