Learn R Programming

phylosim (version 3.0.5)

getSequences.PhyloSim: Gets all the Sequence objects associated with the nodes of a phylo object aggregated by a PhyloSim object

Description

Gets all the Sequence objects associated with the nodes of a phylo object aggregated by a PhyloSim object.

The order of the Sequence objects in the returned list reflects the identifiers of the associated nodes.

Usage

# S3 method for PhyloSim
getSequences(this, ...)

Arguments

this

A PhyloSim object.

...

Not used.

Value

A list of sequence objects.

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="ATG",processes=list(list(JC69())))
	);
	# run the simulation
	Simulate(sim)
	# get all the associated sequence objects
	getSequences(sim)
	# get the sequence associated with node 3
	# via virtual field
	sim$sequences[[3]]
 
# }

Run the code above in your browser using DataLab