Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ install_requires =
scvi-tools>=0.15.3
torch>=1.9.0
pymc3>=3.8<3.10
jax>=0.3,<=0.3.6
jaxlib>=0.1.65,<=0.3.5
arviz==0.10.0
numpy
pandas
Expand Down
4 changes: 4 additions & 0 deletions tests/test_cell2location.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def test_cell2location():
sc_model.train(max_epochs=1, batch_size=1000)
# export the estimated cell abundance (summary of the posterior distribution)
dataset = sc_model.export_posterior(dataset, sample_kwargs={"num_samples": 10})
# test exclusion of observed variables from posterior sampling
assert "data_target" not in dataset.uns["mod"]["post_sample_means"].keys()
# test plot_QC
sc_model.plot_QC()
# test save/load
Expand All @@ -47,6 +49,8 @@ def test_cell2location():
# export the estimated cell abundance (summary of the posterior distribution)
# full data
dataset = st_model.export_posterior(dataset, sample_kwargs={"num_samples": 10, "batch_size": st_model.adata.n_obs})
# test exclusion of observed variables from posterior sampling
assert "data_target" not in dataset.uns["mod"]["post_sample_means"].keys()
## minibatches of locations ##
Cell2location.setup_anndata(dataset, batch_key="batch")
st_model = Cell2location(dataset, cell_state_df=inf_aver, N_cells_per_location=30, detection_alpha=200)
Expand Down