Learn R Programming

phyclust (version 0.1-9)

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)

Arguments

snpseq
a character vector contains SNP codes, 1, 2, or -.
sidseq
a numerical vector contains SNP ids, 0, 1, or 2.

Value

  • snp2sid returns a numerical vector containing SNP ids, and sid2snp returns a character vector containing SNP codes.

Details

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

References

Phylogenetic Clustering Website: http://thirteen-01.stat.iastate.edu/snoweye/phyclust/

See Also

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

Examples

Run this code
a <- c("1", "2", "1", "-", "2")
snp2sid(a)
sid2snp(snp2sid(a))

Run the code above in your browser using DataLab