theislab / zellkonverter

Conversion between scRNA-seq objects
https://theislab.github.io/zellkonverter/
Other
144 stars 27 forks source link

Error in `SCE2AnnData()` if row/col data is empty #105

Open lazappi opened 8 months ago

lazappi commented 8 months ago

Conversion error if these slots are empty.

counts <- matrix(rpois(100 * 50, 4), nrow = 100, ncol = 50)

sce <- SingleCellExperiment::SingleCellExperiment(
    assays = list(counts = counts)
)

adata <- zellkonverter::SCE2AnnData(sce, X_name = "counts")
#> Error in py_call_impl(callable, call_args$unnamed, call_args$named) : 
#>  ValueError: Observations annot. `obs` must have as many rows as `X` has rows (50), but has 0 rows.