Open gerbeldo opened 10 months ago
Yes, this is because there was no "sample" or "samples" column. You can confirm by checking that these groupings cannot be used for between sample DE. Some suggestions for improvements from simple to hard:
grepl('patient|sample|donor|individual', colnames(scdata@metadata))
.
Background
For some Seurat objects, some categorical variables are detected as clustering variables, prefixing the name with the label "Cluster". For example, a Seurat object with the metadata variables "sample_name" and "patient" (which match the "group" variable heuristic, as in 1) all cells in a sample belong to at most one group of the patient variable, and 2) the cardinality of patient is less than or equal to the number of samples) returns this:
While it should return the same but without the "cluster" label.
Hypothesis
It could be related to
add_samples_col
function, and how it looks for a "sample" or "samples" variable and assumes a single sample if not, breaking the cardinality heuristic, and converting these "group" variables to "cluster" variables.goal