Closed bio-la closed 11 months ago
Hey @bio-la, thanks for the detailed report, I think the issue is just with anndata
v0.8 breaking forward compatibility, i.e. AnnData files from versions >=0.8 cannot be read with packages that were targeting earlier versions of files.
This is of course something we're implementing next for MuDataMAE/MuDataSeurat packages but I don't have a solid timeline to share yet...
thanks for answering this! do you mean that mudataSeurat was built expecting objects created with anndata <0.8, and which version of muon/mudata ?
in the meantime do you think I should be able to create a version of the mudata by downgrading muon ? (I'm currently running latest muon )
thanks!
f
Sorry for being unclear. That should be a better way to phrase it: MuDataSeurat was built before AnnData v0.8 spec and hasn't been updated to handle new versions of AnnData files yet.
Basically, it is the same issue as using anndata
<0.8 in Python to read new files (https://github.com/scverse/anndata/issues/698, https://github.com/scverse/anndata/issues/739).
I believe using mudata
<0.2.0 (e.g. 0.1.2) together with anndata <0.8.0 (e.g. 0.7.8) should help with that!
muon
relies on mudata
for serialisation so its version shouldn't be of a problem here.
Hey @bio-la, I added new categorical values handling in the latest commits so you might be able to read files written by the latest anndata
/mudata
. This is not fully compliant with the rest of the new encoding spec but relying on rhdf5
to figure out all the other types seems to do the trick so far for the files I've tested it on.
I.e. this is a small fix to remedy the current issue but also the first step in the direction of this library becoming v0.8-compliant. 😃
tea <- ReadH5MU("muon-tutorials/data/teaseq/pbmc_w3_teaseq.h5mu")
tea
# An object of class Seurat
# 113187 features across 5805 samples within 3 assays
# Active assay: rna (16381 features, 2910 variable features)
# 2 other assays present: atac, prot
# 10 dimensional reductions calculated: MOFA, MOFA_UMAP, UMAP, WNN_UMAP, rnaPCA, rnaUMAP, atacPCA, atacUMAP, protPCA, protUMAP
You can also note that it respects mod-order
attribute now and keeps the rna
as the default assay.
Hi @gtca !
I was encountering the above issue as well. I installed the latest development version of MuDataSeurat and am now experiencing the following error:
library(MuDataSeurat)
## VIASH START
par <- list(
input = "resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_mms.h5mu",
output = "output.rds"
)
## VIASH END
obj <- ReadH5MU(par$input)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': attempt to apply non-function
In addition: Warning messages:
1: In missing_on_read("/var", paste0("global variables metadata (", :
Missing on read: /var. Seurat does not support global variables metadata (genome, feature_types, gene_symbol).
2: In missing_on_read(paste0("some of mod/", modalityname, "/layers"), :
Missing on read: some of mod/rna/layers. Seurat does not support custom layers, unless labeled 'counts'.
Files which trigger this error:
Hi @gtca, I am still observing the issue @rcannood described. I was wondering if there were any updates regarding supporting objects created with anndata > 0.8? Thanks!
Thanks a lot, @ilia-kats 🙇
I'm experiencing the same issue with anndata v0.10.7
Error in column[["categories"]]$read() : attempt to apply non-function
Hello, thanks for working on interoperability between seurat and mudata!
I can't read a mudata that I created following your multimodal tutorial using ReadH5MU
I have no problems loading the object with muon in python
I can explore the h5 but it breaks where the error says. it also seems to expect some attributes that I don't have in the mudata
any suggestions?
thanks!