CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

The parameter "scale.distance" for "computeCommunProb".

Open zzz1314520 opened this issue 2 years ago • 2 comments

Hello, thank you for your excellent package and excellent work. However, I have a question about the "scale.distance" parameter in "computeCommunProb". I'm not quite sure about the meaning of this parameter.

In your description of "computeCommunProb",We choose this values such that the minimum value of the scaled distances is in [1,2].

When I run computeCommunProb, the following message appears:

[1] ">>> Run CellChat on spatial transcriptomics data using distances as constraints of the computed communication probability <<< [2023-12-01 17:02:49.796026]"
The suggested minimum value of scaled distances is in [1,2], and the calculated value here is  55.2037 

And when I look at your tutorial, it says

 [1] ">>> Run CellChat on spatial transcriptomics data using distances as constraints of the computed communication probability <<< [2023-11-26 22:42:03.590081]"
#> The suggested minimum value of scaled distances is in [1,2], and the calculated value here is  1.30553 

But my calculated value is 55, while yours is 1.3, which is a significant difference. Can you please confirm if this is correct? ps:my date is from stereo-seq Looking forward to your reply

zzz1314520 avatar Dec 02 '23 06:12 zzz1314520

@zzz1314520 You can decrease the parameterscale.distance or simply set distance.use = FALSE. Do you use the bin-based or cell-based methods?

sqjin avatar Dec 10 '23 04:12 sqjin

Thank you for your answer. before Professor suye0620 answered stereo-seq's“So you can set scale.factors = list(spot.diameter = 25, spot = 50) or scale.factors = list(spot.diameter = 25, spot = 1) with the parameter interaction.length = 200 in computeCommunProb function.“ So we set scale.distance = 200.

I wonder what effect does the size of this parameter have? ps:We use bin50 for analysis Looking forward to your reply

zzz1314520 avatar Dec 17 '23 13:12 zzz1314520