Skip to content

Commit 3565150

Browse files
authored
Merge pull request #48 from quadbio/fix/joint_pca
Fix hvg mask to joint_pca
2 parents 041ce94 + b98dd4a commit 3565150

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ and this project adheres to [Semantic Versioning][].
1010

1111
## [Unreleased]
1212

13+
## [v0.2.2]
14+
### Added
15+
- Enabled subsetting categories before mapping .obs values {pr}`46`
16+
17+
### Changed
18+
- Updated the README a bit {pr}`44`
19+
- Updated tutorials to work with new parameter names {pr}`43`
20+
21+
### Fices
22+
- Fixed a small bug where hvg masks would not be propagated correctly to joint pca computation {pr}`48`
23+
1324
## [v0.2.1]
1425
### Changed
1526
- Move some duplicated docstrings into a central _docs.py file {pr}`41`

src/cellmapper/model/embedding.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ def compute_joint_pca(self, n_comps: int | None = None, key_added: str = "X_pca"
3232
improved cross-dataset integration.
3333
"""
3434
# Concatenate with inner join on genes
35-
joint = ad.concat([self.reference, self.query], join="inner", label="batch", keys=["reference", "query"])
35+
joint = ad.concat(
36+
[self.reference, self.query], join="inner", label="batch", keys=["reference", "query"], merge="same"
37+
)
3638

3739
# Compute PCA using scanpy
3840
sc.pp.pca(joint, n_comps=n_comps, **kwargs)

0 commit comments

Comments
 (0)