10XGenomics / loupeR

Convert Seurat objects to 10x Genomics Loupe files.
https://10xgen.com/louper
Other
92 stars 14 forks source link

all feature ids should be unique #63

Closed fgv2104 closed 2 weeks ago

fgv2104 commented 2 weeks ago

Hello,

I am trying to create a cloupe file from seurat using the create_loupe_from_seurat function. I am importing feature ids using read_feature_ids_from_tsv. However, for some genes I do not have an associated ensembl id, so I had NA for those. However, I get the error "all feature ids should be unique". Is there a way to get around this and pass the available ensembl ids as feature ids?

Here is the code with output:

>feature_ids_test <- read_feature_ids_from_tsv(feature_ids_tsv_path)
> create_loupe_from_seurat(seurat_obj, feature_ids = feature_ids_test, output_name = "testing_labels")
2024/09/04 00:04:19 extracting matrix, clusters, and projections
2024/09/04 00:04:27 selected assay: RNA
2024/09/04 00:04:27 selected clusters: active_cluster sample batch leiden_0.01 leiden_0.025 leiden_0.05 leiden_0.1 leiden_0.15 leiden_0.2 leiden_0.4
2024/09/04 00:04:27 selected projections: umap
2024/09/04 00:04:27 validating count matrix
Error in create_loupe(counts, clusters = clusters, projections = projections,  : 

It looks like the formatting of your count matrix does not match the required formatting for LoupeR. For further information, please see the documentation: 10xgen.com/louper

all feature ids should be unique

Thank you,

Florencia

esiegel commented 2 weeks ago

Instead of N/A can you just reuse the feature name and ensure that the values are the same? I don't believe we validate that the ensemble I'd is correct. It might lead to weird behavior for those genes with incorrect ensemble ids

fgv2104 commented 2 weeks ago

That worked fine, thank you!