convert_raw {inbreedR} | R Documentation |
Genotype format converter
Description
Turns raw genotype data into 0 (homozygote), 1 (heterozygote) and NA
(missing), which is the working format for
the inbreedR
functions.
A raw genotype matrix has individuals in rows and each locus in two adjacent columns. Individual ID's can be rownames.
Type data(mouse_msats) for an example raw genotype data frame.
Usage
convert_raw(genotypes)
Arguments
genotypes |
Raw genotype |
Value
data.frame
object with 0 (homozygote), 1 (heterozygote) and NA
(missing data).
Each locus is a column and each individual is a row.
Author(s)
Martin Stoffel (martin.adam.stoffel@gmail.com)
Examples
# Mouse microsatellite data with missing values coded as NA
data(mouse_msats)
genotypes <- convert_raw(mouse_msats)
head(genotypes)