-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example data moved and Nature Protocols case examples added
- Loading branch information
Showing
35 changed files
with
218,414 additions
and
17,215 deletions.
There are no files selected for viewing
1,351 changes: 1,351 additions & 0 deletions
1,351
...e_examples/CaseExample1_differentiation/analysis_method3_CellSign_microenvironments.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+68.9 MB
example_data/NatureProtocols2024_case_examples/CaseExample1_differentiation/input.zip
Binary file not shown.
1,136 changes: 1,136 additions & 0 deletions
1,136
...ols2024_case_examples/CaseExample2_spatialNiches/analysis_method3_microenvironments.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+35.5 MB
example_data/NatureProtocols2024_case_examples/CaseExample2_spatialNiches/input.zip
Binary file not shown.
1,818 changes: 1,818 additions & 0 deletions
1,818
...rotocols2024_case_examples/CaseExample3_specificityScoring/analysis_method2_scoring.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+63.1 MB
example_data/NatureProtocols2024_case_examples/CaseExample3_specificityScoring/input.zip
Binary file not shown.
157 changes: 157 additions & 0 deletions
157
example_data/NatureProtocols2024_case_examples/T0_DownloadDB.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
" ![CellphoneDB Logo](https://www.cellphonedb.org/images/cellphonedb_logo_33.png) | CellphoneDB is a publicly available repository of curated receptors, ligands and their interactions." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Download database from source\n", | ||
"In this notebook we will download CellphoneDB database and the input files required to generate the database. These input files can be modified in case the user desires to remove or add new interactions. Please check the `T00_BuildDBfromFiles.ipynb` notebook to generate a database from input files." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Install CellphoneDB\n", | ||
"It's recommended to install CellphoneDB within a conda environment" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"> pip install cellphonedb" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import pandas as pd\n", | ||
"import glob\n", | ||
"import os" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Display database versions" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<table class=\"striped\"><tr><th style=\"text-align:center\">Version</th><th style=\"text-align:center\">Release date</th></tr><td style=\"text-align:center\"><a class=\"teal-text\" href=\"https://github.com/ventolab/cellphonedb-data/releases/tag/v5.0.0\">v5.0.0</a></td><td style=\"text-align:center\">2023-10-31</td></tr><tr><td style=\"text-align:center\"><a class=\"teal-text\" href=\"https://github.com/ventolab/cellphonedb-data/releases/tag/v4.1.0\">v4.1.0</a></td><td style=\"text-align:center\">2023-03-09</td></tr><tr><tr><tr></table>" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.HTML object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"from IPython.display import HTML, display\n", | ||
"from cellphonedb.utils import db_releases_utils\n", | ||
"\n", | ||
"display(HTML(db_releases_utils.get_remote_database_versions_html()['db_releases_html_table']))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Define the version and the path to download database" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# -- Version of the databse\n", | ||
"cpdb_version = 'v5.0.0'\n", | ||
"\n", | ||
"# -- Path where the input files to generate the database are located\n", | ||
"cpdb_target_dir = os.path.join('/home/jovyan/cellphonedb_v500_NatProtocol/', cpdb_version)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Download database" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Downloaded cellphonedb.zip into /home/jovyan/cellphonedb_v500_NatProtocol/v5.0.0\n", | ||
"Downloaded complex_input.csv into /home/jovyan/cellphonedb_v500_NatProtocol/v5.0.0\n", | ||
"Downloaded gene_input.csv into /home/jovyan/cellphonedb_v500_NatProtocol/v5.0.0\n", | ||
"Downloaded interaction_input.csv into /home/jovyan/cellphonedb_v500_NatProtocol/v5.0.0\n", | ||
"Downloaded protein_input.csv into /home/jovyan/cellphonedb_v500_NatProtocol/v5.0.0\n", | ||
"Downloaded uniprot_synonyms.tsv into /home/jovyan/cellphonedb_v500_NatProtocol/v5.0.0/sources\n", | ||
"Downloaded transcription_factor_input.csv into /home/jovyan/cellphonedb_v500_NatProtocol/v5.0.0/sources\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"from cellphonedb.utils import db_utils\n", | ||
"\n", | ||
"db_utils.download_database(cpdb_target_dir, cpdb_version)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "cpdb_v500", | ||
"language": "python", | ||
"name": "cpdb_v500" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.19" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Binary file not shown.
Oops, something went wrong.