plot_correlations_distributions {scFeatureFilter}R Documentation

Produce a density plot of correlation values for each window of feature

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

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

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)


[Package scFeatureFilter version 1.0.0 Index]