condition_v_celltype_distance: Condition vs Cell-type distances

View source: R/condition_v_celltype_distance.R

condition_v_celltype_distanceR Documentation

Condition vs Cell-type distances

Description

Compare the condition perturbation to the estimated distance between different cell types

Usage

condition_v_celltype_distance(
  normalized_counts,
  meta.data,
  fixed.effects,
  random.effects = c(),
  clusters,
  d = 20,
  truncate = FALSE,
  min.counts.per.cell = 20,
  weights = NULL
)

Arguments

normalized_counts

A matrix containing normalized data with genes on rows and cells on columns

meta.data

A data frame containing meta data for each cell.

fixed.effects

The columns in meta.data corresponding to the fixed effects. In a typical case, this would be the condition of interest.

random.effects

The columns in meta.data corresponding to the random effects. In a typical use case this would be the column containing patient ID.

clusters

The column containing the cell-type annotation.

d

The number of PCs to use.

truncate

Whether or not to round negative distances to 0.

min.counts.per.cell

The minimum number of cells per cluster to perform the estimation.

weights

An optional vector of length equal to the number of genes specifying the weight to place on each gene in the distance estimate.

Value

A list with components

  • p - A boxplot comparing the condition perturbation to the inter-celltype distances.

  • D - A distance matrix for the cell types.

Author(s)

Phillip B. Nicol <philnicol740@gmail.com>


phillipnicol/pcDiffPop documentation built on Nov. 29, 2024, 6:06 p.m.