Haplo Prediction
predict haplogroups
Defines | Functions | Variables
options.c File Reference

Options used for all haplo programs. More...

#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <assert.h>
#include <jwsc/base/error.h>
#include <jwsc/base/option.h>
#include <jwsc/vector/vector.h>
#include "haplo_groups.h"
#include "options.h"

Go to the source code of this file.

Defines

#define HEADER_IN   0
#define HEADER_OUT   0
#define EXCLUDE_ONE   0
#define NUM_THREADS   1
#define INPUT_FORMAT   HAPLO_INPUT_TXT
#define INPUT_DTD_FNAME   0
#define OUTPUT_FORMAT   HAPLO_OUTPUT_TXT
#define LABELS_FNAME   0
#define LABELS_DTD_FNAME   0
#define FIRST_MARKER_COL   2
#define NUM_MARKERS   9
#define AUX_INPUT_FNAME   0
#define AUX_LABEL_COL   0
#define AUX_FIRST_MARKER_COL   2
#define AUX_NUM_MARKERS   9
#define NB_FREQ_FNAME   0
#define NB_FREQ_DTD_FNAME   0
#define NB_GAUSS_FNAME   0
#define NB_GAUSS_DTD_FNAME   0
#define NB_GMM_FNAME   0
#define NB_GMM_DTD_FNAME   0
#define MV_GMM_FNAME   0
#define MV_GMM_DTD_FNAME   0
#define MV_MMM_FNAME   0
#define MV_MMM_DTD_FNAME   0
#define SVM_FNAME   0
#define SVM_DTD_FNAME   0
#define WEKA_J48_FNAME   0
#define WEKA_PART_FNAME   0
#define WEKA_JAR_FNAME   0
#define WEKA_DTD_FNAME   0
#define NEAREST_FNAME   0
#define NEAREST_DTD_FNAME   0
#define NEAREST_MAX_D   1
#define BMM_TREE_FNAME   0
#define BMM_INFO_FNAME   0
#define BMM_CONF_THRESH_FNAME   0
#define GMM_BMM_TREE_FNAME   0
#define GMM_BMM_INFO_FNAME   0
#define GMM_BMM_CONF_THRESH_FNAME   0
#define MODEL_DIRNAME   "."

Functions

uint32_t get_num_opts_no_arg ()
 Returns the number of options not taking an argument.
uint32_t get_num_opts_with_arg ()
 Returns the number of options taking an argument.
void print_usage ()
 Prints the program usage to stderr.
Errorprocess_help_opt ()
 Process the 'help' program option.
Errorprocess_version_opt ()
 Process the 'version' program option.
Errorprocess_header_in_opt ()
 Process the 'header-in' program option.
Errorprocess_header_out_opt ()
 Process the 'no-header-out' program option.
Errorprocess_exclude_one_opt ()
 Process the 'exclude-one' program option.
Errorprocess_options_opt (Option_arg arg)
 Process the 'options' program option.
Errorprocess_num_threads_opt (Option_arg arg)
 Process the 'num-threads' program option.
Errorprocess_seed_opt (Option_arg arg)
 Process the 'seed' program option.
static Errorprocess_input_format_opt (Option_arg arg)
 Process the 'input-format' program option.
Errorprocess_input_dtd_opt (Option_arg arg)
 Process the 'input-dtd' program option.
static Errorprocess_output_format_opt (Option_arg arg)
 Process the 'output-format' program option.
Errorprocess_labels_opt (Option_arg arg)
 Process the 'labels' program option.
Errorprocess_labels_dtd_opt (Option_arg arg)
 Process the 'labels-dtd' program option.
Errorprocess_id_cols_opt (Option_arg arg)
 Process the 'id-cols' program option.
Errorprocess_label_col_opt (Option_arg arg)
 Process the 'label-col' program option.
Errorprocess_first_marker_col_opt (Option_arg arg)
 Process the '1st-marker-col' program option.
Errorprocess_num_markers_opt (Option_arg arg)
 Process the 'num-markers' program option.
Errorprocess_marker_cols_opt (Option_arg arg)
 Process the 'marker-cols' program option.
Errorprocess_aux_input_opt (Option_arg arg)
 Process the 'aux-input' program option.
Errorprocess_aux_id_cols_opt (Option_arg arg)
 Process the 'aux-id-cols' program option.
Errorprocess_aux_label_col_opt (Option_arg arg)
 Process the 'aux-label-col' program option.
Errorprocess_aux_first_marker_col_opt (Option_arg arg)
 Process the 'aux-1st-marker-col' program option.
Errorprocess_aux_num_markers_opt (Option_arg arg)
 Process the 'aux-num-markers' program option.
Errorprocess_aux_marker_cols_opt (Option_arg arg)
 Process the 'aux-marker-cols' program option.
