Skip to content

Commit 0beef7c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3b9962c commit 0beef7c

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

hub/Tahoe100.ipynb

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@
14331433
"metadata": {},
14341434
"outputs": [],
14351435
"source": [
1436-
"#because we have so many drugs, we wont plot the umap here\n",
1436+
"# because we have so many drugs, we wont plot the umap here\n",
14371437
"# sc.pl.umap(\n",
14381438
"# subset_adata,\n",
14391439
"# color=[\"drug\"],\n",
@@ -1536,11 +1536,11 @@
15361536
"metadata": {},
15371537
"outputs": [],
15381538
"source": [
1539-
"#sc.pl.umap(\n",
1539+
"# sc.pl.umap(\n",
15401540
"# subset_adata2,\n",
15411541
"# color=[\"plate\", \"Cell_ID_Cellosaur\"],\n",
15421542
"# frameon=False,\n",
1543-
"#)"
1543+
"# )"
15441544
]
15451545
},
15461546
{
@@ -1785,7 +1785,7 @@
17851785
"metadata": {},
17861786
"outputs": [],
17871787
"source": [
1788-
"#tahoe_scanvi.train(max_epochs=5,batch_size=64) #this fails in the workstation"
1788+
"# tahoe_scanvi.train(max_epochs=5,batch_size=64) #this fails in the workstation"
17891789
]
17901790
},
17911791
{
@@ -1805,7 +1805,7 @@
18051805
"source": [
18061806
"predictions = tahoe_scanvi.predict(subset_adata)\n",
18071807
"subset_adata.obs[\"predictions_scanvi\"] = predictions\n",
1808-
"#predictions"
1808+
"# predictions"
18091809
]
18101810
},
18111811
{
@@ -1851,7 +1851,7 @@
18511851
}
18521852
],
18531853
"source": [
1854-
"print(f\"The overall Accuracy is:\",np.round(np.trace(norm_df),2))"
1854+
"print(\"The overall Accuracy is:\", np.round(np.trace(norm_df), 2))"
18551855
]
18561856
},
18571857
{
@@ -1870,8 +1870,8 @@
18701870
"outputs": [],
18711871
"source": [
18721872
"SCANVI_LATENT_KEY = \"X_scanVI\"\n",
1873-
"#latent_scanvi = tahoe_scanvi.get_latent_representation(subset_adata2)\n",
1874-
"#subset_adata2.obsm[SCANVI_LATENT_KEY] = latent_scanvi"
1873+
"# latent_scanvi = tahoe_scanvi.get_latent_representation(subset_adata2)\n",
1874+
"# subset_adata2.obsm[SCANVI_LATENT_KEY] = latent_scanvi"
18751875
]
18761876
},
18771877
{
@@ -1882,8 +1882,8 @@
18821882
"outputs": [],
18831883
"source": [
18841884
"# use scVI latent space for UMAP generation\n",
1885-
"#sc.pp.neighbors(subset_adata2, use_rep=SCANVI_LATENT_KEY)\n",
1886-
"#sc.tl.umap(subset_adata2, min_dist=0.3)"
1885+
"# sc.pp.neighbors(subset_adata2, use_rep=SCANVI_LATENT_KEY)\n",
1886+
"# sc.tl.umap(subset_adata2, min_dist=0.3)"
18871887
]
18881888
},
18891889
{
@@ -1893,12 +1893,12 @@
18931893
"metadata": {},
18941894
"outputs": [],
18951895
"source": [
1896-
"#sc.pl.umap(\n",
1896+
"# sc.pl.umap(\n",
18971897
"# subset_adata2,\n",
18981898
"# color=[\"plate\", \"Cell_ID_Cellosaur\"],\n",
18991899
"# ncols=2,\n",
19001900
"# frameon=False,\n",
1901-
"#)"
1901+
"# )"
19021902
]
19031903
},
19041904
{
@@ -2016,7 +2016,7 @@
20162016
" subset_adata2,\n",
20172017
" batch_key=\"plate\",\n",
20182018
" label_key=\"Cell_ID_Cellosaur\",\n",
2019-
" embedding_obsm_keys=[\"X_pca\",\"X_scVI\"],\n",
2019+
" embedding_obsm_keys=[\"X_pca\", \"X_scVI\"],\n",
20202020
" n_jobs=-1,\n",
20212021
")\n",
20222022
"bm.benchmark()"
@@ -2614,6 +2614,7 @@
26142614
],
26152615
"source": [
26162616
"import plotnine as p9\n",
2617+
"\n",
26172618
"(\n",
26182619
" p9.ggplot(de_change, p9.aes(\"lfc_mean\", \"-log10_pscore\", color=\"Biotype\"))\n",
26192620
" + p9.geom_point(\n",
@@ -2746,9 +2747,9 @@
27462747
"outputs": [],
27472748
"source": [
27482749
"# get the generated expression from the minified model (will take very long time)\n",
2749-
"#tahoe.adata[:, upregulated_genes.index] = tahoe.get_normalized_expression(\n",
2750+
"# tahoe.adata[:, upregulated_genes.index] = tahoe.get_normalized_expression(\n",
27502751
"# gene_list=list(upregulated_genes.index), n_samples=10\n",
2751-
"#)"
2752+
"# )"
27522753
]
27532754
},
27542755
{

0 commit comments

Comments
 (0)