How cuffcompare calculates sensitivity and specificity?
1
2
Entering edit mode
9.6 years ago
scchess ▴ 640

According to wikipedia, sensitivity and specificity are defined as:

sensitivity formula

specificity formula

However, in cuffcompare, the values are calculated as:

sp=(100.0*(double)ps->exonTP)/(ps->exonTP+ps->exonFP);
sn=(100.0*(double)ps->exonTP)/(ps->exonTP+ps->exonFN);

sn is sensitivity and sp is specificity.

The formulas don't match, in particular true-positive (exonTP) is now used in both formulas. Does anybody know why?

cufflinks statistics • 2.3k views
ADD COMMENT
0
Entering edit mode

you should probably open a ticket with the developer

ADD REPLY
0
Entering edit mode

I found the answer. Please look at my answer.

ADD REPLY
2
Entering edit mode
9.4 years ago
scchess ▴ 640

That was explained in their paper.

In this context, we are measuring the accuracy at the base level. In the base level, we will have significantly more noncoding bases than coding bases. Therefore, TN will be much larger than FP. Therefore, SPC (specificity) will tend to be close to one and not very suitable as a metric. To fix the issue, cufflinks prefers another formula:

sp=(100.0*(double)ps->exonTP)/(ps->exonTP+ps->exonFP);

It is important to note that cufflinks is not not calculating specificity anymore. Instead, we are getting the prediction accuracy of the experiment. It is a technical mistake that cufflinks should fix. They should never claim it's specificity when it's not.

ADD COMMENT
0
Entering edit mode

thanks for following up - it is quite interesting to know

ADD REPLY

Login before adding your answer.

Traffic: 1968 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6