KChen-lab / METAFlux

Other
38 stars 6 forks source link

Not able to calculate mean_exp #1

Open GabyBG opened 1 year ago

GabyBG commented 1 year ago

Hello,

I am trying to test your tool in my scRNA-seq data. I had a h5ad object, that I converted to Seurat but when I try to run:

mean_exp=calculate_avg_exp(myseurat = seu_sub,myident = 'Response', n_bootstrap=100,seed=1)

I get the following error

Error in if (any(data.use == Inf)) {: missing value where TRUE/FALSE needed
Traceback:

1. calculate_avg_exp(myseurat = seu_sub, myident = "Ongoing_response", 
 .     n_bootstrap = 1, seed = 1)
2. lapply(1:n_bootstrap, get_ave_exp, myseurat, samples, myident)
3. FUN(X[[i]], ...)
4. AverageExpression(SeuratObject, group.by = myident, return.seurat = T)
5. PseudobulkExpression(object = object, pb.method = "average", 
 .     assays = assays, features = features, return.seurat = return.seurat, 
 .     group.by = group.by, add.ident = add.ident, slot = slot, 
 .     verbose = verbose, ...)

I am using R 4.3.0 Seurat ‘4.3.0.1’ Seurat object 4.1

Thank you for your guidance

qaz-94 commented 1 year ago

Hi Thank you for testing out our tool. Could you please share the rds file so that we can take a look at it?