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

Adding the rate_diff_transformation function. #138

Merged
merged 5 commits into from
May 15, 2024

Conversation

ptajvar
Copy link
Contributor

@ptajvar ptajvar commented May 14, 2024

rate_diff_transformation is an alternative transformation that has been shown to improve the raw pearson values for colocalization analysis especially in terms of removing the correlation between colocalization values and marker abundance. It is now being added as an option but will not be set as the default transformation yet for colocalization analysis (the default is currently log1p).

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added a unit-test for colocalization calculation with rate-diff transformation to verify run without errors. The colocalization values with rate-diff transformation are also checked for different datasets and are shown to result in high agreement between raw pearson values and pearson_z scores and expected biological signals such as HLA-ABC with B2M and CD11a and CD18 appear consistently in top marker pairs.
There will be further inspection and comparison before setting this transformation as default.

PR checklist:

  • This comment contains a description of changes (with reason).
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and documentation and corrected any misspellings
  • I have documented any significant changes to the code in CHANGELOG.md

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.81%. Comparing base (12c9bbc) to head (00be3d6).

Additional details and impacted files
@@           Coverage Diff            @@
##           dev     #138       +/-   ##
========================================
+ Coverage     0   81.81%   +81.81%     
========================================
  Files        0      118      +118     
  Lines        0     6560     +6560     
========================================
+ Hits         0     5367     +5367     
- Misses       0     1193     +1193     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ptajvar ptajvar self-assigned this May 14, 2024
@ptajvar ptajvar marked this pull request as ready for review May 14, 2024 15:21
@ptajvar ptajvar requested a review from ambarrio May 15, 2024 07:28
Copy link
Contributor

@johandahlberg johandahlberg left a comment

Choose a reason for hiding this comment

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

This looks really nice and clean! I had a small comment on the formatting of the doc sting. The other thing I think would be good to do is to add a simple test for rate_diff_tranformation. Lets fix that and then I think we are good to go.

src/pixelator/statistics.py Outdated Show resolved Hide resolved
Copy link
Contributor

@johandahlberg johandahlberg left a comment

Choose a reason for hiding this comment

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

Super!

@ptajvar ptajvar merged commit 04dbc28 into dev May 15, 2024
15 checks passed
@ptajvar ptajvar deleted the feature/exe-1716-Adding-rate-diff-transformation branch May 15, 2024 09:38
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

Successfully merging this pull request may close these issues.

None yet

2 participants