Skip to content

Commit

Permalink
Update test_read.modkit.R
Browse files Browse the repository at this point in the history
  • Loading branch information
yixuan-chen-elisa authored Apr 4, 2024
1 parent c7d1993 commit edf2866
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test_read.modkit.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ context("read.modkit")

# TODO: Re-factor read.modkit() and update tests accordingly
test_that("read.modkit() works for BED files without 5hmc", {
infile <- system.file("extdata", "modkit/chr21.chr22.HG002.top1000.other_mod.bed.gz",
infile <- system.file("extdata", "modkit/chr21.chr22.HG002.top1000.bed.gz",
package = "bsseq")
bsseq <- read.modkit(files = infile,
colData = NULL,
rmZeroCov = FALSE,
strandCollapse = TRUE)

lapply(bsseq, function(x) {expect_is(x, "BSseq")})
expect_is(bsseq, "BSseq")
})

test_that("read.modkit() works for BED files with 5hmc", {
infile <- system.file("extdata", "modkit/Hypo1.first40Bed.txt",
infile <- system.file("extdata", "modkit/Hypo1.first50Bed.txt",
package = "bsseq")
bsseq <- read.modkit(files = infile,
colData = NULL,
rmZeroCov = FALSE,
strandCollapse = TRUE)

lapply(bsseq, function(x) {expect_is(x, "BSseq")})
expect_is(bsseq, "BSseq")
})

0 comments on commit edf2866

Please sign in to comment.