Skip to content

Commit

Permalink
fixed style inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
LisaSikkema committed Jun 23, 2023
1 parent c58c0bc commit 8f78451
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 34 deletions.
50 changes: 18 additions & 32 deletions jupyter-book/annotation/annotation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"import numba\n",
"from numba.core.errors import NumbaDeprecationWarning, NumbaPendingDeprecationWarning\n",
"\n",
"warnings.simplefilter('ignore', category=NumbaDeprecationWarning)"
"warnings.simplefilter(\"ignore\", category=NumbaDeprecationWarning)"
]
},
{
Expand Down Expand Up @@ -801,9 +801,9 @@
"source": [
"cl_annotation = {\n",
" \"4\": \"Naive CD20+ B\",\n",
" \"6\": \"Naive CD20+ B\", # 6\n",
" \"6\": \"Naive CD20+ B\",\n",
" \"8\": \"Transitional B\",\n",
" \"18\": \"B1 B\", # note that IGHD and IGHM are negative markers, in this case more lowly expressed than in the other B cell clusters \n",
" \"18\": \"B1 B\", # note that IGHD and IGHM are negative markers, in this case more lowly expressed than in the other B cell clusters\n",
"}"
]
},
Expand Down Expand Up @@ -2129,7 +2129,7 @@
"scarches_model = sca.models.SCVI.load_query_data(\n",
" adata=adata_to_map_augmented,\n",
" reference_model=os.path.join(dir_reference_model, \"model\"),\n",
" freeze_dropout=True\n",
" freeze_dropout=True,\n",
")"
]
},
Expand Down Expand Up @@ -2582,8 +2582,8 @@
"metadata": {},
"outputs": [],
"source": [
"adata_emb.obs[\"transf_cell_type\"] = labels.loc[adata_emb.obs.index,\"cell_type\"]\n",
"adata_emb.obs['transf_cell_type_unc'] = uncert.loc[adata_emb.obs.index, \"cell_type\"]"
"adata_emb.obs[\"transf_cell_type\"] = labels.loc[adata_emb.obs.index, \"cell_type\"]\n",
"adata_emb.obs[\"transf_cell_type_unc\"] = uncert.loc[adata_emb.obs.index, \"cell_type\"]"
]
},
{
Expand All @@ -2599,8 +2599,12 @@
"metadata": {},
"outputs": [],
"source": [
"adata.obs.loc[adata_emb.obs.index, \"transf_cell_type\"] = adata_emb.obs[\"transf_cell_type\"]\n",
"adata.obs.loc[adata_emb.obs.index, \"transf_cell_type_unc\"] = adata_emb.obs[\"transf_cell_type_unc\"]"
"adata.obs.loc[adata_emb.obs.index, \"transf_cell_type\"] = adata_emb.obs[\n",
" \"transf_cell_type\"\n",
"]\n",
"adata.obs.loc[adata_emb.obs.index, \"transf_cell_type_unc\"] = adata_emb.obs[\n",
" \"transf_cell_type_unc\"\n",
"]"
]
},
{
Expand All @@ -2623,7 +2627,7 @@
"metadata": {},
"outputs": [],
"source": [
"sc.set_figure_params(figsize=(5,5))"
"sc.set_figure_params(figsize=(5, 5))"
]
},
{
Expand Down Expand Up @@ -2655,11 +2659,7 @@
}
],
"source": [
"sc.pl.umap(\n",
" adata,\n",
" color=\"transf_cell_type\",\n",
" frameon=False,\n",
")"
"sc.pl.umap(adata, color=\"transf_cell_type\", frameon=False)"
]
},
{
Expand Down Expand Up @@ -2691,11 +2691,7 @@
}
],
"source": [
"sc.pl.umap(\n",
" adata,\n",
" color=\"transf_cell_type_unc\",\n",
" frameon=False,\n",
")"
"sc.pl.umap(adata, color=\"transf_cell_type_unc\", frameon=False)"
]
},
{
Expand Down Expand Up @@ -2806,11 +2802,7 @@
}
],
"source": [
"sc.pl.umap(\n",
" adata,\n",
" color=\"transf_cell_type_certain\",\n",
" frameon=False\n",
")"
"sc.pl.umap(adata, color=\"transf_cell_type_certain\", frameon=False)"
]
},
{
Expand Down Expand Up @@ -2842,11 +2834,7 @@
}
],
"source": [
"sc.pl.umap(\n",
" adata,\n",
" color=\"transf_cell_type_certain\",\n",
" groups=\"Unknown\"\n",
")"
"sc.pl.umap(adata, color=\"transf_cell_type_certain\", groups=\"Unknown\")"
]
},
{
Expand Down Expand Up @@ -2956,9 +2944,7 @@
],
"source": [
"sc.pl.umap(\n",
" adata,\n",
" color=[\"transf_cell_type_unc\", \"transf_cell_type_certain\"],\n",
" frameon=False\n",
" adata, color=[\"transf_cell_type_unc\", \"transf_cell_type_certain\"], frameon=False\n",
")"
]
},
Expand Down
4 changes: 2 additions & 2 deletions jupyter-book/annotation/annotation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ dependencies:
- anaconda::pandas<2.0.0
- anaconda::pip
- pip:
- scarches>=0.5.8
- scvi-tools>=0.20.3
- scarches>=0.5.8
- scvi-tools>=0.20.3

0 comments on commit 8f78451

Please sign in to comment.