Add metric flowsom mapping similarity #59
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 scriptpreprocess_with_utils.py
from R withsystem()
. Temporary h5ad files are stored in a foldertmp/
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 variablefs_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:
Proposed changes are described in the CHANGELOG.md
CI Tests succeed and look good!