BGI-Qingdao / GEM3D_toolkit

A tool to use stereo-seq GEM and ssDNA to generate single-cell and 3D spatial resolved transtriptomics data
11 stars 1 forks source link

gemc_to_h5ad UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 #2

Open Melany-OY opened 3 months ago

Melany-OY commented 3 months ago

Hi, I came across a problem when I convert gemc to h5ad with mask file

My code is ./Python-3.8.18/bin/python ./GEM3D_toolkit-dev/GEM_toolkit.py gemc_to_h5ad -i A05640B8_cell_mask_correct_filter.gem -o A05640B8_cell_mask_correct_filter.image.h5ad -m A05640B8_cell_mask_correct_filter.tif

The output error looks like this Traceback (most recent call last): File "./GEM3D_toolkit-dev/GEM_toolkit.py", line 141, in gemc_to_h5ad_main(sys.argv[2:]) File "./GEM3D_toolkit-dev/gemtk/gemc_to_h5ad.py", line 64, in gemc_to_h5ad_main masks = np.loadtxt(cellmask,dtype=int,delimiter=' ') File "./Python-3.8.18/lib/python3.8/site-packages/numpy/lib/npyio.py", line 1338, in loadtxt arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter, File "./Python-3.8.18/lib/python3.8/site-packages/numpy/lib/npyio.py", line 999, in _read arr = _load_from_filelike( File "./Python-3.8.18/lib/python3.8/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 78: invalid start byte