Skip to content
Shao, Xin edited this page Sep 24, 2021 · 10 revisions

Welcome to the scDeepSort wiki!

  • list all tissue and cell types on human
  • list all tissue and cell types on mouse

Installation Guide

(scDeepSort) shaoxin@krypton-7820T:~/workspace/scDeepSort$ pip install scDeepSort-v1.0-cpu.tar.gz
Processing ./scDeepSort-v1.0-cpu.tar.gz
Collecting numpy>=1.17.2
  Using cached numpy-1.21.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
Collecting scipy>=1.3.1
  Using cached scipy-1.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.5 MB)
Collecting pandas>=0.25.1
  Using cached pandas-1.3.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.3 MB)
Collecting tqdm>=4.60.0
  Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Collecting torch==1.6.0
  Downloading torch-1.6.0-cp37-cp37m-manylinux1_x86_64.whl (748.8 MB)
     |████████████████████████████████| 748.8 MB 22 kB/s
Collecting scikit_learn>=0.22.2
  Downloading scikit_learn-0.24.2-cp37-cp37m-manylinux2010_x86_64.whl (22.3 MB)
     |████████████████████████████████| 22.3 MB 3.5 MB/s
Collecting dgl==0.4.3
  Downloading dgl-0.4.3-cp37-cp37m-manylinux1_x86_64.whl (3.0 MB)
     |████████████████████████████████| 3.0 MB 4.3 MB/s
Collecting xlrd==1.2.0
  Using cached xlrd-1.2.0-py2.py3-none-any.whl (103 kB)
Collecting networkx>=2.1
  Downloading networkx-2.6.3-py3-none-any.whl (1.9 MB)
     |████████████████████████████████| 1.9 MB 5.1 MB/s
Collecting requests>=2.19.0
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting future
  Downloading future-0.18.2.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 4.9 MB/s
Collecting python-dateutil>=2.7.3
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz>=2017.3
  Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting charset-normalizer~=2.0.0
  Downloading charset_normalizer-2.0.6-py3-none-any.whl (37 kB)
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
     |████████████████████████████████| 138 kB 4.8 MB/s
Requirement already satisfied: certifi>=2017.4.17 in /home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages (from requests>=2.19.0->dgl==0.4.3->deepsort==1.0) (2021.5.30)
Collecting threadpoolctl>=2.0.0
  Downloading threadpoolctl-2.2.0-py3-none-any.whl (12 kB)
Collecting joblib>=0.11
  Using cached joblib-1.0.1-py3-none-any.whl (303 kB)
Building wheels for collected packages: deepsort, future
  Building wheel for deepsort (setup.py) ... done
  Created wheel for deepsort: filename=deepsort-1.0-py3-none-any.whl size=974205126 sha256=2c293acf8974cbdc6b0d8b657fd27e0918f0dfcb7998c899806cca89116c6505
  Stored in directory: /home/shaoxin/.cache/pip/wheels/dc/c2/92/46869404f84e22017324ea8ef5ced686f65e12c960db8508c6
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=10a0534a8da42e90956d04ff3647c9e4d55e00c25b92ad8cb30f0932fac3d435
  Stored in directory: /home/shaoxin/.cache/pip/wheels/56/b0/fe/4410d17b32f1f0c3cf54cdfb2bc04d7b4b8f4ae377e2229ba0
