CompareValues.PSI {MARVEL}R Documentation

Differential splicing analysis

Description

Performs differentially splicing analysis between 2 groups of cells.

Usage

CompareValues.PSI(
  MarvelObject,
  cell.group.g1,
  cell.group.g2,
  downsample = FALSE,
  seed = 1,
  min.cells = 25,
  pct.cells = NULL,
  method,
  nboots = 1000,
  n.permutations = 1000,
  method.adjust = "fdr",
  event.type,
  show.progress = TRUE,
  annotate.outliers = TRUE,
  n.cells.outliers = 10,
  assign.modality = TRUE
)

Arguments

MarvelObject

Marvel object. S3 object generated from TransformExpValues function.

cell.group.g1

Vector of character strings. Cell IDs corresponding to Group 1 (reference group).

cell.group.g2

Vector of character strings. Cell IDs corresponding to Group 2.

downsample

Logical value. If set to TRUE, the number of cells in each cell group will be downsampled to the sample size of the smaller cell group so that both cell groups will have the sample size prior to differential expression analysis. Default is FALSE.

seed

Numeric value. The seed number for the random number generator to ensure reproducibility during during down-sampling of cells when downsample set to TRUE, during permutation testing when method set to "permutation", and during modality assignment which will be performed automatically.

min.cells

Numeric value. The minimum no. of cells expressing the splicing event for the event to be included for differential splicing analysis.

pct.cells

Numeric value. The minimum percentage of cells expressing the splicing event for the event to be included for differential splicing analysis. If pct.cells is specified, then pct.cells will be used as threshold instead of min.cells.

method

Character string. Statistical test to compare the 2 groups of cells. "ks", "kuiper", "ad", "dts", "wilcox", "t.test", and "permutation" for Kolmogorov-Smirnov, Kuiper, Anderson-Darling, DTS, Wilcox, t-test, and, permutation approach respectively.

nboots

Numeric value. When method set to "dts", the number of bootstrap iterations for computing the p-value.

n.permutations

Numeric value. When method set to "permutation", this argument indicates the number of permutations to perform for generating the null distribution for subsequent p-value inference. Default is 1000 times.

method.adjust

Character string. Adjust p-values for multiple testing. Options available as per p.adjust function.

event.type

Character string. Indicate which splicing event type to include for analysis. Can take value "SE", "MXE", "RI", "A5SS", or "A3SS" which represents skipped-exon (SE), mutually-exclusive exons (MXE), retained-intron (RI), alternative 5' splice site (A5SS), and alternative 3' splice site (A3SS), respectively.

show.progress

Logical value. If set to TRUE, progress bar will be displayed so that users can estimate the time needed for differential analysis. Default value is TRUE.

annotate.outliers

Numeric value. When set to TRUE, statistical difference in PSI values between the two cell groups that is driven by outlier cells will be annotated.

n.cells.outliers

Numeric value. When annotate.outliers set to TRUE, the minimum number of cells with non-1 or non-0 PSI values for included-to-included or excluded-to-excluded modality change, respectively. The p-values will be re-coded to 1 when both cell groups have less than this minimum number of cells. This is to avoid false positive results.

assign.modality

Logical value. If set to TRUE (default), modalities will be assigned to each cell group.

Value

An object of class data frame containing the output of the differential splicing analysis.

Examples

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

# Define cell groups for analysis
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"]

# DE
results <- CompareValues.PSI(MarvelObject=marvel.demo,
                             cell.group.g1=cell.group.g1,
                             cell.group.g2=cell.group.g2,
                             min.cells=5,
                             method="t.test",
                             method.adjust="fdr",
                             event.type=c("SE", "MXE", "RI", "A5SS", "A3SS", "AFE", "ALE"),
                             show.progress=FALSE
                             )

# Check output
head(results)

[Package MARVEL version 1.4.0 Index]