Difference between revisions of "Get fastastr"

From PyMOLWiki
Jump to navigation Jump to search
(Created page with "== cmd.get_fastastr == Do you have a pdb file which come from a modelling program?<br> Are you unsure about which amino sequence is in the "long" pdb file? What you really want...")
 
(Nucleic acid support)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== cmd.get_fastastr ==
+
[[get_fastastr]] is an API-only function which returns the one-letter amino acid sequence in FASTA format.
  
Do you have a pdb file which come from a modelling program?<br>
+
''Changed in PyMOL 2.2: Sequences per chain''
Are you unsure about which amino sequence is in the "long" pdb file?
 
  
What you really want is to: '''get the FASTA string''' ?
+
''Changed in PyMOL 2.2: Nucleic acid support''
  
Then write in pymol:
+
== PyMOL API ==
'''print cmd.get_fastastr('all')'''
 
  
That will give you the sequence.
+
<syntaxhighlight lang="python">
 +
cmd.get_fastastr(string selection='all', int state=-1, int quiet=1)
 +
</syntaxhighlight>
 +
 
 +
== Example ==
 +
 
 +
<syntaxhighlight lang="python">
 +
fetch 1ubq, async=0
 +
print(cmd.get_fastastr('all'))
 +
</syntaxhighlight>
 +
 
 +
>1ubq
 +
MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLV
 +
LRLRGG
 +
 
 +
== See Also ==
 +
 
 +
* [[Aa codes]]

Latest revision as of 13:49, 30 July 2020

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

Changed in PyMOL 2.2: Sequences per chain

Changed in PyMOL 2.2: Nucleic acid support

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

See Also