scrublet icon indicating copy to clipboard operation
scrublet copied to clipboard

import error: file_hash from pooch.util

Open JustinYeon opened this issue 3 years ago • 0 comments

Hello everyone. I always thanks to this marvelous module! Recently I got some unseen error. I tried

import scrublet as scr
scrub = scr.Scrublet(adata.raw.X)
adata.obs['doublet_scores'], adata.obs['predicted_doublets'] = scrub.scrub_doublets()

it ends with

importError                               Traceback (most recent call last)
/tmp/ipykernel_1262628/1676924152.py in <module>
      1 import scrublet as scr
      2 scrub = scr.Scrublet(adata.raw.X)
----> 3 adata.obs['doublet_scores'], adata.obs['predicted_doublets'] = scrub.scrub_doublets()
      4 scrub.plot_histogram()
      5 

~/miniconda3/lib/python3.9/site-packages/scrublet/scrublet.py in scrub_doublets(self, synthetic_doublet_umi_subsampling, use_approx_neighbors, distance_metric, get_doublet_neighbor_parents, min_counts, min_cells, min_gene_variability_pctl, log_transform, mean_center, normalize_variance, n_prin_comps, svd_solver, verbose)
    248             get_doublet_neighbor_parents=get_doublet_neighbor_parents
    249             )
--> 250         self.call_doublets(verbose=verbose)
    251 
    252         t1=time.time()

~/miniconda3/lib/python3.9/site-packages/scrublet/scrublet.py in call_doublets(self, threshold, verbose)
    444             # automatic threshold detection
    445             # http://scikit-image.org/docs/dev/api/skimage.filters.html
--> 446             from skimage.filters import threshold_minimum
    447             try:
    448                 threshold = threshold_minimum(self.doublet_scores_sim_)

~/miniconda3/lib/python3.9/site-packages/skimage/__init__.py in <module>
    133                              img_as_bool,
    134                              dtype_limits)
--> 135     from .data import data_dir
    136     from .util.lookfor import lookfor
    137 

~/miniconda3/lib/python3.9/site-packages/skimage/data/__init__.py in <module>
     62 
     63 try:
---> 64     from pooch.utils import file_hash
     65 except ModuleNotFoundError:
     66     # Function taken from

ImportError: cannot import name 'file_hash' from 'pooch.utils' (/home/rndlab/miniconda3/lib/python3.9/site-packages/pooch/utils.py)

It seems like related to pooch recently updated version(v1.5.0 Aug 23) After I downgraded pooch to v1.4.0, it disappeared Can you check for this error? Thanks a lot

JustinYeon avatar Aug 24 '21 07:08 JustinYeon