R/plot_gene_exons.R

Defines functions plot_gene_exons

#' @importFrom ggplot2 ggtitle
#' 
plot_gene_exons <- function(gene_exon_tbl, top_snps_tbl, gene_name, pheno) {
  if(nrow(top_snps_tbl)) {
    p <- ggplot2::autoplot(
      gene_exon_tbl, top_snps_tbl,
      FALSE, genes = gene_name)
    p[[1]] + 
      ggplot2::ggtitle(paste(gene_name, "SNPs for", pheno))
  } else
    plot_null()
}
byandell/qtl2shiny documentation built on Nov. 9, 2023, 7:58 p.m.