tests/testthat/test-geom_gene_arrow.R

context("geom_gene_arrow")

test_that("a simple geom_gene_arrow plot is drawn without errors", { 
  expect_no_error( {
    library(ggplot2)
    example_genes$direction <- example_genes$strand == "forward"
    p <- ggplot(
      example_genes,
      aes(xmin = start, xmax = end, y = molecule, fill = gene, forward = direction)
    ) +
      geom_gene_arrow() +
      facet_wrap(~ molecule, scales = "free", ncol = 1)
    print(p)
  } )
} )

Try the gggenes package in your browser

Any scripts or data that you put into this service are public.

gggenes documentation built on Sept. 8, 2023, 5:43 p.m.