Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How exactly the ligand activity were calculate? #260

Closed
iceautumn opened this issue Apr 21, 2024 · 1 comment
Closed

How exactly the ligand activity were calculate? #260

iceautumn opened this issue Apr 21, 2024 · 1 comment

Comments

@iceautumn
Copy link

Thank you for developing these tools, which are incredibly beneficial for analyzing cell-cell communication. As I was examining the regulatory heatmap, I noticed that some ligands, such as EFNA1, target only a few genes. Despite that, EFNA1's rank seems more optimized than CDH1, which targets a much larger number of genes. This observation puzzled me, so I decided to investigate how ranks are calculated, which led me to the predict_ligand_activities function. Upon reviewing the function's code on rdrr.io, I found that get_single_ligand_importances plays a crucial role within it. In turn, the critical function for that one is evaluate_target_prediction. Yet, it seems this isn't the final function responsible for calculating metrics like AUPR, etc. My search ultimately led me to focus on the evaluate_target_prediction_strict function, which is nested within evaluate_target_prediction. However, I haven't been able to locate the detailed code for this function, and my attempts to Google it turned up no useful results. I’m wondering if evaluate_target_prediction_strict is indeed the key function for calculating metrics such as "auroc", "aupr", "aupr_corrected", and "pearson", and if so, where could I access these detailed codes?
test_heatmap

@Eisuan
Copy link

Eisuan commented May 6, 2024

Thank you for your enquiry.
To compute the prediction values, the function evaluate_target_prediction_strict calls classification_evaluation_continuous_pred using the response and prediction vectors as inputs.

Inside classification_evaluation_continuous_pred you will find all the functions that are called to compute the AUPR and correlation scores. In this way, you should be able to reconstruct all the steps and inputs used to prioritize EFNA1 and CDH1.

@Eisuan Eisuan closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants