You are here

mutate_residue doesn't mutate

7 posts / 0 new
Last post
mutate_residue doesn't mutate
#1

Hello,

In my version of PyRosetta, which I downloaded in december 2014, the mutate_residue function doesn't mutate the sequence of the Pose...

Here is the relevant part of my code:

for j in sequence:
(...)
mutate_residue(pose,resn,j, pack_scorefxn=score_fxn)
(...)
jd.output_decoy(pose)

When I do this, pose doesn't change even though its whole sequence should be replaced.

I decided to do something else then:

for j in sequence:
(...)
mutator = MutateResidue( resn , j )
mutator.apply( decoy )

This time it doesn't work because the amino acids are not recognized :
ERROR: unrecognized residue name 'A'
ERROR:: Exit from: src/core/chemical/ResidueTypeSet.cc line: 397

So I switch to 3 letter code, 'ALA' and now it works fine even though the doc says that the one letter code should be given.

In the end I get what I want with this hack but I'd like to know if you observe the same with your version of PyRosetta.
Also, there is a mistake in the SetPyRosettaEnvironment.sh script which looks for rosetta_database whereas the directory is just 'database'.

Cheers,
D.

Category: 
Post Situation: 
Wed, 2015-03-18 02:32
dsim

Hi D,
How exactly does your code access residue from Pose object? If it uses function like pose.residue and then change returned object then this will not work because returned object is 'const' in C++ world. So it really should not be changed. Please try using 'pose.replace_residue' function instead.

Best,

Thu, 2015-03-19 21:55
Sergey

Hi Sergey,

actually I don't access explicitely to any residue. I use mutate_residue from the toolbox.
Here is what the help says:

Help on function mutate_residue in module toolbox:

mutate_residue(pose, mutant_position, mutant_aa, pack_radius=0.0, pack_scorefxn='')
Replace the residue at <mutant_position> in <pose> with <mutant_aa> and
repack any residues within <pack_radius> angstroms of the mutating
residue's center (nbr_atom) using <pack_scorefxn>

Note: <mutant_aa> is the single letter name for the desired ResidueType

Example:
mutate_residue(pose, 30, "A")

Doesn't it look like it should do the job ?
When I run this function, it does something. It looks like it mutates residues and repack, as it should.
But then, when I write my pose to a pdb it hasn't changed...

++
D.

Mon, 2015-03-23 08:28
dsim

This is from Evan Baugh who wrote the original function:

"Sometime after I added this to PyRosetta, someone created the MutateResidue Mover (yes, it is a Mover despite the name), this is what you should actually use to make a canonical point mutation, my method uses the packer directly and in some rare cases (like...definitely <1% of the time) the packer will not be able to find a sidechain of the new aa that is lower in energy than the old sidechain, in this case, no change will occur"

That said, we will change the functionality to force the mutation as it should be sometime this week. I will update this post when it is pushed to the developer version.

-Jared

Mon, 2015-03-23 10:11
jadolfbr

Hello Jared!

Has any changes been done regarding this mutation since the last year? I'm trying to mutate to a aa with higher energy on purpose to show that the scoring will get worse, but I have the same problem as the thread starter. 

 

-Anneli

Tue, 2016-04-19 05:14
anelutt

From what I can tell, the current version of PyRosetta still has the issues discussed with mutate_residue(). Use the MutateResidueMover instead.

Fri, 2016-04-29 09:48
rmoretti

Allright, thanks a lot Jared.

++
D.

Wed, 2015-03-25 01:59
dsim