-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from stemangiola/dev
Dev
- Loading branch information
Showing
49 changed files
with
3,808 additions
and
1,768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#' Wrap tidyHeatmap (ComplexHeatmap) in a patchwork-compliant patch | ||
#' | ||
#' In order to add tidyHeatmap (ComplexHeatmap) element to a patchwork they can be | ||
#' converted to a compliant representation using the `wrap_heatmap()` function. | ||
#' This allows you to position either grobs, ggplot objects, patchwork | ||
#' objects, or even base graphics (if passed as a formula) in either the full | ||
#' area, the full plotting area (anything between and | ||
#' including the axis label), or the panel area (only the actual area where data | ||
#' is drawn). | ||
#' | ||
#' @importFrom patchwork wrap_elements | ||
#' @importFrom grid grid.grabExpr | ||
#' @importFrom ComplexHeatmap draw | ||
#' @importFrom methods show | ||
#' | ||
#' @param panel,plot,full A grob, ggplot, patchwork, formula, raster, or | ||
#' nativeRaster object to add to the respective area. | ||
#' | ||
#' @param clip Should the grobs be clipped if expanding outside its area | ||
#' | ||
#' @param ignore_tag Should tags be ignored for this patch. This is relevant | ||
#' when using automatic tagging of plots and the content of the patch does not | ||
#' qualify for a tag. | ||
#' | ||
#' @docType methods | ||
#' @rdname wrap_heatmap-method | ||
#' | ||
#' @return A wrapped_patch object | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' | ||
#' | ||
#' tidyHeatmap::N52 |> | ||
#' tidyHeatmap::heatmap( | ||
#' .row = symbol_ct, | ||
#' .column = UBR, | ||
#' .value = `read count normalised log`, | ||
#' ) |> | ||
#' wrap_heatmap() | ||
#' | ||
setGeneric( | ||
"wrap_heatmap", | ||
function(panel = NULL, plot = NULL, full = NULL, clip = TRUE, ignore_tag = FALSE) standardGeneric("wrap_heatmap") | ||
) | ||
|
||
#' Wrap tidyHeatmap (ComplexHeatmap) in a patchwork-compliant patch | ||
#' | ||
#' @docType methods | ||
#' @rdname wrap_heatmap-method | ||
#' | ||
#' @return A wrapped_patch object | ||
setMethod("wrap_heatmap", "InputHeatmap", function(panel = NULL, plot = NULL, full = NULL, clip = TRUE, ignore_tag = FALSE){ | ||
patchwork::wrap_elements(grid::grid.grabExpr(ComplexHeatmap::draw(ComplexHeatmap::draw(methods::show(panel))))) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.