Skip to content

Add metric flowsom mapping similarity #59

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

Merged
merged 5 commits into from
May 22, 2025
Merged

Conversation

LuLeom
Copy link
Contributor

@LuLeom LuLeom commented May 21, 2025

Describe your changes

Implemented metrics/flowsom_mapping_similarity.
It is an horizontal metric to compare flowsom trees between paired replicate samples.

As this implementation involves quite a bit of switch between python and R and I/O operations I think a careful review of this PR is needed.

NOTE: As the common helper functions implemented in src/utils/ are in python, here I am calling an additional helper script preprocess_with_utils.py from R with system(). Temporary h5ad files are stored in a folder tmp/ and loaded in R.

NOTE 2: Apparently, I cannot store FlowSOM objects in adata$uns. A summary of the results (including the FlowSOM objects) is stored in the variable fs_mapping_similarity_allres. We might want to leverage information stored in this variable for figures/tables on a later stage.

NOTE 3: The parametrization for FlowSOM is dataset specific. As for now the implementation uses a FlowSOM parametrization tailored to the spleen dataset. An issue will be open to fix this behaviour.

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

@LuLeom LuLeom requested review from rcannood, SofieVG and ghar1821 May 21, 2025 16:33
Copy link
Member

@rcannood rcannood left a comment

Choose a reason for hiding this comment

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

LGTM!

@rcannood rcannood merged commit 40d5033 into main May 22, 2025
2 checks passed
@rcannood rcannood deleted the add_metric_FS_similarity branch May 22, 2025 07:37
@rcannood
Copy link
Member

Merged it so we can already run it -- @SofieVG @ghar1821 please review this PR for feedback on the actual content

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.

2 participants