pairwise.interaction.KL: Calulate KL divergence between observed vs. expected...

Description Usage Arguments Value

View source: R/pairwise.interaction.KL.R

Description

Expected interaction score distribution is that all cell types express the same level of ligand and receptor genes, thus the normalized probability is 1/n^2. Observed distribution is the interaction scores based on actual expression values. This is a helper function called by make_expressed_net.R or make_expressed_net_specify_expressed_genes.R

Usage

1
pairwise.interaction.KL(ligand_mat, receptor_mat, method)

Arguments

ligand_mat

expression matrix for ligands

receptor_mat

expression matrix for receptors. The same ligand-receptor pair should be in the same order as ligand_mat.

method

"product" or "min": ligand-receptor interaction score is either defined by multiplying ligand and receptor expression values or take the minimum

Value

KL divergence for all expressed ligand-receptor pairs.


yuliangwang/talklr documentation built on Feb. 17, 2020, 5:02 a.m.