create_integer_genotype_matrix: turns long format genotypes into a matrix of integer-code...

View source: R/create_integer_genotype_matrix.R

create_integer_genotype_matrixR Documentation

turns long format genotypes into a matrix of integer-code genotypes

Description

turns long format genotypes into a matrix of integer-code genotypes

Usage

create_integer_genotype_matrix(LG, AF)

Arguments

LG

the genotypes in long format. It must have the columns Indiv (unique IDs of the individuals), Locus, gene_copy (must be 1 or 2 denoting which of the two gene copies in a diploid each allele is), and Allele, which must be a character. If there are any missing genotypes in the data frame, they must appear as NAs in the Allele column.

AF

The data frame of allele frequencies that was passed to create_ckmr() to create the ckmr object that will be used for computing genotype probabilities. It must have columns Chrom, Pos, Locus, Allele, LocIdx, AlleIdx, and Freq.


eriqande/CKMRsim documentation built on Aug. 2, 2024, 7:23 a.m.