snptonumeric: Recodes double nucleotides to numeric format

View source: R/snptonumeric.R

snptonumericR Documentation

Recodes double nucleotides to numeric format

Description

Recodes a single snp in hapmap format (double nubleotide letters i.e: AA, CC, GG, etc) to numeric format. For biallelic SNPs, homozygous are 0 and 2, and heterozygotes are 1.

Usage

snptonumeric(snp = NULL)

Arguments

snp

A single SNP vector or dataframe in hapmap format, e.g., two letters for nucleotides without using characters for separation.

Value

Returns a SNP vector in numeric format


leocrh/FPGC documentation built on Nov. 15, 2024, 2:46 a.m.