| seqgen | R Documentation |
This function modifies the original standalone code of seq-gen
developed by Rambaut, A. and Grassly, N.C. (1997).
seqgen(opts = NULL, rooted.tree = NULL, newick.tree = NULL, input = NULL,
temp.file = NULL)
opts |
options as the standalone version. |
rooted.tree |
a rooted tree which sequences are generated according to. |
newick.tree |
a NEWICK tree which sequences are generated according to. |
input |
optional inputs of seq-gen, e.g. ancestral sequences. |
temp.file |
temporary file for seqgen output. |
This function directly reuses the C code of seq-gen by arguments
as input from the STDIN. The options opts is followed from the
original seq-gen except an input tree.
Input either a rooted.tree or a newick.tree, and
rooted.tree should have a Class phylo.
For examples, options commonly used in phyclust are:
"-m": set an evolution model, e.g. "-mHKY".
"-t": set transition/transversion ratio, e.g. "-t0.7".
"-f": equilibrium probabilities of A, C, G, and T, e.g. "-f0.1,0.2,0.3,0.4".
"-l": length of sequences, e.g. "-l10".
"-s": scale rate for the total height of input tree, "-s0.2".
"-k": index of ancestral sequence in input file, see gen.seq.HKY.
These will return sequences in Format phylip which can be
read by read.seqgen() and transfered into an object with
Class seq.data.
The maximum number of tips is 2000 in seqgen() by default, but an
extra option opts = "-u 2014 ..." can be simply increase the size
to 2014.
Note:
input and rooted.tree/newick.tree can not be
submitted at the same time.
seq-gen use the order A, C, G, T.
-t is ts/tv ratio which is not equal to \kappa.
See more examples in gen.seq.HKY() and gen.seq.SNP().
temp.file allows users to specify seqgen output file themselves, but
this file will not be deleted nor converted into R after the call to
seqgen(). Users should take care the readings. By default,
seqgen()
uses a system temp file to store the output which is converted into R
after the call and is deleted after converting.
This function returns a vector, and each element stores one line of STDOUT
of seq-gen separated by newline. The vector stores in a class
seqgen. The details of output format can found on the website
http://tree.bio.ed.ac.uk/software/seqgen/ and its manual.
Carefully read the seq-gen's original document before using the
seqgen() function.
Rambaut, A. and Grassly, N.C. (1997).
Maintain: Wei-Chen Chen wccsnow@gmail.com
Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/
Rambaut, A. and Grassly, N.C. (1997) “Seq-Gen: An Application for the Monte Carlo Simulation of DNA Sequence Evolution along Phylogenetic Trees”, Computer Applications In The Biosciences, 13:3, 235-238. http://tree.bio.ed.ac.uk/software/seqgen/
print.seqgen(),
read.tree(),
ms(),
gen.seq.HKY(),
gen.seq.SNP().
## Not run:
library(phyclust, quiet = TRUE)
set.seed(123)
ret.ms <- ms(nsam = 5, nreps = 1, opts = "-T")
seqgen(opts = "-mHKY -l40 -s0.2", newick.tree = ret.ms[3])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.