@@ -628,37 +628,39 @@ filter_hwe <- function(
628
628
dplyr :: mutate(POP_ID = factor (POP_ID , pop.levels ))
629
629
parabola <- sample.size <- NULL
630
630
631
- plot.tern <- ggtern :: ggtern(
632
- data = data.sum ,
633
- ggtern :: aes(AA , AB , BB , color = GROUPINGS , size = MISSING_PROP )) +
634
- ggplot2 :: scale_color_manual(name = " Exact test mid p-value" , values = group_colors ) +
635
- ggplot2 :: scale_size_continuous(name = " Missing genotypes proportion" ) +
636
- ggtern :: theme_rgbw() +
637
- ggplot2 :: geom_point(alpha = 0.4 ) +
638
- ggplot2 :: geom_line(data = hw.parabola , ggplot2 :: aes(x = AA , y = AB ),
639
- linetype = 2 , size = 0.6 , colour = " black" ) +
640
- ggtern :: theme_nogrid_minor() +
641
- ggtern :: theme_nogrid_major() +
642
- ggplot2 :: labs(
643
- x = " AA" , y = " AB" , z = " BB" ,
644
- title = " Hardy-Weinberg Equilibrium ternary plots" ,
645
- subtitle = " genotypes frequencies shown for AA: REF/REF, AB: REF/ALT and BB: ALT/ALT"
646
- ) +
647
- ggplot2 :: theme(
648
- plot.title = ggplot2 :: element_text(size = 12 , family = " Helvetica" , face = " bold" , hjust = 0.5 ),
649
- plot.subtitle = ggplot2 :: element_text(size = 10 , family = " Helvetica" , hjust = 0.5 )
650
- ) +
651
- ggplot2 :: facet_wrap(~ POP_ID )
652
- # plot.tern
653
- ggtern :: ggsave(
654
- limitsize = FALSE ,
655
- plot = plot.tern ,
656
- # filename = file.path(path.folder, "hwe.ternary.plots.read.depth.pdf"),
657
- filename = file.path(path.folder , " hwe.ternary.plots.missing.data.pdf" ),
658
- width = n.pop * 5 , height = n.pop * 4 ,
659
- dpi = 300 , units = " cm" , useDingbats = FALSE )
660
- hw.parabola <- NULL
661
- if (verbose ) message(" Plot written: hwe.ternary.plots.missing.data.pdf" )
631
+ # plot.tern <- ggtern::ggtern(
632
+ # data = data.sum,
633
+ # ggtern::aes(AA, AB, BB, color = GROUPINGS, size = MISSING_PROP)) +
634
+ # ggplot2::scale_color_manual(name = "Exact test mid p-value", values = group_colors) +
635
+ # ggplot2::scale_size_continuous(name = "Missing genotypes proportion") +
636
+ # ggplot2::geom_point(alpha = 0.4) +
637
+ # ggplot2::geom_line(data = hw.parabola, ggplot2::aes(x = AA, y = AB),
638
+ # linetype = 2, size = 0.6, colour = "black") +
639
+ # ggplot2::labs(
640
+ # x = "AA", y = "AB", z = "BB",
641
+ # title = "Hardy-Weinberg Equilibrium ternary plots",
642
+ # subtitle = "genotypes frequencies shown for AA: REF/REF, AB: REF/ALT and BB: ALT/ALT"
643
+ # ) +
644
+ # ggplot2::theme(
645
+ # plot.title = ggplot2::element_text(size = 12, family = "Helvetica", face = "bold", hjust = 0.5),
646
+ # plot.subtitle = ggplot2::element_text(size = 10, family = "Helvetica", hjust = 0.5)
647
+ # ) +
648
+ # ggtern::theme_rgbw() +
649
+ # ggtern::theme_nogrid_minor() +
650
+ # ggtern::theme_nogrid_major() +
651
+ # ggplot2::facet_wrap(~ POP_ID)
652
+ # # plot.tern
653
+ # ggtern::ggsave(
654
+ # limitsize = FALSE,
655
+ # plot = plot.tern,
656
+ # # filename = file.path(path.folder, "hwe.ternary.plots.read.depth.pdf"),
657
+ # filename = file.path(path.folder, "hwe.ternary.plots.missing.data.pdf"),
658
+ # width = n.pop * 5, height = n.pop * 4,
659
+ # dpi = 300, units = "cm", useDingbats = FALSE)
660
+ # hw.parabola <- NULL
661
+ # if (verbose) message("Plot written: hwe.ternary.plots.missing.data.pdf")
662
+
663
+ plot.tern <- " temporarily out of order"
662
664
663
665
# Manhattan plot -------------------------------------------------------------
664
666
data.sum.man <- dplyr :: mutate(data.sum , X = " x" ) %> % dplyr :: filter(MID_P_VALUE < 0.05 )
0 commit comments