Hi! I have been trying to convert my Seurat object to a loom file using the "Convert" function in the new seurat release. However, I have been receiving this error every time I try to run the function:
Convert(from=seurat_merge.align,` to = "loom", filename = "fgf-align.loom")
Error in create(filename = filename, data = [email protected][, cell.order], :
unused arguments (chunk.size = chunk.size, overwrite = overwrite)
Do you have any suggestions on how to get around this?
Try updating your version of loomR (and hdf5r). The development version of loomR has numerous improvements as well as some argument changes that the loom branch of Seurat utilizes. Installing the development version of loomR can be done with
devtools::install_github(repo = 'hhoeflin/hdf5r') # Update hdf5r for stability improvements
devtools::install_github(repo = 'mojaveazure/loomR', ref = 'develop') # Update loomR for up-to-date functions
It should work once everything is updated
> library(loomR)
Loading required package: R6
Loading required package: hdf5r
Loading required package: iterators
Loading required package: itertools
> library(Seurat)
Loading required package: ggplot2
Loading required package: cowplot
Attaching package: ‘cowplot’
The following object is masked from ‘package:ggplot2’:
ggsave
Loading required package: Matrix
Warning message:
replacing previous import ‘gridExtra::combine’ by ‘loomR::combine’ when loading ‘Seurat’
> data('pbmc_small')
> lfile = Convert(from = pbmc_small, to = 'loom', filename = 'small.loom')
Transposing input data: loom file will show input columns (cells) as rows and input rows (genes) as columns
This is to maintain compatibility with other loom tools
|======================================================================| 100%
Anybody know how to convert the loom file to Seurat object?
@Jun-NIBS Did you get loom to Seurat working? The convert documentation seems to support this conversion but I am having difficulty getting it to work.
Would like to convert available data from loom file to Seurat object. Any help would be greatly appreciated!
hdf5r is updated (hdf5r_1.0.1); loomR is updated (loomR_0.2.0). (see below for complex session info)
S_object <- Convert(lfile, to= "seurat")
Error in UseMethod(generic = "Convert", object = from) :
no applicable method for 'Convert' applied to an object of class "c('loom', 'H5File', 'H5RefClass', 'R6')"
sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.2
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] splines stats4 parallel stats graphics grDevices utils
[8] datasets methods base
other attached packages:
[1] loomR_0.2.0 itertools_0.1-3 iterators_1.0.10
[4] hdf5r_1.0.1 R6_2.3.0 monocle_2.10.0
[7] DDRTree_0.1.5 irlba_2.3.2 VGAM_1.0-6
[10] Biobase_2.42.0 BiocGenerics_0.28.0 bindrcpp_0.2.2
[13] Seurat_2.3.4 Matrix_1.2-15 cowplot_0.9.3
[16] ggplot2_3.1.0
+1 - just looked into the source code and there is no Convert.loom -- any plans to add it soon?
Hi
I have tried to convert my Seurat file into loom file, but getting an error?
What could be the issue? (See below). Thanks
I am using Seurat 3.1
file1<- readRDS(file = "C:/Users/Documents/file1_final.rds")
pfile <- Convert(from = file1, to = "loom", filename = "file1.loom",
display.progress = FALSE)
pfile
Error in Convert(from = spleen, to = "loom", filename = "spleen.loom", :
could not find function "Convert
```
>> library(Seurat)
>> library(loomR)
>> pfile <- Convert(from=est,to="loom",filename="est.loom")
Error in Convert(from = est, to = "loom", filename = "est.loom") :
could not find function "Convert"
>> packageVersion("loomR")
[1] ‘0.2.1.9000’
>> packageVersion("Seurat")
[1] ‘3.1.2.9010’
Where does this function Convert() come from?
Ok. So the Seurat V3 function is as.loom() https://github.com/satijalab/seurat/issues/2280#issuecomment-549351026.
Most helpful comment
Hi
I have tried to convert my Seurat file into loom file, but getting an error?
What could be the issue? (See below). Thanks
I am using Seurat 3.1
file1<- readRDS(file = "C:/Users/Documents/file1_final.rds")
file1.sce <- as.SingleCellExperiment(spleen)
head(file1)
pfile <- Convert(from = file1, to = "loom", filename = "file1.loom",
display.progress = FALSE)
pfile
Error in Convert(from = spleen, to = "loom", filename = "spleen.loom", :
could not find function "Convert
```