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

SCANVI bug fixes #1458

Merged
merged 5 commits into from
Mar 24, 2022
Merged

SCANVI bug fixes #1458

merged 5 commits into from
Mar 24, 2022

Conversation

justjhong
Copy link
Contributor

Fixes #1449
Fixes #1450

@codecov
Copy link

codecov bot commented Mar 23, 2022

Codecov Report

Merging #1458 (f7b6629) into master (4c4bd29) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1458      +/-   ##
==========================================
+ Coverage   90.97%   91.04%   +0.06%     
==========================================
  Files         111      111              
  Lines        8743     8762      +19     
==========================================
+ Hits         7954     7977      +23     
+ Misses        789      785       -4     
Impacted Files Coverage Δ
scvi/data/fields/_scanvi.py 100.00% <100.00%> (+3.12%) ⬆️
scvi/model/_scanvi.py 93.79% <100.00%> (+0.19%) ⬆️
scvi/model/base/_archesmixin.py 90.76% <100.00%> (+0.21%) ⬆️
scvi/module/_scanvae.py 80.50% <100.00%> (+1.80%) ⬆️
scvi/module/_vae.py 93.99% <100.00%> (+0.85%) ⬆️
scvi/data/_utils.py 86.27% <0.00%> (+0.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c4bd29...f7b6629. Read the comment docs.

"Unknown",
batch_key="batch",
categorical_covariate_keys=["cat1", "cat2"],
continuous_covariate_keys=["cont1", "cont2"],
Copy link
Member

Choose a reason for hiding this comment

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

arches won't actually work as intended with extra categorical covariates. We should not test extra categorical covariates and instead add an error message in load_query_data if they are detected. Extra continuous are fine.

Comment on lines +84 to +99
if (
allow_missing_labels
and self.attr_key is not None
and self.attr_key not in adata_target.obs
):
# Fill in original .obs attribute with unlabeled_category values.
warnings.warn(
f"Missing labels key {self.attr_key}. Filling in with unlabeled category {self._unlabeled_category}."
)
_set_data_in_registry(
adata_target,
self._unlabeled_category,
self.attr_name,
self._original_attr_key,
)

Copy link
Member

Choose a reason for hiding this comment

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

nice

@adamgayoso adamgayoso merged commit 8d02fb1 into master Mar 24, 2022
@adamgayoso adamgayoso deleted the jhong/scanvifixes branch March 24, 2022 15:28
meeseeksmachine pushed a commit to meeseeksmachine/scvi-tools that referenced this pull request Mar 24, 2022
adamgayoso pushed a commit that referenced this pull request Mar 24, 2022
nrclaudio pushed a commit to nrclaudio/scvi-tools-tune that referenced this pull request Jun 21, 2022
* address issue 1449

* fix scanvi covariate handling

* fix tests

* raise error on extra cat covs

* release note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants