plot_protein_by_clones: Plot protein abundance across clones

View source: R/plot.R

plot_protein_by_clonesR Documentation

Plot protein abundance across clones

Description

Uses ggplot framework to plot protein abundance across groups of cells (aka, clones).

Usage

plot_protein_by_clones(
  h5f,
  index_cells_list,
  select_proteins = NULL,
  geom = c("ridges", "boxplot")
)

Arguments

h5f

h5f

index_cells_list

A named list of integers. The names are the names of the clones. The integers are the index of cells that belong to the corresponding clones.

select_proteins

A character vector. Specifies the proteins to plot. To see available proteins, see get_protein_ids

geom

Either ridges or boxplot. Default is ridges.

Value

A named list of ggplot objects

Examples

#Compare CD34 expression between two clones.
#clone1: IDH1_R132H single mutant
#clone2: IDH1_R132H & NPM1c double mutant


## Not run: 
idh1_het <- get_cells_index(h5f, variants = c(IDH1_R132H = "chr2:209113112:C/T"), int_ngt = "1")
npm1c <- get_cells_index(h5f, variants = c(NPM1c = "chr5:170837543:C/CTCTG"), int_ngt = "1")
npm1_wt <- get_cells_index(h5f, variants = c(NPM1c = "chr5:170837543:C/CTCTG"), int_ngt = "0")

index_clone1 <- intersect(idh1_het, npm1_wt)
index_clone2 <- intersect(idh1_het, npm1c)
index_cells_list <- list(clone1 = index_clone1, clone2 = index_clone2)

plot_protein_by_clones(h5f, index_cells_list, select_proteins = "CD34", geom = "ridges")

## End(Not run)

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