de_ttest_all: Run a DE across clusters with Welch's t-test

View source: R/post.R

de_ttest_allR Documentation

Run a DE across clusters with Welch's t-test

Description

Given expression data in counts, run differential expression between droplets in one group against all others, for each group in labels. These counts can be normalized, or raw counts can be given. If providiing raw counts, set the normalize parameter to TRUE. Returns only genes with an adjust p-value less than p_thresh and a log fold change greater than logFC.

Usage

de_ttest_all(counts, labels, normalize = TRUE, sf = 1,
  p_thresh = 0.05, logfc_thresh = 0, p_method = "bonferroni")

Arguments

counts

Gene by droplet sparse matrix of expression data.

labels

Vector of droplet labels giving the cluster that the droplet belongs to.

normalize

Whether to scale the droplets to sum to sf and and then log transform.

sf

Scale the counts in each droplet to sum to this value.

p_thresh

Return only genes that have an adjusted p-value less than this value.

logfc_thresh

Return genes that have a log fold change of at least this value.

p_method

Adjust p-values for multiple testing using this method.

Value

A data frame of DE results with

gene

gene name

diff

difference between mu1 and mu2

logFC

log2 fold change

mu1

mean of group 1

mu2

mean of group 2

t

t statistic

p

p-value

p_adj

p-value corrected for multiple testing

cluster

cluster the DE genes belong to

Examples


counts <- raw_counts(sce, type = "test")
clusts <- clusters(sce)
markers <- de_ttest_all(counts, clusts)


marcalva/diem documentation built on Jan. 1, 2023, 2:33 a.m.