plot_metric: Produce a bar chart of mean (or median) correlation...

Description Usage Arguments Value See Also Examples

View source: R/plotting.R

Description

Use the output of get_mean_median and produce a bar chart of mean (or median) correlation coefficient per bin of features. Correlations against the randomised top window are shown as dot-and-whiskers, and are used to estimate a background level.

Usage

1
2
3
4
plot_metric(metric_table, selected_metric = c("mean", "median", "score"),
  show_ctrl = TRUE, control_color = "blue", show_threshold = TRUE,
  threshold = 2, threshold_color = "red", line_size = 1,
  annotate_lines = TRUE)

Arguments

metric_table

A tibble, usually the output of get_mean_median.

selected_metric

Which column in metricsTable to use? Default to mean.

show_ctrl

A boolean. Should a dashed line indicate the estimated background level?

control_color

The colour of the background dashed line (default to blue).

show_threshold

A boolean. Should a dashed line indicate the estimated threshold level?

threshold

How many times the background level should be multiplies do determine a threshold? Default to 2. The higher the more stringent.

threshold_color

The colour of the threshold dashed line (default to blue).

line_size

Thickness of the dashed lines.

annotate_lines

A boolean. Should the dashed lines be annotated?

Value

A ggplot2 plot.

See Also

get_mean_median

Examples

1
2
3
4
5
6
7
8
library(magrittr)
scData_hESC %>%
    calculate_cvs %>%
    define_top_genes(window_size = 100) %>%
    bin_scdata(window_size = 1000) %>%
    correlate_windows(n_random = 3) %>%
    get_mean_median %>%
    plot_metric

scFeatureFilter documentation built on Nov. 8, 2020, 7:49 p.m.