
Hi Jim and Eric, Thanks to both of you for the great Answers! That's very helpful. Best, Matthias Sent from Outlook for Android<https://aka.ms/AAb9ysg> ________________________________ From: James Procter (Staff) via ChimeraX-users <chimerax-users@cgl.ucsf.edu> Sent: Wednesday, June 28, 2023 8:21:24 PM To: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>; Eric Pettersen <pett@cgl.ucsf.edu> Subject: [chimerax-users] Re: Save only the sequence that is present in the model Dear Matthias. Apologies for the non-chimerax post - but thought it is worth mentioning what you ask is pretty easily with Jalview's command line interface. If you install jalview via bioconda or download your preferred installer for your platform (https://www.jalview.org/download/) you can run Jalview from the command line (https://www.jalview.org/help/html/features/commandline.html) and export sequences with coordinates like: jalview --headless --open <pdb or mmcif file> --fasta out.fa The out.fa file will only contain residues which had a backbone atom with coordinates present in the model. For the moment, you'd need to do this once for each file (changing the filename of course), but our next major release (2.11.3) has a much more powerful command line interface that supports batch processing of whole directories, globs and replacement. See Jalview develop's built in documentation after launching it to find out more (https://www.jalview.org/development/jalview_develop/). Hope this helps, Jim. ________________________________ From: Eric Pettersen via ChimeraX-users <chimerax-users@cgl.ucsf.edu> Sent: 28 June 2023 18:35 To: Eric Pettersen <pett@cgl.ucsf.edu> Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu> Subject: [chimerax-users] Re: Save only the sequence that is present in the model Hi Matthias, There is no command for just saving the modeled sequence of a structure, so you would have to use Python scripting. Below is the code to print the names of chains and the corresponding modeled sequences to the log. You should be able to easily adapt it to what you want, assuming you're familiar with Python... from chimerax.atomic import all_atomic_structures for s in all_atomic_structures(session): for chain in s.chains: print(chain.name, ''.join([c for c, r in zip(chain.characters, chain.residues) if r])) --Eric Eric Pettersen UCSF Computer Graphics Lab On Jun 28, 2023, at 8:29 AM, Eric Pettersen via ChimeraX-users <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> wrote: Begin forwarded message: From: Vorländer,Matthias Kopano <matthias.vorlaender@imp.ac.at<mailto:matthias.vorlaender@imp.ac.at>> Subject: Save only the sequence that is present in the model Date: June 28, 2023 at 6:53:11 AM PDT To: ChimeraX-users <chimerax-users-bounces@cgl.ucsf.edu<mailto:chimerax-users-bounces@cgl.ucsf.edu>> Dear ChimeraX team, I would like to save only the sequence of a chain that is actually modelled. As I would like to do this for many files it would be great if this would work via scripting. Is this possible? Many thanks, Matthias _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu<mailto:chimerax-users-leave@cgl.ucsf.edu> Manage subscription: The University of Dundee is a registered Scottish Charity, No: SC015096