-
Notifications
You must be signed in to change notification settings - Fork 41
Description
3-Assembling-HEST-Data.ipynb
st.save(path='processed')
Couldn't import pyvips, verify that libvips is installed on your system
UnboundLocalError Traceback (most recent call last)
Cell In[7], line 1
----> 1 st.save(path='processed')
File ~/HEST/src/hest/HESTData.py:196, in HESTData.save(self, path, save_img, pyramidal, bigtiff, plot_pxl_size, **kwargs)
192 self.save_tissue_vis(path, 'tissue_seg')
195 if save_img:
--> 196 tiff_save(img, os.path.join(path, ALIGNED_HE_FILENAME), self.pixel_size, pyramidal=pyramidal, bigtiff=bigtiff)
File ~/HEST/src/hest/utils.py:879, in tiff_save(img, save_path, pixel_size, pyramidal, bigtiff)
877 print("Couldn't import pyvips, verify that libvips is installed on your system")
878 print('saving to pyramidal tiff... can be slow')
--> 879 pyvips_img = pyvips.Image.new_from_array(img)
881 # save in the generic tiff format readable by both openslide and QuPath
882 # Note: had to change the compression from 'deflate' to 'lzw' because of a reading incompatibility with CuImage/OpenSlide
883 # when upgrading to vips 8.13 (necessary for Valis)
884 pyvips_img.tiffsave(
885 save_path,
886 bigtiff=bigtiff,
(...)
893 xres=1. / (pixel_size * 1e-4),
894 yres=1. / (pixel_size * 1e-4))
Name: pyvips
Version: 2.2.3
Summary: binding for the libvips image processing library, API mode
Home-page: https://github.com/libvips/pyvips
Author: John Cupitt
Author-email: jcupitt@gmail.com
License: MIT
Location: /home/hsshin/miniconda3/envs/hest/lib/python3.9/site-packages
Requires: cffi, pkgconfig
Required-by: hest
vips-8.9.1-Sun Feb 23 08:51:26 UTC 2020
from hest import VisiumReader
fullres_img_path = '/home/hsshin/Downloads/GSM7697868_GEX_C73_A1_Merged.tiff'
bc_matrix_path = '/home/hsshin/Downloads/GSM7697868_C73A1_raw_feature_bc_matrix.h5'
st = VisiumReader().read(
fullres_img_path, # path to a full res image
bc_matrix_path, # path to filtered_feature_bc_matrix.h5
save_autoalign=True # pass this argument to visualize the fiducial autodetection
)
alignment file is None
/home/hsshin/miniconda3/envs/hest/lib/python3.9/site-packages/anndata/_core/anndata.py:1756: UserWarning: Variable names are not unique. To make them unique, call .var_names_make_unique.
utils.warn_names_duplicates("var")
/home/hsshin/miniconda3/envs/hest/lib/python3.9/site-packages/anndata/_core/anndata.py:1756: UserWarning: Variable names are not unique. To make them unique, call .var_names_make_unique.
utils.warn_names_duplicates("var")
AnnData object with n_obs × n_vars = 4992 × 36601
var: 'gene_ids', 'feature_types', 'genome'
trim the barcodes
no tissue_positions_list.csv/tissue_positions.csv or alignment file found
attempt fiducial auto alignment...
/home/hsshin/miniconda3/envs/hest/lib/python3.9/site-packages/torch/cuda/init.py:129: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
0: 640x640 1 filled_hexagon, 1 open_hexagon, 1 hourglass, 1 triangle, 63.1ms
Speed: 2.8ms preprocess, 63.1ms inference, 0.8ms postprocess per image at shape (1, 3, 640, 640)
/home/hsshin/HEST/src/hest/autoalign.py:126: UserWarning: Setting the 'color' property will override the edgecolor or facecolor properties.
circles2 = [plt.Circle(aligned_fiducials[i] * factor, radius=s_fid, color='r', facecolor='none', linewidth=0.3) for i in range(len(aligned_fiducials))]
cuInit Failed, error CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE
cuFile initialization failed
