External applications integration: Basic configuration
Many aspects of configuring external tools in the CLC Science Server can be described as we set up a very simple command. We have chosen the cp command as will already be on your server.
The cp command requires at minimum two parameters, an input file and an output file. These parameters are positional: the first filename given after the command is the input file, the second is the output file. Here we will just copy a fasta file from one place in the CLC Science Server to another. This is a very inefficient way of doing this task, but it will illustrate how to integrate a command line tool without requring you to install additional software on your system.
Under the External Applications tab of the CLC Science Server administrative web interface, click on the New configuration button. This brings up a window like that shown at the left side of figure 8.2. In the text box labeled External applications command name, enter a name for this command. This will be what the end-user sees in the menu option they will be presented with via the Workbench. In the text box labeled command line argument, provide the command line. Start with the command, and within curly brackets, include any parameter that needs to be configured by the user. The names of the parameters inside the curly brackets will become the labels of the choices offered to the end-user when they start up this external application via their Workbench. In the right hand side of figure 8.2, we show how this looks if we give the cp command two parameters: infile and outfile.
Figure 8.2: Setting up the cp command as an external application.
Two drop-down menus have now appeared in the blue shaded area of the right hand window in 8.2. These are dynamically generated. Each parameter you enter in curly brackets in the command text box area will have a drop-down menu created for it. The text you entered within the curly brackets is used to label the entries in the administrative interface, and are also the labels used in the end-user interface presented via the Workbench.
The administrator now chooses the type of data each parameter will refer to. The options are:
- Text - the users is presented with a text box allowing them to enter a parameter value. The administrator can provide a default value if desired.
- CSV enum - this allows the administrator to set a drop down list of parameter choices for the user. For an example of this, please see section 8.6 on setting up Velvet as an external application.
- User-selected input data - users will be prompted to select an input file from those they have stored on the CLC Server.
- Output file from CL - users will be prompted for a location to store a file that is created by the third-party application. An extra text box is also provided in the configuration so the administrator can specify a default name for the re-imported file. If no filename is provided by the administrator, the basename of the file from the system is used.
- File - users can select an input file from their local machine's filesystem.
- Boolean text - This generates a checkbox in the end-user interface, labelled with the text you provide. If the user clicks in the box, the parameter is set to true; an empty box means the parameter is set to false.
- Boolean compound - this enables the creation of a checkbox, where if checked, the end-user is presented with another option (of your choice). If the check box is not checked, then that option will be greyed out. Here, the administrator can also choose if the box is to be checked or unchecked by default in the Workbench interface.
- Double - Allows the user to enter a number. The administrator can choose a number this option should be set to by default. If none is set, then 0 is the default.
In the right hand side of figure 8.2 we set the parameters so that the input file to be sent to the system's copy command will be specified by the user, and we tell the system to export this file from the CLC Server as a fasta file. We then configure the import of output file from the copy command back into the CLC Server, and specify that we are importing a fasta file. When configuring standard bioinformatics third party applications, you are able to choose from many standard formats to export from, and to import back into, the CLC Science Server.
Once the configuration is complete and has been saved, the external application should now appear in the list in the administrative web interface.
The small checkbox to the left of the external application name should be checked. This means it is will be accessible to those with the Workbench plug-in installed. If a particular external application needs to be removed from end-user access for a while, this small box can just be unchecked.