Learn R Programming

phylosim (version 3.0.5)

getSeqFromNode.PhyloSim: Get the Sequence object associated with a given node of a phylo object aggregated by a PhyloSim object

Description

Get the Sequence object associated with a given node of a phylo object aggregated by a PhyloSim object.

Usage

# S3 method for PhyloSim
getSeqFromNode(this, node=NA, ...)

Arguments

this

A PhyloSim object.

node

Node identifier.

...

Not used.

Value

A Sequence object.

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())))
	);
	# get the sequence associated with node 5
	getSeqFromNode(sim,5)	# Should be NA
	# Run the simulation
	Simulate(sim)
	# try again
	getSeqFromNode(sim,5)
 
# }

Run the code above in your browser using DataLab