Member Site Forums PyRosetta PyRosetta – General Concatenate Pose

Viewing 8 reply threads
  • Author
    Posts
    • #797
      Anonymous

        Hi All.

        I was wondering if anyone knows of a way to select residues of a pose (and their corresponding data) and then copy them to a new pose (for writing/analysis). Then, if possible, deleting those residues in the pose. I was thinking through the fold tree, but I can’t seem to figure it out. Thanks in advance for any help.

        -Jared

      • #5064
        Anonymous

          I assume these Pose functions are wrapped in python:

          append_residue_by_(jump/bond)

          insert_residue_by_(jump/bond)

          replace_residue

          copy_segment

          delete_polymer_residue

        • #5065
          Anonymous

            I searched through core.pose, and searched the help. Couldn’t find them, but thanks for the suggestion. Maybe in the next version?
            Also, do you know if there is a way to export a list of all wrapped functions and their descriptions from iPython, or a document with all of these floating around?

            -Jared

          • #5077
            Anonymous

              Hi Jared,

              I just double checked and indeed as Steven mentioned, member functions of Pose: append_residue_by_jump pose.append_residue_by_bond, replace_residue, insert_residue, copy_segment and other are in the current version of PyRosetta. How did you check for then? The easiest way that I would recommend is to create instance of Pose object like: pose = rosetta.Pose() and then in iPython type:
              ‘pose.append’ and then hit ‘tab’ key twice – then you should see list of all member functions that start with ‘append’.

              Now, regarding exporting all wrapped functions: you can use standard python notation like: ‘from rosetta.core.pose import *’ – this will import all classes/functions that is wrapped in core.pose.

              Let us know if you need more help with this.

            • #5078
              Anonymous

                Sergey,

                Thanks a lot for your comment. I see the functions now. I think I did ‘help rosetta.core.pose’ in ipython…

                Regarding all wrapped functions: I can import all the functions, or see what functions exist using ipython, but do you know of any way to export each of them and the description that accompanies them to a file, sorta like a full appendix?

                Thanks,

                -Jared

              • #5080
                Anonymous

                  Jared, I am not sure how to save documentation for all functions to one file, but there is a really convenient way to browse it. Do this: in you PyRosetta directory execute ‘pydoc -p 8090’, then point your browser to http://127.0.0.1:8090/rosetta.html and you should see all PyRosetta documentation that available in python. For example Pose class docs will be at: http://127.0.0.1:8090/rosetta.core.pose.__pose_all_at_once_.html

                  Also you can generate this documentation for offline usage by executing ‘pydoc -w ./’ in the PyRosetta folder.

                  Sergey.

                • #5081
                  Anonymous

                    Exactly what I was hoping for. Thanks.

                    -J

                  • #5085
                    Anonymous

                      One more question, hopefully. I was able to delete loops from my structure using the delete_polymer_residue; however when I dump the pdb or use the job distributor with the original pose assigned, I’m not able to get the original numbering or chain info back. Is this possible seeing as how I’m messing with the pose so much? If not, I can write some code in python to do it manually, but I wanted to double check before I go that route.

                      -Jared

                    • #5087
                      Anonymous

                        The PDBInfo object jettisons its numbering when residues are added or deleted (or at least, it did as I originally wrote it). It’s possible someone has improved it since then to keep track through indels, but I’d guess not, since it didn’t work for you. Try the manual solution.

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