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

no slot of name "meta.features" for this object of class "Assay5" #82

Open
Rohit-Satyam opened this issue Dec 21, 2023 · 1 comment
Open

Comments

@Rohit-Satyam
Copy link

Hi

I was trying to use sceasy to convert my Seurat object to anndata but I get this weird error no slot of name "meta.features" for this object of class "Assay5". For some unknown reason, meta.features is missing. I am using Seurat v5

c <- read.csv("/data/data/pf-ch10x-set4-ch10x-raw.csv", header = T, row.names = 1)
meta <- read.csv("/data/data/pf-ch10x-set4-ch10x-data.csv", header = T,row.names = 1)

## Normalising the reference data
mca <- CreateSeuratObject(counts = as.sparse(c), project = "MCA",meta.data=meta)

mca_subset<- mca[,mca$STAGE_HR %in% c("ring","trophozoite" ,"schizont")]
> sceasy::convertFormat(mca_subset, from="seurat", to="anndata",
+                       outFile='filename.h5ad')
Error in ncol(df) : 
  no slot of name "meta.features" for this object of class "Assay5"
In addition: Warning message:
In .regularise_df(obj@meta.data, drop_single_values = drop_single_values) :
  Dropping single category variables:orig.ident, HOST
@leezx
Copy link

leezx commented Apr 2, 2024

for seurat v5, run this code to downgrade the assay:
sobj[["RNA"]] <- as(sobj[["RNA"]], "Assay")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants