Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 36 additions & 38 deletions notebooks/qc-template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import tskit\n",
"import tszip\n",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import sys\n",
"sys.path.append(\"../\")\n",
"import sc2ts.utils"
"import sc2ts.debug as sd"
]
},
{
Expand All @@ -23,7 +16,7 @@
"metadata": {},
"outputs": [],
"source": [
"ts = tskit.load(\"../results/XXX.ts\")\n",
"ts = tskit.load(\"../results/XX.ts\")\n",
"ts"
]
},
Expand All @@ -33,12 +26,16 @@
"metadata": {},
"outputs": [],
"source": [
"ti = sc2ts.utils.TreeInfo(ts)\n",
"\n",
"def report(*args, **kwargs):\n",
" display(*ti.node_report(*args, **kwargs))\n",
"\n",
"ti"
"ai = sd.ArgInfo(ts)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"ai"
]
},
{
Expand All @@ -54,7 +51,7 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_mutations_per_node_distribution()"
"ai.plot_mutations_per_node_distribution();"
]
},
{
Expand All @@ -63,7 +60,7 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_masked_sites_per_sample()"
"ai.plot_mutations_per_site_distribution();"
]
},
{
Expand All @@ -72,7 +69,7 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_mutations_per_site_distribution()"
"ai.plot_mutations_per_site();"
]
},
{
Expand All @@ -81,7 +78,7 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_mutations_per_site()"
"ai.plot_ts_tv_per_site();"
]
},
{
Expand All @@ -90,16 +87,14 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_masked_samples_per_site()"
"ai.plot_mutation_spectrum(min_inheritors=2);"
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"ti.plot_diversity()"
"# Missing data"
]
},
{
Expand All @@ -108,7 +103,7 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_ts_tv_per_site()"
"ai.plot_missing_sites_per_sample();"
]
},
{
Expand All @@ -117,7 +112,7 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_mutation_spectrum(min_inheritors=2)"
"ai.plot_missing_samples_per_site();"
]
},
{
Expand All @@ -133,7 +128,14 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_samples_per_day()"
"ai.plot_samples_per_day();"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Recombinants"
]
},
{
Expand All @@ -142,14 +144,14 @@
"metadata": {},
"outputs": [],
"source": [
"ti.plot_recombinants_per_day()"
"ai.recombinants_summary()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Pango lineages"
"# Branch lengths"
]
},
{
Expand All @@ -158,24 +160,20 @@
"metadata": {},
"outputs": [],
"source": [
"df_pango = ti.pango_lineages_report()\n",
"df_pango"
"ai.plot_branch_length_distributions();"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df_pango_rec = ti.pango_recombinant_lineages_report()\n",
"df_pango_rec"
]
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -189,7 +187,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down
Loading