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

View source: R/f_file_seqgen.r

read.seqgenR Documentation

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".

Details

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

Value

Return an object in Class seq.data.

Author(s)

Wei-Chen Chen wccsnow@gmail.com

References

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

See Also

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

Examples

## 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"))

## End(Not run)

snoweye/phyclust documentation built on Sept. 12, 2023, 5 a.m.