Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different features in new layer data than already exists for counts #173

Open
vertesy opened this issue Dec 17, 2023 · 0 comments
Open

Different features in new layer data than already exists for counts #173

vertesy opened this issue Dec 17, 2023 · 0 comments

Comments

@vertesy
Copy link

vertesy commented Dec 17, 2023

Hello,

This is a 2-in-1 issue (A, B).

I am trying to rename genes in Seurat. I know you principally disagree, however I need it.

For that end, I:

obj <- SetAssayData(obj, layer = layer.name, new.data = matrix_n) where matrix_n contains e.g. a single gene renamed.

Also tried SeuratObject::LayerData(assayobj, layer = layer.name) <- matrix_n , but same error

Expected

Matrix replaced.

Observed

  1. Warning
Warning: Different features in new layer data than already exists for counts
  1. Really scary behavior: it omits the gene renamed! so nrow becomes n-1!
    (A) At least this should be a "nrow !=" type of error! )

B) Question

  1. How can I rename genes in freshly created object in Seurat v5?
  2. I realized that names are also stored in obj@assays$RNA@features@.Data. Is there any other place that needs replacement? I guess if I replace rownames of @features@.Data, SetAssayData wont complain?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant