Skip to contents

Runs Entrain to identify ligands responsible for trajectory dynamics. Requires pseudotime labels for each cell in a column in metadata with name pseudotime_key

Usage

get_path_ligands(
  obj,
  expressed_ligands,
  lr_network,
  ligand_target_matrix,
  path_cell_names,
  pseudotime_key = "pseudotime",
  cluster_key = NULL,
  reduction_name = "MonocleUMAP",
  metric = "Covariances",
  covariance_cutoff = 0.05,
  return_model = FALSE
)

Arguments

obj

A seurat object with cell pseudotimes contained in a metadata column with column name pseudotime_key.

expressed_ligands

Character vector of active ligands in dataset (must be in rownames(obj))

lr_network

NicheNet ligand-receptor pairs data file.

ligand_target_matrix

NicheNet ligand-target data file.

path_cell_names

a vector of cell names (must be in colnames(obj)), defining cells in a trajectory path for which associated ligands will be calculated.

pseudotime_key

Column name in colnames(obj@meta.data) that contains cell pseudotime values.

cluster_key

Column name in colnames(obj@meta.data) corresponding to

reduction_name

Seurat reduction key for dimension reduction visualization.

metric

One of "Covariances" or "Correlations". Default "Covariances". Determines whether to use pseudotime covariance or pseudotime correlation in the calculation of TRAINing genes.

covariance_cutoff

Remove the bottom covariance_cutoff fraction of covariances (e.g. 0.10 = bottom 10 percent of genes, ranked by covariance, removed from later analysis).

return_model

If TRUE, will additionally save the raw random forest object in obj@misc$entrain$paths$path_name$model

Value

a Seurat object with ligand trajectory results in obj$misc$entrain$paths$path_name