Skip to content

Commit

Permalink
hom was referenced at line 139 without being defined in scope
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgatti authored Apr 4, 2024
1 parent 8ab5124 commit 6bfc89c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/probs_doqtl_to_qtl2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 6bfc89c

Please sign in to comment.