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

compute DE+ and DE- separately #2826

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

compute DE+ and DE- separately #2826

wants to merge 33 commits into from

Conversation

LevyNat
Copy link
Collaborator

@LevyNat LevyNat commented Jun 3, 2024

No description provided.

@canergen
Copy link
Member

canergen commented Jun 3, 2024

Fixed the wrong behavior that we have seen in different models (high significance despite low mean LFC but high standard deviation). It still requires a release note and it would be good to check in our DE tutorial whether things are changing there. I’m not sure that the Bayes factor computation is correct @PierreBoyeau?

@PierreBoyeau
Copy link
Contributor

Hi, LGTM. I am unsure about the Bayes factor here, since we don't have two, but three competing models now(equally expressed, upreg, and downreg). I would be in favor of not computing BFs in this case.

@canergen
Copy link
Member

canergen commented Jun 7, 2024

I guess it's fine to remove. I would assume we do two tests: upregulated vs rest and downregulated vs rest. We output only the winner of the test for upregulated/downregulated. I guess the corresponding Bayes factor for the returned FDR is then: upregulated/(equally+downregulated) or downregulated/(equally+upregulated).

@martinkim0 martinkim0 added the P0 label Jul 12, 2024
@@ -360,7 +365,8 @@ def m1_domain_fn(samples):
res = dict(
proba_de=proba_m1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not return probe_de?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.67%. Comparing base (abfcbfc) to head (15fc4b5).

❗ There is a different number of reports uploaded between BASE (abfcbfc) and HEAD (15fc4b5). Click for more details.

HEAD has 18 uploads less than BASE
Flag BASE (abfcbfc) HEAD (15fc4b5)
21 3
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2826      +/-   ##
==========================================
- Coverage   89.43%   82.67%   -6.77%     
==========================================
  Files         185      185              
  Lines       16182    16182              
==========================================
- Hits        14473    13379    -1094     
- Misses       1709     2803    +1094     

see 27 files with indirect coverage changes

@LevyNat
Copy link
Collaborator Author

LevyNat commented Jan 2, 2025

@canergen @PierreBoyeau can we merge to main?

I put the new proba_de computation in mode='change_threeway' and kept 'vanilla' as default. Just need to think about how we explain the fix in the documentation

@LevyNat LevyNat changed the title compute DE+ and DE- separately nathan-compute DE+ and DE- separately Jan 7, 2025
@ori-kron-wis ori-kron-wis changed the title nathan-compute DE+ and DE- separately compute DE+ and DE- separately Jan 7, 2025
@canergen
Copy link
Member

canergen commented Jan 9, 2025

Put in other fixes, that we discussed when we met. Especially the threshold was computed wrong. Subset_idx is something that I need for resolVI and it needs to be in this function. The argument is also different now with two and three.

@ori-kron-wis ori-kron-wis added this to the scvi-tools 1.2 milestone Jan 12, 2025
@ori-kron-wis ori-kron-wis added the on-merge: backport to 1.2.x on-merge: backport to 1.2.x label Jan 12, 2025
@ori-kron-wis
Copy link
Collaborator

we need to rerun all tutorials that use DE once merged.

@ori-kron-wis
Copy link
Collaborator

this branch was already merged in this PR: #3144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-merge: backport to 1.2.x on-merge: backport to 1.2.x P0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants