Skip to content

Commit

Permalink
Merge branch 'main' of github.com:gjhuizing/stories
Browse files Browse the repository at this point in the history
  • Loading branch information
gjhuizing committed Jul 22, 2024
2 parents 6b60063 + 085cda1 commit f768682
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
33 changes: 28 additions & 5 deletions docs/vignettes/demo_axolotl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
],
"source": [
"# Load the data\n",
"adata = ad.read_h5ad(\"../../../data/artista/artista_traj_processed.h5ad\")\n",
"adata = ad.read_h5ad(\"artista_traj_processed.h5ad\")\n",
"adata"
]
},
Expand Down Expand Up @@ -439,7 +439,12 @@
],
"source": [
"stories.tools.plot_velocity(\n",
" adata, \"X_pca_harmony\", basis=\"isomap\", color=\"Annotation\", palette=palette, s=50,\n",
" adata,\n",
" \"X_pca_harmony\",\n",
" basis=\"isomap\",\n",
" color=\"Annotation\",\n",
" palette=palette,\n",
" s=50,\n",
")"
]
},
Expand Down Expand Up @@ -601,8 +606,22 @@
}
],
"source": [
"stories.tools.plot_single_gene_trend(adata, \"NPTX1 | AMEX60DD031350\", s=5, palette=palette, alpha=0.75, annotation_key=\"Annotation\")\n",
"stories.tools.plot_single_gene_trend(adata, \"VIM | AMEX60DD022108\", s=5, palette=palette, alpha=0.75, annotation_key=\"Annotation\")"
"stories.tools.plot_single_gene_trend(\n",
" adata,\n",
" \"NPTX1 | AMEX60DD031350\",\n",
" s=5,\n",
" palette=palette,\n",
" alpha=0.75,\n",
" annotation_key=\"Annotation\",\n",
")\n",
"stories.tools.plot_single_gene_trend(\n",
" adata,\n",
" \"VIM | AMEX60DD022108\",\n",
" s=5,\n",
" palette=palette,\n",
" alpha=0.75,\n",
" annotation_key=\"Annotation\",\n",
")"
]
},
{
Expand Down Expand Up @@ -647,6 +666,8 @@
"outputs": [],
"source": [
"import re\n",
"\n",
"\n",
"def extract_gene_name(text):\n",
" # Regular expression patterns ordered by priority\n",
" patterns = [\n",
Expand Down Expand Up @@ -694,7 +715,9 @@
}
],
"source": [
"stories.tools.tf_enrich(adata, trrust_path=\"trrust_rawdata.human.tsv\", gene_key=\"clean_name\")"
"stories.tools.tf_enrich(\n",
" adata, trrust_path=\"trrust_rawdata.human.tsv\", gene_key=\"clean_name\"\n",
")"
]
}
],
Expand Down
9 changes: 7 additions & 2 deletions docs/vignettes/demo_midbrain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"outputs": [],
"source": [
"# Load the data\n",
"adata = ad.read_h5ad(\"../../../data/dorsal_midbrain/dorsal_midbrain_processed.h5ad\")"
"adata = ad.read_h5ad(\"dorsal_midbrain_processed.h5ad\")"
]
},
{
Expand Down Expand Up @@ -401,7 +401,12 @@
],
"source": [
"stories.tools.plot_velocity(\n",
" adata, \"X_pca_harmony\", basis=\"isomap\", color=\"annotation\", palette=palette, s=50,\n",
" adata,\n",
" \"X_pca_harmony\",\n",
" basis=\"isomap\",\n",
" color=\"annotation\",\n",
" palette=palette,\n",
" s=50,\n",
")"
]
},
Expand Down

0 comments on commit f768682

Please sign in to comment.