dot-sp_costrain: Weigh by spatial constrans

.sp_costrainR Documentation

Weigh by spatial constrans

Description

Weigh by spatial constrans

Usage

.sp_costrain(lr_res, cell.adj, adjacency = "adjacency")

Arguments

lr_res

liana_pipe output prior to joining complexes

cell.adj

cell adjacency weights (should be positive)

adjacency

name of the column with cell pair adjacency scores

Details

Note that for the case that there are weights from 0-1, the negative values (in e.g. logFC, z-scores) might be counter-logically affected - i.e. they would be brought closer to 0. Thus, by default liana expects weights from 0-1. These are then multiplied for positive values, while negative values are divided.

Alternatively, one could e.g. multiply the weights by a factor (e.g. 10,000), if logFC and Connectome are used. However, this would change some of the assumptions/interpretations of the scores, while consensus ranking will be unaffected.

Also, note that any interactions between cell pairs with an adjacency of 0 will be excluded (this would affect the scores from CytoTalk).

NB! ' single-context, and should not be used when scaling between conditions!!!

Value

weighed lr_res


saezlab/liana documentation built on Aug. 10, 2024, 8:14 a.m.