Question: I am using loupeR to convert a merged Seurat Object with multiple datasets into a .cloupe file. I am getting the error: It looks like the
formatting of your clusters does not match the required formatting for LoupeR.
For further information, please see the documentation: 10xgen.com/louper
cluster must have the same length as the number of barcodes.
What does this error mean and how can I solve it?
Answer: This error message indicates that there is a discrepancy in the number of cell barcodes with counts and the number of cell barcodes with cluster assignments within the provided Seurat Object. This error can occur with merged (multiple datasets) or non-merged (single dataset) objects.
As of Seurat v5, merged objects store counts in different 'layers' within the Seurat Object. To solve this issue so that loupeR can recognize the counts within these layers, one needs to merge the layers in the Seurat Object. For example, using the following command in Seurat:
combined.obj <- JoinLayers(combined.obj, assay = "RNA")
If working with a non-merged object, this suggests that some cell barcodes do not have cluster assignments or count information. Each cell barcode requires count information, cluster assignments, and projection information. Double check that the numbers of cell barcodes, cluster assignments, and projections in the dataset all match.
More information on the loupeR tool can be found here: https://github.com/10XGenomics/loupeR. For more in depth documentation and support please head to our support page or send an email to support@10xgenomics.com.
LoupeR is an R package designed to empower community tool users and developers to incorporate Loupe Browser for data exploration and collaboration. The documentation and code provided here is for instructional purposes only. 10x Genomics does not support Seurat or data wrangling (formatting data).