genSeq | R Documentation |
Simulates DNA sequence on tree
under the specified model.
genSeq(tree, l=1000, Q=NULL, rate=1, format="DNAbin", ...)
tree |
object of class |
l |
length of desired sequences. |
Q |
transition matrix for the simulation. Row and column names ( |
rate |
multiplier for |
format |
format of the output object. Can be |
... |
optional arguments. |
Uses sim.Mk
internally.
An object of class "DNAbin"
or "phyDat"
, or a matrix of nucleotides.
Liam Revell liam.revell@umb.edu
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
data(mammal.tree)
mammal.tree$edge.length<-mammal.tree$edge.length/
max(nodeHeights(mammal.tree))*0.2 ## rescale tree
## simulate gamma rate heterogeneity
gg<-rgamma(n=100,shape=0.25,rate=0.25)
dna<-genSeq(mammal.tree,l=100,rate=gg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.