STRAP-scripting language

Scripts can be used An alphabetic list of all script commands is available at the bottom of the script panel in Strap, or with the program parameter -help=script.

HTTP port 10117 can be used by other programs to send script commands. Strap is listening on port 10117 unless a different port is specified with the command line option -port=number. With -port=0, Strap is not listening. The following command line would load the two PDB entries.
      echo "-script=load PDB:1sbc-LINEBREAK-load PDB:1prn" | telnet localhost 10117
In this html page, scripts are send to port 10117 with a Java-script object of type XMLHttpRequest when the user clicks "Run".

Named pipes are another option for local programs to send script lines. Try:
      mkfifo test.namedPipe
      echo > test.namedPipe
      java -jar strap.jar -script=test.namedPipe
In another terminal type:
      echo aa_sequence hello , sequence1 >> test.namedPipe
      echo aa_sequence world , sequence2 >> test.namedPipe
It works also with regular files when the file name has the suffix ".namedPipe". On Windows the file suffix is always required. Reading data from Strap: There are script commands to write information to an output file specified with the command line parameter -scriptOutput=file-path.

Java-webstart is not included in Oracle Java any more and the SingleInstanceListener technology has been removed.


The command "close" removes all proteins from the current Strap session. The following example links will load a new set of proteins for the commands to act on.

Gaps are inserted into the protein. This may be used to infer the gaps of a multiple sequence alignment that is computed on a server. The gaps are specified by a string of letters and non-letter characters.

A number of proteins are aligned. If at least two of the proteins have a 3D-structure then 3D-superposition is used to improve the alignment.

Removes the protein.

Residue Annotation

The residue annotation with name "myAnnotation1" is created for residues 10-30 and 32.

For pdb-proteins, the residue number can be specified using the Rasmol notation "residue-number:chain". The chain can be left off if there is only one.

The Color is specified with command set_annotation which is similar to add_annotation (see below). The only difference is that all previous values are removed before adding the new one. The command set_annotation is used when there should only be one annotation with the given key, here "Color".

The residue selection "myAnnotation1" has been created with the previous commands. If it does not exist, then an error message will appear. Annotated residue selections contain a set of key-value pairs. The keys are "Note", "Balloon", "Color" etc.. The key-value pair ("Balloon","Example of...") is added to the annotation. Double click the annotation or open "View/edit annotation" from the Context-menu to see the stored information.

With add_annotation, more text can be added. Annotations with the key "Balloon" appear in the tool-tip (or so-called Balloon-message).

Deletes the residue annotation. will load all sequence into Jalview and will also display the residue selections.

Residue Annotation from UniProt

Residue Annotation from BioDAS services

BioDAS has become unavailable in 2015.

Residue selections and Displaced positions

Consider, the residues 80 to 90 "CLEASGMQCPI" of the protein UNIPROT:P29590.
Now load PFAM:PF00097 and highlight these residues in Pfam.
However in earlier PFAM-releases the selection, had been displaced by 2 amino acids because it it had been using an earlier UNIPROT version of UNIPROT P29590. This is a rare situation but might occure due to sequence updates in Uniprot entries.
Solution to the Problem: Specification of the sequence object:


The C-Alpha atom trace of the protein structures are shown.

Proteins can be specified by name. But they can also be specified by the expression they were loaded with or by an accession or PDB id. In the URL the protein is loaded with "PDB:1v6c_A".

The proteins matching the regular expressions *\.pdb are added to the 3D-view of subtilisin.pdb. If subtilisin.pdb is not yet in a 3D-view, then a new 3D panel is created.

Closes the C-alpha trace of all proteins.

The Swissprot file hslv_bacsu contains only the amino acid sequence. The 3D-coordinates of PDB:1ned_A will be infered. The PDB-file can refer to the smae protein or to a homologous protein. A sequence alignment algorithm is used for mapping the postition.
If the pdb ID is not known, "AUTO" indicates that STRAP should automatically search for the best structure. This may even fail. It depends on precomputed blast results.

A number of proteins are superimposed three-dimensionally. The optimal reference structure is selected automatically. After superimposition all but one proteins are in a new coordinate system. The user can restore the original coordinates: Context-menu-of-proteins>3D.

Restore original coordinates:

