[chimerax-users] Where is the renumber sequence tool in ChimeraX?

Eric Pettersen pett at cgl.ucsf.edu
Mon May 16 13:53:48 PDT 2022


Hi Isabelle,
	Yes, there is no user-friendly way to renumber residues in ChimeraX yet.  The renumber_residues() method that you found can do it, if you know how to call it correctly.  Here is some code to renumber chain A in a structure starting from -7:

	from chimerax.core.commands import run
	s = run(session, "open my_structure_file")[0]
	for chain in s.chains:
		if chain.chain_id == "A":
			s.renumber_residues(chain.existing_residues, -7)

The caveat is that if the chain has any missing residues, this renumbering won't maintain any jumps in numbering across those gaps -- the numbering will simply be consecutive.  You would need fancier code to maintain jumps in numbering.

--Eric

	Eric Pettersen
	UCSF Computer Graphics Lab

> On May 13, 2022, at 2:56 PM, Phan, Isabelle via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
> 
> The sequence of my structure  includes  a tag and I want to renumber from -7 so that the first residue is the start Met. I tried the old chimera command resrenumber = FAIL. I googled and searched the docs, read the list of commands one by one, and still could not figure it out.
> 
> The API has a renumber_sequence() function but I don't understand the description (what’s "the given residues”? The chain?) and was unable to find an example on how to call this from the interface. I opened the python shell and typed:
> 
> from chimerax.core.commands import run
> run(renumber_residues('#1/A:*', -7))
> # FAIL
> 
> Sorry if this is trivial, I am still completely baffled by ChimeraX despite using it for years.
> 
> Thanks,
> 
> Isabelle
> CONFIDENTIALITY NOTICE: This e-mail, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220516/b9c9f3df/attachment.html>


More information about the ChimeraX-users mailing list