pertpy 0.10.0__py3-none-any.whl → 0.11.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pertpy/__init__.py +5 -1
- pertpy/_doc.py +1 -3
- pertpy/_types.py +6 -0
- pertpy/data/_dataloader.py +68 -24
- pertpy/data/_datasets.py +9 -9
- pertpy/metadata/__init__.py +2 -1
- pertpy/metadata/_cell_line.py +133 -25
- pertpy/metadata/_look_up.py +13 -19
- pertpy/metadata/_moa.py +1 -1
- pertpy/preprocessing/_guide_rna.py +138 -44
- pertpy/preprocessing/_guide_rna_mixture.py +17 -19
- pertpy/tools/__init__.py +4 -3
- pertpy/tools/_augur.py +106 -98
- pertpy/tools/_cinemaot.py +74 -114
- pertpy/tools/_coda/_base_coda.py +134 -148
- pertpy/tools/_coda/_sccoda.py +69 -70
- pertpy/tools/_coda/_tasccoda.py +74 -80
- pertpy/tools/_dialogue.py +48 -41
- pertpy/tools/_differential_gene_expression/_base.py +21 -31
- pertpy/tools/_differential_gene_expression/_checks.py +4 -6
- pertpy/tools/_differential_gene_expression/_dge_comparison.py +5 -6
- pertpy/tools/_differential_gene_expression/_edger.py +6 -10
- pertpy/tools/_differential_gene_expression/_pydeseq2.py +1 -1
- pertpy/tools/_differential_gene_expression/_simple_tests.py +3 -3
- pertpy/tools/_differential_gene_expression/_statsmodels.py +8 -5
- pertpy/tools/_distances/_distance_tests.py +1 -2
- pertpy/tools/_distances/_distances.py +31 -46
- pertpy/tools/_enrichment.py +7 -22
- pertpy/tools/_milo.py +19 -15
- pertpy/tools/_mixscape.py +73 -75
- pertpy/tools/_perturbation_space/_clustering.py +4 -4
- pertpy/tools/_perturbation_space/_comparison.py +4 -4
- pertpy/tools/_perturbation_space/_discriminator_classifiers.py +83 -32
- pertpy/tools/_perturbation_space/_perturbation_space.py +10 -10
- pertpy/tools/_perturbation_space/_simple.py +12 -14
- pertpy/tools/_scgen/_scgen.py +16 -17
- pertpy/tools/_scgen/_scgenvae.py +2 -2
- pertpy/tools/_scgen/_utils.py +3 -1
- {pertpy-0.10.0.dist-info → pertpy-0.11.1.dist-info}/METADATA +42 -24
- pertpy-0.11.1.dist-info/RECORD +58 -0
- {pertpy-0.10.0.dist-info → pertpy-0.11.1.dist-info}/licenses/LICENSE +1 -0
- pertpy/tools/_kernel_pca.py +0 -50
- pertpy-0.10.0.dist-info/RECORD +0 -58
- {pertpy-0.10.0.dist-info → pertpy-0.11.1.dist-info}/WHEEL +0 -0
@@ -1,15 +1,16 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pertpy
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.11.1
|
4
4
|
Summary: Perturbation Analysis in the scverse ecosystem.
|
5
5
|
Project-URL: Documentation, https://pertpy.readthedocs.io
|
6
6
|
Project-URL: Source, https://github.com/scverse/pertpy
|
7
7
|
Project-URL: Home-page, https://github.com/scverse/pertpy
|
8
|
-
Author: Lukas Heumos,
|
8
|
+
Author: Lukas Heumos, Lilly May, Stefan Peidli, Johannes Ostner, Gregor Sturm, Emma Dann, Yuge Ji, Xinyue Zhang, Xichen Wu, Tessa Green, Antonia Schumacher
|
9
9
|
Maintainer-email: Lukas Heumos <lukas.heumos@posteo.net>
|
10
10
|
License: MIT License
|
11
11
|
|
12
12
|
Copyright (c) 2021, Lukas Heumos
|
13
|
+
Copyright (c) 2025, scverse®
|
13
14
|
|
14
15
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
16
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -29,7 +30,7 @@ License: MIT License
|
|
29
30
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
30
31
|
SOFTWARE.
|
31
32
|
License-File: LICENSE
|
32
|
-
Classifier: Development Status ::
|
33
|
+
Classifier: Development Status :: 5 - Production/Stable
|
33
34
|
Classifier: Environment :: Console
|
34
35
|
Classifier: Framework :: Jupyter
|
35
36
|
Classifier: Intended Audience :: Developers
|
@@ -39,66 +40,67 @@ Classifier: Natural Language :: English
|
|
39
40
|
Classifier: Operating System :: MacOS :: MacOS X
|
40
41
|
Classifier: Operating System :: POSIX :: Linux
|
41
42
|
Classifier: Programming Language :: Python :: 3
|
42
|
-
Classifier: Programming Language :: Python :: 3.10
|
43
43
|
Classifier: Programming Language :: Python :: 3.11
|
44
44
|
Classifier: Programming Language :: Python :: 3.12
|
45
|
+
Classifier: Programming Language :: Python :: 3.13
|
45
46
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
46
47
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
47
|
-
Requires-Python: <3.
|
48
|
+
Requires-Python: <3.14,>=3.11
|
48
49
|
Requires-Dist: adjusttext
|
50
|
+
Requires-Dist: arviz
|
49
51
|
Requires-Dist: blitzgsea
|
50
52
|
Requires-Dist: decoupler
|
53
|
+
Requires-Dist: fast-array-utils
|
51
54
|
Requires-Dist: lamin-utils
|
52
|
-
Requires-Dist:
|
55
|
+
Requires-Dist: mudata
|
53
56
|
Requires-Dist: openpyxl
|
54
57
|
Requires-Dist: ott-jax
|
55
58
|
Requires-Dist: pubchempy
|
56
59
|
Requires-Dist: pyarrow
|
57
60
|
Requires-Dist: requests
|
58
61
|
Requires-Dist: rich
|
59
|
-
Requires-Dist: scanpy
|
62
|
+
Requires-Dist: scanpy
|
60
63
|
Requires-Dist: scikit-learn>=1.4
|
61
64
|
Requires-Dist: scikit-misc
|
62
65
|
Requires-Dist: scvi-tools
|
63
66
|
Requires-Dist: sparsecca
|
64
|
-
Provides-Extra: coda
|
65
|
-
Requires-Dist: arviz; extra == 'coda'
|
66
|
-
Requires-Dist: ete3; extra == 'coda'
|
67
|
-
Requires-Dist: pyqt5; extra == 'coda'
|
68
|
-
Requires-Dist: toytree; extra == 'coda'
|
69
67
|
Provides-Extra: de
|
70
68
|
Requires-Dist: formulaic; extra == 'de'
|
71
69
|
Requires-Dist: formulaic-contrasts>=0.2.0; extra == 'de'
|
72
|
-
Requires-Dist: pydeseq2>=v0.5.
|
70
|
+
Requires-Dist: pydeseq2>=v0.5.0; extra == 'de'
|
73
71
|
Provides-Extra: dev
|
74
72
|
Requires-Dist: pre-commit; extra == 'dev'
|
75
73
|
Provides-Extra: doc
|
76
|
-
Requires-Dist: docutils
|
77
|
-
Requires-Dist: furo; extra == 'doc'
|
74
|
+
Requires-Dist: docutils>=0.8; extra == 'doc'
|
78
75
|
Requires-Dist: ipykernel; extra == 'doc'
|
79
76
|
Requires-Dist: ipython; extra == 'doc'
|
80
77
|
Requires-Dist: myst-nb; extra == 'doc'
|
81
|
-
Requires-Dist: myst-parser; extra == 'doc'
|
82
78
|
Requires-Dist: nbsphinx; extra == 'doc'
|
83
79
|
Requires-Dist: nbsphinx-link; extra == 'doc'
|
84
|
-
Requires-Dist: pyenchant; extra == 'doc'
|
85
80
|
Requires-Dist: pygments; extra == 'doc'
|
81
|
+
Requires-Dist: scanpydoc; extra == 'doc'
|
86
82
|
Requires-Dist: sphinx-autodoc-typehints; extra == 'doc'
|
87
83
|
Requires-Dist: sphinx-automodapi; extra == 'doc'
|
84
|
+
Requires-Dist: sphinx-book-theme; extra == 'doc'
|
88
85
|
Requires-Dist: sphinx-copybutton; extra == 'doc'
|
89
86
|
Requires-Dist: sphinx-design; extra == 'doc'
|
90
87
|
Requires-Dist: sphinx-gallery; extra == 'doc'
|
88
|
+
Requires-Dist: sphinx-issues; extra == 'doc'
|
91
89
|
Requires-Dist: sphinx-last-updated-by-git; extra == 'doc'
|
92
90
|
Requires-Dist: sphinx-remove-toctrees; extra == 'doc'
|
93
|
-
Requires-Dist: sphinx>=
|
91
|
+
Requires-Dist: sphinx>=8.1; extra == 'doc'
|
94
92
|
Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'doc'
|
95
93
|
Requires-Dist: sphinxext-opengraph; extra == 'doc'
|
94
|
+
Provides-Extra: tcoda
|
95
|
+
Requires-Dist: ete4; extra == 'tcoda'
|
96
|
+
Requires-Dist: pyqt6; extra == 'tcoda'
|
97
|
+
Requires-Dist: toytree; extra == 'tcoda'
|
96
98
|
Provides-Extra: test
|
97
99
|
Requires-Dist: coverage; extra == 'test'
|
100
|
+
Requires-Dist: leidenalg; extra == 'test'
|
98
101
|
Requires-Dist: pytest; extra == 'test'
|
99
102
|
Description-Content-Type: text/markdown
|
100
103
|
|
101
|
-
[](https://github.com/psf/black)
|
102
104
|
[](https://github.com/scverse/pertpy/actions/workflows/build.yml)
|
103
105
|
[](https://codecov.io/gh/scverse/pertpy)
|
104
106
|
[](https://opensource.org/licenses/Apache2.0)
|
@@ -108,13 +110,16 @@ Description-Content-Type: text/markdown
|
|
108
110
|
[](https://github.com/scverse/pertpy/actions/workflows/test.yml)
|
109
111
|
[](https://github.com/pre-commit/pre-commit)
|
110
112
|
|
111
|
-
# pertpy
|
113
|
+
# pertpy - Perturbation Analysis in Python
|
114
|
+
|
115
|
+
Pertpy is a scverse ecosystem framework for analyzing large-scale single-cell perturbation experiments.
|
116
|
+
It provides tools for harmonizing perturbation datasets, automating metadata annotation, calculating perturbation distances, and efficiently analyzing how cells respond to various stimuli like genetic modifications, drug treatments, and environmental changes.
|
112
117
|
|
113
118
|

|
114
119
|
|
115
120
|
## Documentation
|
116
121
|
|
117
|
-
Please read the [documentation](https://pertpy.readthedocs.io/en/latest).
|
122
|
+
Please read the [documentation](https://pertpy.readthedocs.io/en/latest) for installation, tutorials, use cases, and more.
|
118
123
|
|
119
124
|
## Installation
|
120
125
|
|
@@ -127,10 +132,10 @@ You can install _pertpy_ in less than a minute via [pip] from [PyPI]:
|
|
127
132
|
pip install pertpy
|
128
133
|
```
|
129
134
|
|
130
|
-
if you want to use
|
135
|
+
if you want to use tascCODA, please install pertpy as follows:
|
131
136
|
|
132
137
|
```console
|
133
|
-
pip install 'pertpy[
|
138
|
+
pip install 'pertpy[tcoda]'
|
134
139
|
```
|
135
140
|
|
136
141
|
If you want to use the differential gene expression interface, please install pertpy by running:
|
@@ -146,4 +151,17 @@ bioRxiv 2024.08.04.606516; doi: https://doi.org/10.1101/2024.08.04.606516](https
|
|
146
151
|
|
147
152
|
[pip]: https://pip.pypa.io/
|
148
153
|
[pypi]: https://pypi.org/
|
149
|
-
[
|
154
|
+
[api]: https://pertpy.readthedocs.io/en/latest/api/api.html
|
155
|
+
[//]: # "numfocus-fiscal-sponsor-attribution"
|
156
|
+
|
157
|
+
pertpy is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
|
158
|
+
If you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
|
159
|
+
|
160
|
+
<div align="center">
|
161
|
+
<a href="https://numfocus.org/project/scverse">
|
162
|
+
<img
|
163
|
+
src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
|
164
|
+
width="200"
|
165
|
+
>
|
166
|
+
</a>
|
167
|
+
</div>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
pertpy/__init__.py,sha256=4KCpjhbsKaAAYJjZIPbAi12NCBtGGThexdh3QaausRg,716
|
2
|
+
pertpy/_doc.py,sha256=j5TMNC-DA9yIMqIIUNpjpcVgWfRqyBBfvbRjnCM_OLs,427
|
3
|
+
pertpy/_types.py,sha256=IcHCojCUqx8CapibNkcYf2TUqjBFP2ujeELvn_IBSBQ,154
|
4
|
+
pertpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
+
pertpy/data/__init__.py,sha256=ah3yvoxkgbdMUNAWxS3SyqcUuVamBOSeuWkF2QRAEwM,2703
|
6
|
+
pertpy/data/_dataloader.py,sha256=ZWDDvx8KmqkvMcjXEmGNeDyCceDur_osb-o2dDTHeQU,4397
|
7
|
+
pertpy/data/_datasets.py,sha256=4IceyYURpstZSFRrD6gBjoYg8uRbEPo1QLXTt-SwB5k,65507
|
8
|
+
pertpy/metadata/__init__.py,sha256=wROPCXmJX2v5schJaBTPQtGW-FGCNWPfO_6bpnXwk-c,276
|
9
|
+
pertpy/metadata/_cell_line.py,sha256=xzlJV_loGS5yA3QaB2xnp0mlEgCWdoG1VPCrfbJKtMw,44494
|
10
|
+
pertpy/metadata/_compound.py,sha256=ywNNqtib0exHv0z8ctmTRf1Hk64tSGWSiUEffycxf6A,4755
|
11
|
+
pertpy/metadata/_drug.py,sha256=8QDSyxiFl25JdS80EQJC_krg6fEe5LIQEE6BsV1r8nY,9006
|
12
|
+
pertpy/metadata/_look_up.py,sha256=4BuQlff_aAKFOKPojXDdxvH6uOkRlHzGeyxcjBc79OM,28682
|
13
|
+
pertpy/metadata/_metadata.py,sha256=hV2LTFrExddLNU_RsDkZju6lQUSRoP4OIn_dumCyQao,3277
|
14
|
+
pertpy/metadata/_moa.py,sha256=cSJimHZsPZ6tAXcl_aHOhyzUayf6fqtgAcJJ5KwRRsA,4698
|
15
|
+
pertpy/plot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
+
pertpy/preprocessing/__init__.py,sha256=VAPFaeq2_qCvdFkQTCj_Hm460HC4Tersu8Rig_tnp_Y,71
|
17
|
+
pertpy/preprocessing/_guide_rna.py,sha256=ijL-bjQ-9qn4r3DlhBxzsqk-bD4RqPsFlok-Otj4hg8,15872
|
18
|
+
pertpy/preprocessing/_guide_rna_mixture.py,sha256=pT_YkjmN4iEJ-THBROu_dpbr8E6u8GJw36YoGseikD0,6422
|
19
|
+
pertpy/tools/__init__.py,sha256=xjfw3Dd_KGytjjCID0uEs6Fz7DalH46fCjVL2Zf2kOo,2629
|
20
|
+
pertpy/tools/_augur.py,sha256=7iB2_xq8knyxtmN0G_a0u37o8WPlMlJXZCwDqxGvoKQ,55296
|
21
|
+
pertpy/tools/_cinemaot.py,sha256=54-rS0AEj31dMe7iU4kEmLoAunq3jNuhsBE3IEp9hrI,38071
|
22
|
+
pertpy/tools/_dialogue.py,sha256=cCSwo9ge1pOLoA7QHTPb3b865juCFWUaKX5aD7UoSjo,52355
|
23
|
+
pertpy/tools/_enrichment.py,sha256=55mwotLH9DXQOhl85MCkxXu-MX0RysLyrPheJysAnF0,21369
|
24
|
+
pertpy/tools/_milo.py,sha256=r-kZcpAcoQuhi41AnVuzh-cMIcV3HB3-RGzynHyDc1A,43712
|
25
|
+
pertpy/tools/_mixscape.py,sha256=ob22FI1hqUtaEZzCqrocy0-k8iUOChItc2tdCDeNDGY,57173
|
26
|
+
pertpy/tools/decoupler_LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
27
|
+
pertpy/tools/transferlearning_MMD_LICENSE,sha256=MUvDA-o_j9htRpI8fStVdCRuyLdPkQUuIH0a_EIc57w,1069
|
28
|
+
pertpy/tools/_coda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
+
pertpy/tools/_coda/_base_coda.py,sha256=-rpdipPLFd4cFXyLMN7uFgv-pFJseKaqDmyWRBrGfws,111519
|
30
|
+
pertpy/tools/_coda/_sccoda.py,sha256=0Ret6O56kAfCNOdBvtxqiyuj2rUPp18SV1GVK1AvYGU,22607
|
31
|
+
pertpy/tools/_coda/_tasccoda.py,sha256=BTaOAmL458zQ_og3x4ENlDnJHD6_F4YkdCoXWsF4i1U,30465
|
32
|
+
pertpy/tools/_differential_gene_expression/__init__.py,sha256=SEydWg0iT3Y1pApjnCAOuHxFeI6xVUfgyBHv2s3LADU,487
|
33
|
+
pertpy/tools/_differential_gene_expression/_base.py,sha256=PpfH_RZXsN79Bu0yBFPE9TXEqNsZ4bSzSbhM0wZou2I,38322
|
34
|
+
pertpy/tools/_differential_gene_expression/_checks.py,sha256=hH_GP0lWGO-5zrCFX4YiIVCZBCuK0ZJ0jFmdlx2Qm4k,1639
|
35
|
+
pertpy/tools/_differential_gene_expression/_dge_comparison.py,sha256=LXhp5djKKCAk9VI7OqxOuja849G5lnd8Ehcs9Epk8rg,4159
|
36
|
+
pertpy/tools/_differential_gene_expression/_edger.py,sha256=nSHMDA4drGq_sJwUXs5I2EbMHwqjiS08GqOU_1_dXPc,4798
|
37
|
+
pertpy/tools/_differential_gene_expression/_pydeseq2.py,sha256=OowFb67jHT-UwibvRolR6Vw_yHEAxQ_ybJ7a65HJg8M,2943
|
38
|
+
pertpy/tools/_differential_gene_expression/_simple_tests.py,sha256=SfU8s_P2JzEA1RkmS0_xsARs4-BdnIYAwMmQv9-fxRg,6610
|
39
|
+
pertpy/tools/_differential_gene_expression/_statsmodels.py,sha256=90h9EPuoCtNxAbJ1Xq4j_E4yYJJpk64zTP7GyTdmrxY,2220
|
40
|
+
pertpy/tools/_distances/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
|
+
pertpy/tools/_distances/_distance_tests.py,sha256=6_nqfHUfKxkI2Yhkzspq3ujMpq56zV_Ddn7bgPzgjyo,13513
|
42
|
+
pertpy/tools/_distances/_distances.py,sha256=89d1zShW_9dhphup2oWx5hMOFC7RdogOY56doMuBFts,50473
|
43
|
+
pertpy/tools/_perturbation_space/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
|
+
pertpy/tools/_perturbation_space/_clustering.py,sha256=pNx_SpPkZfCbgF7vzHWqAaiiHdbxPaA-L-hTWTbzFhI,3528
|
45
|
+
pertpy/tools/_perturbation_space/_comparison.py,sha256=-NzCPRT-IlhJ9hOz7NQLSk0riIzr2C0yZvX6zm3kon4,4291
|
46
|
+
pertpy/tools/_perturbation_space/_discriminator_classifiers.py,sha256=gDid9Z1_AAPHPWuNgAkbP7yrgcC0qjjqTuWjTzTAAZo,23373
|
47
|
+
pertpy/tools/_perturbation_space/_metrics.py,sha256=y8-baP8WRdB1iDgvP3uuQxSCDxA2lcxvEHHM2C_vWHY,3248
|
48
|
+
pertpy/tools/_perturbation_space/_perturbation_space.py,sha256=8RxVUkVEPZj5YZ-C-NP5zO4aYYVD04PzlsYuaIG-wjY,19447
|
49
|
+
pertpy/tools/_perturbation_space/_simple.py,sha256=nnagHJ_aPv4ZCqfnVLdVUT_JShtIXg7iEP_sCMD3JLY,14271
|
50
|
+
pertpy/tools/_scgen/__init__.py,sha256=uERFlFyF88TH0uLiwmsUGEfHfLVCiZMFuk8gO5f7164,45
|
51
|
+
pertpy/tools/_scgen/_base_components.py,sha256=Qq8myRUm43q9XBrZ9gBggfa2cSV2wbz_KYoLgH7iF1A,3009
|
52
|
+
pertpy/tools/_scgen/_scgen.py,sha256=31T8ez0FxABIbunJHCk8xvGulHFb8RHXSsyM_z1WsPY,30850
|
53
|
+
pertpy/tools/_scgen/_scgenvae.py,sha256=bPk4v7EdJc7ROdLuDitHiX_Pvwa7Flw2qHRUwBvjLJY,3889
|
54
|
+
pertpy/tools/_scgen/_utils.py,sha256=qz5QUn_Bvk2NGyYVzp3jgjWTFOMt1YyHwUo6HWtoThY,2871
|
55
|
+
pertpy-0.11.1.dist-info/METADATA,sha256=uLFTtFW3JuRShmdYTUR-byUMcRB3Zntu84xe_2BI3ZI,8051
|
56
|
+
pertpy-0.11.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
57
|
+
pertpy-0.11.1.dist-info/licenses/LICENSE,sha256=XuiT2hxeRInhquEIBKMZ5M21n5syhDQ4XbABoposIAg,1100
|
58
|
+
pertpy-0.11.1.dist-info/RECORD,,
|
pertpy/tools/_kernel_pca.py
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
from typing import TYPE_CHECKING
|
4
|
-
|
5
|
-
from sklearn.decomposition import KernelPCA
|
6
|
-
|
7
|
-
if TYPE_CHECKING:
|
8
|
-
from anndata import AnnData
|
9
|
-
|
10
|
-
|
11
|
-
def kernel_pca(
|
12
|
-
adata: AnnData,
|
13
|
-
n_comps: int = 50,
|
14
|
-
kernel: str = "linear",
|
15
|
-
copy: bool = False,
|
16
|
-
return_transformer: bool = False,
|
17
|
-
**kwargs,
|
18
|
-
):
|
19
|
-
"""Compute kernel PCA on `adata.X`.
|
20
|
-
|
21
|
-
Compute Kernel Principal component analysis (KPCA) using sklearn.
|
22
|
-
See also :class:`~sklearn.decomposition.KernelPCA`.
|
23
|
-
|
24
|
-
Args:
|
25
|
-
adata: The annotated data object.
|
26
|
-
n_comps: Number of components. If None, all non-zero components are kept.
|
27
|
-
kernel: Kernel used for PCA.
|
28
|
-
copy: Determines whether a copy of the `adata` is returned.
|
29
|
-
return_transformer: Determines if the `KernelPCA` transformer is returned.
|
30
|
-
**kwargs: Additional arguments for the `KernelPCA` transformer.
|
31
|
-
|
32
|
-
Returns:
|
33
|
-
If `copy=True`, returns the copy of `adata` with kernel pca in `.obsm["X_kpca"]`.
|
34
|
-
Otherwise, writes kernel pca directly to `.obsm["X_kpca"]` of the provided `adata`.
|
35
|
-
If `return_transformer=True`, returns also the fitted `KernelPCA` transformer.
|
36
|
-
"""
|
37
|
-
if copy:
|
38
|
-
adata = adata.copy()
|
39
|
-
transformer = KernelPCA(n_components=n_comps, kernel=kernel, **kwargs)
|
40
|
-
X_kpca = transformer.fit_transform(adata.X)
|
41
|
-
adata.obsm["X_kpca"] = X_kpca
|
42
|
-
|
43
|
-
if copy:
|
44
|
-
if return_transformer:
|
45
|
-
return adata, transformer
|
46
|
-
else:
|
47
|
-
return adata
|
48
|
-
else:
|
49
|
-
if return_transformer:
|
50
|
-
return transformer
|
pertpy-0.10.0.dist-info/RECORD
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
pertpy/__init__.py,sha256=SGZpJmqp7CRJfINcZ8YFM8pIR2LKPQ7wlMttiaJAQ5g,659
|
2
|
-
pertpy/_doc.py,sha256=jT8GIw3DVk-wLnX5qPEPaAH3Y_Jv2KAoXBX2jlCkJKY,437
|
3
|
-
pertpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
pertpy/data/__init__.py,sha256=ah3yvoxkgbdMUNAWxS3SyqcUuVamBOSeuWkF2QRAEwM,2703
|
5
|
-
pertpy/data/_dataloader.py,sha256=ENbk1T3w3N6tVI11V4FVUxuWFEwOHP8_kIB-ehiMlVQ,2428
|
6
|
-
pertpy/data/_datasets.py,sha256=c_U2U2NvncPZc6vs6w_s77zmWqr8ywDpzmkx6edCfUE,65616
|
7
|
-
pertpy/metadata/__init__.py,sha256=zoE_VXNyuKa4nlXlUk2nTgsHRW3jSQSpDEulcCnzOT0,222
|
8
|
-
pertpy/metadata/_cell_line.py,sha256=RKRxm91PBAjx2S4ou5MGoSjEIkO5PV_okZT5HBdMO_M,38937
|
9
|
-
pertpy/metadata/_compound.py,sha256=ywNNqtib0exHv0z8ctmTRf1Hk64tSGWSiUEffycxf6A,4755
|
10
|
-
pertpy/metadata/_drug.py,sha256=8QDSyxiFl25JdS80EQJC_krg6fEe5LIQEE6BsV1r8nY,9006
|
11
|
-
pertpy/metadata/_look_up.py,sha256=DoWp6OxIk_HyyyOhW1p8z5E68IZ31_nZDnqxk1rJqps,28778
|
12
|
-
pertpy/metadata/_metadata.py,sha256=hV2LTFrExddLNU_RsDkZju6lQUSRoP4OIn_dumCyQao,3277
|
13
|
-
pertpy/metadata/_moa.py,sha256=u_OcMonjOeeoW5P9xOltquVSoTH3Vs80ztHsXf-X1DY,4701
|
14
|
-
pertpy/plot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
pertpy/preprocessing/__init__.py,sha256=VAPFaeq2_qCvdFkQTCj_Hm460HC4Tersu8Rig_tnp_Y,71
|
16
|
-
pertpy/preprocessing/_guide_rna.py,sha256=72NbKsgvbA9AgVU0l0pkwKH2KKX4qdAth32lRTGl9hA,12319
|
17
|
-
pertpy/preprocessing/_guide_rna_mixture.py,sha256=NJYU6gUJp_lKHKf_P5kS8QzAnkOnmX8snECmqvoNprM,6458
|
18
|
-
pertpy/tools/__init__.py,sha256=NUTwCGxRdzUzLTgsS3r7MywENwPAdcGZDKrl83sU8mo,2599
|
19
|
-
pertpy/tools/_augur.py,sha256=tZXlVeXvF7oGWXTEeVhN-5mbaNUSD1xIo40tKD_l1rg,54633
|
20
|
-
pertpy/tools/_cinemaot.py,sha256=jkJCoTX2m-xVqQs4Iq8LbHWvQyH06-SCMBYczYXUzLE,39573
|
21
|
-
pertpy/tools/_dialogue.py,sha256=NGf3yiUntWp5P0WmXHErgqietw1eyXqr40QCpHUkMZM,52076
|
22
|
-
pertpy/tools/_enrichment.py,sha256=NYBVvnGDAeoWfTEhezWBUWeNugZDRisMpZMsU0lpA_s,21592
|
23
|
-
pertpy/tools/_kernel_pca.py,sha256=_EJ9WlBLjHOafF34sZGdyBgZL6Fj0WiJ1elVT1XMmo4,1579
|
24
|
-
pertpy/tools/_milo.py,sha256=Z87RETCz7loUVov5WhrT0ieqJQrAHgknWcpU6qci_VM,43619
|
25
|
-
pertpy/tools/_mixscape.py,sha256=nNFWVJeudEiDQ7i5FTXF0xWdOILh2rIF2YyFbZuz6jE,57015
|
26
|
-
pertpy/tools/decoupler_LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
27
|
-
pertpy/tools/transferlearning_MMD_LICENSE,sha256=MUvDA-o_j9htRpI8fStVdCRuyLdPkQUuIH0a_EIc57w,1069
|
28
|
-
pertpy/tools/_coda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
pertpy/tools/_coda/_base_coda.py,sha256=w5Tgd73tUYJ9209xncM_QhcnGfeDEgRHss8M_1NQSoM,111630
|
30
|
-
pertpy/tools/_coda/_sccoda.py,sha256=gGmyd0MGpchulV9d4PxKSmGORyZ8fCDS9tQVPOuF_Og,22622
|
31
|
-
pertpy/tools/_coda/_tasccoda.py,sha256=vNk43OQHn7pBLsez2rmSj0bMZKOf8jZTI7G8TfBByRg,30665
|
32
|
-
pertpy/tools/_differential_gene_expression/__init__.py,sha256=SEydWg0iT3Y1pApjnCAOuHxFeI6xVUfgyBHv2s3LADU,487
|
33
|
-
pertpy/tools/_differential_gene_expression/_base.py,sha256=4BTJx1bfvDdFpJPFA_jMBVqVFWAYASM01Ec0ObIRgeE,38322
|
34
|
-
pertpy/tools/_differential_gene_expression/_checks.py,sha256=SxNHJDsCYZ6rWLTMEymEBpigs_B9cnXyw0kkAe1l6e0,1675
|
35
|
-
pertpy/tools/_differential_gene_expression/_dge_comparison.py,sha256=9HjmWkrqZhj_ZJeR-ymyEDzpRJNx7JiYJoStvCfKuCU,4188
|
36
|
-
pertpy/tools/_differential_gene_expression/_edger.py,sha256=ttgTocAYnr8BTDcixwHGjRZew6zeja-U77TLKkSdd1Y,4857
|
37
|
-
pertpy/tools/_differential_gene_expression/_pydeseq2.py,sha256=aOqsdu8hKp8_h2HhjkxS0B_itxRBnzEU2oSnU2PYiQ4,2942
|
38
|
-
pertpy/tools/_differential_gene_expression/_simple_tests.py,sha256=tTSr0Z2Qbpxdy9bcO8Gi_up6R616IcoK_e4_rlanyx4,6621
|
39
|
-
pertpy/tools/_differential_gene_expression/_statsmodels.py,sha256=jBCtaCglOvvVjkIBGXuTCTDB6g2AJsZMCf7iOlDyn48,2195
|
40
|
-
pertpy/tools/_distances/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
|
-
pertpy/tools/_distances/_distance_tests.py,sha256=mNmNu5cX0Wj5IegR6x5K-CbBSid8EhrH2jZPQxuvK4U,13521
|
42
|
-
pertpy/tools/_distances/_distances.py,sha256=h0FHkWF4MwfXO2ZbFHicgwVXsit-24z8PtfFzRrky2E,50497
|
43
|
-
pertpy/tools/_perturbation_space/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
|
-
pertpy/tools/_perturbation_space/_clustering.py,sha256=m52-J8c8OnIXRCf3NoFabIO2yMHIuy1X0m0amtsK2vE,3556
|
45
|
-
pertpy/tools/_perturbation_space/_comparison.py,sha256=rLO-EGU0I7t5MnLw4k1gYU-ypRu-JsDPLat1t4h2U2M,4329
|
46
|
-
pertpy/tools/_perturbation_space/_discriminator_classifiers.py,sha256=OA2eZeG_4iuW1T5ilsRIkS0rU-azmwEch7IuB546KSY,21617
|
47
|
-
pertpy/tools/_perturbation_space/_metrics.py,sha256=y8-baP8WRdB1iDgvP3uuQxSCDxA2lcxvEHHM2C_vWHY,3248
|
48
|
-
pertpy/tools/_perturbation_space/_perturbation_space.py,sha256=F-F-_pMCTWxjkVQSLre6hrE6PeRfCRscpt2ug3NlfuU,19531
|
49
|
-
pertpy/tools/_perturbation_space/_simple.py,sha256=tgIDXcJ-uG59BpU64gAq_RbCb_AQn3UxvJi4Gjm48BY,14190
|
50
|
-
pertpy/tools/_scgen/__init__.py,sha256=uERFlFyF88TH0uLiwmsUGEfHfLVCiZMFuk8gO5f7164,45
|
51
|
-
pertpy/tools/_scgen/_base_components.py,sha256=Qq8myRUm43q9XBrZ9gBggfa2cSV2wbz_KYoLgH7iF1A,3009
|
52
|
-
pertpy/tools/_scgen/_scgen.py,sha256=vPpCXUGVvrP5UxuaHuEaYK7D_A27HZcbFYpSCjMUcao,30708
|
53
|
-
pertpy/tools/_scgen/_scgenvae.py,sha256=v_6tZ4wY-JjdMH1QVd_wG4_N0PoaqB-FM8zC2JsDu1o,3935
|
54
|
-
pertpy/tools/_scgen/_utils.py,sha256=1upgOt1FpadfvNG05YpMjYYG-IAlxrC3l_ZxczmIczo,2841
|
55
|
-
pertpy-0.10.0.dist-info/METADATA,sha256=U-9KOM65HXc4uHjsfbpQfu68sizlsKxsBQQGNNBAmFs,6940
|
56
|
-
pertpy-0.10.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
57
|
-
pertpy-0.10.0.dist-info/licenses/LICENSE,sha256=OZ-ZkXM5CmExJiEMM90b_7dGNNvRpj7kdE-49AnrLuI,1070
|
58
|
-
pertpy-0.10.0.dist-info/RECORD,,
|
File without changes
|