as.ten.state.matrix.from.node.seq {RScelestial} | R Documentation |
Generates 10-state sequence matrix from name/10-char string matrix.
Description
This function is used for conversion of results of internal scelestial result to 10-state sequence matrices.
Usage
as.ten.state.matrix.from.node.seq(n.seq)
Arguments
n.seq |
A two column data frame. First column is the name of a node and the second column is a string representation of the sequencing result. Each element of the sequencing result is from a 10-state representation in which each state represented as a character according to the following encoding:
|
Value
A 10-state sequence data frame with samples as columns
and loci as rows. Elements of n.seq
are translated
to their 10-state representations.
Examples
## A node sequence data frame
n.seq = data.frame("node" = c("C1", "C2"), "seq" = c("AKLTCXAAC", "AKKOCXAPC"))
## Convert it to ten state matrix
as.ten.state.matrix.from.node.seq(n.seq)
# V1 V2 V3 V4 V5 V6 V7 V8 V9
# C1 A/A A/C A/G T/T C/C ./. A/A A/A C/C
# C2 A/A A/C A/C T/G C/C ./. A/A T/A C/C
[Package RScelestial version 1.0.4 Index]