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

Feature/tmap kernel connectivities #828

Merged
merged 9 commits into from Mar 18, 2022
Merged

Conversation

michalk8
Copy link
Collaborator

@michalk8 michalk8 commented Feb 25, 2022

IMPORTANT: Please search among the Pull requests before creating one.

Description

Allow local block-diagonal connectivities in :class:cellrank.tl.kernels.TransportMapKernel. Rename last_time_point argument to self_transitions and add conn_weight. self_transitions can also be applied to specific diagonal blocks only.

How has this been tested?

Add new test for this.

Closes

closes #827

@michalk8 michalk8 self-assigned this Feb 25, 2022
@michalk8 michalk8 added the feature PR introduces a new feature label Feb 25, 2022
@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #828 (97777d9) into dev (84e083a) will decrease coverage by 1.42%.
The diff coverage is 82.21%.

❗ Current head 97777d9 differs from pull request most recent head 1086c1e. Consider uploading reports for the commit 1086c1e to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #828      +/-   ##
==========================================
- Coverage   82.43%   81.00%   -1.43%     
==========================================
  Files          67       70       +3     
  Lines        9136     9280     +144     
  Branches     1850     1876      +26     
==========================================
- Hits         7531     7517      -14     
- Misses       1030     1189     +159     
+ Partials      575      574       -1     
Impacted Files Coverage Δ
...ellrank/external/estimators/_import_error_estim.py 0.00% <0.00%> (ø)
cellrank/external/models/_import_error_model.py 0.00% <0.00%> (ø)
cellrank/pl/_cluster_fates.py 86.69% <0.00%> (ø)
cellrank/tl/_mixins/_anndata.py 93.33% <ø> (ø)
cellrank/ul/_docs.py 100.00% <ø> (ø)
cellrank/tl/_utils.py 72.09% <53.33%> (-0.70%) ⬇️
cellrank/tl/estimators/terminal_states/_gpcca.py 80.48% <65.71%> (-1.17%) ⬇️
cellrank/tl/estimators/_base_estimator.py 79.23% <66.66%> (+1.91%) ⬆️
cellrank/tl/kernels/_transport_map_kernel.py 81.15% <71.92%> (-12.97%) ⬇️
cellrank/tl/kernels/utils/_random_walk.py 77.41% <77.41%> (ø)
... and 36 more

@Marius1311
Copy link
Collaborator

What's missing to merge this?

@Marius1311
Copy link
Collaborator

It just adds functionality but doesn't take anything away, right? You can still add global connectivities by adding a connectivity kernel.

