Post

CellPhoneDB: Cell-Cell interaction analysis

Installation

1
2
3
4
5
6
7
8
9
10
conda create -n cpdb python=3.8
conda activate cpdb
pip install cellphonedb

# pip install jupyter notebook

#Install the ipython kernel
pip install -U ipykernel
#Add the environment as a jupyter kernel
python -m ipykernel install --user --name 'cpdb'

Download the DB from source

1
2
3
4
5
6
7
8
9
10
11
bsub -P xxx -q premium -W 6:00 -n 10 -R rusage[mem=15000] -R himem -R span[hosts=1] -Is /bin/bash
conda activate cpdb
ml proxies

# 시작하고 싶은 위치로 먼저 이동
jupyter notebook --no-browser --port=8889

# in local
ssh -t -t -L localhost:8888:localhost:8889 chos14@minerva.hpc.mssm.edu ssh -X lh06g23 -L localhost:8889:localhost:8889
# http://localhost:8888 
# token은 서버에서 jupyter notebook 켰을때 나옴

준비하시고 in jupyter notebook

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pandas as pd
import glob
import os

# Display DB version
from IPython.display import HTML, display
from cellphonedb.utils import db_releases_utils

display(HTML(db_releases_utils.get_remote_database_versions_html()['db_releases_html_table']))

# -- Version of the databse
cpdb_version = 'v5.0.0'

# -- Path where the input files to generate the database are located
cpdb_target_dir = os.path.join('/sc/arion/projects/scMultiscale/chos14/Project01_sysFlu/Trial02/06_CCI/CellPhoneDB', cpdb_version)

# Download DB
from cellphonedb.utils import db_utils

db_utils.download_database(cpdb_target_dir, cpdb_version)
This post is licensed under CC BY 4.0 by the author.

© Subin Cho. Some rights reserved.

Using the Chirpy theme for Jekyll.