read.seqgen {phyclust} | R 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)

[Package phyclust version 0.1-25 Index]