You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent Bioconductor check on nebbiolo1 for the methylKit package version 1.33.0 encountered an error in testthat.R.
An error occurred in the test suite tests/testthat.R, specifically in test-17-bedgraph.r:19:1. The error was caused by a scan() function call in R, where it expected a numeric (real) value but encountered 'NA'.
Reason
This error occurs when we want to export the meth.diffvalue as log transformed value. This will lead to NA output, which causes rtracklayer to complain upon import. similiar to perc.meththe meth.diff value should not be allowed to be transformed.
Error in scan(file = file, ...): scan() expected 'a real', got 'NA'
Environment: Linux (Ubuntu 24.04.1 LTS), R Under development (unstable), gcc 13.2.0.
Suggested Fixes
Disallow transformation of meth.diff values
update tests
Testthat Log
Expand
methylKit.Rcheck/tests/testthat.Rout.fail
R Under development (unstable) (2024-10-21 r87258) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(methylKit)
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: generics
Attaching package: 'generics'
The following objects are masked from 'package:base':
as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
setequal, union
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:generics':
intersect, setdiff, setequal, union
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
as.data.frame, basename, cbind, colnames, dirname, do.call,
duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
pmin.int, rank, rbind, rownames, sapply, saveRDS, setdiff,
setequal, table, tapply, union, unique, unsplit, which.max,
which.min
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following object is masked from 'package:utils':
findMatches
The following objects are masked from 'package:base':
I, expand.grid, unname
Loading required package: IRanges
Loading required package: GenomeInfoDb
>
>
>
> test_check("methylKit")
Using internal DSS code...
Using internal DSS code...
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 224 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-17-bedgraph.r:19:1'): (code run outside of `test_that()`) ──────
Error in `scan(file = file, what = what, sep = sep, quote = quote, dec = dec,
nmax = nrows, skip = 0, na.strings = na.strings, quiet = TRUE,
fill = fill, strip.white = strip.white, blank.lines.skip = blank.lines.skip,
multi.line = FALSE, comment.char = comment.char, allowEscapes = allowEscapes,
flush = flush, encoding = encoding, skipNul = skipNul)`: scan() expected 'a real', got 'NA'
Backtrace:
▆
1. ├─rtracklayer::import.bedGraph(outFile2) at test-17-bedgraph.r:19:1
2. └─rtracklayer::import.bedGraph(outFile2)
3. ├─BiocIO::import(con, "bedGraph", ...)
4. └─BiocIO::import(con, "bedGraph", ...)
5. ├─BiocIO::import(FileForFormat(con, format), ...)
6. └─rtracklayer::import(FileForFormat(con, format), ...)
7. └─rtracklayer (local) .local(con, format, text, ...)
8. ├─rtracklayer::import.ucsc(...)
9. └─rtracklayer::import.ucsc(...)
10. └─rtracklayer (local) .local(con, ...)
11. ├─rtracklayer::import.ucsc(...)
12. └─rtracklayer::import.ucsc(...)
13. ├─BiocIO::import(con, "ucsc", ...)
14. └─BiocIO::import(con, "ucsc", ...)
15. ├─BiocIO::import(FileForFormat(con, format), ...)
16. └─rtracklayer::import(FileForFormat(con, format), ...)
17. └─rtracklayer (local) .local(con, format, text, ...)
18. ├─BiocGenerics::lapply(seq_along(trackLines), makeTrackSet)
19. └─base::lapply(seq_along(trackLines), makeTrackSet)
20. └─rtracklayer (local) FUN(X[[i]], ...)
21. ├─BiocIO::import(...)
22. └─BiocIO::import(...)
23. ├─BiocIO::import(FileForFormat(con, format), ...)
24. └─rtracklayer::import(FileForFormat(con, format), ...)
25. └─rtracklayer (local) .local(con, format, text, ...)
26. ├─S4Vectors::DataFrame(...)
27. └─utils::read.table(...)
28. └─base::scan(...)
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 224 ]
Error: Test failures
Execution halted
The text was updated successfully, but these errors were encountered:
Fixes#331
Fix the error in `tests/testthat/test-17-bedgraph.r` due to NA handling in `meth.diff` export as log-transformed value.
* **R/bedgraph.R**
- Disallow transformation of `meth.diff` values in `bedgraph` function for `methylDiff` objects.
- Add a check to ensure `log.transform` is `FALSE` when `col.name` is `meth.diff`.
* **tests/testthat/test-17-bedgraph.r**
- Update tests to ensure `log.transform` is not allowed for `meth.diff` values.
- Add a test to check for error when `log.transform` is `TRUE` for `meth.diff`.
- Add tests for `methylDiffDB` objects to ensure `log.transform` is not allowed for `meth.diff` values.
* **R/methylDBFunctions.R**
- Add a check to ensure `log.transform` is `FALSE` when `col.name` is `meth.diff`.
- Disallow transformation of `meth.diff` values in `bedgraph` function for `methylDiffDB` objects.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/al2na/methylKit/issues/331?shareId=XXXX-XXXX-XXXX-XXXX).
The recent Bioconductor check on nebbiolo1 for the methylKit package version 1.33.0 encountered an error in testthat.R.
An error occurred in the test suite tests/testthat.R, specifically in test-17-bedgraph.r:19:1. The error was caused by a scan() function call in R, where it expected a numeric (real) value but encountered 'NA'.
Reason
This error occurs when we want to export the
meth.diff
value as log transformed value. This will lead to NA output, which causes rtracklayer to complain upon import. similiar toperc.meth
themeth.diff
value should not be allowed to be transformed.Summary of Error:
In test-17-bedgraph.r:
Details:
Line 19 causes failure:
methylKit/tests/testthat/test-17-bedgraph.r
Lines 10 to 19 in 0a5581c
Error Message:
Suggested Fixes
meth.diff
valuesTestthat Log
Expand
The text was updated successfully, but these errors were encountered: