-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Hi (again) Stefano,
I am running into an issue with sccomp version 2.0.0.
I have a dataset with a certain number of patients, sampled at two timepoints. Each patient is either a responder or a non-responder to our treatment of interest. For each sample, cells are grouped into clusters (RNA_snn_res.0.5).
I used to be able to test whether there were some longitudinal changes associated with treatment response with this code:
metadata %>%
sccomp_glm(
formula_composition = ~Timepoint*Reponse+Patient_ID,
.sample = Sample,
.cell_group = RNA_snn_res.0.5,
bimodal_mean_variability_association = TRUE,
cores = 1
)
Since upgrading to v 2.0.0, I have been trying this code:
metadata %>%
sccomp_estimate(
formula_composition = ~Timepoint*Response+Patient_ID,
sample = "Sample",
cell_group = "RNA_snn_res.0.5",
bimodal_mean_variability_association = TRUE,
cores = 1,
verbose = TRUE
) %>%
sccomp_test()
but I get this error:
Error in check_sample_consistency_of_factors(.data, formula_composition, :
sccomp says: your "Timepoint, Response_binary, Patient_ID" factor(s) is(are) mismatched across samples. For example, sample_bar having more than one value for factor_foo. For sample_bar you should have one value for factor_foo. consistent across groups (e.g. cell types).
All my columns are characters. There are indeed counts for each combination of Timepoint and Patient, but of course Patients can only ever be Responders or Non Responders.
What am I missing?
Thanks so much!!
Ciao
Liliana