CompareValues.SJ.10x {MARVEL}R Documentation

Differential splice junction analysis

Description

Performs differential splice junction analysis between two groups of cells.

Usage

CompareValues.SJ.10x(
  MarvelObject,
  coord.introns = NULL,
  cell.group.g1,
  cell.group.g2,
  min.pct.cells.genes = 10,
  min.pct.cells.sj = 10,
  min.gene.norm = 1,
  seed = 1,
  n.iterations = 100,
  downsample = FALSE,
  show.progress = TRUE
)

Arguments

MarvelObject

Marvel object. S3 object generated from CheckAlignment.10x function.

coord.introns

Character strings. Specific splice junctions to be included for analysis. Default is NULL.

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.

min.pct.cells.genes

Numeric value. Minimum percentage of cells in which the gene is expressed for that gene to be included for splice junction expression distribution analysis. Expressed genes defined as genes with non-zero normalised UMI counts. This threshold may be determined from PlotPctExprCells.SJ.10x function. Default is 10.

min.pct.cells.sj

Numeric value. Minimum percentage of cells in which the splice junction is expressed for that splice junction to be included for splice junction expression distribution analysis. Expressed splice junctions defined as splice junctions with raw UMI counts >= 1. This threshold may be determined from PlotPctExprCells.SJ.10x function. Default is 10.

min.gene.norm

Numeric value. The average normalised gene expression across the two cell groups above which the splice junction will be included for analysis. Default is 1.0.

seed

Numeric value. Random number generator to be fixed for permutations test and down-sampling.

n.iterations

Numeric value. Number of times to shuffle the cell group labels when building the null distribution. Default is 100.

downsample

Logical value. If set to TRUE, both cell groups will be down-sampled so that both cell groups will have the same number of cells. The number of cells to downsample will be based on the smallest cell group. Default is FALSE.

show.progress

Logical value. If set to TRUE (default), the progress bar will appear.

Value

An object of class S3 with a new slots MarvelObject$DE$SJ$Table, MarvelObject$DE$SJ$cell.group.g1, and MarvelObject$DE$SJ$cell.group.g2.

Examples


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

# Define cell groups
    # Retrieve sample metadata
    sample.metadata <- marvel.demo.10x$sample.metadata

    # Group 1 (reference)
    index <- which(sample.metadata$cell.type=="iPSC")
    cell.ids.1 <- sample.metadata[index, "cell.id"]
    length(cell.ids.1)

    # Group 2
    index <- which(sample.metadata$cell.type=="Cardio day 10")
    cell.ids.2 <- sample.metadata[index, "cell.id"]
    length(cell.ids.2)

# DE
marvel.demo.10x <- CompareValues.SJ.10x(
                        MarvelObject=marvel.demo.10x,
                        cell.group.g1=cell.ids.1,
                        cell.group.g2=cell.ids.2,
                        min.pct.cells.genes=10,
                        min.pct.cells.sj=10,
                        min.gene.norm=1.0,
                        seed=1,
                        n.iterations=100,
                        downsample=TRUE,
                        show.progress=FALSE
                        )

# Check output
head(marvel.demo.10x$DE$SJ$Table)

[Package MARVEL version 1.4.0 Index]