STOmics / SAW

GNU General Public License v3.0
132 stars 34 forks source link

Error running spatialCluster: no locator available for file #60

Closed ChangqingW closed 1 year ago

ChangqingW commented 1 year ago

While running spatialCluster with

spatialCluster -i ./05.tissuecut/D01654B1.tissue.gef -o ./06.spatialcluster/D01654B1.spatial.cluster.h5ad -s 50

I got the following error:

Matplotlib created a temporary config/cache directory at /tmp/matplotlib-ap20j_9m because the default path (/home/users/allstaff/wang.ch/.cache/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
/usr/local/python3/lib/python3.8/site-packages/geopandas/_compat.py:111: UserWarning: The Shapely GEOS version (3.11.1-CAPI-1.17.1) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.
  warnings.warn(
Traceback (most recent call last):
  File "./spatial_cluster.py", line 22, in <module>
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/__init__.py", line 6, in <module>
    from . import io
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/io/__init__.py", line 9, in <module>
    from .reader import read_gef, read_gem, read_ann_h5ad, read_stereo_h5ad, anndata_to_stereo, stereo_to_anndata, read_gef_info, read_seurat_h5ad
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/io/reader.py", line 26, in <module>
    from stereo.io import h5ad
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/io/h5ad.py", line 24, in <module>
    from stereo.core.gene import Gene
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/core/__init__.py", line 10, in <module>
    from .st_pipeline import StPipeline
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/core/st_pipeline.py", line 29, in <module>
    from ..algorithm.algorithm_base import AlgorithmBase
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/algorithm/__init__.py", line 1, in <module>
    from .cell_cell_communication import PlotCellCellCommunication
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/algorithm/cell_cell_communication/__init__.py", line 2, in <module>
    from .plot_ccc import PlotCellCellCommunication
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/algorithm/cell_cell_communication/plot_ccc.py", line 14, in <module>
    from stereo.plots.plot_base import PlotBase
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/plots/__init__.py", line 15, in <module>
    from .interact_plot.interactive_scatter import InteractiveScatter
  File "/usr/local/python3/lib/python3.8/site-packages/stereo/plots/interact_plot/interactive_scatter.py", line 19, in <module>
    import holoviews.operation.datashader as hd
  File "/usr/local/python3/lib/python3.8/site-packages/holoviews/operation/datashader.py", line 12, in <module>
    import datashader as ds
  File "/usr/local/python3/lib/python3.8/site-packages/datashader/__init__.py", line 8, in <module>
    from .core import Canvas                                 # noqa (API import)
  File "/usr/local/python3/lib/python3.8/site-packages/datashader/core.py", line 20, in <module>
    from . import reductions as rd
  File "/usr/local/python3/lib/python3.8/site-packages/datashader/reductions.py", line 13, in <module>
    from datashader.transfer_functions._cuda_utils import (cuda_atomic_nanmin,
  File "/usr/local/python3/lib/python3.8/site-packages/datashader/transfer_functions/__init__.py", line 19, in <module>
    from datashader.composite import composite_op_lookup, over, validate_operator
  File "/usr/local/python3/lib/python3.8/site-packages/datashader/composite.py", line 30, in <module>
    def extract_scaled(x):
  File "/usr/local/python3/lib/python3.8/site-packages/numba/core/decorators.py", line 212, in wrapper
    disp.enable_caching()
  File "/usr/local/python3/lib/python3.8/site-packages/numba/core/dispatcher.py", line 863, in enable_caching
    self._cache = FunctionCache(self.py_func)
  File "/usr/local/python3/lib/python3.8/site-packages/numba/core/caching.py", line 601, in __init__
    self._impl = self._impl_class(py_func)
  File "/usr/local/python3/lib/python3.8/site-packages/numba/core/caching.py", line 337, in __init__
    raise RuntimeError("cannot cache function %r: no locator available "
RuntimeError: cannot cache function 'extract_scaled': no locator available for file '/usr/local/python3/lib/python3.8/site-packages/datashader/composite.py'

The singularity image was obtained with singularity build SAW_6.1.0.sif docker://stomics/saw:06.1.0

ChangqingW commented 1 year ago

Could this be because the pycache folders in the docker image are not user-writable? I got around this with export NUMBA_CACHE_DIR='/tmp'