.sp_costrain | R Documentation |
Weigh by spatial constrans
.sp_costrain(lr_res, cell.adj, adjacency = "adjacency")
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 |
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!!!
weighed lr_res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.