# Installation procedure - OptiMAS in command line

If you are dealing with huge amount of data or complex MARS schemes, it could be better for you to use OptiMAS in command line (on a server for example) and then reload the results folder via the GUI (see saving/reloading section).

- Windows (32 bits)
- Linux (32/64 bits)
- Mac OS X (32 bits)

The executable comes in a zipped file. Extract it with your favorite file archiver software (e.g. 7-zip). This will create a new directory called "optimas_cmd_win". Move to this directory via the terminal application (click on Start > Execute > type "cmd" > OK) before attempting to run the program (for example):

> cd Desktop\optimas_cmd_win

To run the program, you must supply 4 input files and possibly an optional one for allelic effects. Instructions for how to prepare the input files are given in the data preparation section. Two input file examples (input directory) are supplied with the software. You can run the program on the test example data supplied by typing (see next sections for more details about the parameters and options):

> optimas.exe input\blanc.dat input\blanc.map 0.000001 0.0 output\run_blanc 0 verb

Make sure that both "optimas.exe" and the "input" folder with the examples are in the current directory. The program will output a summary of the results in the folder output\run_blanc. Open the file "tab_scores.txt" to see the genotypic values calculated for the plants present in the dataset.

To build and install "optimas" in command line on your system, extract the zipped file "optimas_cmd_linux.zip" by typing (for example):

$ unzip optimas_cmd_linux.zip

This will create a new directory called "optimas_cmd_linux". Then, open a terminal, move to this directory before attempting to run the program and run the installation shell (bash) script:

$ ./install_optimas_on_linux.sh --no-gui

As root (or sudoer), it will perform an installation for all users in /usr/local/bin/. The input/output file examples will be stored respectively in /usr/local/share/OptiMAS/input and /usr/local/share/OptiMAS/output.

As a common user, it will perform a local install in user's personal directory $HOME/bin/. The input/output file examples will be stored respectively in $HOME/.OptiMAS/input and $HOME/.OptiMAS/output.

You can now run optimas from a terminal by typing optimas or /usr/local/bin/optimas or $HOME/bin/optimas.

Note: it is not necessary to specify the complete path to the binary "optimas" if it is present in the PATH environment variable.

To run the program, you must supply 4 input files and possibly an optional one for allelic effects. Instructions for how to prepare the input files are given below (see data preparation section). Two input file examples (input directory) are supplied with the software. You can run the program on the test data supplied by typing as an example (see next sections for more details about the parameters and options):

$ optimas $HOME/.OptiMAS/input/blanc.dat $HOME/.OptiMAS/input/blanc.map 0.000001 0.0 $HOME/.OptiMAS/output/run_blanc 0 verb

The program will output a summary of the results in the folder "run_blanc". Open the file "tab_scores.txt" to see the genotypic values calculated for the plants present in the dataset.

To uninstall OptiMAS, run the script uninstall_optimas.sh located in the same directory as optimas.

The executable comes in a zipped file. Extract it with your favorite file archiver software (e.g. Archive Utility). This will create a new directory called "optimas_cmd_mac". Move to this directory via the terminal application (Applications > Utilities > Terminal) before attempting to run the program (for example):

$ cd Desktop/optimas_cmd_mac

To run the program, you must supply 4 input files and possibly an optional one for allelic effects. Instructions for how to prepare the input files are given below (see data preparation section). Two input file examples (input directory) are supplied with the software. You can run the program on the test data supplied by typing (see next sections for the details about the parameters and options):

$ optimas input/blanc.dat input/blanc.map 0.000001 0.0 output/run_blanc 0 verb

Make sure that both "optimas" and the "input" folder with the examples are in the current directory. The program will output a summary of the results in the folder output\run_blanc. Open the file "tab_scores.txt" to see the genotypic values calculated for the plants present in the dataset.