Successfully built deepsort future
Installing collected packages: urllib3, six, numpy, idna, charset-normalizer, threadpoolctl,scipy, requests, pytz, python-dateutil, networkx, joblib, future, xlrd, tqdm, torch, scikit-learn, pandas, dgl, deepsort
Successfully installed charset-normalizer-2.0.6 deepsort-1.0 dgl-0.4.3 future-0.18.2 idna-3.2 joblib-1.0.1 networkx-2.6.3 numpy-1.21.2 pandas-1.3.3 python-dateutil-2.8.2 pytz-2021.1 requests-2.26.0 scikit-learn-0.24.2 scipy-1.7.1 six-1.16.0 threadpoolctl-2.2.0 torch-1.6.0 tqdm-4.62.3 urllib3-1.26.7 xlrd-1.2.0
(scDeepSort) shaoxin@krypton-7820T:~/workspace/scDeepSort$ python
Python 3.7.11 (default, Jul 27 2021, 14:32:16)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import deepsort
DGL does not detect a valid backend option. Which backend would you like to work with?
Backend choice (pytorch, mxnet or tensorflow): pytorch
Set the default backend to "pytorch". You can change it in the ~/.dgl/config.json file or export the DGLBACKEND environment variable.
>>> import deepsort
>>> deepsort.demo()
Start to test built-in demo file.
The build graph contains 20428 gene nodes with 12 labels supported.
demo_file.csv -> Nonzero Ratio: 8.56%
Totally 28 cells in demo_file.csv
Time Consumed: 0.26 seconds.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/deepsort/demo.py", line 9, in demo
    result = predictor.predict(demo_file)
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/deepsort/predict.py", line 51, in predict
    df = self.__get_result_dataframe(input_file, pred, test_dict['origin_id'][input_file])
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/deepsort/predict.py", line 96, in __get_result_dataframe
    names=['species', 'old_type', 'new_type', 'new_subtype'])
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 364, in read_excel
    io = ExcelFile(io, storage_options=storage_options, engine=engine)
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/pandas/io/excel/_base.py", line 1233, in __init__
    self._reader = self._engines[engine](self._io, storage_options=storage_options)
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/pandas/io/excel/_openpyxl.py", line 521, in __init__
    import_optional_dependency("openpyxl")
  File "/home/shaoxin/anaconda3/envs/scDeepSort/lib/python3.7/site-packages/pandas/compat/_optional.py", line 118, in import_optional_dependency
    raise ImportError(msg) from None
ImportError: Missing optional dependency 'openpyxl'.  Use pip or conda to install openpyxl.
>>> quit()
(scDeepSort) shaoxin@krypton-7820T:~/workspace/scDeepSort$ pip install openpyxl
Collecting openpyxl
  Downloading openpyxl-3.0.9-py2.py3-none-any.whl (242 kB)
     |████████████████████████████████| 242 kB 754 kB/s
Collecting et-xmlfile
  Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Installing collected packages: et-xmlfile, openpyxl
Successfully installed et-xmlfile-1.1.0 openpyxl-3.0.9
(scDeepSort) shaoxin@krypton-7820T:~/workspace/scDeepSort$ python
Python 3.7.11 (default, Jul 27 2021, 14:32:16)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import deepsort
>>> deepsort.demo()
Start to test built-in demo file.
The build graph contains 20428 gene nodes with 12 labels supported.
demo_file.csv -> Nonzero Ratio: 8.56%
Totally 28 cells in demo_file.csv
Time Consumed: 0.23 seconds.
Test successfully!
   index    cell_type cell_subtype
0    C_1  Paneth cell          N/A
1    C_2  Paneth cell          N/A
2    C_3  Paneth cell          N/A
3    C_4  Paneth cell          N/A
4    C_5  Paneth cell          N/A
5    C_6  Paneth cell          N/A
6    C_7  Paneth cell          N/A
7    C_8  Paneth cell          N/A
8    C_9  Paneth cell          N/A
9   C_10  Paneth cell          N/A
10  C_11  Paneth cell          N/A
11  C_12  Paneth cell          N/A
12  C_13  Paneth cell          N/A
13  C_14  Paneth cell          N/A
14  C_15  Paneth cell          N/A
15  C_16  Paneth cell          N/A
16  C_17  Paneth cell          N/A
17  C_18  Paneth cell          N/A
18  C_19  Paneth cell          N/A
19  C_20  Paneth cell          N/A
20  C_21  Paneth cell          N/A
21  C_22  Paneth cell          N/A
22  C_23  Paneth cell          N/A
23  C_24  Paneth cell          N/A
24  C_25  Paneth cell          N/A
25  C_26  Paneth cell          N/A
26  C_27  Paneth cell          N/A
27  C_28  Paneth cell          N/A