Skip to content

Commit

Permalink
move ComplexHeatmap to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Jun 15, 2024
1 parent ec9bcb3 commit 0c8c363
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: spiralize
Type: Package
Title: Visualize Data on Spirals
Version: 1.1.0
Date: 2024-06-11
Date: 2024-06-14
Authors@R: person("Zuguang", "Gu", email = "[email protected]", role = c("aut", "cre"),
comment = c('ORCID'="0000-0002-7395-8709"))
Depends: R (>= 4.0.0), grid
Expand All @@ -13,9 +13,9 @@ Imports: GlobalOptions (>= 0.1.1),
methods,
grDevices,
lubridate,
utils
Suggests: ComplexHeatmap,
knitr,
utils,
ComplexHeatmap
Suggests: knitr,
rmarkdown,
grImport,
grImport2,
Expand All @@ -33,7 +33,7 @@ Description: It visualizes data along an Archimedean spiral <https://en.wikipedi
It has two major advantages for visualization: 1. It is able to visualize data with very long axis with high
resolution. 2. It is efficient for time series data to reveal periodic patterns.
VignetteBuilder: knitr
URL: https://github.com/jokergoo/spiralize, https://jokergoo.github.io/spiralize
URL: https://github.com/jokergoo/spiralize, https://jokergoo.github.io/spiralize/
License: MIT + file LICENSE
NeedsCompilation: no
RoxygenNote: 7.3.1
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import(GlobalOptions)
import(grid)
import(lubridate)
import(methods)
import(ComplexHeatmap)
importFrom(GetoptLong,qq)
importFrom(GetoptLong,qqcat)
importFrom(circlize,colorRamp2)
Expand Down
5 changes: 1 addition & 4 deletions R/dendrogram.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@

#' @importFrom stats is.leaf
#' @import ComplexHeatmap
construct_dend_segments = function(dend, gp = gpar()) {

if(!requireNamespace("ComplexHeatmap")) {
stop("You need to install the 'ComplexHeatmap' package from Bioconductor.")
}

if(is.null(attr(dend, "x"))) {
dend = ComplexHeatmap::adjust_dend_by_x(dend)
}
Expand Down
4 changes: 0 additions & 4 deletions R/graphics.R
Original file line number Diff line number Diff line change
Expand Up @@ -1229,10 +1229,6 @@ split_vec_by_NA = function(x) {
horizon_legend = function(lt, title = "", format = "%.2f",
template = "[{x1}, {x2}]", ...) {

if(!requireNamespace("ComplexHeatmap")) {
stop("You need to install the 'ComplexHeatmap' package from Bioconductor.")
}

interval = lt$interval
col_fun = lt$col_fun

Expand Down

0 comments on commit 0c8c363

Please sign in to comment.