tests/testthat/test-get_protein_coverage.R

test_that("Coverage in right format",
          expect_type(
            get_protein_coverage(t_dat),
            "double"
          )
)

test_that("Coverage for test file",
          expect_equal(
            get_protein_coverage(t_dat, protein_length  = 132),
            86.36
          )
)

test_that("Coverage protein legth is ok",
          expect_error(get_protein_coverage(t_dat, protein_length  = 100))
)

Try the HaDeX2 package in your browser

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

HaDeX2 documentation built on Feb. 9, 2026, 5:07 p.m.