object of type 'S4' is not subsettable in write_h5_scJoint
Opened this issue · 0 comments
Hi,
I used the test rds data downloaded from the data_10x folder and tried to combine scATAC and scRNA data using the following scripts:
sce_10xPBMC_atac <- readRDS("/scratch/hy17471/software/scJoint/data_10x/sce_10xPBMC_atac.rds")
sce_10xPBMC_rna <- readRDS("/scratch/hy17471/software/scJoint/data_10x/sce_10xPBMC_rna.rds")
common_genes <- intersect(rownames(sce_10xPBMC_atac),
rownames(sce_10xPBMC_rna))
length(common_genes)
exprs_atac <- logcounts(sce_10xPBMC_atac[common_genes, ])
exprs_rna <- logcounts(sce_10xPBMC_rna[common_genes, ])
write_h5_scJoint(exprs_list = list(rna = exprs_rna,
atac = exprs_atac),
h5file_list = c(paste0(output_dir,'/exprs_10xPBMC_test_rna.h5'),
paste0(output_dir,'/exprs_10xPBMC_test_atac.h5')))
but it returns:
Error in .Primitive("[")(new("HDF5RealizationSink", dim = c(9841L, 15463L :
object of type 'S4' is not subsettable
Would you help to figure it out. Thanks
Best,
Haidong