diff --git a/notebooks/qc-template.ipynb b/notebooks/qc-template.ipynb index aa7ab5e9..7cb035cf 100644 --- a/notebooks/qc-template.ipynb +++ b/notebooks/qc-template.ipynb @@ -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" ] }, { @@ -23,7 +16,7 @@ "metadata": {}, "outputs": [], "source": [ - "ts = tskit.load(\"../results/XXX.ts\")\n", + "ts = tskit.load(\"../results/XX.ts\")\n", "ts" ] }, @@ -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" ] }, { @@ -54,7 +51,7 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_mutations_per_node_distribution()" + "ai.plot_mutations_per_node_distribution();" ] }, { @@ -63,7 +60,7 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_masked_sites_per_sample()" + "ai.plot_mutations_per_site_distribution();" ] }, { @@ -72,7 +69,7 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_mutations_per_site_distribution()" + "ai.plot_mutations_per_site();" ] }, { @@ -81,7 +78,7 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_mutations_per_site()" + "ai.plot_ts_tv_per_site();" ] }, { @@ -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" ] }, { @@ -108,7 +103,7 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_ts_tv_per_site()" + "ai.plot_missing_sites_per_sample();" ] }, { @@ -117,7 +112,7 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_mutation_spectrum(min_inheritors=2)" + "ai.plot_missing_samples_per_site();" ] }, { @@ -133,7 +128,14 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_samples_per_day()" + "ai.plot_samples_per_day();" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Recombinants" ] }, { @@ -142,14 +144,14 @@ "metadata": {}, "outputs": [], "source": [ - "ti.plot_recombinants_per_day()" + "ai.recombinants_summary()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Pango lineages" + "# Branch lengths" ] }, { @@ -158,8 +160,7 @@ "metadata": {}, "outputs": [], "source": [ - "df_pango = ti.pango_lineages_report()\n", - "df_pango" + "ai.plot_branch_length_distributions();" ] }, { @@ -167,15 +168,12 @@ "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" }, @@ -189,7 +187,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.12.9" } }, "nbformat": 4,