plot_overlap: Plot gene-annotation matches as heatmap

Description Usage Arguments Value Examples

View source: R/display.R

Description

Heatmap will plot genes on the X-axis against annotations on the Y-axis. Matches will be shown with colored squares, and non-matches will be transparent. If the value is "Gene Value", "Odds Ratio", "Fold Enrichment" or "Adjusted Fold Enrichment", if the value is NaN or an infinity, these will also be transparent.

Usage

1
plot_overlap(matches, value, input, stats, val_trans = "identity")

Arguments

matches

value from compute

value

"Gene Value" for values from input or one of "#gene sets", "# genes", "# matches", "P-value", "Adjusted P-value", "Odds Ratio", "Fold Enrichment" or "Adjusted Fold Enrichment" for values from stats

input

output of process_input_text or process_input_seurat

stats

value from compute

val_trans

optional: value transformation, see trans argument in scale_continuous; default "identity"

Value

ggplot2: heatmap of overlap

Examples

1
2
3
4
5
6
7
8
anno_path <- system.file("extdata", "ex_anno.csv", package = "glacier")
data_path <- system.file("extdata", "ex_data.csv", package = "glacier")
anno <- import_annotations(anno_path, ",", TRUE, c(2, 4), 5)
data <- import_database(data_path, ",", FALSE, c(2, 4), 0)

input <- process_input_text('CYP1A1 0.2 CYP1B1 NQO1 0.3 SODD 9.0')
results <- compute(input, anno, data)
over <- plot_overlap(results$matches, "Gene Value", input, results$stats)

lilin-yang/glacier documentation built on Oct. 3, 2020, 8:06 a.m.