This is a read-only mirror of pymolwiki.org

Difference between revisions of "Get fastastr"

From PyMOL Wiki
Jump to navigation Jump to search
m (2 revisions)
m (1 revision)
 
(One intermediate revision by one other user not shown)
Line 11: Line 11:
 
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
 
fetch 1ubq, async=0
 
fetch 1ubq, async=0
print cmd.get_fastastr('all')
+
print(cmd.get_fastastr('all'))
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 02:46, 3 April 2017

get_fastastr is an API-only function which returns the one-letter amino acid sequence in FASTA format.

PyMOL API

cmd.get_fastastr(string selection='all', int state=-1, int quiet=1)

Example

fetch 1ubq, async=0
print(cmd.get_fastastr('all'))
>1ubq
MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLV
LRLRGG

Known Issues

  • Due to a bug this function currently only works for selections from a single object (see #3466472)
  • The sequences of different chains are just concatenated and returned as a single sequence

See Also