CLI-mate

Interface generator for command line programs
Version 0.3

Aims

CLI-mate was developed at the Department of Human Genetics, Leiden University Medical Center (LUMC). Its aim is to facilitate developers in creating user-friendly interfaces for a command line tool.

In the agile development environment of bioinformatics, many command line tools are created quickly to fill in gaps between complex information processes. A command line interface (CLI) is sometimes sufficient for the task, but it limits adoption by a broader audience. As such, it's often necessary for the developer to create a CLI wrapper that provides a more user friendly interface. CLI-mate was developed to systematize and expedite this very time consuming process.

To generate an interface from a command line tool, we need to create a complete usage definition using the following properties:

  • argument
  • value type
  • default value
  • dependency
  • repeatability
We also need to add meta properties in the tool definition, such as:
  • name
  • label
  • help manual
  • display*
  • property bag**

* When a parameter's display is marked as "hide", it is not to say that this parameter is no longer "optional". Rather, this is to provide a mechanism to split a single program into multiple sub programs. In this way, parameters unrelated to this sub routine can be eliminated from the defintion, reducing the complexity of the generated interface.

** Property bag was created to store interface specific properties of a parameter. These properties may not be generalized. For example, Galaxy uses loc files to store mapping information. The way Galaxy runtime retrieved that information has nothing to do with the command line itself. However, to generate a functionally rich galaxy interface, we need to store these meta properties in the tool definition. We chose the property bag (dictionary structure) because it gives us the most flexibility.

This definition is stored in the RDF/turtle format. The command line tool is modeled using the Process ontology. To adapt for our purposes, we extended the Process ontology with a Command Line Interface Ontology, which will be released soon.

Once we have the command line program definition in RDF/turtle format, we can use it to generated targetted interfaces using predefined templates.

Property bag

Adoption with Galaxy

Galaxy is used as a case study to test the design and the usability of CLI-mate. As a result, the beta release of this web service includes two Galaxy templates. To use the default Galaxy templates, you can use the following meta properties in the property bag.

Property Name Property Value
from_loc Indicate the value of a parameter is from a .loc file. Use one of the following:
  • data_table: The value of a parameter is from a data table. Use this option to generate dynamic dropdown menu in galaxy. The parameter type must be "select".
  • dbkey: The value of a parameter is a cell in the dbkey column of a data table. This property should be used with loc_id_filter.
  • path: The value of the parameter is a cell in the path column of a data table. This property should be used with loc_id_filter.
loc_id_filter The id column of the datatable. The value should be the name of a parameter.

Adoption with MOTEUR

There are two templates created for the MOTEUR system. You can use the following meta properties for gasw.xml and gwendia.xml templates.

Property Name Property Value
access_type Access type on the grid. The value should be either LFN or URL.
access_location The location where the resource (such as input file, executables) can be accesseed. Should always be used with access_type.
dir_template The directory template used by a output/stdout/stderr paramter. The value should be the name of an input parameter.

Demos

See how you can make your first Galaxy wrapper in 3 minutes.

Contact Us

Zuotian Tatum
Scientific Programmer
Email: z dot tatum at lumc dot nl

Please report bugs at here.

Please note that this service is in beta release and for testing purposes ONLY.
Designed by Zuotian Tatum and Jeroen F. J. Laros. Developed by Zuotian Tatum.