PlotValues.PSI {MARVEL}R Documentation

Plot percent spliced-in (PSI) values

Description

Violin plot of percent spliced-in (PSI) values across different groups of cells.

Usage

PlotValues.PSI(
  MarvelObject,
  cell.group.list,
  feature,
  maintitle = "gene_short_name",
  xlabels.size = 8,
  max.cells.jitter = 10000,
  max.cells.jitter.seed = 1,
  min.cells = 25,
  sigma.sq = 0.001,
  bimodal.adjust = TRUE,
  seed = 1,
  modality.column = "modality.bimodal.adj",
  scale.y.log = FALSE,
  cell.group.colors = NULL,
  point.alpha = 0.2
)

Arguments

MarvelObject

Marvel object. S3 object generated from TransformExpValues function.

cell.group.list

List of character strings. Each element of the list is a vector of cell IDs corresponding to a cell group. The name of the element will be the cell group label.

feature

Character string. Coordinates of splicing event to plot.

maintitle

Character string. Column to use as plot main title as per MarvelObject$ValidatedSpliceFeature. Default is "gene_short_name" column.

xlabels.size

Numeric value. Size of x-axis labels as per ggplot2 function. Default is 8.

max.cells.jitter

Numeric value. Maximum number of cells for jitter points. Cells are randomly downsampled to show on jitter plot. Useful when there are large number of cells so that individual jitter points do not overcrowd the violin plot.

max.cells.jitter.seed

Numeric value. Cells downsampled are reproducible.

min.cells

Numeric value. The minimum no. of cells expressing the splicing event to be included for analysis. Please refer to AssignModality function help page for more details.

sigma.sq

Numeric value. The variance threshold below which the included/excluded modality will be defined as primary sub-modality, and above which it will be defined as dispersed sub-modality. Please refer to AssignModality function help page for more details. Default is 0.001.

bimodal.adjust

Logical. When set to TRUE, MARVEL will identify false bimodal modalities and reassign them as included/excluded modality. Please refer to AssignModality function help page for more details.

seed

Numeric value. Ensure the fitdist function returns the same values for alpha and beta paramters each time this function is executed using the same random number generator. Please refer to AssignModality function help page for more details.

modality.column

Character string. Can take the value "modality", "modality.var" or "modality.bimodal.adj". Please refer to AssignModality function help page for more details. Default is "modality.bimodal.adj".

scale.y.log

Logical value. Only applicable when level set to "splicing". If set to TRUE, the y-axis of will log10-scaled. Useful when most PSI values are extremely small (< 0.02) or big (> 0.98). Default is FALSE.

cell.group.colors

Character string. Vector of colors for the cell groups specified for PCA analysis using cell.type.columns, cell.type.variable, and cell.type.labels. If not specified, default ggplot2 colors will be used.

point.alpha

Numeric value. Transparency of the data points. Takes any values between 0-1. Default value is 0.2.

Value

An object of class S3 with new slot MarvelObject$adhocPlot$PSI.

Examples

marvel.demo <- readRDS(system.file("extdata/data", "marvel.demo.rds", package="MARVEL"))

# Define cell groups to plot
df.pheno <- marvel.demo$SplicePheno
cell.group.g1 <- df.pheno[which(df.pheno$cell.type=="iPSC"), "sample.id"]
cell.group.g2 <- df.pheno[which(df.pheno$cell.type=="Endoderm"), "sample.id"]
cell.group.list <- list(cell.group.g1, cell.group.g2)
names(cell.group.list) <- c("iPSC", "Endoderm")

# Plot
marvel.demo <- PlotValues.PSI(MarvelObject=marvel.demo,
                              cell.group.list=cell.group.list,
                              feature="chr17:8383254:8382781|8383157:-@chr17:8382143:8382315",
                              min.cells=5,
                              xlabels.size=5
                              )

# Check output
marvel.demo$adhocPlot$PSI

[Package MARVEL version 1.4.0 Index]