The rotation matrix (9 numbers) and the translation vector (3 numbers) are applied.
      X2 = X *  -0.51 +  Y *  -0.69 +  Z *   0.50 +   91.15
      Y2 = Y *   0.22 +  Y *   0.45 +  Z *   0.86 +   25.13
      Z2 = Z *  -0.82 +  Y *   0.55 +  Z *  -0.80 +   55.68

Commands that start with 3D_ such as 3D_spheres act on the 3D view currently in focus. In Strap, the current 3D view can be activated by clicking into the 3D pane. Within scripts, the command select_3D is used to select a certain view by its name. Show Macromolecular assembly 1 or the asymmetric unit respectively. The biological units (i.e. macromolecular assemblies) are given as a decimal or hexadecimal bit masks. For example 0x8 denotes the assembly 3 since 2^3=8. Also see the BIOMT lines in PDB files.


A protein-complex consist of several peptide chains. If two multimeric proteins are loaded, the script command "superimpose" can not be applied because it would also superimpose non-homologous chains of the same multimeric structure.

For the structural comparison of two protein-complexes the command superimpose_protein_complexes can be used. Now knowledge of which chains are matching is needed.

For superimposing these two heter-trimeric G-proteins, the superpositions of all three chains of PDB:1scg versus the three chains of PDB:1a0r is probed. Comparing the score values of these nine superpositions shows that the chains PDB:1A0R_B PDB:1SCG_B are very similar. Having identified this pair of similar peptide chains, the superposition of the two complexes will be based on these chains.

If it is already known, which chains from either complex are best matching, these chains can be directly superimposed. Then the resulting transformation matrix can be applied to the other chains in the complex using the command rotate_translate_protein_complex.


Strap contains full featured 3D-molecule viewers such as OpenAstex.

The three proteins (given after the colon) are loaded into the same 3D view. The 3D-view is called "myView". This id will be used in the subsequent commands.

The respective residues are shown as spheres. Residue numbering starts at 1. To refer to the pdb-residue numbering, please use the Rasmol syntax "number-colon-chain". For example "20:A" means amino acid with number 20 in chain A.

The atoms can be specified. Asterisks are allowed as for example ".N*" denoting all nitrogen atoms.

Move the view such that the selection is centered in the viewer panel. Otherwise, the change might remain unnoticed when it is beyond the screen border.

There are many other style commands which can be used in this context. See menu of the 3D-view.

Removes a protein from view "myView".

Removes the entire 3D-view "myView".

Change order of proteins

Move the given protein to the given row. A row can be defined by a number or indirectly by another protein.

The protein is not shown in the alignment but it remains loaded. To access hidden proteins open the vertical divider which is at the left edge of the STRAP panel.

Show the protein again.


The alignment is scrolled so that amino acids 20-30 of protein hslv_ecoli is visible. If more than one item is given, then the program tries to find a scroll position where all items are visible.

If the vertical scroll bar is visible, the alignment is scrolled so that protein hslv_ecoli is visible. The horizontal scroll position remains unchanged.

Using the Rasmol notation "residue-number:chain".

The alignment is scrolled so that the given selection is visible.

The alignment cursor is set to the given amino acid.

Selecting proteins and residue selections

The given protein and the given residue selections are selected. The residue selections are surrounded by marching ants.

All proteins are selected.

Regular expression matching is activated if an asterisk or a square bracket occurs in the text.

All residue selections of this protein are selected.

myAnnotation1 and myAnnotation2 is matching.

Unselect all proteins.

Unselect all residue selections.

A ants is drawn encompassing all given residue annotations and amino acids.

Nucleotide Reading Frame

Use the first CDS of the EMBL or GenBank file.

Apply the given coding sequence for translation into amino acids.

The "new_nucleotide_selection" command has the same syntax as "new_aminoacid_selection".


Icons for sequences

Removes an icon.

Sets a protein icon.


Accession-IDs and cross references act as references to protein database entries. They are listed in the balloon texts of the protein labels. These balloon texts appear when the mouse is over the left edge of the protein label. Read the balloon texts to observe the effect of the commands above. These database IDs allow to obtain additional information from Web-resources such as sequence features like phosphorylation sites, active sites and signal peptides. Further they are used for forming Web links. A list of Web links can be obtained by clicking the left part of a protein label in the row-header of the alignment.

In case of errorneous PDB reference. Wrong PDB will be noticed at least when it is used to assiociate a 3D-structure by the bad alignment.

Send enhancement request to
@ christophgil @ googlemail .com