Skip to contents

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.

Usage

genotype2allelev2(
  genotype_data,
  annotation_data,
  validate_alleles = TRUE,
  verbose = TRUE
)

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)

Value

A list containing validation results and converted genotypes

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

Examples

if (FALSE) { # \dontrun{
# Basic usage
results <- genotype2allelev2(genotype_data, annotation_data)

# Silent mode
results <- genotype2allelev2(genotype_data, annotation_data, verbose = FALSE)
} # }