Command Line Interface Usage

If you want to use GWASpi as a command line interface, you have to start a cli (*nix) or a cmd (windows) terminal and type the following command line:

Syntax
java [JVM memory options] -jar [Path to GWASpi jar] script [Path of script to be executed] log [Path to output file of the process log]

Examples:

*nix
java -Xms6000m -Xmx6000m -jar app/GWASpi.jar script scrips/load.txt log scritp/load.log

Windows
java -Xms6000m -Xmx6000m -jar C:/GWASpi/app/GWASpi.jar script C:/GWASpi/scrips/load.txt log C:/GWASpi/scritp/load.log

Script Files

The script file scontain a list of parameters that specify the operation to be run.
An example of script is hown below:

#This is a demo file
#Usage: java -Xms1500m -Xmx2500m -jar GWASpi.jar script scriptFile [log cli.log]
data-dir=/GWASpi/data/
[script]
0.command=load_genotypes
1.study-id=1
2.format=PLINK
3.use-dummy-samples=true
4.new-matrix-name=Matrix 42
5.description=Load genotypes of batch 42
6.file1-path=/GWASpi/input/Plink/mi_input.map
7.file2-path=/GWASpi/input/Plink/mi_input.ped
8.sample-info-path=no info file
[/script]

Line by line…

Let’s look into the example above and explain it line by line:

  • First we see two lines starting with a # character. These are comment lines and you can have as many as you want, as long as they start with #.
  • Next, the "data-dir=/GWASpi/data/" line specifies where GWASpi’s datae has to be stored. If the database doesn’t allready exist, a new and empty one will be created at the specified path.
  • Following these lines starts the "[script][/script]" block itself. In this block, file-paths, commands and parameters will be passed to gwaspi so as to be able to complete the operations correctly. Every operation called in the "0.command=" line will necessitate a specific set of parameters to be passed. These parameters change in number and kind, depending on the command that has been called.

Following is a list of available operation calls with their respective scripts: