Description Usage Arguments Value Examples

Conversion of ten-state sequencing matrix to 0/1-mutation matrix.

1 |

`seq` |
A dataframe representing the ten-state sequencing matrix. Elements of the matrix are the from "X/Y" for X and Y being nucleotides or "./." for missing value. Rows represent loci and columns represent samples. |

A data frame with exactly the same size as the input `seq`

matrix.
The most abundant state in each loci (row) translated to 0, and
the others are translated to 1. Missing values are translated to 3.

1 2 3 4 5 6 7 8 | ```
## A small 10-state matrix
seq = data.frame("C1" = c("C/C", "C/C"), "C2" = c("A/A", NA),
"C3" = c("C/C", "A/A"), stringsAsFactors = TRUE)
## Convert it to mutation matrix
as.mutation.matrix(seq)
# C1 C2 C3
# 1 0 1 0
# 2 1 3 0
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.