From 6bfc89cba710cc407aa3f7b860622c342f12f58f Mon Sep 17 00:00:00 2001 From: Daniel Gatti Date: Thu, 4 Apr 2024 11:25:33 -0400 Subject: [PATCH] hom was referenced at line 139 without being defined in scope --- R/probs_doqtl_to_qtl2.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/probs_doqtl_to_qtl2.R b/R/probs_doqtl_to_qtl2.R index 211bbd8..941bc31 100644 --- a/R/probs_doqtl_to_qtl2.R +++ b/R/probs_doqtl_to_qtl2.R @@ -123,11 +123,11 @@ probs_doqtl_to_qtl2 <- dimnames(newprobs[[i]]) <- list(rownames(probs), c(new_geno_labels, paste0(LETTERS[1:8], "Y")), dimnames(probs)[[3]][chr==i]) + hom <- paste0(LETTERS[1:8], LETTERS[1:8]) if(is.null(is_female)) { # need to guess sex het_tolerance <- 1e-4 - hom <- paste0(LETTERS[1:8], LETTERS[1:8]) het <- old_geno_labels[!(old_geno_labels %in% hom)] sum_het <- apply(probs[,het,chr==i,drop=FALSE], 1, sum)/dim(probs)[[3]] is_female <- setNames((sum_het > het_tolerance), rownames(probs))