Scoring a membrane protein in PyRosetta?

Member Site Forums PyRosetta PyRosetta – Applications Scoring a membrane protein in PyRosetta?

Viewing 7 reply threads
  • Author
    Posts
    • #1799
      Anonymous

        Hi everyone,

        I would like to study mutations in a membrane protein with PyRosetta. Is this currently possible and if so, how do I pass on information about the transmembrane region to the scoring function?
        Should I use the ‘score_membrane.wts’ scoring function?

        Thanks,
        Tobias

      • #9675
        Anonymous

          It should be possible, although there is not necessarily a good way to programmatically twisty all the knobs. Instead, you have to manipulate the Rosetta options system. See http://www.pyrosetta.org/faq#TOC-1.-How-do-I-interact-with-the-Rosetta-Options-system-using-PyRosetta- for details. Keep in mind that the values of some options (especially energy function options) are accessed early and stored internally, so changing them midway through the program might not work as expected. It’s often best to set options as early as possible, and then leave them at a single setting throughout the whole PyRosetta run.

          To tell Rosetta what the transmembrane regions are, use a span file. The regular Rosetta documentation covers this somewhat in the membrane ab inito documentation. https://www.rosettacommons.org/manuals/archive/rosetta3.5_user_guide/db/d38/membrane_abinitio.html Although not needed, adding a lipophilicity file can often also help with membrane predictions.

          Regarding what weights files to use score_membrane.wts is a low-resolution (centroid mode) score function. It’s good for folding and loop modeling studies, but if you’re using a somewhat constant backbone structure, you’ll want a full atom scorefunction, of which I would recommend the membrane_highres_Menv_smooth.wts scoring function with the following options:

          #Boolean options
          -membrane:no_interpolate_Mpair #membrane scoring specification
          -membrane:Menv_penalties #turn on membrane penalty scores

          #file options
          -in:file:spanfile protein.span # Transmembrane prediction
          -in:file:lipofile protein.lips # Lipophilicity prediction

          There’s no way to change these options programmatically – they have to go through the options system, and should be set before you create the scorefunction.

        • #9695
          Anonymous

            Hi,
            I am trying to get rosetta score for membrane protein (using Pyrosetta).
            My code:
            init()
            pose = Pose()
            pose_from_pdb(pose, pdb_filename)

            spanfile = os.path.join(work_dir,os.path.basename(pdb_filename)+”.spn”)
            rosetta.core.set_string_option( ‘in::file::spanfile’ , spanfile)
            print rosetta.core.get_string_option( ‘in::file::spanfile’ )

            mem_scorefxn = create_score_function(‘score_membrane’)
            print mem_scorefxn.show(pose)

            I get this error:
            ERROR: set_option: OptionKey with id in::file::spanfile not found!

            Any ideas what am doing wrong here?
            Thanks

          • #9696
            Anonymous

              by the way I also tried using : core.get_file_option and got the same error

            • #9703
              Anonymous

                Which version of PyRosetta did you use? I jus tried example below (take from http://www.pyrosetta.org/faq#TOC-1.-How-do-I-interact-with-the-Rosetta-Options-system-using-PyRosetta-) on one of the latest build and it works as expected. If you using an old build it quite possible that it does not have this option yet.


                In [1]: import rosetta
                In [2]: rosetta.init()
                ...
                In [6]: rosetta.core.set_string_option('in:file:frag3', 'aaa')
                In [7]: print rosetta.core.get_string_option('in:file:frag3')
                aaa
                ...
                In [8]: rosetta.core.set_string_option('in:file:spanfile', 'bbb')
                In [9]: print rosetta.core.get_string_option('in:file:spanfile')
                bbb

              • #9721
                Anonymous

                  Hi again,
                  Please help me…

                • #9784
                  Anonymous

                    Hi nh,
                    Try the following:
                    from rosetta import *
                    init()
                    import rosetta.basic.options
                    rosetta.basic.options.set_string_option(“in:file:spanfile”, “asdf”)
                    print rosetta.basic.options.get_string_option(“in:file:spanfile”)

                  • #9801
                    Anonymous

                      Hi again,
                      Thanks for helping me before.

                      Now I have a new problem.

                      I would like to score a complex with two chains.
                      When using a simple score (not membrane)
                      Like:
                      pose = Pose()
                      pose_from_pdb(pose, pdb_filename) #pdb with both chains
                      bound_score = fa_scorefxn(pose)

                      With this I get the whole complex score.

                      But I would like to score it with the membrane score function.

                      I do:
                      opts = [“-in:file:spanfile “+spanfile, “-in:file:fullatom”,”-membrane:no_interpolate_Mpair”,”-membrane:Menv_penalties”]
                      rosetta.init(” “.join(opts))
                      mem_scorefxn = create_score_function(‘membrane_highres_Menv_smooth’) # or (‘score_membrane’)
                      bound_score = mem_scorefxn(pose)

                      I prepare a concatenated file of two span files (also changing the residue number).
                      What I see in the output log is that only one chain’s membrane region is taken from the span file.

                      Any ideas how to do this?
                      Attaching the pdb file, span files and the output file.

                      Thanks!

                    • #9689
                      Anonymous

                        Thanks!

                        Does the scoring function consider lipo files? I would have to download the NR database from NCBI, is that right?

                      • #9691
                        Anonymous

                          Yes, the same machinery that considers the span file will also take the lipo file into consideration.

                          I’ve never run the run_lips.pl script myself, but as I understand it you will indeed need BLAST and the NR database from NCBI to run it. (Keep in mind that the lipofile is optional – if you have issues generating it, you can still run the protocol without it.)

                        • #9705
                          Anonymous

                            Thanks for the reply.

                            I am using a new version which was downloaded last week.

                            It looks like it has the set/get options but is not able to find the “option keys” for some reason.

                            I get the error:

                            ERROR: set_option: OptionKey with id in:file:frag3 not found!
                            ERROR:: Exit from: /home/sergey/PyRosetta.autobuild.linux.Ubuntu/main/source/src/python/bindings/rosetta/core/__core_all_at_once_.0.cpp line: 48

                            Maybe something to do with the compilation.
                            Is it possible to get the source so I can compile it on my computer?

                            Thanks a lot.

                          • #9726
                            Anonymous

                              Can you post the full command you are using to set the options? Have you called rosetta.init() before you try to set the option?

                              In the meantime, instead of getting and setting individual options, you can have the options as strings in a list and re-init Rosetta with those options:

                              rosetta.init(” “.join(opts))

                              Make sure to have “-” in front of the option. In your case, you would have opts = [“-in:file:frag3 path_to_my_file.txt”] Any other options that you would want to set can be added to the opts list.

                            • #9730
                              Anonymous

                                Hi,

                                Thanks a lot for your reply.

                                rosetta.init(” “.join(opts)) works!

                              • #9805
                                Anonymous

                                  First off, good job on knowing that you need to adjust the residue numbering. Residue numbering mismatches are typically where people get tripped up.

                                  The issue you’re seeing, though, is the line “6 496” in the span file. The second number is the total number of residues, which you correctly updated, but the first number is the number of transmembrane helicies. Since you left it at 6, it only reads in the first 6 entries in the file, and omits the rest. You need to adjust that line to match.

                                • #9810
                                  Anonymous

                                    Hi,

                                    It works!!
                                    Thanks a lot for your help.
                                    I really appreciate it!

                                    All the best.

                                Viewing 7 reply threads
                                • You must be logged in to reply to this topic.