diff --git a/R/drawone.R b/R/drawone.R index 6b98d38..89dc130 100644 --- a/R/drawone.R +++ b/R/drawone.R @@ -456,6 +456,11 @@ drawone <- # determine x position of qtl if (nrow(qtldf) > 0) { + hatch <- 0 + if(!is.null(qtldf$hatch)) + hatch <- ifelse(qtldf$hatch, 30, NA) # if hatch is TRUE, set density to 30 + if(is.null(qtldf$border)) + qtldf$border <- NA for (ql in 1:nrow(qtldf)) { # if there are labels on y axis where qtl needs to be drawn # first decide if QTL line (so to eo) or text label is longest @@ -521,7 +526,8 @@ drawone <- x2[1] + posmult * (qtlxpos + strwidth("M") + lgwpct / 3), qtldf$ei[ql], col = qtldf$col[ql], - border = qtldf$col[ql] + density = hatch[ql], + border = qtldf$border[ql] ) text( x2[1] + posmult * (qtlxpos + strwidth("MM") + lgwpct / 3), diff --git a/R/lmv.linkage.plot.R b/R/lmv.linkage.plot.R index 14ed24f..3af6974 100644 --- a/R/lmv.linkage.plot.R +++ b/R/lmv.linkage.plot.R @@ -186,6 +186,8 @@ #' \item ei End of inner interval. Numeric. #' \item eo End of outer interval. Numeric. #' \item col Color for QTL. +#' \item border Color of QTL rectangle border (optionnal) +#' \item hatch Hatch or not QTL rectangle (optionnal). Logical. #' } #' #' @param qtlscanone Optional scanone data frame from package r/qtl. If provided,