Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Minimal code sample (that we can run without your data, using public data)
I am following the tutorial and am the step: Estimate cell-type specific expression of every gene in the spatial data (needed for NCEM).
Running the below code fails
#Compute expected expression per cell type
expected_dict = mod.module.model.compute_expected_per_cell_type(mod.samples["post_sample_q05"], mod.adata_manager)
# Add to anndata layers
for i, n in enumerate(mod.factor_names_):
adata_vis.layers[n] = expected_dict['mu'][i]
# Save anndata object with results
adata_file = f"{run_name}/sp.h5ad"
adata_vis.write(adata_file)
adata_file
Here is the error obtained after running the above code. This is occurring with all my samples.
AttributeError Traceback (most recent call last)
Input In [28], in <cell line: 2>()
1 #Compute expected expression per cell type
----> 2 expected_dict = mod.module.model.compute_expected_per_cell_type(mod.samples["post_sample_q05"], mod.adata_manager)
4 # Add to anndata layers
5 for i, n in enumerate(mod.factor_names_):
AttributeError: 'Cell2location' object has no attribute 'samples'
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Minimal code sample (that we can run without your data, using public data)
I am following the tutorial and am the step: Estimate cell-type specific expression of every gene in the spatial data (needed for NCEM). Running the below code fails
Here is the error obtained after running the above code. This is occurring with all my samples.
Version cell2location 0.8a0