From fa8a36226421a0e2d7b796698151d7113a4191c7 Mon Sep 17 00:00:00 2001 From: Karl Broman Date: Thu, 24 Aug 2023 09:47:39 -0500 Subject: [PATCH] Fix bug introduced in calc_het() - dimnames(pr) for output of calc_genoprob gives chromosome-specific genotype names --- R/calc_het.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/calc_het.R b/R/calc_het.R index 414ef72a..3f7abedc 100644 --- a/R/calc_het.R +++ b/R/calc_het.R @@ -64,7 +64,7 @@ calc_het <- het_col <- vector("list", n_chr) geno <- dimnames(probs)[[2]] - if(any(nchar(geno) != 2)) { + if(any(nchar(unlist(geno)) != 2)) { stop("calc_het requires genotypes to have two-letter names") }