scArches with multiple covariates

Hi,

I want to use scArches to query disease samples to a normal reference. My data comes from a range of studies, using different single cell technologies, each including different patient samples.

My reference model looks like this:

scvi.model.SCVI.setup_anndata(
adata_ref,
layer=“counts”,
batch_key=“sample”,
categorical_covariate_keys=[“study”],
)

But when I add the query data I get an error:

vae_q = scvi.model.SCVI.load_query_data(
adata_query,
dir_path,
)
scArches currently does not support models with extra categorical covariates.

Does this mean I can’t have multiple covariates? Is there any workaround for this?

Many thanks,
Jess

Hi, thank you for your question. Yes, it looks like scArches currently does not support categorical covariates. A possible way around this would be to concatenate your "sample" and "study" columns into a single obs and then use that as the batch key. I’m not sure if there are plans to support extra categorical covariates for scArches in the future.

Thanks for your help

I think this feature would definitely be useful, for future versions of scArches :slight_smile:

Thanks for the feedback! We’ll see if we can update scarches with this feature.