You are here

Making mutations in PyRosetta?

16 posts / 0 new
Last post
Making mutations in PyRosetta?
#1

Hi all,

I'm new to PyRosetta and just had a quick question. Is there a way to make mutations to an existing protein structure using PyRosetta? I'm currently doing all the mutations in PyMOL then saving the mutants as new pdb's and calling them into PyRosetta for analysis. If I could just write a short script to mutate the structure using PyRosetta, it would save me a lot of time. Thanks!

Post Situation: 
Thu, 2012-08-09 09:24
thorx020

The most straightforward way I can think of off the top of my head is to use the Pose function replace_residue. You'll need a copy of the residue with which you want to do the replacement (probably from ResidueFactory). You should repack after the replacement.

You can just as easily set up a PackerTask which specifies a mutation at your position of interest, then repack using that PackerTask, which will repack while mutating. Specifying a single mutation in code using the PackerTask is marginally troublesome (in C++), but you may find it easier than the other methods.

I know these are broad overviews of how to do these things. I can offer more descriptions of how classes work if you need them, but I only know Rosetta in C++ so I can't write the python for you.

Thu, 2012-08-09 10:00
smlewis

There is a Mover called MutateResidue

ex. mut = MutateResidue( 1 , 'A' )

use pose numbered residue number and the single letter code for the new amino acid

there is also an example method for mutating and repacking the nearby residues outlined in mutants.py, a sample script on the PyRosetta website under Scripts

If you want to use a non-canonical amino acids (anything other than the usual 20 amino acids) you can use the method Steven suggested using the PackerTask (and example script for using this object is also on the PyRosetta Scripts page), if you have the appropriate params file or its in the PyRosetta database

Thu, 2012-08-09 16:52
evan

I haven't tested it, but it looks like if you know the full Rosetta residue type name you might be able to use it with the MutateResidue mover, instead the one letter code. (Unless that functionality got masked in the PyRosetta wrapping.) This should allow you to use the mover with non-canonical amino acids.

Fri, 2012-08-10 15:24
rmoretti

Newer versions of PyRosetta include an exposed method that performs simple point mutations:

mutate_residue(pose, 49, 'E')

The above will replace residue 49 of pose with a glutamate. (However, it does not optimize rotamers.)

Tue, 2012-09-11 07:27
Labonte

Hi Labonte,
I am using the method of mutate_residue(pose, 49, 'E') on my PyRosetta. However, I was told:

name 'mutate_residue' is not defined

Do you know why? Thank you very much.

Mon, 2014-08-11 07:37
lanselibai

What version of PyRosetta are you using? You may be using an older one which doesn't yet have that function.

Tue, 2014-08-12 08:37
rmoretti

Hi, rmoretti,
I installed
PyRosetta.Windows.64Bit.monolith.mode=release.branch=release-r10.exe
Do you think is this a problem?

Yours sincerely
Cheng

Wed, 2014-08-13 07:42
lanselibai

I think that should be recent enough. One possible issue is that the mutate_residue() function may be in the toolbox module rather than being imported with the regular rosetta module. Try doing a "from toolbox import *" prior to using mutate_residue, and see if that helps.

Wed, 2014-08-13 08:23
rmoretti

Hi rmoretti,
I think you are right. After using "from toolbox import *", the "mutate_residue" can be run. However, my PC freezes for more than 30min and everything stops. So I have to restart the PC. I was only mutating one residue within a sequence of three residues. Maybe my PC is too old now.

Wed, 2014-08-13 12:41
lanselibai

I wouldn't think that mutating a residue should take all that much time, even on an older computer. There might be something going on with your PC besides just being old, though. I'd certainly recommend trying PyRosetta out on another machine and see if that solves your problem.

Thu, 2014-08-14 08:33
rmoretti

Is your memory usage spiking when this is running?

Fri, 2014-08-22 09:02
ajasja

Hi ajasja,
Do you mean if memory usage failed? I am not sure about it. All I know is the PC froze. I will try to use a cluster later. Thank you.

Mon, 2014-08-25 09:50
lanselibai

If you use the windows task monitor to monitor the memory usage, what sort of memory profile do you observe? How much memory is used by PyRosetta? When I tested this PyRosetta used 5GB of RAM on windows and only 1 GB on linux.

Tue, 2014-08-26 12:03
ajasja

Hi ajasja,
My Windows PC only has 4GB RAM and it was using almost 100% when the PC froze. As you said, it requires 5GB. So a Windowns PC may not be suitable to run PyRosetta. Thank you very much for testing it.

Yesterday, I used a resfile to mutate the protein and it turned out to be okay.

But anyway, I will use cluster in the future. Thanks a lot!

Wed, 2014-08-27 01:33
lanselibai

You can also use PyRosetta from within a virtual machine. (eg VirtualBox). The slowdown is minimal and the memory usage does not spike.
For testing scripts this might be more convenient.
If you setup an IPython notebook server on the VM you can work from Windows in browser, which is a nice bonus.

Best regards,
Ajasja

Mon, 2014-09-22 10:17
ajasja