Converting hdf5 file to loom file
2
0
Entering edit mode
2.9 years ago

Hello, I am currently processing the single cell data. I have hdf5 file, however, I want the loom file for downstream analysis. Can anyone please suggest if there is a way to convert hdf5 to loom file format? Any help is highly appreciated. Thanks in advance.

single-cell python scvelo RNA • 1.8k views
ADD COMMENT
1
Entering edit mode
7 months ago
bk11 ★ 2.4k

You can use Seurat and LoomExperiment or sceasy to convert hdf5 file into loom file.

library(Seurat)
library(sceasy)
library(reticulate)
library(LoomExperiment)

#Creating Seurat object
data <- Read10X_h5("filtered_feature_bc_matrix.h5") 
data <- CreateSeuratObject(counts=data, project="test_project") 

#Converting into SingleCellExperiment object
data.sce <- as.SingleCellExperiment(data)

#Converting SCE object into loom
data.loom <- SingleCellLoomExperiment(data.sce)

OR
sceasy::convertFormat(data.sce, from="sce", to="loom",
                       outFile='data.loom')
ADD COMMENT
0
Entering edit mode

Thanks so much for your reply! It works for me

ADD REPLY
0
Entering edit mode
7 months ago
AndyLiang • 0

Hi,

Have you find a way to convert hdf5 file to loom file? Many thanks in advance!

Best, Mingxuan

ADD COMMENT

Login before adding your answer.

Traffic: 2616 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6