Keywords: pose_from_pdb(), sequence(), cleanATOM, annotated_sequence()
In this lab, we will get practice working with the Pose
class in PyRosetta. We will load in a protein from a PDB files, use the Pose
class to learn about the geometry of the protein, make changes to this geometry, and visualize the changes easily with PyMOL
and PyRosetta's PyMOLMover
.
On the corresponding Pose
lab found on the PyRosetta website, you will find various useful commands to interrogate poses; these may come in handy for the exercises.
PyRosetta Installation: The following two lines will load in the PyRosetta library and load in database files. If this does not work, please notify the professor or the TA.
!pip install pyrosettacolabsetup
import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()
import pyrosetta; pyrosetta.init()
from pyrosetta import *
init()
Protein Data Bank (PDB) is a text file format for describing 3D molecular structures and other information. Rosetta can read in PDB files and can output them as well. In addition to PDB, mmTF and mmCIF are a couple other file formats that are used with Rosetta.
We will spend some time today looking at the crystal structure for the protein PafA (PDB ID: 5tj3) using Pyrosetta. PafA is an alkaline phosphatase, which removes a phosphate group from a phosphate monoester. In this structure, a modified amino acid, phosphothreonine, is used to mimic the substrate in the active site. Let's load in this structure with PyRosetta (make sure that you have the PDB file located in your current directory):
This will set our current working directory to student-notebooks folder
!cd /content/google_drive/MyDrive/student-notebooks/
This will print the current working directory:
!pwd
(the bang symbol "!" indicates a linux system command).
This will list the files in current working directory:
!ls
Remember to adjust your working directory each time you work in one of the PyRosetta notebooks!
!echo Starting directory info
!pwd
!ls
!echo Student notebook directory [adjust the path depending on where you put the notebooks!]
!cd /content/google_drive/MyDrive/student-notebooks
!pwd
!ls
# [optional|advanced] you can also install and open a "real" UNIX terminal and do above commands interactively:
!pip install colab-xterm
%load_ext colabxterm
%xterm
pose = pose_from_pdb("5tj3.pdb")
Here we are inputting the PDB file using the pose_from_pdb
method. However, we can also load this structure from the internet with pose_from_rcsb("5TJ3")
.
YOUR-CODE-HERE
The Pose class includes various types of information that describe a structure. Some of the core components include the Energies, PDBInfo, and Conformation. See the Rosetta3 paper to learn more: https://www.sciencedirect.com/science/article/pii/B9780123812704000196
As an example, let's use our pose to look at the sequence of 5TJ3:
pose.sequence()
# print out the sequence of the pose
YOUR-CODE-HERE
Sometimes PDB files do not conform to standards and need to be cleaned to be loaded successfully with PyRosetta. One way to make sure the file is loaded successfully is to only include the ATOM lines from the PDB file. Alternatively, you could use the cleanATOM function in pyrosetta.toolbox to achieve the same:
from pyrosetta.toolbox import cleanATOM
cleanATOM("inputs/5tj3.pdb")
This method will create a cleaned 5tj3.clean.pdb file for you. Lets load this into PyRosetta as well:
pose_clean = pose_from_pdb("inputs/5tj3.clean.pdb")
In our case, we could load in the PDB file for 5tj3 without cleaning it. In fact, we've lost some residues when cleaning the PDB file with cleanATOM. What is the difference in the sequence
of the pose_clean
now, compared to before?
# print out the sequence of the pose_clean
YOUR-CODE-HERE
With the function annotated_sequence
below, we can start to see in more detail what the differences are. Note that non-canonical amino acids and hetatms are spelled out more explicitly now.
pose.annotated_sequence()
pose_clean.annotated_sequence()
Visually inspect the sequences to find the difference(s) between the pose_clean.sequence()
and pose.sequence()
. Were residues removed? Which ones?
(Optional) Write a program to automatically find the differences between these two sequences