theislab / scib

Benchmarking analysis of data integration tools
MIT License
294 stars 63 forks source link

General optimised clustering function #343

Closed mumichae closed 1 year ago

mumichae commented 1 year ago

Create a new function for clustering for optimal resolution. Allows the user to specify whether they want to use the louvain, leiden or any other algorithm that works with an anndata and a cluster resolution.

Closes #340

codecov[bot] commented 1 year ago

Codecov Report

Merging #343 (409fc28) into main (612ff18) will increase coverage by 0.94%. The diff coverage is 87.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #343 +/- ## ========================================== + Coverage 55.09% 56.04% +0.94% ========================================== Files 38 38 Lines 2040 2102 +62 ========================================== + Hits 1124 1178 +54 - Misses 916 924 +8 ``` | Flag | Coverage Δ | | |---|---|---| | unittest | `56.04% <87.30%> (+0.94%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theislab#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/theislab/scib/pull/343?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theislab) | Coverage Δ | | |---|---|---| | [scib/metrics/clustering.py](https://codecov.io/gh/theislab/scib/pull/343/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theislab#diff-c2NpYi9tZXRyaWNzL2NsdXN0ZXJpbmcucHk=) | `82.82% <83.67%> (+0.82%)` | :arrow_up: | | [scib/metrics/\_\_init\_\_.py](https://codecov.io/gh/theislab/scib/pull/343/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theislab#diff-c2NpYi9tZXRyaWNzL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [tests/preprocessing/test\_clustering.py](https://codecov.io/gh/theislab/scib/pull/343/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=theislab#diff-dGVzdHMvcHJlcHJvY2Vzc2luZy90ZXN0X2NsdXN0ZXJpbmcucHk=) | `100.00% <100.00%> (ø)` | |