Closed alexvpickering closed 10 months ago
There's an issue with seurat objects downloaded from Cellenics, using the "download rds" button in the Data Management module.
Louvain slot was duplicated, and the values taken as louvain were actually the doublet predictions.
These objects use the cellset key to add the clustering information, which for clusters is "louvain".
In the dataset in question, "louvain" was not the first column in the metadata table, which duplicates the name.
Original:
Re-uploaded:
I tested two other datasets, with and without sample level metadata, but the issue does not reproduce, so it might be a particularly bad dataset.
Thanks for the report @gerbeldo! It should be fixed now. The issue was the following:
active.ident
(just the project name) or seurat_clusters
which are the first choice this PR uses for the default clustersdoublet_class
which was being given the key louvain
(we need this key to exist)louvain
that was being assigned the same key causing the issueThere is now an explicit check to make sure that the louvain
key isn't used if there is a column with the same name
Background
Currently Seurat object upload uses
scdata$seurat_clusters
as the louvain clusters. It is common to have multiple clusterings of a dataset (e.g. from different resolutions, grouping multiple clusters into a single cluster, etc). These additional clusterings of a Seurat object are not currently available to the user without manually overwritingseurat_clusters
and uploading as a separate project. The goal of this ticket is to automatically detect these clusterings and make them available to the user.Approach
Discover cluster columns by exclusion (may need to adjust):
samples
column and any columns that are consistent with division ofsamples
into groups (auto-detected currently as sample-level metadata columns for between-group comparisons)