Skip to content

Commit

Permalink
Merge pull request #33 from chabrault/patch-20
Browse files Browse the repository at this point in the history
Fix minor bug in MIMQTL
  • Loading branch information
Timothée Flutre authored Dec 11, 2019
2 parents 994c285 + 44a3f49 commit 26022dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/qtl.R
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ MIMQTL <- function(cross, numeric.chr.format=FALSE,
CI <- temp4
CI[,c(2:6)] <- suppressWarnings(lapply(CI[,c(2:6)], as.character))
CI[,c(2:6)] <- suppressWarnings(lapply(CI[,c(2:6)], as.numeric))
CI$position <- round(CI$position, digits=1) # position is rounded in QTLest

## QTL table
if(all(apply(QTLest, 1, is.na)) & all(apply(CI[-1], 1, is.na))){
Expand All @@ -670,7 +671,7 @@ MIMQTL <- function(cross, numeric.chr.format=FALSE,
"est.BC"=NA, "est.AD"=NA, "est.BD"=NA,
"effect.Af"=NA, "effect.Am"=NA, "effect.D"=NA)
} else {
qtl.df <- merge(QTLest, CI, by=c("Trait", "linkage.group", "position"), all=TRUE)
qtl.df <- merge(QTLest, CI, by=c("Trait", "linkage.group", "position"), all=FALSE)
if(all(is.numeric(qtl.df[,c("LOD", "perc.var")])))
qtl.df[,c("LOD", "perc.var")] <- round(qtl.df[,c("LOD", "perc.var")], 2)
qtl.df <- qtl.df[order(qtl.df$ord),]
Expand Down

0 comments on commit 26022dd

Please sign in to comment.