scverse / mudata

Multimodal Data (.h5mu) implementation for Python
https://mudata.rtfd.io
BSD 3-Clause "New" or "Revised" License
78 stars 17 forks source link

Unification of `mudata.read` and `anndata.read` #76

Open MUCDK opened 3 months ago

MUCDK commented 3 months ago

First, I think documentation could be improved for such a basic function, second, I think it should take similar arguments to anndata.read.

gtca commented 3 months ago

Thanks, @MUCDK!

Which other arguments from anndata.read would you like to see here? Is it about propagating arguments like as_sparse, as_sparse_fmt, and chunk_size to the readers of individual modalities?

selmanozleyen commented 2 months ago

@gtca I'd imagine adding the backup_url to be very useful. We currently are planning to use scanpy.readwrite._check_datafile_present_and_download to download MuData objects and read them but I think it makes more sense for this project to use the private functions of scanpy to load the MuData object.

gtca commented 2 months ago

I don't think we should make MuData depend on scanpy though. If we reuse scanpy.readwrite._check_datafile_present_and_download, would it make sense to have it in muon.read() instead?

selmanozleyen commented 2 months ago

I don't think it matters which function we use as long as backup_url functionality is there and similar to scanpy in muon.read(). I didn't know muon didn't depend on scanpy so a re-implementation would make sense I guess. From what I saw it was a quite robust implementation