{ "cells": [ { "cell_type": "markdown", "id": "290c36cd", "metadata": {}, "source": [ "# Analyzing the avGFP landscape" ] }, { "cell_type": "markdown", "id": "75582049", "metadata": {}, "source": [ "**WARNING: this example notebook uses an outdated version of the library API. See the documentation for more details.**\nThis example walks through the generation of analysis figures for the avGFP brightness landscape, similar to how they were generate ``Interpretable modeling of genotype-phenotype landscapes with state-of-the-art predictive power''." ] }, { "cell_type": "code", "execution_count": 1, "id": "72df64e5", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "id": "993607c7", "metadata": {}, "source": [ "## Prepare the model" ] }, { "cell_type": "markdown", "id": "49e08a29", "metadata": {}, "source": [ "First we load the dataset and pre-trained model file. The dataset for avGFP can be generated from the manuscript pipeline found at [https://github.com/usnistgov/lantern/tree/master/manuscript](github.com/usnistgov/lantern/tree/master/manuscript). The pre-trained model parameters are also provided there.\n", "\n", "First, we load the csv dataset and prepare it as a `LANTERN` dataset." ] }, { "cell_type": "code", "execution_count": 2, "id": "8a592e74", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | aaMutations | \n", "uniqueBarcodes | \n", "medianBrightness | \n", "std | \n", "substitutions | \n", "phenotype | \n", "cv | \n", "
|---|---|---|---|---|---|---|---|
| 0 | \n", "NaN | \n", "3645 | \n", "3.719212 | \n", "0.106992 | \n", "NaN | \n", "1.030462 | \n", "1.0 | \n", "
| 1 | \n", "SA108D | \n", "1 | \n", "1.301030 | \n", "NaN | \n", "SA108D | \n", "-1.250280 | \n", "7.0 | \n", "
| 2 | \n", "SA108D:SN144D:SI186V:SM231T:SL234P | \n", "1 | \n", "1.301031 | \n", "NaN | \n", "SA108D:SN144D:SI186V:SM231T:SL234P | \n", "-1.250279 | \n", "9.0 | \n", "
| 3 | \n", "SA108D:SY141N:SH146L:SE220G | \n", "1 | \n", "1.301189 | \n", "NaN | \n", "SA108D:SY141N:SH146L:SE220G | \n", "-1.250130 | \n", "8.0 | \n", "
| 4 | \n", "SA108G | \n", "2 | \n", "3.708478 | \n", "0.020613 | \n", "SA108G | \n", "1.020338 | \n", "8.0 | \n", "