Teichlab / bbknn

Batch balanced KNN
MIT License
149 stars 25 forks source link

An error when running bbknn$bbknn(adata,batch_key=0) #34

Open Zhaohui-Ruan opened 3 years ago

Zhaohui-Ruan commented 3 years ago

Hi @Teichlab,

I want to use bbknn in R. But an error come out as follow: `

bbknn = import(module = 'bbknn') sc = import("scanpy",convert=FALSE) np = import("numpy") scipy = import("scipy") b <- brca[[1]] pca.input <- b@reductions$pca@cell.embeddings batches <- b@meta.data$sample adata <- anndata$AnnData(X = pca.input, obs = batches) sc$tl$pca(adata) None adata$obsm$X_pca <- r_to_py(pca.input) bbknn$bbknn(adata, batch_key = 0)

caught illegal operation address 0x2b6db2dc781d, cause 'illegal operand'

Traceback: 1: py_call_impl(callable, dots$args, dots$keywords) 2: bbknn$bbknn(adata, batch_key = 0)

Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection:

` Could you please help me figure out this problem?

Thanks a lot

Best

Zhaohui Ruan