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

Why isn't it possible to run solo when there are categorical_covariate_keys? #3160

Open
alexlenail opened this issue Jan 22, 2025 · 1 comment

Comments

@alexlenail
Copy link

I have a large experiment in which multiple mice were each separately sequenced in multiple 10X channels. So each mouse has multiple channels. I created by model with:

scvi.model.SCVI.setup_anndata(
    adata,
    batch_key='channel',
    categorical_covariate_keys=["Mouse"],
)

And now I want to remove doublets, but just found out

ValueError: Initializing a SOLO model from SCVI with registered categorical covariates is currently unsupported.

Should I leave out the "Mouse" covariate? I don't understand what I'm supposed to do here.

@ori-kron-wis
Copy link
Collaborator

ori-kron-wis commented Feb 4, 2025

Hey,

Sorry for late response.
Yes, leave out the mouse covariate. Our SOLO model does not support this option now.

When performing batch integration, both the channel ID and the donor ID (or any other relevant source of variation) should ideally be considered as part of the batch correction process, depending on your analysis needs.
For that manner, you can generate a new column in your concatenated adata as the batch key which is a concatenation between "channel" and "Mouse" and use that in the SCVI setup anndata to be later used in SOLO.
e.g:
'donor_1_channel1'
'donor_1_channel2'
'donor_2_channel1'
etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants