bio-services / LinkageMapView

Plot Linkage Group Maps with QTLs
GNU General Public License v3.0
8 stars 12 forks source link

Moving the marker labels position to the left doesn't render well with QTL highlighting #9

Open IdoBar opened 5 years ago

IdoBar commented 5 years ago

Moving the loci labels to the left (with posonleft=FALSE) doesn't render well (see right edge below) and move the QTL highlighting region to the left as well rather than keeping it next to the chromosome/LG. Command used:

lmv.linkage.plot(gmap_plot_df,outfile,dupnbr = TRUE, ruler=TRUE, showonly=qtl_markers$marker,
                qtldf = qtl_df, lg.col = "lightblue1",denmap = FALSE, 
                posonleft=rep(FALSE,8),
                pdf.width=13, pdf.height = 8)

image

Thanks, Ido

sgblanch commented 4 years ago

Ido,

Right now, LinkageMapView works best if you let it decide the dimensions of the output plot. Have you tried plotting this without specifying pdf.height and pdf.width?

Testing with the carrot dataset and an auto-sized plot, the only standout problem I see is a complete lack of margin on the right-hand side of the plot. Although the QTL position on the left is mildly ambiguous. I can also emulate more of the problems you saw by setting pdf.width = 7

data(carrot)
qtldf <- data.frame(chr = "70349LG3", qtl = "RTPE-Q1", so = 36.6, si = 37, ei = 37, eo = 38, col = "red", stringsAsFactors = FALSE)
only <- carrot[, 3][carrot[, 1] == "70349LG3"]
lmv.linkage.plot(carrot, outfile="carrot.pdf", ruler = TRUE, qtldf = qtldf, posonleft=rep(FALSE,3), showonly = only, autoconnadj = FALSE)

The current QTL positioning being controlled by the current posonleft argument isn't very flexible. I have some ideas in that direction but I don't know when they will become available. We are just starting to put together a roadmap of features and updates to LinkageMapView.

Sorry it has taken us a year to follow up on your issues. We do plan on supporting LinkageMapView and value your feedback.

Thanks, ~Steven