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

Mixscape reproducibility #683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Lilly-May
Copy link
Collaborator

PR Checklist

  • Referenced issue is linked (closes Reproducibility of mixscape #671)
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

  • As described in Reproducibility of mixscape #671, running Mixscape multiple times can produce varying results due to the non-deterministic GaussianMixture model. I added a seed parameter to pt.tl.Mixscape.mixscape.
  • In the original Mixscape implementation, there is a parameter called n_dims, which specifies the number of dimensions from the chosen representation (usually PCA) to be used for determining the nearest neighbors. I have added this parameter to our implementation of pt.tl.Mixscape.perturbation_signature and set its default value to 15, which is also the default used in the original implementation.
  • I added a test for pt.tl.Mixscape.perturbation_signature that not only verifies that a layer has been added to the AnnData object but also checks the correctness of the computed scores
  • Input required: The perturbation signature was previously calculated by subtracting the average expression of the N nearest control (NT) cells from the observed expression. But, in the original implementation, this subtraction is performed in the reverse order (see here). This only affects the sign of the result, but aligning our calculation with the original implementation would make it easier to compare scores. I suggest adopting our calculation to the original approach, but happy to discuss this further.

@github-actions github-actions bot added the bug Something isn't working label Dec 9, 2024
@Zethson
Copy link
Member

Zethson commented Dec 9, 2024

The test fixes are unrelated and I'm hoping to fix them next week. Just ping me if you want a review, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reproducibility of mixscape
2 participants