powered by
Transfer nucleotide codes (A, G, C, T, -) and nucleotide ids (0, 1, 2, 3, 4).
### S3 methods for a list, vector or matrix (default). code2nid(codeseq) nid2code(nidseq, lower.case = TRUE)
code2nid returns a numerical vector containing nucleotide ids, and
code2nid
nid2code returns a character vector containing nucleotide codes.
nid2code
a character vector contains nucleotide codes, A, G, C, T, or -.
a numerical vector contains nucleotide ids, 0, 1, 2, 3, or 4.
transfer in lower cases.
Wei-Chen Chen wccsnow@gmail.com
These functions are based on the internal object .nucleotide to transfer codes and nids.
.nucleotide
Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/
.nucleotide, snp2sid, sid2snp, code2snp, snp2code.
snp2sid
sid2snp
code2snp
snp2code
if (FALSE) { library(phyclust, quiet = TRUE) a <- c("A", "C", "G", "-", "T") code2nid(a) nid2code(code2nid(a)) }
Run the code above in your browser using DataLab