{ "cells": [ { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "JdmDoI8U8RvW" }, "source": [ "\n", "*This notebook contains material from [PyRosetta](https://RosettaCommons.github.io/PyRosetta.notebooks);\n", "content is available [on Github](https://github.com/RosettaCommons/PyRosetta.notebooks.git).*" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "2gfBr3ZVNLQE" }, "source": [ "\n", "< [*De Novo* Protein Design with PyRosetta](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/06.07-Introduction-to-DeNovo-protein-design.ipynb) | [Contents](toc.ipynb) | [Index](index.ipynb) | [Docking](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/07.00-Protein-Docking.ipynb) >
"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "tfY7I5ms8Rvf"
},
"source": [
"# **Point Mutation Scan**\n",
"\n",
"Keywords: FastRelax, ResidueSelector, NeighborhoodResidueSelector, TaskFactory, TaskOperation, RestrictToRepackingRLT, RestrictAbsentCanonicalAASRLT, NoRepackDisulfides, OperateOnResidueSubset, RigidBodyTransMover, ggplot2\n",
"\n",
"## Overview\n",
"The purpose of this section is to create a protocol using what you have learned in the previous sections. In this tutorial, we will prepare an antibody-antigen bound structure, make point mutations on the antibody, records changes in binding enregy, and generate a heatmap demonstrating energy differences. This method is widely used in antibody interface design for either improving binding affinity or expanding the binding range. \n",
"\n",
"\n",
"\n",
"## Protocol\n",
"The whole protocol is broken down by eight steps.\n",
"\n",
"**Step 1.** Prepare the structure with FastRelax()\n",
"\n",
"**Step 2.** Write the function to perform the mutation PackMover()\n",
"\n",
"**Step 3.** Write the function to unbind the antibody-antigen bound structure unbind()\n",
"\n",
"**Step 4.** Write the function to get wildtype amino acid\n",
"\n",
"**Step 5.** Write the function to properly mutate and pack a specific residue and output energy metrics\n",
"\n",
"**Step 6.** Loop through interface positions mutating them into 20 amino acids with output files\n",
"\n",
"**Step 7.** Summarize all input files for binding energy analysis\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "i7Ft-iITfib-"
},
"source": [
"## **Section Contributors:**\n",
"Yuanhan Wu (The Wistar Institute)\n",
"\n",
"Daniel Kulp (The Wistar Institute)\n",
"\n",
"Jared Adolf-Bryfogle (Scripps; Institute for Protein Innovation)\n",
"\n",
"Ajasja Ljubetič (University of Washington)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "NQBxdWtegQpX"
},
"source": [
"### Set up notebook"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 85
},
"colab_type": "code",
"executionInfo": {
"elapsed": 4889,
"status": "ok",
"timestamp": 1583520330814,
"user": {
"displayName": "Yuanhan Wu",
"photoUrl": "",
"userId": "03333451059275340958"
},
"user_tz": 300
},
"id": "-1bN0zDc8Rvj",
"outputId": "975250d0-77d4-43a9-aba8-5c255f4d67f9"
},
"outputs": [],
"source": [
"!pip install pyrosettacolabsetup\n",
"import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()\n",
"import pyrosetta; pyrosetta.init()\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "193kixKl8Rvx"
},
"source": [
"**Make sure you are in the directory with the pdb files:**\n",
"\n",
"`cd google_drive/MyDrive/student-notebooks/`"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "JkMqBiLZ-i7K"
},
"source": [
"### Loading structures "
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 768
},
"colab_type": "code",
"executionInfo": {
"elapsed": 1449,
"status": "ok",
"timestamp": 1583520334457,
"user": {
"displayName": "Yuanhan Wu",
"photoUrl": "",
"userId": "03333451059275340958"
},
"user_tz": 300
},
"id": "CUe-0OB78Rv0",
"outputId": "0fedc288-0355-4947-d81d-a154c16322c0"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"PyRosetta-4 2019 [Rosetta PyRosetta4.Release.python36.mac 2019.39+release.93456a567a8125cafdf7f8cb44400bc20b570d81 2019-09-26T14:24:44] retrieved from: http://www.pyrosetta.org\n",
"(C) Copyright Rosetta Commons Member Institutions. Created in JHU by Sergey Lyskov and PyRosetta Team.\n",
"\u001b[0mcore.init: \u001b[0mChecking for fconfig files in pwd and ./rosetta/flags\n",
"\u001b[0mcore.init: \u001b[0mReading fconfig.../Users/jadolfbr/.rosetta/flags/common\n",
"\u001b[0mcore.init: \u001b[0m\n",
"\u001b[0mcore.init: \u001b[0m\n",
"\u001b[0mcore.init: \u001b[0mRosetta version: PyRosetta4.Release.python36.mac r233 2019.39+release.93456a567a8 93456a567a8125cafdf7f8cb44400bc20b570d81 http://www.pyrosetta.org 2019-09-26T14:24:44\n",
"\u001b[0mcore.init: \u001b[0mcommand: PyRosetta -ex1 -ex2aro -database /Users/jadolfbr/Library/Python/3.6/lib/python/site-packages/pyrosetta-2019.39+release.93456a567a8-py3.6-macosx-10.6-intel.egg/pyrosetta/database\n",
"\u001b[0mbasic.random.init_random_generator: \u001b[0m'RNG device' seed mode, using '/dev/urandom', seed=-323604717 seed_offset=0 real_seed=-323604717\n",
"\u001b[0mbasic.random.init_random_generator: \u001b[0mRandomGenerator:init: Normal mode, seed=-323604717 RG_type=mt19937\n",
"\u001b[0mcore.import_pose.import_pose: \u001b[0mFile 'inputs/1jhl.clean.pdb' automatically determined to be of type PDB\n",
"\u001b[0mcore.io.pdb.pdb_reader: \u001b[0mParsing 0 .pdb records with unknown format to search for Rosetta-specific comments.\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mFound disulfide between residues 23 88\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 23 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 88 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 23 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 88 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mFound disulfide between residues 130 204\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 130 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 204 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 130 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 204 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mFound disulfide between residues 230 351\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 230 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 351 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 230 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 351 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mFound disulfide between residues 254 339\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 254 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 339 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 254 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 339 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mFound disulfide between residues 288 304\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 288 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 304 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 288 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 304 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mFound disulfide between residues 300 318\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 300 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 318 CYS\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 300 CYD\n",
"\u001b[0mcore.conformation.Conformation: \u001b[0mcurrent variant for 318 CYD\n",
"PDB file name: inputs/1jhl.clean.pdb\n",
"Total residues: 353\n",
"Sequence: DIELTQSPSYLVASPGETITINCRASKSISKSLAWYQEKPGKTNNLLIYSGSTLQSGIPSRFSGSGSGTDFTLTISSLEPEDFAMYICQQHNEYPWTFGGGTKLEIKRQVQLQQSGAELVRPGASVKLSCKASGYTFISYWINWVKQRPGQGLEWIGNIYPSDSYTNYNQKFKDKATLTVDKSSSTAYMQLSSPTSEDSAVYYCTRDDNYGAMDYWGQGTTVTVKVYGRCELAAAMKRMGLDNYRGYSLGNWVCAAKFESNFNTGATNRNTDGSTDYGILQINSRWWCNDGRTPGSKNLCHIPCSALLSSDITASVNCAKKIVSDGDGMNAWVAWRKHCKGTDVNVWIRGCRL\n",
"Fold tree:\n",
"FOLD_TREE EDGE 1 108 -1 EDGE 1 109 1 EDGE 109 224 -1 EDGE 1 225 2 EDGE 225 353 -1 \n"
]
}
],
"source": [
"from pyrosetta import * \n",
"init()\n",
"pose = pose_from_pdb(\"inputs/1jhl.clean.pdb\")\n",
"testPose = Pose()\n",
"testPose.assign(pose)\n",
"print(testPose)"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
"id": "qTi7EVQn8Rv6"
},
"source": [
"## **Step 1. Prepare the starting structure with FastRelax()**\n",
"\n",
"Properly relaxing a structure is crucial in design with Rosetta. A non relaxed structure may not overcome bad global energy well and therefore skew the following analysis on binding energy.\n",
"\n",
"A FastRelax() is used to relax the structrue. While we want to put the sturcture in its lowest energy state, we want to keep the backbone information from the crystal structure as much as possible (lowest RMSD). Therefore, we apply constrain_relax_to_start_coords(True) to FastRelax().\n",
"\n",
"Since FastRelax() is taking up a huge amount of resource, running it seems to crash the notebook, we commented out the \"apply\" part (the part that perform the relax) and print out the relaxMover() instead. We uploaded the relaxed structure to the input folder for furthre analysis.\n",
"\n",
"Coordinate constrained relax is a general prep. For a more advanced version of this preparation method, see the [ pareto-optimal method by Nivon, Morreti, and Baker ](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0059004)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 85
},
"colab_type": "code",
"executionInfo": {
"elapsed": 274,
"status": "ok",
"timestamp": 1583520337756,
"user": {
"displayName": "Yuanhan Wu",
"photoUrl": "",
"userId": "03333451059275340958"
},
"user_tz": 300
},
"id": "Fajoeayb8Rv7",
"outputId": "e8a5826d-1f24-4a75-cead-b26402321408"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0mcore.scoring.ScoreFunctionFactory: \u001b[0mSCOREFUNCTION: \u001b[32mref2015\u001b[0m\n",
"\u001b[0mcore.scoring.ScoreFunctionFactory: \u001b[0mSCOREFUNCTION: \u001b[32mref2015\u001b[0m\n",
"\u001b[0mcore.scoring.ScoreFunctionFactory: \u001b[0mSCOREFUNCTION: \u001b[32mref2015\u001b[0m\n",
"