brianhie / scanorama

Panoramic stitching of single cell data
http://scanorama.csail.mit.edu
MIT License
265 stars 49 forks source link

NameError: name 'exit' is not defined. when integrating #110

Closed brianpenghe closed 2 years ago

brianpenghe commented 2 years ago

I was trying to integrate two datasets but got this:

integrated, genes=scanorama.integrate(adatas,

                                     [adata.var_names.tolist(),adata.var_names.tolist()])

ERROR: Data sets must be numpy array or scipy.sparse.csr_matrix, received type <class 'list'>.

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
/tmp/ipykernel_30152/2077460397.py in <module>
----> 1 integrated, genes=scanorama.integrate(adatas,
      2                                      [adata.var_names.tolist(),adata.var_names.tolist()])

~/miniconda3/envs/flng/lib/python3.8/site-packages/scanorama/scanorama.py in integrate(datasets_full, genes_list, batch_size, verbose, ds_names, dimred, approx, sigma, alpha, knn, union, hvg, seed, sketch, sketch_method, sketch_max)
    166     random.seed(seed)
    167 
--> 168     datasets_full = check_datasets(datasets_full)
    169 
    170     datasets, genes = merge_datasets(datasets_full, genes_list,

~/miniconda3/envs/flng/lib/python3.8/site-packages/scanorama/scanorama.py in check_datasets(datasets_full)
    382                              'scipy.sparse.csr_matrix, received type '
    383                              '{}.\n'.format(type(ds)))
--> 384             exit(1)
    385     return datasets_new
    386 

NameError: name 'exit' is not defined

Any ideas?

brianpenghe commented 2 years ago

Never mind it's a silly mistake. I should use scanorama.integrate_scanpy instead. Thanks!