Panels B–D come from plot_synteny_and_repeats.Rmd. Panel
E (genotype map) with Panel F (chr4 inset) come from
plot_genotype_get_correlated_loci.Rmd as
plot_with_inset.
p_bcd <- readRDS(file.path(paths$intermediate, "fig1_panel_BCD.rds"))
p_ef <- readRDS(file.path(paths$intermediate, "fig1_panel_E.rds"))
Panel A is the breeding scheme diagram created in Inkscape.
panel_a_svg <- file.path(paths$figures, "panelA.svg")
img_a <- magick::image_read_svg(panel_a_svg, width = 18 * 300)
p_a <- ggdraw() + draw_image(img_a)
p_ef is the full bottom row from
plot_genotype_get_correlated_loci.Rmd: E = whole-genome
genotype map, F = chr4 zoom inset, with spike-calibrated brackets and
panel labels already included.
p_ef
fig1_grid <- plot_grid(
p_a,
p_bcd,
p_ef,
ncol = 1,
rel_heights = c(220, 400, 400))
# Add A and B labels on the Figure 1 canvas so they share NPC space with E
fig1 <- ggdraw(fig1_grid) +
draw_label("A", x = 0.005, y = 0.995, size = 45, fontface = "bold",
hjust = 0, vjust = 1) +
draw_label("B", x = 0.005, y = 0.762, size = 45, fontface = "bold",
hjust = 0, vjust = 1)
fig1
ggsave(file.path(paths$figures, "Figure_1.png"),
plot = fig1, width = 18, height = 19, dpi = 300, bg = "white")
ggsave(file.path(paths$figures, "Figure_1.svg"),
plot = fig1, width = 18, height = 19, device = "svg",
fix_text_size = TRUE, bg = "white")
sessionInfo()
## R version 4.5.2 (2025-10-31)
## Platform: aarch64-apple-darwin20
## Running under: macOS Tahoe 26.3
##
## Matrix products: default
## BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.1
##
## locale:
## [1] C.UTF-8/C.UTF-8/C.UTF-8/C/C.UTF-8/C.UTF-8
##
## time zone: America/New_York
## tzcode source: internal
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] magick_2.9.0 ggtext_0.1.2 cowplot_1.2.0 ggplot2_4.0.1 here_1.0.2
##
## loaded via a namespace (and not attached):
## [1] gtable_0.3.6 jsonlite_2.0.0 dplyr_1.1.4 compiler_4.5.2
## [5] tidyselect_1.2.1 Rcpp_1.1.0 xml2_1.5.1 rsvg_2.7.0
## [9] dichromat_2.0-0.1 jquerylib_0.1.4 textshaping_1.0.4 systemfonts_1.3.1
## [13] scales_1.4.0 yaml_2.3.12 fastmap_1.2.0 R6_2.6.1
## [17] generics_0.1.4 knitr_1.51 tibble_3.3.0 rprojroot_2.1.1
## [21] svglite_2.2.2 bslib_0.9.0 pillar_1.11.1 RColorBrewer_1.1-3
## [25] rlang_1.1.6 cachem_1.1.0 xfun_0.55 sass_0.4.10
## [29] S7_0.2.1 otel_0.2.0 cli_3.6.5 withr_3.0.2
## [33] magrittr_2.0.4 digest_0.6.39 grid_4.5.2 gridtext_0.1.5
## [37] lifecycle_1.0.4 vctrs_0.6.5 evaluate_1.0.5 glue_1.8.0
## [41] farver_2.1.2 ragg_1.5.0 rmarkdown_2.30 tools_4.5.2
## [45] pkgconfig_2.0.3 htmltools_0.5.9