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

Sensitivity&Specificity #12

Closed
Ultramancc opened this issue Jun 17, 2024 · 3 comments
Closed

Sensitivity&Specificity #12

Ultramancc opened this issue Jun 17, 2024 · 3 comments

Comments

@Ultramancc
Copy link

Hi,

I'm currently using scoary2 and it's a useful tool. I have a question about sensitivity&specificity
May I know the calculation way for those two values? As I have found there may be some conflicts with sensitivity and specificity, those genes were lowly detected in trait-positive but the results indicate they have a high sensitivity.

image

@MrTomRod
Copy link
Owner

MrTomRod commented Jul 2, 2024

Dear @Ultramancc

Sorry for responding so slowly, I was on holiday.

Good question, the cause is a recent change that was made to Scoary2 in response to this issue/pull request:

The original behaviour (Scoary1 and Scoary2 up until 0.0.4):

  • The sensitivity of using the presence of this gene as a diagnostic test to determine trait-positivity: g+t+/(g+t++g-t+)
  • The specificity of using the absence of this gene as a diagnostic test to determine trait-negativity: g-t-/(g+t-+g-t-)

The current behaviour (Socary2 starting with 0.0.5):

If gene and trait are positively correlated (original behaviour):

  • The sensitivity of using the presence of this gene as a diagnostic test to determine trait-positivity: g+t+/(g+t++g-t+)
  • The specificity of using the absence of this gene as a diagnostic test to determine trait-negativity: g-t-/(g+t-+g-t-)

If gene and trait are negatively correlated:

  • The sensitivity of using the absence of this gene as a diagnostic test to determine trait-positivity: g-t+/(g+t++g-t+)
  • The specificity of using the presence of this gene as a diagnostic test to determine trait-negativity: g+t-/(g+t-+g-t-)

Your data

I made a simple Excel that may make it easier to understand what is happening: SensSpecPlayground.xlsx

@Ultramancc
Copy link
Author

Thank you so much for your detailed and helpful answer!

@MrTomRod
Copy link
Owner

MrTomRod commented Jul 6, 2024

No worries! 👍

@MrTomRod MrTomRod closed this as completed Jul 6, 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