This is a test version of Biostars. For the public version, visit https://www.biostars.org.
OSCA -open .h5 file

Hello,

I am using OSCA for the first time to run the scRNA Analyis and all my data files are in the matrix.h5 file format.

I am not sure how to open the .h5 files. Please help.

I tried the following, by replacing the path to my .h5 file.

library(zellkonverter)
demo <- system.file("extdata", "krumsiek11.h5ad", package = "zellkonverter")
sce <- readH5AD(demo)
sce
osca

1 answer

You can read .h5 file in Seurat. You can try following-

library(Seurat)
library(SingleCellExperiment)

#Reading .h5 file
data <- Read10X_h5("filtered_feature_bc_matrix.h5")

#If you want SingleCellExperiment object do the following-
data.sce <- SingleCellExperiment(assays = list(counts = as.matrix(data)))

#For creating Seurat object, do the following
data.so <- CreateSeuratObject(counts=counts(data.sce), meta.data = as.data.frame(colData(data.sce)), project="title")

Log in to answer this question.