saezlab / liana

LIANA: a LIgand-receptor ANalysis frAmework
https://saezlab.github.io/liana/
GNU General Public License v3.0
160 stars 28 forks source link

cytotalk.rank in mean_rank #118

Closed auroramaurizio closed 9 months ago

auroramaurizio commented 1 year ago

Dear Daniel, Thank you so much for providing such a useful and well-documented tool! I am currently working on prioritizing the most important LR interactions in my dataset using the information reported in the table generated by the liana_aggregate function.

Here's an example of how I'm using the Liana package with my testdata:

liana_test <- liana_wrap(testdata, method = c("natmi", "connectome", "logfc", "sca", "cellphonedb","cytotalk", "cytotalk"), resource = c("MouseConsensus"))

liana_test <- liana_test %>% liana_aggregate()

In the documentation, you mentioned that "liana provides consensus ranks for the results obtained using different methods. By default, liana will provide mean, median, and aggregate* consensus ranks. The aggregate consensus rank (aggregate_rank) is obtained using a re-implementation of the RRA method from the RobustRankAggreg package. RRA scores can be interpreted as p-values, and interactions that are consistently ranked higher than random are assigned low scores/p-values."

I noticed that the rank of "cytotalk" is not used for calculating the "mean_rank". My assumption is that this is because there are two separate rank columns, namely "cytotalk.rank.x" and "cytotalk.rank.y", and the function averages only the rank columns ending with *.rank. Is that correct?

Would you kindly give me some useful tips to make the most of the performance metrics provided in prioritising certain cell cell interactions ( ...to complement the existing knowledge about the specific characteristics of my dataset and research question...). E.g. like you already said, sorting ascending by aggregate_rank etc.

Thank you! I wish you a good day,

Aurora

dbdimitrov commented 1 year ago

Hi @auroramaurizio,

I believe you get two columns ("cytotalk.rank.x" and "cytotalk.rank.y") for cytotalk because you technically call it twice: method = c("natmi", "connectome", "logfc", "sca", "cellphonedb","cytotalk", "cytotalk") I can have a sanity check for this in a future version.

Hmmm, I think this might depend on the task at hand, but I would suggest running liana with it's default methods, and in addition to the aggregate of the methods, one can use cellphonedb's metrics as both are quite easy to interpret.

Hope this helps.

auroramaurizio commented 1 year ago

Ahaha sorry Daniel -.-'. How silly was my mistake!! Thank you for your prompt reply. I performed independent analysis with cellphoneDB and CellChat, so I will follow your advice. Best, Aurora