upset_plot: Construct an "upset plot" to explore gene presence/absence

View source: R/plotters.R

upset_plotR Documentation

Construct an "upset plot" to explore gene presence/absence

Description

This function constructs an "upset plot" showing patterns of gene familiy presence/absence in order of pattern frequency (number of gene families following the pattern). The genomes are ordered along their phylogeny.

Usage

upset_plot(
  tg,
  genome_name = genome,
  genome_col = NULL,
  genome_bold = NULL,
  color_scale = scale_color_brewer(palette = "Paired", guide = "none"),
  n = 50,
  freq_min = NULL,
  barchart_height = 50,
  frequency_labels = F,
  phylogroups = F
)

Arguments

tg

A tidygenomes object

genome_name

Name of a variable (unquoted) from the genome or phylogroup table that should be used to name the genomes

genome_col

Name of a variable (unquoted) from the genome or phylogroup table that should be used to color the genome names

genome_bold

Name of a logical variable (unquoted) from the genome or phylogroup table that indicates which genome names should be in bold

color_scale

Ggplot color scale generated by a scale_color_... type function

n

The number of presence/absence patterns to plot

freq_min

The minimum frequency of patterns to appear on the plot

barchart_height

The relative height of the frequency barchart, expressed as a number of rows from the main plot

frequency_labels

Logical variable indicating whether the frequency numbers should be plotted as labels on top of the barchart

phylogroups

Should horizontal lines be plotted between phylogroups?

Value

A ggplot object


SWittouck/tidyorthogroups documentation built on Feb. 2, 2023, 12:45 a.m.