theislab / scCODA

A Bayesian model for compositional single-cell data analysis
BSD 3-Clause "New" or "Revised" License
141 stars 23 forks source link

Covariate has non-unique values #89

Closed schroeme closed 4 months ago

schroeme commented 5 months ago

Good morning,

I'm getting the following error

Covariate sex has non-unique values! Skipping...

when I run

sccoda_model = pt.tl.Sccoda() sccoda_data = sccoda_model.load( adata_small, type="cell_level", generate_sample_level=True, cell_type_identifier="cell_type", sample_identifier="10x_batch", covariate_obs=["age","region","sex","replicate"], )

where sex has two values, male and female. I did not get this error when sex had 3 values, male, female, and mixed. Observation names are unique and the data type for sex is categorical. What might be causing this issue? Can a covariate not have only two possible values? Please let me know if you need more information.

johannesostner commented 4 months ago

Hi @schroeme! From your code snippet, it looks like you're using the implementation of scCODA in pertpy. The repository right here only contains an older implementation. Could you please open your issue in the pertpy repo? Thank you!

schroeme commented 4 months ago

Thanks, will do!