plot_correlations_distributions: Produce a density plot of correlation values for each window...

Description Usage Arguments Value See Also Examples

View source: R/plotting.R

Description

Feature by feature correlation values between every windows and the reference to window of features are visualized as density lines, one facet per comparison. Two density lines are drown in each facets:

Usage

1
2
plot_correlations_distributions(df, metrics = NULL, vlines = c("mean",
  "median"), facet_ncol = 4)

Arguments

df

A tibble, usually the output of correlations_to_densities.

metrics

Optional. The output of get_mean_median. Dashed line will represent mean or median of the correlation coefficient distributions.

vlines

A string, either "mean" or "median". Should the dashed line represent the mean or the median of the correlation coefficient distributions? Ignored if metrics is NULL.

facet_ncol

The number of columns to arrange the plots.

Value

A ggplot2 plot.

See Also

correlations_to_densities, get_mean_median

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(magrittr)
myData <- scData_hESC %>%
calculate_cvs %>%
    define_top_genes(window_size = 100) %>%
    bin_scdata(window_size = 1000)

corDistrib <- correlate_windows(myData, n_random = 3)

corDens <- correlations_to_densities(corDistrib)

plot_correlations_distributions(corDens)

metrics <- get_mean_median(corDistrib)

plot_correlations_distributions(corDens, metrics = metrics)

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