Skip to content

Commit

Permalink
notebooks_mod
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomarco25 committed Dec 18, 2024
1 parent 2e84b0b commit 98e0a84
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 929 deletions.
29 changes: 8 additions & 21 deletions notebooks/spatialdata_tutorials/1_run_segmentation_free.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,17 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/sergio/.local/lib/python3.10/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n",
" warnings.warn(\n",
"/home/sergio/.local/lib/python3.10/site-packages/numba/core/decorators.py:246: RuntimeWarning: nopython is set for njit and is ignored\n",
" warnings.warn('nopython is set for njit and is ignored', RuntimeWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n"
]
}
],
"outputs": [],
"source": [
"import spatialdata_io\n",
"import spatialdata as sd\n",
"import sys\n",
"sys.path.append(\"../..\")\n",
"import exrna \n",
"import pandas as pd\n",
"import spatialdata_plot"
"import spatialdata_plot\n",
"import sys\n",
"sys.path.append(\"../../src\")\n",
"import troutpy \n"
]
},
{
Expand Down Expand Up @@ -209,7 +196,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "spatial_exrna",
"language": "python",
"name": "python3"
},
Expand All @@ -223,7 +210,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.10.15"
}
},
"nbformat": 4,
Expand Down
6 changes: 4 additions & 2 deletions notebooks/spatialdata_tutorials/2_process_cells.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"/home/sergio/.local/lib/python3.10/site-packages/numba/core/decorators.py:246: RuntimeWarning: nopython is set for njit and is ignored\n",
" warnings.warn('nopython is set for njit and is ignored', RuntimeWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n"
]
}
Expand All @@ -30,8 +32,8 @@
"\n",
"# while not pip installable, add path to file \n",
"import sys\n",
"sys.path.append(\"../..\")\n",
"import exrna "
"sys.path.append(\"../../src\")\n",
"import troutpy \n"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/spatialdata_tutorials/3_quantify_exRNA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"\n",
"# while not pip installable, add path to file \n",
"import sys\n",
"sys.path.append(\"../..\")\n",
"import exrna "
"sys.path.append(\"../../src\")\n",
"import troutpy \n"
]
},
{
Expand Down
10 changes: 7 additions & 3 deletions notebooks/spatialdata_tutorials/4_explore_comunication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/sergio/.local/lib/python3.10/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n",
" warnings.warn(\n",
"/home/sergio/.local/lib/python3.10/site-packages/numba/core/decorators.py:246: RuntimeWarning: nopython is set for njit and is ignored\n",
" warnings.warn('nopython is set for njit and is ignored', RuntimeWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
Expand All @@ -27,8 +31,8 @@
"\n",
"# while not pip installable, add path to file \n",
"import sys \n",
"sys.path.append(\"../..\")\n",
"import exrna "
"sys.path.append(\"../../src\")\n",
"import troutpy "
]
},
{
Expand Down
21 changes: 18 additions & 3 deletions notebooks/spatialdata_tutorials/6_identify_patterns.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/sergio/.local/lib/python3.10/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n",
" warnings.warn(\n",
"/home/sergio/.local/lib/python3.10/site-packages/numba/core/decorators.py:246: RuntimeWarning: nopython is set for njit and is ignored\n",
" warnings.warn('nopython is set for njit and is ignored', RuntimeWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n"
]
}
],
"source": [
"import os\n",
"import numpy as np\n",
Expand All @@ -16,8 +31,8 @@
"\n",
"# while not pip installable, add path to file \n",
"import sys \n",
"sys.path.append(\"../..\")\n",
"import exrna "
"sys.path.append(\"../../src\")\n",
"import troutpy "
]
},
{
Expand Down
17 changes: 13 additions & 4 deletions notebooks/spatialdata_tutorials/7_image_params.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
"cells": [
{
"cell_type": "code",
"execution_count": 61,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n"
]
}
],
"source": [
"import os\n",
"import numpy as np\n",
Expand All @@ -16,8 +25,8 @@
"\n",
"# while not pip installable, add path to file \n",
"import sys \n",
"sys.path.append(\"../..\")\n",
"import exrna "
"sys.path.append(\"../../src\")\n",
"import troutpy "
]
},
{
Expand Down
17 changes: 15 additions & 2 deletions notebooks/spatialdata_tutorials/8_exrna_signature.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/sergio/.local/lib/python3.10/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n",
" warnings.warn(\n",
"/home/sergio/.local/lib/python3.10/site-packages/numba/core/decorators.py:246: RuntimeWarning: nopython is set for njit and is ignored\n",
" warnings.warn('nopython is set for njit and is ignored', RuntimeWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n"
]
}
],
"source": [
"from gseapy import Biomart\n",
"import os\n",
Expand All @@ -13,7 +26,7 @@
"import seaborn as sns\n",
"import matplotlib.pyplot as plt\n",
"import spatialdata_io\n",
"import spatialdata as sd"
"import spatialdata as sd\n"
]
},
{
Expand Down
33 changes: 20 additions & 13 deletions notebooks/spatialdata_tutorials/9_sender_centric_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@
"cells": [
{
"cell_type": "code",
"execution_count": 60,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/sergio/.local/lib/python3.10/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n",
" warnings.warn(\n",
"/home/sergio/.local/lib/python3.10/site-packages/numba/core/decorators.py:246: RuntimeWarning: nopython is set for njit and is ignored\n",
" warnings.warn('nopython is set for njit and is ignored', RuntimeWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n",
"/home/sergio/.local/lib/python3.10/site-packages/anndata/utils.py:429: FutureWarning: Importing read_text from `anndata` is deprecated. Import anndata.io.read_text instead.\n",
" warnings.warn(msg, FutureWarning)\n"
]
}
],
"source": [
"import os\n",
"import numpy as np\n",
Expand All @@ -16,17 +31,9 @@
"from tqdm import tqdm\n",
"import scanpy as sc\n",
"import networkx as nx\n",
"import sys \n",
"sys.path.append(\"../../exrna\")\n",
"from formatting import *\n",
"from quantify_overexpression import *\n",
"from spatial_variability import *\n",
"from compute_target import *\n",
"from plotting import *\n",
"from compute_source_cell import *\n",
"from compute_target import *\n",
"from estimate_density import *\n",
"from NMF import *"
"import sys\n",
"sys.path.append(\"../../src\")\n",
"import troutpy "
]
},
{
Expand Down
376 changes: 0 additions & 376 deletions notebooks/spatialdata_tutorials/DEP_2_filter_transcripts.ipynb

This file was deleted.

Loading

0 comments on commit 98e0a84

Please sign in to comment.