multigrate 0.0.2__tar.gz → 1.0.1__tar.gz
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.
- multigrate-1.0.1/.codecov.yaml +17 -0
- multigrate-1.0.1/.cruft.json +43 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/.editorconfig +3 -0
- multigrate-1.0.1/.github/ISSUE_TEMPLATE/bug_report.yml +94 -0
- multigrate-1.0.1/.github/ISSUE_TEMPLATE/config.yml +5 -0
- multigrate-1.0.1/.github/ISSUE_TEMPLATE/feature_request.yml +11 -0
- multigrate-1.0.1/.github/workflows/build.yaml +28 -0
- multigrate-1.0.1/.github/workflows/release.yaml +29 -0
- multigrate-1.0.1/.github/workflows/test.yaml +61 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/.gitignore +8 -14
- multigrate-1.0.1/.pre-commit-config.yaml +38 -0
- multigrate-1.0.1/.readthedocs.yaml +16 -0
- multigrate-1.0.1/.vscode/extensions.json +18 -0
- multigrate-1.0.1/.vscode/launch.json +33 -0
- multigrate-1.0.1/.vscode/settings.json +18 -0
- multigrate-1.0.1/CHANGELOG.md +35 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/LICENSE +1 -1
- multigrate-1.0.1/PKG-INFO +157 -0
- multigrate-1.0.1/README.md +75 -0
- multigrate-1.0.1/biome.jsonc +17 -0
- multigrate-1.0.1/docs/_static/css/custom.css +4 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/_templates/autosummary/class.rst +6 -10
- multigrate-1.0.1/docs/api.md +37 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/conf.py +56 -30
- multigrate-1.0.1/docs/contributing.md +241 -0
- multigrate-1.0.1/docs/extensions/typed_returns.py +32 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/index.md +5 -5
- multigrate-1.0.1/docs/notebooks/paired_integration_cite-seq.ipynb +2075 -0
- multigrate-1.0.1/docs/notebooks/trimodal_integration.ipynb +1980 -0
- multigrate-1.0.1/docs/references.bib +121 -0
- multigrate-1.0.1/docs/tutorials.md +10 -0
- multigrate-1.0.1/pyproject.toml +163 -0
- multigrate-1.0.1/src/multigrate/__init__.py +7 -0
- multigrate-1.0.1/src/multigrate/data/__init__.py +3 -0
- multigrate-1.0.1/src/multigrate/data/_preprocessing.py +177 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/src/multigrate/dataloaders/_ann_dataloader.py +55 -33
- {multigrate-0.0.2 → multigrate-1.0.1}/src/multigrate/dataloaders/_data_splitting.py +13 -17
- multigrate-1.0.1/src/multigrate/distributions/__init__.py +4 -0
- multigrate-1.0.1/src/multigrate/distributions/_jeffreys.py +86 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/src/multigrate/distributions/_mmd.py +44 -20
- multigrate-1.0.1/src/multigrate/model/_multivae.py +661 -0
- multigrate-1.0.1/src/multigrate/module/_multivae_torch.py +766 -0
- multigrate-1.0.1/src/multigrate/nn/_base_components.py +250 -0
- multigrate-1.0.1/src/multigrate/utils/__init__.py +9 -0
- multigrate-1.0.1/src/multigrate/utils/_utils.py +71 -0
- multigrate-1.0.1/tests/_helpers.py +13 -0
- multigrate-1.0.1/tests/conftest.py +71 -0
- multigrate-1.0.1/tests/data/test_organize_multimodal_anndatas.py +223 -0
- multigrate-1.0.1/tests/dataloaders/test_group_data_loader.py +264 -0
- multigrate-1.0.1/tests/distributions/test_jeffreys.py +115 -0
- multigrate-1.0.1/tests/distributions/test_mmd.py +104 -0
- multigrate-1.0.1/tests/model/test_multivae.py +144 -0
- multigrate-1.0.1/tests/model/test_multivae_integrate_on_loss_coefs.py +57 -0
- multigrate-1.0.1/tests/model/test_multivae_integration_and_q2r_missing_mod_smoke.py +115 -0
- multigrate-1.0.1/tests/model/test_multivae_integration_and_q2r_smoke.py +110 -0
- multigrate-1.0.1/tests/model/test_multivae_load.py +55 -0
- multigrate-1.0.1/tests/module/test_multivae_torch.py +227 -0
- multigrate-1.0.1/tests/nn/test_decoder.py +113 -0
- multigrate-1.0.1/tests/nn/test_generalized_sigmoid.py +125 -0
- multigrate-1.0.1/tests/nn/test_mlp.py +110 -0
- multigrate-1.0.1/tests/test_basic.py +83 -0
- multigrate-1.0.1/uv.lock +4901 -0
- multigrate-0.0.2/.bumpversion.cfg +0 -8
- multigrate-0.0.2/.codecov.yaml +0 -17
- multigrate-0.0.2/.flake8 +0 -46
- multigrate-0.0.2/.github/workflows/build.yaml +0 -23
- multigrate-0.0.2/.github/workflows/test.yaml +0 -62
- multigrate-0.0.2/.pre-commit-config.yaml +0 -70
- multigrate-0.0.2/.readthedocs.yaml +0 -15
- multigrate-0.0.2/CHANGELOG.md +0 -17
- multigrate-0.0.2/PKG-INFO +0 -140
- multigrate-0.0.2/README.md +0 -75
- multigrate-0.0.2/docs/api.md +0 -31
- multigrate-0.0.2/docs/extensions/.gitkeep +0 -0
- multigrate-0.0.2/docs/make.bat +0 -35
- multigrate-0.0.2/docs/notebooks/data/trimodal/cite_harmonized_celltypes.csv +0 -90262
- multigrate-0.0.2/docs/notebooks/data/trimodal/multiome_harmonized_celltypes.csv +0 -69248
- multigrate-0.0.2/docs/notebooks/neurips2021_cite_pp.ipynb +0 -419
- multigrate-0.0.2/docs/notebooks/neurips2021_multiome_pp.ipynb +0 -474
- multigrate-0.0.2/docs/notebooks/paired_integration_cite.ipynb +0 -409
- multigrate-0.0.2/docs/notebooks/paired_integration_multiome.ipynb +0 -418
- multigrate-0.0.2/docs/notebooks/trimodal_integration.ipynb +0 -976
- multigrate-0.0.2/docs/notebooks/trimodal_pp.ipynb +0 -386
- multigrate-0.0.2/docs/references.bib +0 -17
- multigrate-0.0.2/docs/tutorials.md +0 -23
- multigrate-0.0.2/pyproject.toml +0 -97
- multigrate-0.0.2/src/multigrate/__init__.py +0 -7
- multigrate-0.0.2/src/multigrate/data/__init__.py +0 -3
- multigrate-0.0.2/src/multigrate/data/_preprocessing.py +0 -98
- multigrate-0.0.2/src/multigrate/distributions/__init__.py +0 -3
- multigrate-0.0.2/src/multigrate/model/_multivae.py +0 -513
- multigrate-0.0.2/src/multigrate/module/_multivae_torch.py +0 -638
- multigrate-0.0.2/src/multigrate/nn/_base_components.py +0 -143
- multigrate-0.0.2/tests/test_basic.py +0 -12
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/Makefile +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/_static/.gitkeep +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/_templates/.gitkeep +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/changelog.md +0 -0
- {multigrate-0.0.2/docs/notebooks/data/trimodal → multigrate-1.0.1/docs/notebooks}/cellttype_harmonize.json +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/docs/references.md +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/src/multigrate/dataloaders/__init__.py +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/src/multigrate/model/__init__.py +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/src/multigrate/module/__init__.py +0 -0
- {multigrate-0.0.2 → multigrate-1.0.1}/src/multigrate/nn/__init__.py +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Based on pydata/xarray
|
|
2
|
+
codecov:
|
|
3
|
+
require_ci_to_pass: no
|
|
4
|
+
|
|
5
|
+
coverage:
|
|
6
|
+
status:
|
|
7
|
+
project:
|
|
8
|
+
default:
|
|
9
|
+
# Require 1% coverage, i.e., always succeed
|
|
10
|
+
target: 1
|
|
11
|
+
patch: false
|
|
12
|
+
changes: false
|
|
13
|
+
|
|
14
|
+
comment:
|
|
15
|
+
layout: diff, flags, files
|
|
16
|
+
behavior: once
|
|
17
|
+
require_base: no
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"template": "https://github.com/scverse/cookiecutter-scverse",
|
|
3
|
+
"commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec",
|
|
4
|
+
"checkout": "v0.6.0",
|
|
5
|
+
"context": {
|
|
6
|
+
"cookiecutter": {
|
|
7
|
+
"project_name": "multigrate",
|
|
8
|
+
"package_name": "multigrate",
|
|
9
|
+
"project_description": "Multimodal weakly supervised learning to identify disease-specific changes in single-cell atlases",
|
|
10
|
+
"author_full_name": "Anastasia Litinetskaya",
|
|
11
|
+
"author_email": "alitinet@gmail.com",
|
|
12
|
+
"github_user": "theislab",
|
|
13
|
+
"github_repo": "multigrate",
|
|
14
|
+
"license": "BSD 3-Clause License",
|
|
15
|
+
"ide_integration": true,
|
|
16
|
+
"_copy_without_render": [
|
|
17
|
+
".github/workflows/build.yaml",
|
|
18
|
+
".github/workflows/test.yaml",
|
|
19
|
+
"docs/_templates/autosummary/**.rst"
|
|
20
|
+
],
|
|
21
|
+
"_exclude_on_template_update": [
|
|
22
|
+
"CHANGELOG.md",
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"README.md",
|
|
25
|
+
"docs/api.md",
|
|
26
|
+
"docs/index.md",
|
|
27
|
+
"docs/notebooks/example.ipynb",
|
|
28
|
+
"docs/references.bib",
|
|
29
|
+
"docs/references.md",
|
|
30
|
+
"src/**",
|
|
31
|
+
"tests/**"
|
|
32
|
+
],
|
|
33
|
+
"_render_devdocs": false,
|
|
34
|
+
"_jinja2_env_vars": {
|
|
35
|
+
"lstrip_blocks": true,
|
|
36
|
+
"trim_blocks": true
|
|
37
|
+
},
|
|
38
|
+
"_template": "https://github.com/scverse/cookiecutter-scverse",
|
|
39
|
+
"_commit": "d383d94fadff9e4e6fdb59d77c68cb900d7cedec"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"directory": null
|
|
43
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report something that is broken or incorrect
|
|
3
|
+
labels: bug
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
|
|
9
|
+
detailing how to provide the necessary information for us to reproduce your bug. In brief:
|
|
10
|
+
* Please provide exact steps how to reproduce the bug in a clean Python environment.
|
|
11
|
+
* In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
|
|
12
|
+
* Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
|
|
13
|
+
available datasets or to share a subset of your data.
|
|
14
|
+
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: report
|
|
17
|
+
attributes:
|
|
18
|
+
label: Report
|
|
19
|
+
description: A clear and concise description of what the bug is.
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: versions
|
|
25
|
+
attributes:
|
|
26
|
+
label: Versions
|
|
27
|
+
description: |
|
|
28
|
+
Which version of packages.
|
|
29
|
+
|
|
30
|
+
Please install `session-info2`, run the following command in a notebook,
|
|
31
|
+
click the “Copy as Markdown” button, then paste the results into the text box below.
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
In[1]: import session_info2; session_info2.session_info(dependencies=True)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Alternatively, run this in a console:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
>>> import session_info2; print(session_info2.session_info(dependencies=True)._repr_mimebundle_()["text/markdown"])
|
|
41
|
+
```
|
|
42
|
+
render: python
|
|
43
|
+
placeholder: |
|
|
44
|
+
anndata 0.11.3
|
|
45
|
+
---- ----
|
|
46
|
+
charset-normalizer 3.4.1
|
|
47
|
+
coverage 7.7.0
|
|
48
|
+
psutil 7.0.0
|
|
49
|
+
dask 2024.7.1
|
|
50
|
+
jaraco.context 5.3.0
|
|
51
|
+
numcodecs 0.15.1
|
|
52
|
+
jaraco.functools 4.0.1
|
|
53
|
+
Jinja2 3.1.6
|
|
54
|
+
sphinxcontrib-jsmath 1.0.1
|
|
55
|
+
sphinxcontrib-htmlhelp 2.1.0
|
|
56
|
+
toolz 1.0.0
|
|
57
|
+
session-info2 0.1.2
|
|
58
|
+
PyYAML 6.0.2
|
|
59
|
+
llvmlite 0.44.0
|
|
60
|
+
scipy 1.15.2
|
|
61
|
+
pandas 2.2.3
|
|
62
|
+
sphinxcontrib-devhelp 2.0.0
|
|
63
|
+
h5py 3.13.0
|
|
64
|
+
tblib 3.0.0
|
|
65
|
+
setuptools-scm 8.2.0
|
|
66
|
+
more-itertools 10.3.0
|
|
67
|
+
msgpack 1.1.0
|
|
68
|
+
sparse 0.15.5
|
|
69
|
+
wrapt 1.17.2
|
|
70
|
+
jaraco.collections 5.1.0
|
|
71
|
+
numba 0.61.0
|
|
72
|
+
pyarrow 19.0.1
|
|
73
|
+
pytz 2025.1
|
|
74
|
+
MarkupSafe 3.0.2
|
|
75
|
+
crc32c 2.7.1
|
|
76
|
+
sphinxcontrib-qthelp 2.0.0
|
|
77
|
+
sphinxcontrib-serializinghtml 2.0.0
|
|
78
|
+
zarr 2.18.4
|
|
79
|
+
asciitree 0.3.3
|
|
80
|
+
six 1.17.0
|
|
81
|
+
sphinxcontrib-applehelp 2.0.0
|
|
82
|
+
numpy 2.1.3
|
|
83
|
+
cloudpickle 3.1.1
|
|
84
|
+
sphinxcontrib-bibtex 2.6.3
|
|
85
|
+
natsort 8.4.0
|
|
86
|
+
jaraco.text 3.12.1
|
|
87
|
+
setuptools 76.1.0
|
|
88
|
+
Deprecated 1.2.18
|
|
89
|
+
packaging 24.2
|
|
90
|
+
python-dateutil 2.9.0.post0
|
|
91
|
+
---- ----
|
|
92
|
+
Python 3.13.2 | packaged by conda-forge | (main, Feb 17 2025, 14:10:22) [GCC 13.3.0]
|
|
93
|
+
OS Linux-6.11.0-109019-tuxedo-x86_64-with-glibc2.39
|
|
94
|
+
Updated 2025-03-18 15:47
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Propose a new feature for multigrate
|
|
3
|
+
labels: enhancement
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: description
|
|
7
|
+
attributes:
|
|
8
|
+
label: Description of feature
|
|
9
|
+
description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Check Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
package:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
filter: blob:none
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
with:
|
|
24
|
+
cache-dependency-glob: pyproject.toml
|
|
25
|
+
- name: Build package
|
|
26
|
+
run: uv build
|
|
27
|
+
- name: Check package
|
|
28
|
+
run: uvx twine check --strict dist/*.whl
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: Upload release to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment:
|
|
13
|
+
name: pypi
|
|
14
|
+
url: https://pypi.org/p/multigrate
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
filter: blob:none
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
- name: Install uv
|
|
23
|
+
uses: astral-sh/setup-uv@v5
|
|
24
|
+
with:
|
|
25
|
+
cache-dependency-glob: pyproject.toml
|
|
26
|
+
- name: Build package
|
|
27
|
+
run: uv build
|
|
28
|
+
- name: Publish package distributions to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 5 1,15 * *"
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest]
|
|
21
|
+
python-version: ["3.12", "3.13"]
|
|
22
|
+
prerelease: [false]
|
|
23
|
+
include:
|
|
24
|
+
- python-version: "3.13"
|
|
25
|
+
prerelease: true
|
|
26
|
+
os: ubuntu-latest
|
|
27
|
+
|
|
28
|
+
name: Python ${{ matrix.python-version }}${{ matrix.prerelease && ' (pre-release)' || '' }}
|
|
29
|
+
runs-on: ${{ matrix.os }}
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
with:
|
|
34
|
+
filter: blob:none
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
- name: Install uv
|
|
37
|
+
uses: astral-sh/setup-uv@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: ${{ matrix.python-version }}
|
|
40
|
+
cache-dependency-glob: uv.lock
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: uv sync --group test
|
|
43
|
+
env:
|
|
44
|
+
UV_PRERELEASE: ${{ matrix.prerelease && 'allow' || 'disallow' }}
|
|
45
|
+
- name: Run tests
|
|
46
|
+
env:
|
|
47
|
+
MPLBACKEND: agg
|
|
48
|
+
PLATFORM: ${{ matrix.os }}
|
|
49
|
+
run: uv run pytest --cov --cov-report=xml -v
|
|
50
|
+
- name: Upload coverage
|
|
51
|
+
uses: codecov/codecov-action@v5
|
|
52
|
+
|
|
53
|
+
check:
|
|
54
|
+
name: Tests pass
|
|
55
|
+
if: always()
|
|
56
|
+
needs: [test]
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: re-actors/alls-green@release/v1
|
|
60
|
+
with:
|
|
61
|
+
jobs: ${{ toJSON(needs) }}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
# Temp files
|
|
2
2
|
.DS_Store
|
|
3
3
|
*~
|
|
4
|
+
buck-out/
|
|
4
5
|
|
|
5
6
|
# Compiled files
|
|
7
|
+
.venv/
|
|
6
8
|
__pycache__/
|
|
9
|
+
.*cache/
|
|
7
10
|
|
|
8
11
|
# Distribution / packaging
|
|
9
|
-
/build/
|
|
10
12
|
/dist/
|
|
11
|
-
/*.egg-info/
|
|
12
13
|
|
|
13
14
|
# Tests and coverage
|
|
14
|
-
/.pytest_cache/
|
|
15
|
-
/.cache/
|
|
16
15
|
/data/
|
|
16
|
+
/node_modules/
|
|
17
|
+
/.coverage*
|
|
17
18
|
|
|
18
19
|
# docs
|
|
19
20
|
/docs/generated/
|
|
20
21
|
/docs/_build/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/.vscode/
|
|
25
|
-
|
|
26
|
-
# data
|
|
27
|
-
*.h5ad
|
|
28
|
-
|
|
29
|
-
# jupyter checkpoints
|
|
30
|
-
.ipynb_checkpoints
|
|
22
|
+
/docs/notebooks/data/
|
|
23
|
+
/docs/notebooks/totalvi_test.ipynb
|
|
24
|
+
/docs/notebooks/*.h5ad
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
fail_fast: false
|
|
2
|
+
default_language_version:
|
|
3
|
+
python: python3
|
|
4
|
+
default_stages:
|
|
5
|
+
- pre-commit
|
|
6
|
+
- pre-push
|
|
7
|
+
minimum_pre_commit_version: 2.16.0
|
|
8
|
+
repos:
|
|
9
|
+
- repo: https://github.com/biomejs/pre-commit
|
|
10
|
+
rev: v2.3.10
|
|
11
|
+
hooks:
|
|
12
|
+
- id: biome-format
|
|
13
|
+
exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
|
|
14
|
+
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
15
|
+
rev: v2.11.1
|
|
16
|
+
hooks:
|
|
17
|
+
- id: pyproject-fmt
|
|
18
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
+
rev: v0.14.14
|
|
20
|
+
hooks:
|
|
21
|
+
- id: ruff-check
|
|
22
|
+
types_or: [python, pyi, jupyter]
|
|
23
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
24
|
+
- id: ruff-format
|
|
25
|
+
types_or: [python, pyi, jupyter]
|
|
26
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
27
|
+
rev: v6.0.0
|
|
28
|
+
hooks:
|
|
29
|
+
- id: detect-private-key
|
|
30
|
+
- id: check-ast
|
|
31
|
+
- id: end-of-file-fixer
|
|
32
|
+
- id: mixed-line-ending
|
|
33
|
+
args: [--fix=lf]
|
|
34
|
+
- id: trailing-whitespace
|
|
35
|
+
- id: check-case-conflict
|
|
36
|
+
# Check that there are no merge conflicts (could be generated by template sync)
|
|
37
|
+
- id: check-merge-conflict
|
|
38
|
+
args: [--assume-in-merge]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
2
|
+
version: 2
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-24.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.12"
|
|
7
|
+
jobs:
|
|
8
|
+
create_environment:
|
|
9
|
+
- asdf plugin add uv
|
|
10
|
+
- asdf install uv latest
|
|
11
|
+
- asdf global uv latest
|
|
12
|
+
- uv sync --group doc
|
|
13
|
+
build:
|
|
14
|
+
html:
|
|
15
|
+
- uv run sphinx-build -M html docs docs/_build -W
|
|
16
|
+
- mv docs/_build $READTHEDOCS_OUTPUT
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
// GitHub integration
|
|
4
|
+
"github.vscode-github-actions",
|
|
5
|
+
"github.vscode-pull-request-github",
|
|
6
|
+
// Language support
|
|
7
|
+
"ms-python.python",
|
|
8
|
+
"ms-python.vscode-pylance",
|
|
9
|
+
"ms-toolsai.jupyter",
|
|
10
|
+
"tamasfe.even-better-toml",
|
|
11
|
+
// Dependency management
|
|
12
|
+
"ninoseki.vscode-mogami",
|
|
13
|
+
// Linting and formatting
|
|
14
|
+
"editorconfig.editorconfig",
|
|
15
|
+
"charliermarsh.ruff",
|
|
16
|
+
"biomejs.biome",
|
|
17
|
+
],
|
|
18
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Python: Build Documentation",
|
|
9
|
+
"type": "debugpy",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"module": "sphinx",
|
|
12
|
+
"args": ["-M", "html", ".", "_build"],
|
|
13
|
+
"cwd": "${workspaceFolder}/docs",
|
|
14
|
+
"console": "internalConsole",
|
|
15
|
+
"justMyCode": false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Python: Debug Test",
|
|
19
|
+
"type": "debugpy",
|
|
20
|
+
"request": "launch",
|
|
21
|
+
"program": "${file}",
|
|
22
|
+
"purpose": ["debug-test"],
|
|
23
|
+
"console": "internalConsole",
|
|
24
|
+
"justMyCode": false,
|
|
25
|
+
"env": {
|
|
26
|
+
"PYTEST_ADDOPTS": "--color=yes",
|
|
27
|
+
},
|
|
28
|
+
"presentation": {
|
|
29
|
+
"hidden": true,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"[python][json][jsonc]": {
|
|
3
|
+
"editor.formatOnSave": true,
|
|
4
|
+
},
|
|
5
|
+
"[python]": {
|
|
6
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
7
|
+
"editor.codeActionsOnSave": {
|
|
8
|
+
"source.fixAll": "always",
|
|
9
|
+
"source.organizeImports": "always",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
"[json][jsonc]": {
|
|
13
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
14
|
+
},
|
|
15
|
+
"python.analysis.typeCheckingMode": "basic",
|
|
16
|
+
"python.testing.pytestEnabled": true,
|
|
17
|
+
"python.testing.pytestArgs": ["-vv", "--color=yes"],
|
|
18
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog][],
|
|
6
|
+
and this project adheres to [Semantic Versioning][].
|
|
7
|
+
|
|
8
|
+
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
|
|
9
|
+
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
|
10
|
+
|
|
11
|
+
## [1.0.1] - 2026-06-14
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `MultiVAE(losses=None)` no longer raises `TypeError: argument of type 'NoneType' is not iterable`. `losses=None` (the documented default, meaning MSE for all modalities) now works correctly in both the model wrapper (`_multivae.py`) and the torch module (`_multivae_torch.py`).
|
|
16
|
+
- `MultiVAE.load_query_data` no longer raises `AttributeError` when the reference model was trained with `integrate_on` but without an nb/zinb loss (i.e. `theta` is `None`).
|
|
17
|
+
- `StratifiedSampler` (used when `integrate_on` is set) no longer silently produces zero training batches on small datasets. Training will now always produce at least one batch per group, and raises a clear `ValueError` if the batch size is too large for the data.
|
|
18
|
+
- `organize_multimodal_anndatas` now preserves `.var` metadata from each modality. When the same column name appears in multiple modalities it is suffixed with the modality index (e.g. `mean_0`, `mean_1`). Fixes [#4](https://github.com/theislab/multigrate/issues/4).
|
|
19
|
+
- Defensive `.get("columns", [])` in the continuous-covariate registry lookup prevents a `KeyError` with certain scvi-tools versions. Fixes [#45](https://github.com/theislab/multigrate/issues/45).
|
|
20
|
+
- Removed deprecated `dtype=` argument from `anndata.AnnData()` call (anndata 0.12+).
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Requires Python ≥ 3.12 (aligned with scvi-tools 1.4.3 minimum).
|
|
25
|
+
- Bumped core dependencies: `scvi-tools>=1.4.3`, `anndata>=0.12`; removed `numpy<2` and `jax<0.6` upper-bound pins.
|
|
26
|
+
- Migrated developer tooling from hatch to native [uv](https://docs.astral.sh/uv/). Dependency groups (`dev`, `test`, `doc`) are now declared via PEP 735 `[dependency-groups]` in `pyproject.toml`.
|
|
27
|
+
- CI rewritten to use `uv sync --group test` + `uv run pytest` against Python 3.12 and 3.13.
|
|
28
|
+
- ReadTheDocs build updated to use `uv sync --group doc` + `uv run sphinx-build`.
|
|
29
|
+
- How the masks for missing modalities are calculated: now assume that the modality is missing when all features are zero instead of the sum over all features being <= 0 previously (only makes a difference when the input can be negative, which doesn't happen with standard single-cell modalities)
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- support for scvi-tools >= 1.0 ([#37](https://github.com/theislab/multigrate/pull/37))
|
|
34
|
+
- support for multiple NB lossed ([#34](https://github.com/theislab/multigrate/pull/34))
|
|
35
|
+
- tests
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: multigrate
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: Multimodal weakly supervised learning to identify disease-specific changes in single-cell atlases
|
|
5
|
+
Project-URL: Documentation, https://multigrate.readthedocs.io/
|
|
6
|
+
Project-URL: Homepage, https://github.com/theislab/multigrate
|
|
7
|
+
Project-URL: Source, https://github.com/theislab/multigrate
|
|
8
|
+
Author: Anastasia Litinetskaya
|
|
9
|
+
Maintainer-email: Anastasia Litinetskaya <alitinet@gmail.com>
|
|
10
|
+
License: BSD 3-Clause License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2024, Anastasia Litinetskaya
|
|
13
|
+
All rights reserved.
|
|
14
|
+
|
|
15
|
+
Redistribution and use in source and binary forms, with or without
|
|
16
|
+
modification, are permitted provided that the following conditions are met:
|
|
17
|
+
|
|
18
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
19
|
+
list of conditions and the following disclaimer.
|
|
20
|
+
|
|
21
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
22
|
+
this list of conditions and the following disclaimer in the documentation
|
|
23
|
+
and/or other materials provided with the distribution.
|
|
24
|
+
|
|
25
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
26
|
+
contributors may be used to endorse or promote products derived from
|
|
27
|
+
this software without specific prior written permission.
|
|
28
|
+
|
|
29
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
30
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
31
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
32
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
33
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
34
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
35
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
36
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
37
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
38
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
|
+
License-File: LICENSE
|
|
40
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
44
|
+
Requires-Python: >=3.12
|
|
45
|
+
Requires-Dist: anndata>=0.12
|
|
46
|
+
Requires-Dist: jax
|
|
47
|
+
Requires-Dist: matplotlib
|
|
48
|
+
Requires-Dist: numpy
|
|
49
|
+
Requires-Dist: requests
|
|
50
|
+
Requires-Dist: scanpy
|
|
51
|
+
Requires-Dist: scvi-tools>=1.4.3
|
|
52
|
+
Requires-Dist: session-info2
|
|
53
|
+
Provides-Extra: dev
|
|
54
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
55
|
+
Requires-Dist: twine>=4.0.2; extra == 'dev'
|
|
56
|
+
Provides-Extra: doc
|
|
57
|
+
Requires-Dist: docutils!=0.18.*,!=0.19.*,>=0.8; extra == 'doc'
|
|
58
|
+
Requires-Dist: ipykernel; extra == 'doc'
|
|
59
|
+
Requires-Dist: ipython; extra == 'doc'
|
|
60
|
+
Requires-Dist: myst-nb>=1.1; extra == 'doc'
|
|
61
|
+
Requires-Dist: pandas; extra == 'doc'
|
|
62
|
+
Requires-Dist: setuptools; extra == 'doc'
|
|
63
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == 'doc'
|
|
64
|
+
Requires-Dist: sphinx-book-theme>=1; extra == 'doc'
|
|
65
|
+
Requires-Dist: sphinx-copybutton; extra == 'doc'
|
|
66
|
+
Requires-Dist: sphinx-tabs; extra == 'doc'
|
|
67
|
+
Requires-Dist: sphinx>=8.1; extra == 'doc'
|
|
68
|
+
Requires-Dist: sphinxcontrib-bibtex>=1; extra == 'doc'
|
|
69
|
+
Requires-Dist: sphinxext-opengraph; extra == 'doc'
|
|
70
|
+
Provides-Extra: test
|
|
71
|
+
Requires-Dist: coverage>=7.10; extra == 'test'
|
|
72
|
+
Requires-Dist: pytest; extra == 'test'
|
|
73
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
74
|
+
Provides-Extra: tutorials
|
|
75
|
+
Requires-Dist: gdown; extra == 'tutorials'
|
|
76
|
+
Requires-Dist: igraph; extra == 'tutorials'
|
|
77
|
+
Requires-Dist: ipywidgets; extra == 'tutorials'
|
|
78
|
+
Requires-Dist: jupyterlab; extra == 'tutorials'
|
|
79
|
+
Requires-Dist: leidenalg; extra == 'tutorials'
|
|
80
|
+
Requires-Dist: muon; extra == 'tutorials'
|
|
81
|
+
Description-Content-Type: text/markdown
|
|
82
|
+
|
|
83
|
+
# Multigrate: multiomic data integration for single-cell genomics
|
|
84
|
+
|
|
85
|
+
[![Tests][badge-tests]][link-tests]
|
|
86
|
+
[![Documentation][badge-docs]][link-docs]
|
|
87
|
+
|
|
88
|
+
[badge-tests]: https://img.shields.io/github/actions/workflow/status/theislab/multigrate/test.yaml?branch=main
|
|
89
|
+
[link-tests]: https://github.com/theislab/multigrate/actions/workflows/test.yml
|
|
90
|
+
[badge-docs]: https://img.shields.io/readthedocs/multigrate
|
|
91
|
+
[badge-colab]: https://colab.research.google.com/assets/colab-badge.svg
|
|
92
|
+
|
|
93
|
+
## Getting started
|
|
94
|
+
|
|
95
|
+
Please refer to the [documentation][link-docs]. In particular, the
|
|
96
|
+
|
|
97
|
+
- [API documentation][link-api]
|
|
98
|
+
|
|
99
|
+
and the tutorials:
|
|
100
|
+
|
|
101
|
+
- [Paired integration and query-to-reference mapping](https://multigrate.readthedocs.io/en/latest/notebooks/paired_integration_cite-seq.html) [![Open In Colab][badge-colab]](https://colab.research.google.com/github/theislab/multigrate/blob/main/docs/notebooks/paired_integration_cite-seq.ipynb)
|
|
102
|
+
- [Trimodal integration and query-to-reference mapping](https://multigrate.readthedocs.io/en/latest/notebooks/trimodal_integration.html) [![Open In Colab][badge-colab]](https://colab.research.google.com/github/theislab/multigrate/blob/main/docs/notebooks/trimodal_integration.ipynb)
|
|
103
|
+
|
|
104
|
+
See the paired integration tutorial for advice on which distributions and losses to use for which modalities.
|
|
105
|
+
|
|
106
|
+
## Installation
|
|
107
|
+
|
|
108
|
+
You need to have Python 3.12 or newer installed on your system.
|
|
109
|
+
|
|
110
|
+
### Quick start
|
|
111
|
+
|
|
112
|
+
To install the latest release of `multigrate` from [PyPI][link-pypi]:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
pip install multigrate
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Or install the latest development version:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pip install git+https://github.com/theislab/multigrate.git@main
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Development setup
|
|
125
|
+
|
|
126
|
+
For development, we recommend using [`uv`](https://docs.astral.sh/uv/) for fast dependency management:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Clone the repository
|
|
130
|
+
git clone https://github.com/theislab/multigrate.git
|
|
131
|
+
cd multigrate
|
|
132
|
+
|
|
133
|
+
# Install in development mode with all optional dependencies
|
|
134
|
+
uv sync --all-groups
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Release notes
|
|
138
|
+
|
|
139
|
+
See the [changelog][changelog].
|
|
140
|
+
|
|
141
|
+
## Contact
|
|
142
|
+
|
|
143
|
+
If you found a bug, please use the [issue tracker][issue-tracker].
|
|
144
|
+
|
|
145
|
+
## Citation
|
|
146
|
+
|
|
147
|
+
> Anastasia Litinetskaya, Maiia Schulman, Fabiola Curion, Artur Szalata, Alireza Omidi, Mohammad Lotfollahi, and Fabian Theis. 2022. "Integration and querying of multimodal single-cell data with PoE-VAE." _bioRxiv_. https://doi.org/10.1101/2022.03.16.484643.
|
|
148
|
+
|
|
149
|
+
## Reproducibility
|
|
150
|
+
|
|
151
|
+
Code and notebooks to reproduce the results from the paper are available at https://github.com/theislab/multigrate_reproducibility.
|
|
152
|
+
|
|
153
|
+
[issue-tracker]: https://github.com/theislab/multigrate/issues
|
|
154
|
+
[changelog]: https://multigrate.readthedocs.io/latest/changelog.html
|
|
155
|
+
[link-docs]: https://multigrate.readthedocs.io
|
|
156
|
+
[link-api]: https://multigrate.readthedocs.io/latest/api.html
|
|
157
|
+
[link-pypi]: https://pypi.org/project/multigrate
|