Skip to contents

After running performViper, this can be run to produce a PBN with the identity function probability for each node relative to the VIPER normalised enrichment score (NES) for cell. For computePbnByCluster, the median NES for all cells in that cluster will be used.

Usage

computePbnByCluster(ingres.object, range = c(-1, 1))

computePbnBySingleCell(ingres.object, range = c(-1, 1))

Arguments

ingres.object

An ingres object with a non-null VIPER slot.

range

A vector representing the range to which the NES are to be re-scaled. range[1]+range[2] == 0 should be TRUE. Defaults to [-1, 1]

Value

An ingres object with the cluster.pbn or the single.cell.pbn slot filled

Functions

  • computePbnByCluster: Compute a Probabilistic Boolean Network (PBN) for each cluster

  • computePbnBySingleCell: Compute a Probabilistic Boolean Network (PBN) for each cell

Examples

# Create an ingres object with viper slot
ing <- createExampleIngresObjectWithViper()
#> Error in createExampleIngresObjectWithViper(): could not find function "createExampleIngresObjectWithViper"

ing <- computePbnByCluster(ing)
#> Error in eval_tidy(xs[[j]], mask): object 'ing' not found
head(ing@cluster.pbn)
#> Error in head(ing@cluster.pbn): object 'ing' not found

ing <- computePbnBySingleCell(ing)
#> Error in eval_tidy(xs[[j]], mask): object 'ing' not found
head(ing@single.cell.pbn)
#> Error in head(ing@single.cell.pbn): object 'ing' not found

# Restrict range to (-0.5, 0.5)
ing <- computePbnByCluster(ing, range = c(-0.5, 0.5))
#> Error in eval_tidy(xs[[j]], mask): object 'ing' not found
head(ing@cluster.pbn)
#> Error in head(ing@cluster.pbn): object 'ing' not found

ing <- computePbnBySingleCell(ing, range = c(-0.5, 0.5))
#> Error in eval_tidy(xs[[j]], mask): object 'ing' not found
head(ing@single.cell.pbn)
#> Error in head(ing@single.cell.pbn): object 'ing' not found