Errorprocess_num_gmm_bmm_markers_opt (Option_arg arg)
 Process the 'num-gmm-bmm-markers' program option.
Errorprocess_model_dir_opt (Option_arg arg)
 Process the 'model-dir' program option.
Errorprocess_nb_freq_opt (Option_arg arg)
 Process the 'nb-freq' program option.
Errorprocess_nb_freq_dtd_opt (Option_arg arg)
 Process the 'nb-freq-dtd' program option.
Errorprocess_nb_gauss_opt (Option_arg arg)
 Process the 'nb-gauss' program option.
Errorprocess_nb_gauss_dtd_opt (Option_arg arg)
 Process the 'nb-gauss-dtd' program option.
Errorprocess_nb_gmm_opt (Option_arg arg)
 Process the 'nb-gmm' program option.
Errorprocess_nb_gmm_dtd_opt (Option_arg arg)
 Process the 'nb-gmm-dtd' program option.
Errorprocess_mv_gmm_opt (Option_arg arg)
 Process the 'mv-gmm' program option.
Errorprocess_mv_gmm_dtd_opt (Option_arg arg)
 Process the 'mv-gmm-dtd' program option.
Errorprocess_mv_mmm_opt (Option_arg arg)
 Process the 'mv-mmm' program option.
Errorprocess_mv_mmm_dtd_opt (Option_arg arg)
 Process the 'mv-mmm-dtd' program option.
Errorprocess_nearest_max_d_opt (Option_arg arg)
 Process the 'nearest-max-d' program option.
Errorprocess_nearest_opt (Option_arg arg)
 Process the 'nearest' program option.
Errorprocess_nearest_dtd_opt (Option_arg arg)
 Process the 'nearest-dtd' program option.
Errorprocess_bmm_tree_opt (Option_arg arg)
 Process the 'bmm-tree' program option.
Errorprocess_bmm_info_opt (Option_arg arg)
 Process the 'bmm-info' program option.
Errorprocess_bmm_conf_thresh_opt (Option_arg arg)
 Process the 'bmm-conf-thresh' program option.
Errorprocess_gmm_bmm_tree_opt (Option_arg arg)
 Process the 'gmm-bmm-tree' program option.
Errorprocess_gmm_bmm_info_opt (Option_arg arg)
 Process the 'gmm-bmm-info' program option.
Errorprocess_gmm_bmm_conf_thresh_opt (Option_arg arg)
 Process the 'gmm-bmm-conf-thresh' program option.
void init_options (Option_no_arg *opts_no_arg, Option_with_arg *opts_with_arg)
 Initializes the shared program options.

Variables

Option_no_arg opts_no_arg []
 Program options not taking an argument.
Option_with_arg opts_with_arg []
 Program options taking an argument.
uint8_t sequential_markers = 0
 Boolean indicating whether sequential markers are used through the first_marker_col and num_markers variables; otherwise marker_cols is used.
uint8_t aux_sequential_markers = 0
 Boolean indicating whether sequential markers are used through the first_marker_col and num_markers variables; otherwise marker_cols is used.

Detailed Description

Options used for all haplo programs.

Author:
Joseph Schlecht
License:
Creative Commons BY-NC-SA 3.0

Definition in file options.c.


Define Documentation

#define HEADER_IN   0

Definition at line 66 of file options.c.

#define HEADER_OUT   0

Definition at line 67 of file options.c.

#define EXCLUDE_ONE   0

Definition at line 68 of file options.c.

#define NUM_THREADS   1

Definition at line 69 of file options.c.

#define INPUT_FORMAT   HAPLO_INPUT_TXT

Definition at line 70 of file options.c.

#define INPUT_DTD_FNAME   0

Definition at line 71 of file options.c.

#define OUTPUT_FORMAT   HAPLO_OUTPUT_TXT

Definition at line 72 of file options.c.

#define LABELS_FNAME   0

Definition at line 73 of file options.c.

#define LABELS_DTD_FNAME   0

Definition at line 74 of file options.c.

#define FIRST_MARKER_COL   2

Definition at line 75 of file options.c.

#define NUM_MARKERS   9

Definition at line 76 of file options.c.

#define AUX_INPUT_FNAME   0

Definition at line 77 of file options.c.

#define AUX_LABEL_COL   0

Definition at line 78 of file options.c.

#define AUX_FIRST_MARKER_COL   2

Definition at line 79 of file options.c.

#define AUX_NUM_MARKERS   9

Definition at line 80 of file options.c.

#define NB_FREQ_FNAME   0

Definition at line 81 of file options.c.

#define NB_FREQ_DTD_FNAME   0

Definition at line 82 of file options.c.

