Clone wiki

ApproxWF / Launching ApproxWF

Launching ApproxWF

Using an input file

The program ApproxWF is launched via the command line, preferentially with the name of an input file as the only argument. All necessary arguments are then specified in the input file, which is the most convenient way to specify arguments since they are stored in a reusable fashion. Basically, an input file a simple collection of pairs of argument names and corresponding values (separated by one or several white space characters, i.e. blanks or tabs). While each name-value pair has to be at the beginning of a new line, the order is of no importance.

Comments may either be added after a name-value pair or given on a line on their own. Note that all comments must be proceeded with a double slash ``//''. Empty lines may be present anywhere within the file and are ignored. A minimal input file to conduct some simulations may look like this:

//My first input file for ApproxWF!
task simulate
nLoci 10
sampleSize 1000
timePoints 1-100:10
N 1000
s 0.0{9},0.1 //the {9} indicates that the first 9 loci have s=0.0
h 0.5

Suppose the inputfile is named example.input, the program has to be launched as follows:

ApproxWF example.input

Command Line Arguments

Additionally, arguments may be passed on the command line. In that case, arguments that are also given in the input file will be overwritten. The required syntax is as follows:

ApproxWF example.input name=value

where name is the name of an argument and value is the corresponding value. For instance,

ApproxWF example.input outName=test h=0.2

launches ApproxWF as specified in example.input but adds the argument outName, which specifies a prefix for all output files, and also sets h=0.2 and thus overwrites the specification h=0.5 in the input file. Note that some arguments do not require a value.

There is no restriction on the number of arguments to be passed that way and arguments can also be specified on the command line only. Also, the order in which the arguments are given, both in the input file or on the command line, is of no importance. However, if an input file is to be used, the program ApproxWF requires the name of it to be the first argument specified.

Choosing the right Task

Note that ApproxWF is designed to perform multiple tasks. To specify the desired task, the mandatory argument task has to be specified either in the input file or on the command line. See the list fo available tasks.

Progress Report & Log File

By default, ApproxWF writes only minimal information to the screen. To get a more detailed progress report printed to the screen, simply add the argument verbose either in the input file or on the command line, for instance:

ApproxWF example.input verbose

Alternatively, ApproxWF can also write the progress report to a log file. To invoke this, simply use the argument logFile, followed by the name of the desired file. For instance,

ApproxWF example.input logFile=example.log

will tell ApproxWF to write the progress report to a file named example.log. Note that this will overwrite any existing file with that name. Note further that verbose and logFile can both be used at the same time.