Skip to content

Command line version

MateSel supports a command line (batch) version which supports automated runs of MateSel. This is commonly used when frequent (e.g. weekly) matings are required and for research simulations.

The suggested workflow for automating MateSel runs is to first use the GUI to configure your breeding program objectives and then export that configuration for use in the command line version. After setting your targets in the MateSel GUI, click the Stop Run button and follow these steps:

Generate Command Line Script

  1. Click the Show/Hide advanced stop options button
  2. Select the Generate command line script with these run parameters checkbox
  3. Click Yes to stop the run
  4. Using File Explorer, navigate to your data file and open the generated commandline folder

The following files are generated:

FileDescription
Run_MateSel.cmdThis script provides direction on how to call MateSel from the commandline
MateSel.csvYour main data file
MateSel.iniYou main configuration, in the same format used by MateSel Legacy.
OthersDepending on the type of MateSel run, there may be other configuration files e.g. for grouping etc.

Executing Run_MateSel.cmd should start the MateSel run, however, you will need a Run Token file to run the command line version, see below.

The command line version requires that you have a valid RunToken.txt file located in the same directory as the MateSel program OR the same directory as your main data file. To obtain a run token:

  1. Login to www.matesel.com
  2. Navigate to the Download menu item
  3. Click on the Get Batch Token button and follow the instructions from there. You will see we also support an automated approach for obtaining batch run tokens via API for those that need this facility.

To monitor progress of the MateSel command line process, open the Console.txt file in a non-locking text viewer/editor. Non-locking so that MateSel can still write to this file. The run will stop when the criteria for stopping have been met.

There are several ways of deciding when there has been sufficient solution convergence. These can all be set in MateSel.ini and applied simultaneously:

SettingDescription
ConvergePercentTargetThe solution must exceed a specified percentage of the current predicted asymptotic maximum solution. 99.9% is the default.
MinNewGensNo improvement for a specified fixed number of generations since the last improvement. This is an extra safeguard against premature stopping.
AbsMinNewGensNo fewer than nmin generations in total.
MaxNewGensNo more than nmax generations in total
NoChangePercentNo improvement over the last pnc percent of nlast generations, where nlast is the last generation in which the best solution improved on the best solution in the previous generation, and pnc is a percentage. It can be >100%.

If you have previously been using the command line version shipped with MateSel Legacy, there are a number of changes to the report files:

  • OutResultsDLL.txt and OutBackupsDLL.txt are no longer created. Please use OutResults.csv/txt and OutBackups.csv/txt.
  • OutResults.csv/txt no longer contains backup sires. Please get these from OutBackups.csv/txt
  • OutSireUseDLL.txt has been renamed to OutSireUse.txt
  • OutSireUse.txt now reports sire id, not the sire sequence id
  • OutSummary.txt no longer contains trait outcomes. Please get these from OutTraits.txt/json.

The following additional report files are now generated for easier integration with other systems:

  • OutSummary.json
  • OutTraits.json
  • OutMarkers.json
  • OutSireUse.json
  • OutGroups.json