@*~RSC_HELP_APPS

Apps - Running external applications

The Apps dialog allows to run local programs and web applications with the currently loaded sequence data. They are listed in an expandable tree and can be activated by mouse click (Debugging: hold Ctrl while clicking).

With the settings button at the top of the dialog, the user can change the list of applications. In addition, lines are added from all files with the ending ".list" in HTMLDOC_FILE:DIR_STRAP_APPS_ETC and HTMLDOC_FILE:DIR_STRAP_APPS_PRGDATA.

With apps, the functionality of Strap can be extended. They might provide: Apps extend the functionality of Strap. They are either web services or local applications. With the prefix SH, a command line is interpreted by sh -c which is usually the WIKI:bash. HTMLDOC_OS_WIN{ Since bash.exe and other standard tools are not part of the Windows installation, one of the environments Rtools, Mingw, MSYS2 or Cygwin need to be installed (See HTMLDOC_BUTTON:BUT_C1(DialogPckgAll)!). The following are found on this system:
    HTMLDOC_TEXT:SYSP_MSG_INSTALLED_MINGW_CYGWIN.
  
}HTMLDOC_OS_WIN


Read more.

*@ @*~RSC_HELP_APPS_DEVEL

For developers of Apps

This document explains concepts and provides all information for developing Apps.

The list of Apps

The Apps are listed in an expandable tree structure. There are a few Demo entries to play with. The user can change the list of applications by activating the settings button at the top of the dialog. This is where new Apps can be added. Straps also looks for all files with the ending ".list" in /etc/strap/apps/ and ~/.StrapAlign/apps/ and adds all entries.

The program parameter -addPreferenceStrapApps=file path or URL of a list of apps can be used to register applications. If Strap is web started the respective web variable can be used in the same way.

Start

They are invoked by mouse click. Holding Ctrl, debugging information is shown.

Input data

The program or web application obtains the sequence data in XML. For web applications, the XML text is found in the HTTP_POST variable "strap". For local applications, the file path is the first program parameter.
Requesting non-standard data: To keep the XML small, the atom coordinates are usually not included. To request atom coordinates, the App line must contain the string ATOM_COORDINATES separated by non-word characters. For URLs, ATOM_COORDINATES could be written after the query sign such as
 http://www.myUrl/myScript.php?options=-ATOM_COORDINATES_IF_SELECTED-CALPHA_COORDINATES-
For local applications, these flags can be typed after a hash sign. The hash and all following characters are not interpreted by bash. Example
SH myProgram * # ATOM_COORDINATES
With the prefix SH, the line is interpreted by sh -c.

The following flags are currently supported:

Server side cache: With the flag SERVER_CACHE, only those sequence data is uploaded that had been changed since last call. If the cached information has got lost on the server, the server should return RESET_CACHE. As a result, the request is immediately sent again with all data included.

Program output

The program can write via standard output stream either *@