... | ... |
@@ -1,8 +1,8 @@ |
1 | 1 |
Package: ComplexHeatmap |
2 | 2 |
Type: Package |
3 | 3 |
Title: Make Complex Heatmaps |
4 |
-Version: 2.7.9.1006 |
|
5 |
-Date: 2021-3-25 |
|
4 |
+Version: 2.7.9.1007 |
|
5 |
+Date: 2021-3-28 |
|
6 | 6 |
Author: Zuguang Gu |
7 | 7 |
Maintainer: Zuguang Gu <z.gu@dkfz.de> |
8 | 8 |
Depends: R (>= 3.1.2), methods, grid, graphics, stats, grDevices |
... | ... |
@@ -467,6 +467,7 @@ Heatmap = function(matrix, col, name, |
467 | 467 |
column_km = 1 |
468 | 468 |
if(verbose) qqcat("matrix is character. Do not cluster unless distance method is provided.\n") |
469 | 469 |
} |
470 |
+ class(matrix) = "matrix" |
|
470 | 471 |
.Object@matrix = matrix |
471 | 472 |
|
472 | 473 |
.Object@matrix_param$row_km = row_km |
... | ... |
@@ -92,6 +92,10 @@ setMethod(f = "draw_heatmap_body", |
92 | 92 |
heatmap_width_pt = max(1, ceiling(convertWidth(unit(1, "npc"), "bigpts", valueOnly = TRUE))) |
93 | 93 |
heatmap_height_pt = max(1, ceiling(convertHeight(unit(1, "npc"), "bigpts", valueOnly = TRUE))) |
94 | 94 |
|
95 |
+ if(raster_quality < 1) raster_quality = 1 |
|
96 |
+ heatmap_width_pt = ceiling(heatmap_width_pt * raster_quality) |
|
97 |
+ heatmap_height_pt = ceiling(heatmap_height_pt * raster_quality) |
|
98 |
+ |
|
95 | 99 |
matrix_is_resized = FALSE |
96 | 100 |
# resize on the matrix |
97 | 101 |
raster_resize_mat = object@heatmap_param$raster_resize_mat |
... | ... |
@@ -132,14 +136,8 @@ setMethod(f = "draw_heatmap_body", |
132 | 136 |
temp_image_width = ceiling(max(heatmap_width_pt, 1)) |
133 | 137 |
temp_image_height = ceiling(max(heatmap_height_pt, 1)) |
134 | 138 |
} else { |
135 |
- if(is.character(raster_quality)) { |
|
136 |
- temp_image_width = ceiling(max(heatmap_width_pt, nc, 1)) |
|
137 |
- temp_image_height = ceiling(max(heatmap_height_pt, nr, 1)) |
|
138 |
- } else { |
|
139 |
- if(raster_quality < 1) raster_quality = 1 |
|
140 |
- temp_image_width = ceiling(max(heatmap_width_pt*raster_quality, 1)) |
|
141 |
- temp_image_height = ceiling(max(heatmap_height_pt*raster_quality, 1)) |
|
142 |
- } |
|
139 |
+ temp_image_width = ceiling(max(heatmap_width_pt, 1)) |
|
140 |
+ temp_image_height = ceiling(max(heatmap_height_pt, 1)) |
|
143 | 141 |
} |
144 | 142 |
do.call(device_fun, c(list(filename = temp_image, |
145 | 143 |
width = temp_image_width, height = temp_image_height), raster_device_param)) |