Convert Genotype Data to Allele Pairs (Version 2)
Source:R/genotype2allelev2.R
genotype2allelev2.Rd
Converts numerical genotype data (0, 1, 2) to actual allele pairs using annotation data. This enhanced version includes improved validation and better handling of special cases like missing genotypes and multi-character alleles.
Arguments
- genotype_data
A data frame containing genotype data with probeset_id column
- annotation_data
A data frame containing annotation data with Probe.Set.ID, Allele.A, and Allele.B columns
- validate_alleles
Logical indicating whether to validate allele assignments (default: TRUE)
- verbose
Logical indicating whether to print validation results (default: TRUE)
Details
This enhanced version provides:
Space-to-dash conversion for alleles
Handling of missing genotypes (-1 -> "–")
Extended indel detection for multi-character alleles
Improved validation and error handling
See also
genotype2allele
for the original version