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

Negative TPR in calcROC() calcultation #71

Open
Fabian-RY opened this issue Mar 23, 2022 · 0 comments
Open

Negative TPR in calcROC() calcultation #71

Fabian-RY opened this issue Mar 23, 2022 · 0 comments

Comments

@Fabian-RY
Copy link

I've tried to benchmark the results of CaSpER ( I used it to detect CNV events at gene level from bulk RNAseq data) using the calcROC function of this package. I found out that this function returned a negative true positive ratio of -0.04 which, as far as I know, it is impossible, because TPR is a ratio of counts so neither of the elements needed to calculate this value can be negative. I followed the vignette with the documentation and example data in the readme of this repository and then used calcROC to check my matrices.

tp <- sum(chrMat * chrMat2)

I checked the code of this function calcROC to know how it calculated the number of true positives and saw that this value is calculated as the product of both matrices (array and CaSpER) and them sum the values. I found this very strange. As the values in the matrices are only -1, 0 and 1, I can expect values of 1 (agreement between matrices), 0 (at least one don't have a cnv event) and -1 (matrices disagree). In my data however there are more disagreements than agreements. and therefore the sum was negative. But i think it doesn't make sense that the number of True Positives is negative or that the disagreements affect the number of true positives.

Why is this calculation implemented this way?

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

1 participant