Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object of type 'S4' is not subsettable in write_h5_scJoint #9

Open
yanhaidong1 opened this issue Jul 24, 2022 · 0 comments
Open

object of type 'S4' is not subsettable in write_h5_scJoint #9

yanhaidong1 opened this issue Jul 24, 2022 · 0 comments

Comments

@yanhaidong1
Copy link

yanhaidong1 commented Jul 24, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant