PageRenderTime 31ms CodeModel.GetById 25ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/examples/example_V2.1.1.R

http://github.com/sbotond/phylosim
R | 16 lines | 5 code | 4 blank | 7 comment | 0 complexity | 7d210a350aad2977f4d6bf0c3c431570 MD5 | raw file
 1#!/usr/bin/env Rscript
 2
 3##
 4## Example V2.1.1: Simulating substitutions under the JC69 model - compact example
 5## See also the package vignette (vignette("PhyloSim",package="phylosim")).
 6##
 7
 8# load PhyloSim
 9library("phylosim")
10
11# Run the simulation, display the alignment matrix: 
12Simulate(PhyloSim(
13        root.seq=sampleStates( NucleotideSequence(len=50,proc=list(list(JC69())) )),
14        phylo=read.tree("data/3taxa.nwk")
15))$alignment
16