Closed likejie closed 3 years ago
Same here: Error in match.arg(from) : 'arg' should be one of “seurat”, “sce”, “loom”
It would be great to know if conversion from h5ad to seurat is possible.
Hi -- any updates to this?
Sorry for getting back to you late. The functionality was implemented but not enabled in convertFormat(). It was fixed in #10 . Please try again with the github version.
The error still seems to come up (in this case anndata -> sce):
> sce <- sceasy::convertFormat(sc_files[["LaManno2020"]],
outFile = gsub(".h5ad",".sce",sc_files[["LaManno2020"]]),
from="anndata", to="sce")
Error: Unsupported conversion from "anndata" to "sce"
# I have the most recent version
> devtools::install_github("cellgeni/sceasy")
Skipping install of 'sceasy' from a github remote, the SHA1 (5e059239) has not changed since last install.
Use `force = TRUE` to force installation
> packageVersion("sceasy")
[1] ‘0.0.6’
I would like to test anndata to seurat conversion by calling convertFormat function. But it turned out there is no "from anndata" option. Did i miss anything?
Thanks a lot!
convertFormat function (obj, from = c("seurat", "sce", "loom"), to = c("anndata", "loom", "sce"), outFile = NULL, main_layer = NULL, ...) { from <- match.arg(from) to <- match.arg(to) tryCatch({ func <- eval(parse(text = paste(from, to, sep = "2"))) }, error = function(e) { stop(paste0("Unsupported conversion from \"", from, "\" to \"", to, "\""), call. = FALSE) }, finally = { }) return(func(obj, outFile = outFile, main_layer = main_layer, ...)) }