snp2sid {phyclust} | R Documentation |
Transfer SNP codes (1, 2, -) and sids (0, 1, 2)
Description
Transfer SNP codes (1, 2, -) and SNP ids (0, 1, 2).
Usage
snp2sid(snpseq)
sid2snp(sidseq)
Arguments
snpseq |
a character vector contains SNP codes, 1, 2, or -. |
sidseq |
a numerical vector contains SNP ids, 0, 1, or 2. |
Details
This function is based on the internal object .snp
to
transfer SNP codes and SNP ids.
Value
snp2sid
returns a numerical vector containing SNP ids, and
sid2snp
returns a character vector containing SNP codes.
Author(s)
Wei-Chen Chen wccsnow@gmail.com
References
Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/
See Also
.show.option
,
.snp
,
code2nid
,
nid2code
,
code2snp
,
snp2code
.
Examples
## Not run:
library(phyclust, quiet = TRUE)
a <- c("1", "2", "1", "-", "2")
snp2sid(a)
sid2snp(snp2sid(a))
## End(Not run)
[Package phyclust version 0.1-34 Index]