#define NB_GAUSS_FNAME   0

Definition at line 83 of file options.c.

#define NB_GAUSS_DTD_FNAME   0

Definition at line 84 of file options.c.

#define NB_GMM_FNAME   0

Definition at line 85 of file options.c.

#define NB_GMM_DTD_FNAME   0

Definition at line 86 of file options.c.

#define MV_GMM_FNAME   0

Definition at line 87 of file options.c.

#define MV_GMM_DTD_FNAME   0

Definition at line 88 of file options.c.

#define MV_MMM_FNAME   0

Definition at line 89 of file options.c.

#define MV_MMM_DTD_FNAME   0

Definition at line 90 of file options.c.

#define SVM_FNAME   0

Definition at line 91 of file options.c.

#define SVM_DTD_FNAME   0

Definition at line 92 of file options.c.

#define WEKA_J48_FNAME   0

Definition at line 93 of file options.c.

#define WEKA_PART_FNAME   0

Definition at line 94 of file options.c.

#define WEKA_JAR_FNAME   0

Definition at line 95 of file options.c.

#define WEKA_DTD_FNAME   0

Definition at line 96 of file options.c.

#define NEAREST_FNAME   0

Definition at line 97 of file options.c.

#define NEAREST_DTD_FNAME   0

Definition at line 98 of file options.c.

#define NEAREST_MAX_D   1

Definition at line 99 of file options.c.

#define BMM_TREE_FNAME   0

Definition at line 100 of file options.c.

#define BMM_INFO_FNAME   0

Definition at line 101 of file options.c.

#define BMM_CONF_THRESH_FNAME   0

Definition at line 102 of file options.c.

#define GMM_BMM_TREE_FNAME   0

Definition at line 103 of file options.c.

#define GMM_BMM_INFO_FNAME   0

Definition at line 104 of file options.c.

#define GMM_BMM_CONF_THRESH_FNAME   0

Definition at line 105 of file options.c.

#define MODEL_DIRNAME   "."

Definition at line 106 of file options.c.


Function Documentation

uint32_t get_num_opts_no_arg ( )

Returns the number of options not taking an argument.

Definition at line 131 of file haplo_cluster.c.

uint32_t get_num_opts_with_arg ( )

Returns the number of options taking an argument.

Definition at line 137 of file haplo_cluster.c.

void print_usage ( )

Prints the program usage to stderr.

Definition at line 143 of file haplo_cluster.c.

Error* process_help_opt ( void  )

Process the 'help' program option.

Definition at line 131 of file options.c.

Error* process_version_opt ( void  )

Process the 'version' program option.

Definition at line 139 of file options.c.

Error* process_header_in_opt ( )

Process the 'header-in' program option.

Definition at line 147 of file options.c.

Error* process_header_out_opt ( )

Process the 'no-header-out' program option.

Definition at line 154 of file options.c.

Error* process_exclude_one_opt ( )

Process the 'exclude-one' program option.

Definition at line 160 of file options.c.

Error* process_options_opt ( Option_arg  arg)

Process the 'options' program option.

Definition at line 167 of file options.c.

Error* process_num_threads_opt ( Option_arg  arg)

Process the 'num-threads' program option.

Definition at line 190 of file options.c.

Error* process_seed_opt ( Option_arg  arg)

Process the 'seed' program option.

Definition at line 206 of file options.c.

static Error* process_input_format_opt ( Option_arg  arg) [static]

Process the 'input-format' program option.

Definition at line 223 of file options.c.

Error* process_input_dtd_opt ( Option_arg  arg)

Process the 'input-dtd' program option.

Definition at line 249 of file options.c.

static Error* process_output_format_opt ( Option_arg  arg) [static]

Process the 'output-format' program option.

Definition at line 261 of file options.c.

Error* process_labels_opt ( Option_arg  arg)

Process the 'labels' program option.

Definition at line 287 of file options.c.

Error* process_labels_dtd_opt ( Option_arg  arg)

Process the 'labels-dtd' program option.

Definition at line 299 of file options.c.

Error* process_id_cols_opt ( Option_arg  arg)

Process the 'id-cols' program option.

Definition at line 311 of file options.c.

Error* process_label_col_opt ( Option_arg  arg)

Process the 'label-col' program option.

Definition at line 359 of file options.c.

Error* process_first_marker_col_opt ( Option_arg  arg)

Process the '1st-marker-col' program option.

Definition at line 374 of file options.c.

Error* process_num_markers_opt ( Option_arg  arg)

Process the 'num-markers' program option.

Definition at line 395 of file options.c.

Error* process_marker_cols_opt ( Option_arg  arg)

Process the 'marker-cols' program option.

Definition at line 415 of file options.c.

Error* process_aux_input_opt ( Option_arg  arg)

Process the 'aux-input' program option.

Definition at line 462 of file options.c.

Error* process_aux_id_cols_opt ( Option_arg  arg)

Process the 'aux-id-cols' program option.

Definition at line 473 of file options.c.

Error* process_aux_label_col_opt ( Option_arg  arg)

Process the 'aux-label-col' program option.

Definition at line 518 of file options.c.

Error* process_aux_first_marker_col_opt ( Option_arg  arg)

Process the 'aux-1st-marker-col' program option.

Definition at line 532 of file options.c.

Error* process_aux_num_markers_opt ( Option_arg  arg)

Process the 'aux-num-markers' program option.

Definition at line 552 of file options.c.

Error* process_aux_marker_cols_opt ( Option_arg  arg)

Process the 'aux-marker-cols' program option.

Definition at line 572 of file options.c.

Error* process_num_gmm_bmm_markers_opt ( Option_arg  arg)

Process the 'num-gmm-bmm-markers' program option.

Definition at line 619 of file options.c.

Error* process_model_dir_opt ( Option_arg  arg)

Process the 'model-dir' program option.

Definition at line 636 of file options.c.

Error* process_nb_freq_opt ( Option_arg  arg)

Process the 'nb-freq' program option.

Definition at line 647 of file options.c.

Error* process_nb_freq_dtd_opt ( Option_arg  arg)

Process the 'nb-freq-dtd' program option.

Definition at line 658 of file options.c.

Error* process_nb_gauss_opt ( Option_arg  arg)

Process the 'nb-gauss' program option.

Definition at line 669 of file options.c.

Error* process_nb_gauss_dtd_opt ( Option_arg  arg)

Process the 'nb-gauss-dtd' program option.

Definition at line 680 of file options.c.

Error* process_nb_gmm_opt ( Option_arg  arg)

Process the 'nb-gmm' program option.

Definition at line 691 of file options.c.

Error* process_nb_gmm_dtd_opt ( Option_arg  arg)

Process the 'nb-gmm-dtd' program option.

Definition at line 702 of file options.c.

Error* process_mv_gmm_opt ( Option_arg  arg)

Process the 'mv-gmm' program option.

Definition at line 713 of file options.c.

Error* process_mv_gmm_dtd_opt ( Option_arg  arg)

Process the 'mv-gmm-dtd' program option.

Definition at line 724 of file options.c.

Error* process_mv_mmm_opt ( Option_arg  arg)

Process the 'mv-mmm' program option.

Definition at line 735 of file options.c.

Error* process_mv_mmm_dtd_opt ( Option_arg  arg)

Process the 'mv-mmm-dtd' program option.

Definition at line 746 of file options.c.

Error* process_nearest_max_d_opt ( Option_arg  arg)

Process the 'nearest-max-d' program option.

Definition at line 827 of file options.c.

Error* process_nearest_opt ( Option_arg  arg)

Process the 'nearest' program option.

Definition at line 841 of file options.c.

Error* process_nearest_dtd_opt ( Option_arg  arg)

Process the 'nearest-dtd' program option.

Definition at line 852 of file options.c.

Error* process_bmm_tree_opt ( Option_arg  arg)

Process the 'bmm-tree' program option.

Definition at line 863 of file options.c.

Error* process_bmm_info_opt ( Option_arg  arg)

Process the 'bmm-info' program option.

Definition at line 874 of file options.c.

Error* process_bmm_conf_thresh_opt ( Option_arg  arg)

Process the 'bmm-conf-thresh' program option.

Definition at line 885 of file options.c.

Error* process_gmm_bmm_tree_opt ( Option_arg  arg)

Process the 'gmm-bmm-tree' program option.

Definition at line 896 of file options.c.

Error* process_gmm_bmm_info_opt ( Option_arg  arg)

Process the 'gmm-bmm-info' program option.

Definition at line 907 of file options.c.

Error* process_gmm_bmm_conf_thresh_opt ( Option_arg  arg)

Process the 'gmm-bmm-conf-thresh' program option.

Definition at line 918 of file options.c.

void init_options ( Option_no_arg opts_no_arg,
Option_with_arg opts_with_arg 
)

Initializes the shared program options.

Definition at line 929 of file options.c.


Variable Documentation

Program options not taking an argument.

Definition at line 106 of file haplo_cluster.c.

Program options taking an argument.

Definition at line 109 of file haplo_cluster.c.

uint8_t sequential_markers = 0

Boolean indicating whether sequential markers are used through the first_marker_col and num_markers variables; otherwise marker_cols is used.

Definition at line 120 of file options.c.

Boolean indicating whether sequential markers are used through the first_marker_col and num_markers variables; otherwise marker_cols is used.

Definition at line 127 of file options.c.