readTree.PhyloSim: Read tree from file

Description Usage Arguments Value Author(s) See Also Examples

Description

Read tree from file.

This method reads a tree by using the read.tree function from the ape package and stores in the PhyloSim object. If an alignment is already attached to the PhyloSim object, it must contain all sequences corresponding to tip nodes.

Usage

1
2
## S3 method for class 'PhyloSim'
readTree(this, file, ...)

Arguments

this

A PhyloSim object.

file

A file name specified by either a variable of mode character, or a double-quoted string.

...

Not used.

Value

The PhyloSim object (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see PhyloSim.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	# get a safe file name
	fname<-paste("PhyloSim_dummy_fas_",Sys.getpid(),sep="")
	# write out a fasta alignment
	cat("(a,(b,c));",file=fname);
	# construct a PhyloSim object:
	sim<-PhyloSim()
	# read the alignment
	readTree(sim,fname)
	# remove alignment file
	unlink(fname)
	# plot the tree
	plot(sim)
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.