plot_upset_with_variants: Plot an upsetplot

View source: R/plot.R

plot_upset_with_variantsR Documentation

Plot an upsetplot

Description

Upset plot to visualize which variants co-occur.

Usage

plot_upset_with_variants(
  h5f,
  variants,
  unknown = c("unknown_to_ref", "unknown_discard"),
  return_data = FALSE,
  index_cell = NULL,
  nsets = 5
)

Arguments

h5f

h5f

variants

A named vector. You should get the value from the id column after calling get_variants. If you don't provide the names of the variants, R will do a bad job for you.

unknown

A String. Specifies if NGT = 3 should be considered as reference or discarded for plotting.

return_data

Boolean. Defaults to FALSE. If TRUE, returns the NGT data.table with cells as rows and variants as columns.

index_cell

A numeric vector. Use this if you want to restrict the search to a subset of cells.

nsets

An integer. How many sets (ie, variants) of the supplied variants to plot.

Examples

path <- "path/to/.h5"
h5f <- read_h5f(path)

interesting_variants <- c(IDH1_R132H = "chr2:209113112:C/T", NPM1c = "chr5:170837543:C/CTCTG")
plot_upset_with_variants(h5f, variants = interesting_variants)

northNomad/tapestri.tools documentation built on May 31, 2024, 4:44 p.m.