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

feat: TOTALVI & MULTIVI Mudata Minification #3039

Open
wants to merge 89 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
61bbedb
wip
martinkim0 Jun 26, 2024
7929c44
Merge branch 'main' into minified-mode
martinkim0 Jul 2, 2024
1bb2f2f
wip
martinkim0 Jul 3, 2024
245c710
keep empty layers for registry
martinkim0 Jul 3, 2024
b02040d
Merge branch 'main' into minified-mode
canergen Jul 26, 2024
5fea40e
Merge branch 'main' into minified-mode
ori-kron-wis Sep 15, 2024
b02405e
Merge branch 'main' into minified-mode
ori-kron-wis Nov 6, 2024
8d9d012
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 6, 2024
243c206
updated conflics during merge
ori-kron-wis Nov 6, 2024
23c60a5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 6, 2024
d0ad5f5
Added mudata support for MULTIVI as well as tests
ori-kron-wis Nov 6, 2024
9450546
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 6, 2024
079faff
needed muon
ori-kron-wis Nov 6, 2024
5e8bc5f
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 6, 2024
b420037
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 6, 2024
815555c
Added ATC/PROTEIN + RNA capability for MultiVI + more tests like in t…
ori-kron-wis Nov 7, 2024
e03b006
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 7, 2024
ea59fd1
small fix
ori-kron-wis Nov 7, 2024
278353f
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 7, 2024
9118af8
small fix
ori-kron-wis Nov 7, 2024
870b0fc
small fix
ori-kron-wis Nov 7, 2024
4f08c1b
small fix
ori-kron-wis Nov 7, 2024
9622f88
small fix
ori-kron-wis Nov 7, 2024
3299355
Added mudata minification models for MULTIVI & TOTALVI as well as tests
ori-kron-wis Nov 12, 2024
e9b72d9
fix typos
ori-kron-wis Nov 12, 2024
987ebd3
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-MuData
ori-kron-wis Nov 13, 2024
371ef7a
fixed comments
ori-kron-wis Nov 13, 2024
8f969a9
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-TotalVi-M…
ori-kron-wis Nov 13, 2024
3cf0108
fixed comments
ori-kron-wis Nov 13, 2024
ff82b28
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 13, 2024
33cbf84
merge with base branch
ori-kron-wis Nov 13, 2024
1a00720
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 13, 2024
8326895
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-MuData
ori-kron-wis Nov 13, 2024
591a9ee
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-TotalVi-M…
ori-kron-wis Nov 13, 2024
b00d439
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-TotalVi-M…
ori-kron-wis Nov 14, 2024
e670511
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-MuData
ori-kron-wis Nov 14, 2024
b6d2028
fixed typos
ori-kron-wis Nov 14, 2024
211d344
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 14, 2024
a903359
fix comments
ori-kron-wis Nov 18, 2024
6c08f1c
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 18, 2024
8aecdf8
fix some tests
ori-kron-wis Nov 18, 2024
c957c94
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-MuData
ori-kron-wis Nov 19, 2024
7b5f22f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 19, 2024
43b360b
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 19, 2024
5709249
Merge branch 'main' into minified-mode
ori-kron-wis Nov 19, 2024
aab2e09
Merge remote-tracking branch 'origin/main' into minified-mode
ori-kron-wis Nov 19, 2024
fe12fac
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-MuData
ori-kron-wis Nov 19, 2024
44e736f
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-TotalVi-M…
ori-kron-wis Nov 19, 2024
951035b
Merge branch 'main' into minified-mode
ori-kron-wis Nov 19, 2024
af8ef83
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 19, 2024
b770de3
Merge remote-tracking branch 'origin/minified-mode' into minified-mode
ori-kron-wis Nov 19, 2024
2a99751
added atac registry field
ori-kron-wis Nov 19, 2024
51077d0
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 19, 2024
3906a6a
merged with the minification refactor branch
ori-kron-wis Nov 19, 2024
a3de92e
Refactored minified models
canergen Nov 19, 2024
bda6b30
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 19, 2024
c5678e1
added adata minification for multi/total vi and fixed several tests
ori-kron-wis Nov 19, 2024
108175d
Fixed loss computation for keep count models
canergen Nov 19, 2024
9706947
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 19, 2024
a0ed985
Increase tolerance
canergen Nov 20, 2024
1adc452
Merge branch 'minified-mode' of https://github.com/scverse/scvi-tools…
canergen Nov 20, 2024
0bd790a
Typo
canergen Nov 20, 2024
c971e91
Changed keep adata when keep_counts
canergen Nov 20, 2024
ded463b
Merge remote-tracking branch 'origin/minified-mode' into Ori-MultiVI-…
ori-kron-wis Nov 20, 2024
24177da
Fixed multiVI mudata
canergen Nov 20, 2024
c7b0a3b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 20, 2024
101641a
following can's fixes
ori-kron-wis Nov 20, 2024
3b154de
Merge remote-tracking branch 'origin/Ori-MultiVI-TotalVi-Minification…
ori-kron-wis Nov 20, 2024
b32a92f
update branch
ori-kron-wis Nov 20, 2024
effc2f6
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 20, 2024
e369eb1
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-MuData
ori-kron-wis Nov 20, 2024
488ed67
Merge remote-tracking branch 'origin/main' into Ori-MultiVI-TotalVi-M…
ori-kron-wis Nov 20, 2024
6629923
Merge remote-tracking branch 'origin/main' into minified-mode
ori-kron-wis Nov 20, 2024
a0cd0bd
fix get_accessibility was using gene indices, should have used region…
ori-kron-wis Nov 20, 2024
711ec54
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 20, 2024
93dfda4
Merge remote-tracking branch 'origin/minified-mode' into Ori-MultiVI-…
ori-kron-wis Nov 20, 2024
4a9dca9
Merge remote-tracking branch 'origin/Ori-MultiVI-MuData' into Ori-Mul…
ori-kron-wis Nov 20, 2024
afaf1b3
some fixes
ori-kron-wis Nov 20, 2024
02a8b8f
update tests
ori-kron-wis Nov 20, 2024
69c06e4
fix tests, save/load
ori-kron-wis Nov 20, 2024
b5eb0a6
more fixes.
ori-kron-wis Nov 20, 2024
cd9c5b2
Refactor code and add tests
canergen Nov 21, 2024
165633c
updated multivi tutorials with mudata and minification
ori-kron-wis Nov 21, 2024
8d91791
Merge branch 'Ori-MultiVI-TotalVi-Minification-MuData' of https://git…
canergen Nov 21, 2024
0143471
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 21, 2024
237ff13
Fixed multiVI
canergen Nov 22, 2024
fa7b457
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 22, 2024
79c1b96
Merge branch 'main' into Ori-MultiVI-TotalVi-Minification-MuData
ori-kron-wis Nov 27, 2024
a13f29d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will need to update the changlog

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Starting from version 0.20.1, this format is based on [Keep a Changelog], and th
to [Semantic Versioning]. Full commit history is available in the
[commit logs](https://github.com/scverse/scvi-tools/commits/).

## Version 1.2
## Version 1.3
ori-kron-wis marked this conversation as resolved.
Show resolved Hide resolved

### 1.3.0 (2024-XX-XX)

Expand All @@ -19,10 +19,15 @@ to [Semantic Versioning]. Full commit history is available in the
- Add {class}`scvi.external.Decipher` for dimensionality reduction and interpretable
representation learning in single-cell RNA sequencing data {pr}`3015`.

## Version 1.2

### 1.2.1 (2024-XX-XX)

#### Added

- MuData support for {class}`~scvi.model.MULTIVI` via the method
- Add MuData Minification option to {class}`~scvi.model.MULTIVI` and {class}`~scvi.model.TOTALVI` {pr}`3039`.

#### Fixed

- Breaking Change: Fix `get_outlier_cell_sample_pairs` function in {class}`scvi.external.MRVI`
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ regseq = ["biopython>=1.81", "genomepy"]
# read loom
loompy = ["loompy>=3.0.6"]
# scvi.criticism and read 10x
scanpy = ["scanpy>=1.6"]
scanpy = ["scanpy>=1.6","scikit-misc"]

optional = [
"scvi-tools[autotune,aws,hub,loompy,pymde,regseq,scanpy]"
Expand All @@ -107,7 +107,6 @@ tutorials = [
"pooch",
"pynndescent",
"igraph",
"scikit-misc",
"scrublet",
"scib-metrics",
"scvi-tools[optional]",
Expand Down
4 changes: 3 additions & 1 deletion src/scvi/data/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,12 @@ def _get_adata_minify_type(adata: AnnData) -> MinifiedDataType | None:
return adata.uns.get(_constants._ADATA_MINIFY_TYPE_UNS_KEY, None)


def _is_minified(adata: AnnData | str) -> bool:
def _is_minified(adata: AnnOrMuData | str) -> bool:
uns_key = _constants._ADATA_MINIFY_TYPE_UNS_KEY
if isinstance(adata, AnnData):
return adata.uns.get(uns_key, None) is not None
elif isinstance(adata, MuData):
return adata.uns.get(uns_key, None) is not None
elif isinstance(adata, str):
with h5py.File(adata) as fp:
return uns_key in read_elem(fp["uns"]).keys()
Expand Down
Loading
Loading