Learn R Programming

pergola (version 1.0)

bases2genotypes: Transform bases into genotypes

Description

Preprocess the input data in case bases are provided instead of genotypes

Usage

bases2genotypes(input, ploidy)

Arguments

input
Matrix of genotype bases. Rows represent the individual markers. Columns represent samples, dependenden on the ploidy.
ploidy
Ploidy level of the organism. Influences how many columns are collapsed into one.

Value

Matrix of genotypes. The number of columns is 1/ploidy of the input.

Examples

Run this code
data(simTetra)
bases2genotypes(simTetra, 4)

Run the code above in your browser using DataLab