dot-o2tH: Convert a one-row haplotype to a two-row haplotype

.o2tHR Documentation

Convert a one-row haplotype to a two-row haplotype

Description

Converts a haplotype matrix where each individual is represented by one row and alleles are stored in alternating columns (1st allele, 2nd allele, ...) into a two-row-per-individual representation.

Usage

.o2tH(haplotype)

Arguments

haplotype

A haplotype object:

  • a matrix with individuals in rows and allele columns in pairs (i.e. ncol(haplotype) must be even).

Details

Internally, any allele code of '2' is converted to '0' before conversion.

Value

An integer matrix in a two-row-per-individual format with 2 * nrow(haplotype) rows and ncol(haplotype) / 2 columns. Row names are interleaved using the original individual names.


hsphase documentation built on Feb. 17, 2026, 5:07 p.m.