@michalk8 michalk8 merged commit 8e08d5c into dev Mar 18, 2022
@michalk8 michalk8 deleted the feature/tmap-kernel-connectivities branch March 18, 2022 00:08
michalk8 added a commit that referenced this pull request Mar 21, 2022
* Fix/wot pickle (#748)

* Fix WOTKernel saving OTModel

* [ci skip] Polish docs

* [auto][ci skip] Generate news fragment (#748)

* Fix term/macro states dtype mixture (#750)

* Fix states association having mixture dtypes

* Fix stat dist

* Install Cython in CI

* Add numpy to tox.ini 3.9

* Do not install WOT on 3.9

* Install Cython external

* Fix importorskip

* Don't install statOT on 3.9 CI

* [auto][ci skip] Generate news fragment (#750)

* Feature/update tmat kernel (#764)

* First TmatKernel update

* Add QoL changes to TransportMapKernel

* Refactor transport map kernel

* [auto][ci skip] Generate news fragment (#764)

* Update CytoTRACE calcultation (#761)

* Update CytoTRACE calcultation

* [ci skip] Remove NaN check

* Check whether top correlated genes have NaNs

* [ci skip] Update docstring

* [auto][ci skip] Generate news fragment (#761)

* CI cron on dev (#769)

* Add Edit on GitHub (#775)

* Add Edit on GitHub

* [ci skip] Fix README.rst GPCCA link

* Expose ascending when plotting gene correlations (#779)

* [auto][ci skip] Generate news fragment (#779)

* Fix exp. time kernel colors (#784)

* Fix exp. time kernel colors

* Update news workflow

* [auto][ci skip] Generate news fragment (#784)

* [auto][ci skip] Update dev release notes (#784)

* Fix pyGAM deprecation warnings (#798)

* [auto][ci skip] Generate news fragment (#798)

* [auto][ci skip] Update dev release notes (#798)

* Update PAGA message in cluster_fates (#799)

* Update PAGA message in cluster_fates

* Fix wrong import

* [auto][ci skip] Update dev release notes (#799)

* Fix bad pandas version

* Add order option in GPCCA.plot_coarse_T (#804)

* Add order option in GPCCA.plot_coarse_T

* Remove outgoing order for coarse T

* Add test

* [auto][ci skip] Update dev release notes (#804)

* Feature/refactor kernels (#791)

* Add tmap_as_tmat ctx manager

* Add Edit on GitHub

* [ci skip] Fix README.rst GPCCA link

* Decouple CTPT from __init__

* Add negative corr to CytoTRACE

* Alpha version of kernel refactorings

* Add ConnectivityKernel

* Start refactoring VelocityKernel

* Fix typos

* Finish DisplacementKernel

* Switch to new impl.

* Dont copy expression when combining them

* Remove old impl.

* Fix typo in deterministic model

* Fix VK backward case

* Refactor RW plotting

* Refactor compute_projection -> plot_projection

* Start clean-up

* Fix transport kernel TODOs

* Fix pseudotime kernel TODOs

* Refactor precomputed kernel

* Add _copy_ignore

* Update external kernels

* Update str/repr

* Fix combining

* Change cache handler

* Fix getitem, update tmat setter

* Update precomputed kernel, add tmat decorator

* Fix superfluous dedent

* First round of test fixes

* Second round of test fixing

* Fix projection tests

* Fix VelocityKernel tests

* Fix TransportMapKernel

* Fix minor tests

* Update PrecomputedKernel, fix more tests

* Fix a few more tests

* Fix WOT + thresholding again

* Fix GPCCA tests

* Fix absorption probabilities when array is dense

* Clean the function a bit

* Fix tools tests

* Fix estimator precomputed kernel

* Fix RandomWalk tests

* Fix rest of the tests

* Update manuscript links, bump pyGPCCA>=1.0.3

* Update bibtex

* [auto][ci skip] Generate v1.5.1 release notes

* [auto][ci skip] Release v1.5.1

* Change verbosity level

* Remove neg. correlated genes in CytoTRACE

* [ci skip] Add unnormalized transition matrix in VK

* [ci skip] Update PrecomputedKernel docs

* [ci skip] Finish updating docstrings

* [ci skip] Fix transport maps not being set

* [ci skip] Add missing docstrings, fix a few typos

* Fix PrecomputedKernel and add tests

* Fix external, add more tests

* Add copy_ignore test

* Fix PrecomputedKernel behavior, update estim docs

* [ci skip] Fix typo

* Fix docs

* Fix n_cells in fit, examples and update docstring

* Fix typo in kernel tests

* Regenerate figures

Co-authored-by: michalk8 <michalk8@users.noreply.github.com>

* [auto][ci skip] Generate news fragment (#791)

* [auto][ci skip] Update dev release notes (#791)

* Fix/correlation qval nan (#835)

* Fix qvalue calculation resulting in all NaN values

* Add test, set to NaN if any corr not in [-1, 1]

* [auto][ci skip] Generate news fragment (#835)

* [auto][ci skip] Update dev release notes (#835)

* Fix None subset in VelocityKernel

* Change order to ascending when plotting macros (#839)

* Change order to ascending when plotting macros

* Add outgoing order of plotting coarse T

* [auto][ci skip] Update dev release notes (#839)

* Feature/tmap kernel connectivities (#828)

* Add initial diag conn implementation

* Expose conn_weight

* Update docs, fix minor issues

* Fix typo in import, add test, update docs

* Fix type

* Threshold before added diagonal connectivities

* Fix minor dtype bug and typo, fix tests

* [auto][ci skip] Generate news fragment (#828)

* [auto][ci skip] Update dev release notes (#828)

* Do not save Enums in AnnData (#842)

* [auto][ci skip] Generate news fragment (#842)

* [auto][ci skip] Update dev release notes (#842)

* Misc/nested anndata (#841)

* Don't save nested AnnData

* Fix reading from AnnData

* Misc/remove dev (#843)

* Remove references to dev

* Update pre-commit

* Fix badges

* Temporarily pin AnnData from above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants