代码参考:https://cran.r-project.org/web/packages/LinkageMapView/vignettes/LinkageMapView.html
library(LinkageMapView)
#示例数据
data(carrot)
head(carrot)
carrot=carrot[order(carrot$group),]
outfile="genetic_map_ruler.pdf"
lmv.linkage.plot(carrot,outfile,ruler = TRUE,lg.col = "lightblue1")
outfile="genetic_map_noruler.pdf"
lmv.linkage.plot(carrot,outfile,ruler = F,lg.col = "lightblue1")
## draw tickmarks at each cM from 0 to largest position of linkage groups to be drawn
maxpos <- floor(max(carrot$position))
at.axis <- seq(0, maxpos)
## put labels on ruler at every 10 cM
axlab <- vector()
for (lab in 0:maxpos) {
if (!lab %% 10) {
axlab <- c(axlab, lab)
}
else {
axlab <- c(axlab, NA)
}
}
outfile="genetic_map.pdf"
lmv.linkage.plot(carrot,outfile,denmap=TRUE, cex.axis = 1, at.axis = at.axis, labels.axis = axlab)
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!