sharing_venn: Produce tables to plot sharing venn or euler diagrams.

View source: R/plotting-functions.R

sharing_vennR Documentation

Produce tables to plot sharing venn or euler diagrams.

Description

[Stable] This function processes a sharing data frame obtained via is_sharing() with the option table_for_venn = TRUE to obtain a list of objects that can be plotted as venn or euler diagrams.

Usage

sharing_venn(sharing_df, row_range = NULL, euler = TRUE)

Arguments

sharing_df

The sharing data frame

row_range

Either NULL or a numeric vector of row indexes (e.g. c(1, 4, 5) will produce tables only for rows 1, 4 and 5)

euler

If TRUE will produce tables for euler diagrams, otherwise will produce tables for venn diagrams

Details

The functions requires the package eulerr. Each row of the input data frame is representable as a venn/euler diagram. The function allows to specify a range of row indexes to obtain a list of plottable objects all at once, leave it to NULL to process all rows.

To actually plot the data it is sufficient to call the function plot() and specify optional customization arguments. See eulerr docs for more detail on this.

Value

A list of data frames

See Also

Other Plotting functions: CIS_volcano_plot(), HSC_population_plot(), circos_genomic_density(), fisher_scatterplot(), integration_alluvial_plot(), sharing_heatmap(), top_abund_tableGrob(), top_cis_overtime_heatmap()

Examples

data("integration_matrices", package = "ISAnalytics")
data("association_file", package = "ISAnalytics")
aggreg <- aggregate_values_by_key(
    x = integration_matrices,
    association_file = association_file,
    value_cols = c("seqCount", "fragmentEstimate")
)
sharing <- is_sharing(aggreg, n_comp = 3, table_for_venn = TRUE)
venn_tbls <- sharing_venn(sharing, row_range = 1:3, euler = FALSE)
venn_tbls
plot(venn_tbls[[1]])

calabrialab/ISAnalytics documentation built on Nov. 2, 2023, 8:57 p.m.