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:
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/).
Jim.
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
Begin forwarded message:
Subject: Save only the sequence that is present in the model
Date: June 28, 2023 at 6:53:11 AM PDT
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
To unsubscribe send an email to
chimerax-users-leave@cgl.ucsf.edu
Manage subscription: