Skip to content

How can I use cell2location output for downstream analysis in R Studio #369

@532at

Description

@532at

Please use the template below to post a question to https://discourse.scverse.org/c/ecosytem/cell2location/.

Problem

Hi, since I was working with R Studio before doing cell2location deconvolution, I was wondering if it is possible to do cell2location deconvolution and use its output for further analysis in R Studio. If yes, how to do it?

I was looking for a file I could use after running the tutorial, but I cannot see anything useful for annotating cell type proportions to Visium spots. Specifically, I looked at the three folders: cell_type_fractions_mean; factor_markers and location_factor_mean, but they seem wrong as there are 11 factors and in the tutorial data is much more cell types?

Running the tutorial, I experienced an error (below), could it be a reason behind it? As I don't see any quantile cell abundance files?

TypeError Traceback (most recent call last)
Cell In[30], line 1
----> 1 adata_ref = mod.export_posterior(
2 adata_ref, use_quantiles=True,
3
4 add_to_obsm=["q05","q50", "q95", "q0001"],
5 sample_kwargs={'batch_size': 2500, 'use_gpu': False}
6 )

TypeError: export_posterior() got an unexpected keyword argument 'add_to_obsm'

Best wishes,
Adrian

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions