Wiki

Clone wiki

jqcML / CLI

jqcML command-line interface

jqcML includes command-line functionality to quickly demonstrate its functionality. Using the command-line interface you are able to quickly extract a specific qualityParameter or attachmentParameter from a qcML file or a qcDB RDBMS.

Here you can see the command-line arguments jqcML accepts. This information can also be retrieved by providing the -h argument when running jqcML.

usage: jqcML
 -ap,--attachmentParameter <arg>   print the attachmentParameter with the
                                   given accession number
 -db,--database                    read from a qcDB RDBMS
 -f,--file                         read from a qcML file
 -h,--help                         show help
 -mysql <arg>                      connect to the MySQL database with the
                                   given url
                                   'username[:password]@host:port/db'
 -qa,--qualityAssessment <arg>     get parameters from the
                                   qualityAssessment (runQuality or
                                   setQuality) with the given ID
 -qcml,--qcml <arg>                read from the given qcML source (either
                                   file name or name in the database)
 -qp,--qualityParameter <arg>      print the qualityParameter with the
                                   given accession number
 -sqlite <arg>                     connect to the SQLite database with the
                                   given path

In order to retrieve the information for a specific parameter, some cumulative arguments have to be provided. These settins can be divided into several parts:

  • An indication whether the source of the qcML data is an XML-based file or a qcDB RDBMS. Additional arguments can be required to connect to the specified input source.
  • The root qcML object that contains the requested parameter
  • The runQuality or setQuality that contains the requested parameter
  • The parameter itself as a qualityParameter or attachment

The following examples illustrate how to use the command-line interface.

java -jar jqcml.jar -f -qcml "path/to/example.qcml" -qa "run_quality_id" -qp "param_accession"

The previous command will retrieve the qualityParameter with the given accession number from the runQuality with the given ID enclosed in the given root qcML represented by the corresponding qcML file.

java -jar jqcml.jar -db -mysql "root@localhost:3306/qcdb" -qcml "example.qcml" -qa "run_quality_id" -ap "param_accession"

The previous command will retrieve the attachment with the given accession number from the runQuality with the given ID enclosed in the given root qcML from a MySQL qcDB.

The types of qcDB implementations currently supported are MySQL and SQLite. A connection with a MySQL database is established by providing the host, port, database name, username, and (if applicable) password. A connection with a SQLite database is established by providing the path to the database file.

Updated