as.ten.state.matrix.from.node.seq: Generates 10-state sequence matrix from name/10-char string...

Description Usage Arguments Value Examples

View source: R/scelestial.R

Description

This function is used for conversion of results of internal scelestial result to 10-state sequence matrices.

Usage

1

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:

One character representation 10-state representation
"A" "A/A",
"T" "T/T",
"C" "C/C",
"G" "G/G",
"K" "A/C",
"L" "A/G",
"M" "C/T",
"N" "C/G",
"O" "T/G",
"P" "T/A",
"X" "./."

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

1
2
3
4
5
6
7
## 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

RScelestial documentation built on Dec. 11, 2021, 10:02 a.m.