Results
Plugin repository
New graphical interfaces are added to a Pline web application by supplying the corresponding
JSON description files, either by copying them into the designated
plugin directory (when using with standalone web application), or by passing JSON data directly to the Pline interface generator (using addPlugin()
). In principle, a Pline GUI can be generated for any
command-line executable, including installed programs that are available
system-wide. However, the JSON description is written for a specific
version of a program and it is recommended that the matching executable is distributed
together with its description file, forming a plugin. For collecting and sharing Pline plugins, we have created a public repository as part of the Pline homepage \cite{homepage}. At the time of writing, it contains 11 plugins for CLI programs used in phylogenetic and short-read sequence analyses. Plugins can be downloaded both as JSON files (useful for website integration or as a template for new plugins), as well as standalone applications (includes Pline, the JSON and the CLI program). The repository webpage is also an example of integrated Pline, which is used to generate a working interface for each plugin in the list. Similarly, a live version of the GUI shown in Figure \ref{477555} is available on the Pline front page. The plugin files are sourced from a dedicated GitHub repository, where third-party plugin contributions can be made via Git pull requests. Updates and additions to the plugins list are automatically shown on the Pline repository webpage.
The downloadable Pline applications are designed to be installation-free and work across many different operating systems. The JSON program description files are platform-agnostic, the interface generator runs on any device with a modern web browser (including mobile devices), and the server module supports both Python 2.7 and 3 environments (which are preinstalled on most MacOS and Linux systems). However, binary command-line executables are compiled to run on a specific operating system, so a Pline plugin should to include an executable for each target system. To reduce file size, the plugins on the repository page are provided in multiple versions for different operating systems (currently for Linux and MacOS).
Integration into Wasabi
Pline does not contain binary executables, consisting of human-readable text files written in HTML, JavaScript and CSS (Python for the server module). Similar to other web pages, a Pline application is easy to modify and customize (e.g. changing the GUI appearance by editing CSS rules). In addition, Pline-generated interfaces are self-contained web elements and the JavaScript library can be extended with custom functions to modify any step in the interface generation process. This flexibility is especially useful for integrating Pline into existing web pages.
As an example of extensive integration, we added Pline to Wasabi, a web-based environment for evolutionary sequence analyses \cite{wasabi}. With Pline, we were able to integrate external analysis programs into Wasabi’s graphical interface as plugins without having to write program-specific interfaces and related code from scratch. Wasabi-specific features were added to the Pline interface generator as extensions. For example, an additional function in the plugin registration step makes a pop-up menu showing all the available plugins in Wasabi. Other additions automatically convert user-supplied files to the correct format, show the status updates of running programs in the Wasabi menu bar, and collects the resulting output files in an analysis database. The extensions are available as open-source software at Wasabi homepage \cite{wasabi}.
Since Wasabi is designed for evolutionary sequence analysis, the list of integrated plugins include tools for related tasks: PRANK
\cite{Loytynoja2005}, PAGAN
\cite{Loytynoja2012} and MAFFT
\cite{Katoh2013} for multiple sequence alignment; FastTree
\cite{Price2010} for phylogenetic inference; CodeML
\cite{Yang2007} for tests of positive selection. All these plugins are also available in the plugins repository. Out of these programs, CodeML has the most complex interface and serves as a comprehensive example that utilizes a majority of the options available in the Pline API. The CodeML interface in Wasabi windowing system is shown in Figure
\ref{890860}. The CodeML plugin JSON (and therefore its interface) includes multiple presets – stored sets of pre-filled argument values – that are useful for running common configurations of selection models and related parameters. When users select a preset, the interface hides or reveals the relevant inputs, fills these with default values and enables the corresponding models from a set of tick boxes. When the user modifies an input that is part of the selected preset, the interface checks for dependencies and changes the preset selection as the combination of the input values no longer matches the initial preset. As an example of proxy inputs, the set of model selection tick boxes are converted to their corresponding command-line form as a single argument that consists of a string of numbers representing the selected model. As CodeML takes the input arguments through a configuration file, the
"configfile"
and
"valuesep"
properties in the JSON data instruct Pline to store the argument values as a whitespace-delimited text file and to launch the program with the file path as its only input argument.