Learn R Programming

phyclust (version 0.1-34)

snp2sid: 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)

Value

snp2sid returns a numerical vector containing SNP ids, and

sid2snp returns a character vector containing SNP codes.

Arguments

snpseq

a character vector contains SNP codes, 1, 2, or -.

sidseq

a numerical vector contains SNP ids, 0, 1, or 2.

Author

Wei-Chen Chen wccsnow@gmail.com

Details

This function is based on the internal object .snp to transfer SNP codes and SNP ids.

References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

See Also

.show.option, .snp, code2nid, nid2code, code2snp, snp2code.

Examples

Run this code
if (FALSE) {
library(phyclust, quiet = TRUE)

a <- c("1", "2", "1", "-", "2")
snp2sid(a)
sid2snp(snp2sid(a)) 
}

Run the code above in your browser using DataLab