{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Trajectory: In silico gene perturbation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the {mod}`dynamo` Cell paper :cite:p:`QIU2022`, we introduced the analytical form of a\n", "vector field. This permits *in silico* perturbation predictions of expression\n", "for each gene in each cell and the cell fate diversions after\n", "genetic perturbations. In particular, we demonstrated the predictive\n", "power of hematopoietic fate trajectory predictions after genetic\n", "perturbations. \n", "\n", "In this tutorial, we will cover the following topics:\n", "- Perturbation functionality and API in {mod}`dynamo` \n", "- How to perturb gene expression levels individually or collectively in hematopoietic scNT-seq dataset \n", "- Visualize gene perturbation effects \n", "- Reproduce results in {mod}`dynamo` paper Fig.7 :cite:p:`QIU2022`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Perturbation method introduction" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import relevant packages" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using already downloaded Arial font from: /tmp/dynamo_arial.ttf\n", "Registered custom font as: Arial\n", "\n", "\n", " ███ ████████ \n", "█████ █████ █████ █████ ███ █████ \n", " ██████ ██████ ██████ ████████ ████ \n", " ___ ████ ███\n", " | \\ _ _ _ _ __ _ _ __ ___ ███\n", " | |) | || | ' \\/ _` | ' \\/ _ \\█████ ███ \n", " |___/ \\_, |_||_\\__,_|_|_|_\\___/█████ ████ \n", " |__/ ███ █████ \n", "Tutorial: https://dynamo-release.readthedocs.io/ \n", " █████ \n", "\n" ] }, { "data": { "text/html": [ "
| package | \n", "umap-learn | \n", "typing-extensions | \n", "tqdm | \n", "statsmodels | \n", "setuptools | \n", "session-info | \n", "seaborn | \n", "scipy | \n", "requests | \n", "pynndescent | \n", "pre-commit | \n", "pandas | \n", "openpyxl | \n", "numdifftools | \n", "numba | \n", "networkx | \n", "mudata | \n", "matplotlib | \n", "loompy | \n", "leidenalg | \n", "igraph | \n", "dynamo-release | \n", "colorcet | \n", "anndata | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| version | \n", "0.5.7 | \n", "4.13.2 | \n", "4.67.1 | \n", "0.14.4 | \n", "79.0.0 | \n", "1.0.1 | \n", "0.13.2 | \n", "1.11.4 | \n", "2.32.3 | \n", "0.5.13 | \n", "4.2.0 | \n", "2.2.3 | \n", "3.1.5 | \n", "0.9.41 | \n", "0.60.0 | \n", "3.4.2 | \n", "0.3.1 | \n", "3.10.3 | \n", "3.0.8 | \n", "0.10.2 | \n", "0.11.8 | \n", "1.4.2rc1 | \n", "3.1.0 | \n", "0.11.4 | \n", "