phyclust (version 0.1-24)

read.seqgen: Read seqgen's Results and Return a seq.data

Description

This function can read the results generated by seqgen and turn into a object in Class seq.data.

Usage

read.seqgen(text, byrow = TRUE, code.type = .code.type[1])

Arguments

text

a text vector generated by seqgen.

byrow

advanced option, default = TRUE.

code.type

either "NUCLEOTIDE" (default) or "SNP".

Value

Return an object in Class seq.data.

Details

If code.type is "SNP", the A, G will be transfered to 1, and the C, T will be transfered to 2.

References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

See Also

seqgen, gen.seq.HKY, gen.seq.SNP.

Examples

Run this code
# NOT RUN {
library(phyclust, quiet = TRUE)

set.seed(123)
ret.ms <- ms(nsam = 5, nreps = 1, opts = "-T")
ret.seqgen <- seqgen(opts = "-mHKY -l40 -s0.2", newick.tree = ret.ms[3])
(ret.nucleotide <- read.seqgen(ret.seqgen))
(ret.snp <- read.seqgen(ret.seqgen, code.type = "SNP"))
# }

Run the code above in your browser using DataLab