Skip to content

Commit

Permalink
Glom detevtion finalised
Browse files Browse the repository at this point in the history
  • Loading branch information
behnam-yousefi committed Sep 6, 2024
1 parent b087f27 commit 194a25f
Show file tree
Hide file tree
Showing 4 changed files with 391 additions and 337 deletions.
26 changes: 13 additions & 13 deletions notebooks/03_image_registration/plot_example.ipynb

Large diffs are not rendered by default.

200 changes: 123 additions & 77 deletions notebooks/03_image_registration/registration_final_elastix.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 26,
"id": "fc5c083e-6e4b-4bda-acd1-47e7ffcf2959",
"metadata": {},
"outputs": [],
Expand All @@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 27,
"id": "a1347b2e-6d2d-435e-b64a-c0ee3b065e97",
"metadata": {},
"outputs": [
Expand All @@ -41,7 +41,7 @@
"Categories (63, object): ['X1', 'X2', 'X3', 'X4', ..., 'X60', 'X61', 'X62', 'X63']"
]
},
"execution_count": 2,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -55,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 28,
"id": "b9e6e12c-d657-49ff-b363-b01975d4e7b4",
"metadata": {},
"outputs": [],
Expand All @@ -66,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 29,
"id": "1b668e32-5cd0-46c9-b1f9-f41f29482c80",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -94,7 +94,7 @@
" 'per_sample_leiden_res_0.39']"
]
},
"execution_count": 4,
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -107,7 +107,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 30,
"id": "9a45a688-9f23-4e7b-adf8-cfed96cd33b5",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -139,7 +139,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 31,
"id": "3738f23f-c25e-4f5c-b118-efbf24e8bdd7",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -169,7 +169,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 32,
"id": "530fdb46-aa92-4631-9ea9-ce22d09a234b",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -814,7 +814,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 25,
"id": "f60c2dc8-586c-4531-8cf8-e8af26b4c800",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -951,24 +951,34 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 33,
"id": "a53a93eb-039a-4fab-a380-02ea781ddc9f",
"metadata": {},
"outputs": [],
"source": [
"# If we want to sneak-in some values\n",
"# adata_all = sc.read_h5ad(\"data/adata_nichepca_per_sample_with_domain_2.h5ad\")\n",
"# adata.obs['final_clusters_cat'] = adata.obs['final_clusters_cat'].cat.set_categories(adata_all.obs['domains'].cat.categories)\n",
"# adata.obs['final_clusters_cat'] = adata.obs['final_clusters_cat'].cat.as_unordered()\n",
"# adata_all.obs.loc[adata_all.obs['sample'] == sample ,'domains'] = adata.obs['final_clusters_cat']"
"adata_all = sc.read_h5ad(\"data/adata_nichepca_per_sample_with_domain_0.h5ad\")\n",
"adata.obs['final_clusters_cat'] = adata.obs['final_clusters_cat'].cat.set_categories(adata_all.obs['domains'].cat.categories)\n",
"adata.obs['final_clusters_cat'] = adata.obs['final_clusters_cat'].cat.as_unordered()\n",
"adata_all.obs.loc[adata_all.obs['sample'] == sample ,'domains'] = adata.obs['final_clusters_cat']"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 34,
"id": "26816d8a-1d05-4018-8af5-0f14a64c8d05",
"metadata": {},
"outputs": [],
"source": [
"adata_all.write_h5ad(\"data/adata_nichepca_per_sample_with_domain_2.h5ad\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9cd1a6cc-4c49-421a-a103-ef26afdce0bf",
"metadata": {},
"outputs": [],
"source": []
}
],
Expand Down
Loading

0 comments on commit 194a25f

Please sign in to comment.