Function to plot the heatmap of cross-talk results
ct_heatmap.Rd
The function elaborates the output of `gs_cross-talk()` function to represent the obtained cross-talks as an heatmap
Usage
ct_heatmap(
ct,
color_by = "ct_score",
color = NULL,
color_level = NULL,
no_ct_color = NULL,
filtering = FALSE,
p_val,
FDR,
ct_val,
legend_side = "left",
community = F,
pal_community = NULL,
label_size = 5,
row_annotation = NULL,
pal_row_annotation = NULL,
row_name_side = "bottom",
column_annotation = NULL,
pal_column_annotation = NULL,
col_name_side = "left",
file_out = NULL,
file_width = 200,
file_height = 200,
res = 300,
units = "mm",
...
)
Arguments
- ct
results obtained with `gs_cross-talk()` functions
- color_by
name of the column to be plotted in the heatmap
- color
vector of two colors used to build the gradient to color the heatmap, that are the colors of the two number of `color_level`. If NULL, the function uses `lightyellow` and `red3`
- color_level
vector of the two values to be used to create the gradient to color the heatmap. If not provided, the function uses minimum and maximum
- no_ct_color
color that have to be used for the gene set pairs that shows no cross-talk (in the heatmap will have score = 0). If `NULL` the function uses `whitesmoke`
- filtering
logical, if the function have to plot all the edges or only the significant ones. If `TRUE`, the function uses `p_val, FDR` and `ct_val` to identify the significant ones, that are plotted with a solid line, and the not significant with a dashed line. If `FALSE`, all edges are plotted as a solid line.
- p_val, FDR, ct_val
filtering values. If one of these is set to `NULL` the function ignores it
- legend_side
where to place the legend of the heatmap and of the annotations (if provided). See `Heatmap` for further details
- community
logical or an object resulting from igraph community calculation. If `TRUE`, the function calculates the communities by using fastgreedy algorithm, if `FALSE` the function does not consider communities. Otherwise, if a community object is provided, the function uses it and colors the vertices accordingly. The communities will be plotted as a row and column annotation of the heatmap
- pal_community
vector of colors to be used to color the community annotation. If `NULL` the function will use `rainbow()` palette
- label_size
size of the gene-set names that will be printed on the diagonal of the heatmaps
- row_annotation, column_annotation
data.frame with columns corresponding to the rows or columns annotations. The rownames must be named after all the cells/gene-set in the `ct` tables. The values in the columns will be treated as a discrete variable
- pal_row_annotation, pal_column_annotation
list of vectors, one for each column in `row_annotation,column_annotation` df. Each vector should be a color vector named after each cells/gene-set in the `ct` table. If `NULL`, the function uses `pals::alphabet2()` palette
- row_name_side, col_name_side
if the name of the row/column annotation should be put at the "bottom" or "top" ("left" or "right") of the annotation
- file_out
name used to save the jpeg file. If `NULL` the complexHeatmap object is returned
- file_width, file_height, res, units
graphical value of `jpeg()` function
- ...
further arguments passed down to `ComplexHeatmap::Heatmap()`