[Chimera-users] Output chain sequences

Elaine Meng meng at cgl.ucsf.edu
Tue Jul 10 10:00:39 PDT 2018

Hi Joe,
I can’t advise on the python, but our system was down for several days recently.  It’s up now, and I just used the Align Chains service successfully.

Saving fasta for structure chains might be slightly easier in ChimeraX, although still one-by-one.  When you open a structure, there are links in the Log to show each chain sequence with a single click, and then you can save fasta using the context menu within each sequence window.

Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

> On Jul 10, 2018, at 4:48 AM, Healey, Joe <J.R.J.Healey at warwick.ac.uk> wrote:
> Hi Chimera Team,
> I've been experiencing issues with the "Align Chains" tools that connect to Clustal and Muscle - I think ostensibly this might be because the servers are no longer available or something.
> I'm happy to make the alignments myself, but to do this I'd like to try and simply export the sequences of all open models to a fasta file or similar. I know this can be done manually sequence-by-sequence thtrough the GUI.
> Could you tell me what the python (or chimera syntax) would be to do this if it's possible?
> I'm envisaging something to the effect of this, but I can't quite get what I need back in terms of the sequence (it returns a `bound object'?):
> ```
> from chimera import openModels
> all_mods = chimera.openModels.list(modelTypes=[chimera.Molecule])
> with open('output.fasta', 'w') as ofh:
>      for mod in all_mods:
>          ofh.write('>%s\n%s' % (mod.name, mod.sequence)
> ```

More information about the Chimera-users mailing list