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

Options used for all haplo programs. More...

#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <jwsc/base/error.h>
#include <jwsc/base/option.h>
#include <jwsc/vector/vector.h>
#include "output.h"
#include "input.h"

Go to the source code of this file.

Defines

#define NUM_THREAD_OPTS   0
#define NUM_SHARED_OPTS_NO_ARG   4
#define NUM_SHARED_OPTS_WITH_ARG   12 + NUM_THREAD_OPTS

Functions

Errorprocess_exclude_one_opt ()
 Process the 'exclude-one' 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_opt (Option_arg arg)
 Process the 'nearest' program option.
Errorprocess_nearest_dtd_opt (Option_arg arg)
 Process the 'nearest-dtd' program option.
Errorprocess_nearest_max_d_opt (Option_arg arg)
 Process the 'nearest-max-d' 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

struct {
   uint8_t   header_in
 Boolean indicating whether the input data has a header (descriptive) line.
   uint8_t   header_out
 Boolean indicating whether to write a header (descriptive) line to the output file.
   uint8_t   exclude_one
 Boolean indicating whether to exclude at most one prediction when deciding on an agreed label from the set of classification algorithms.
   uint32_t   seed
 Random seed.
   uint32_t   num_threads
 Number of pthreads to use at any given time.
   Haplo_input_format   input_format
 Input file format.
   const char *   input_dtd_fname
 XML input file DTD.
   Haplo_output_format   output_format
 Output file format.
   const char *   labels_fname
 XML file containin the haplo group labels.
   const char *   labels_dtd_fname
 XML labels file DTD.
   Vector_u32 *   id_cols
 Columns in input CSV file containing sample IDs.
   uint32_t   label_col
 Column in input CSV file containing the haplo labels.
   uint32_t   first_marker_col
 Column in input CSV file containing the first marker.
   uint32_t   num_markers
 Number of marker columns in the input CSV file.
   Vector_u32 *   marker_cols
 Marker columns to use.
   const char *   aux_input_fname
 Auxiliary input file.
   Vector_u32 *   aux_id_cols
 Columns in input CSV file containing sample IDs.
   uint32_t   aux_label_col
 Column in input CSV file containing the haplo labels.
   uint32_t   aux_first_marker_col
 Column in input CSV file containing the first marker.
   uint32_t   aux_num_markers
 Number of marker columns in the input CSV file.
   Vector_u32 *   aux_marker_cols
 Marker columns to use.
   uint32_t   num_gmm_markers
 Number of marker columns in the input CSV file.
   const char *   nb_freq_fname
 Naive Bayes non-parametric frequency model tree information.
   const char *   nb_freq_dtd_fname
 XML DTD for nb_freq_fname.
   const char *   nb_gauss_fname
 Naive Bayes Gaussian model tree information.
   const char *   nb_gauss_dtd_fname
 XML DTD for nb_gauss_fname.
   const char *   nb_gmm_fname
 Naive Bayes Gaussian mixture model tree information.
   const char *   nb_gmm_dtd_fname
 XML DTD for nb_gmm_fname.
   const char *   mv_gmm_fname
 Multivariate Gaussian mixture model tree information.
   const char *   mv_gmm_dtd_fname
 XML DTD for mv_gmm_fname.
   const char *   mv_mmm_fname
 Multivariate multinomial mixture model tree information.
   const char *   mv_mmm_dtd_fname
 XML DTD for mv_mmm_fname.
   const char *   nearest_fname
 Nearest neighbor model information.
   const char *   nearest_dtd_fname
 XML DTD for the nearest neighbor model.
   uint32_t   nearest_max_d
 Maximum allowed nearest neighbor distance for a prediction.
   const char *   bmm_tree_fname
 Name of the Bernoulli mixture model tree file.
   const char *   bmm_info_fname
 Name of the Bernoulli mixture model info file.
   const char *   bmm_conf_thresh_fname
 Name of the Bernoulli mixture model confidence threshold file.
   const char *   gmm_bmm_tree_fname
 Name of the Gaussian and Bernoulli mixture model tree file.
   const char *   gmm_bmm_info_fname
 Name of the Gaussian and Bernoulli mixture model info file.
   const char *   gmm_bmm_conf_thresh_fname
 Name of the Gaussian and Bernoulli mixture model confidence threshold file.
   const char *   model_dirname
 Director to find the models in.
opts

Detailed Description

Options used for all haplo programs.

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

Definition in file options.h.


Define Documentation

#define NUM_THREAD_OPTS   0

Definition at line 67 of file options.h.

#define NUM_SHARED_OPTS_NO_ARG   4

Definition at line 70 of file options.h.

#define NUM_SHARED_OPTS_WITH_ARG   12 + NUM_THREAD_OPTS

Definition at line 71 of file options.h.


Function Documentation

Error* process_exclude_one_opt ( )

Process the 'exclude-one' program option.

Definition at line 160 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_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_nearest_max_d_opt ( Option_arg  arg)

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

Definition at line 827 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

uint8_t header_in

Boolean indicating whether the input data has a header (descriptive) line.

Definition at line 81 of file options.h.

uint8_t header_out

Boolean indicating whether to write a header (descriptive) line to the output file.

Definition at line 87 of file options.h.

uint8_t exclude_one

Boolean indicating whether to exclude at most one prediction when deciding on an agreed label from the set of classification algorithms.

Definition at line 94 of file options.h.

uint32_t seed

Random seed.

The random generator is initially seeded (srand) with zero.

Definition at line 101 of file options.h.

uint32_t num_threads

Number of pthreads to use at any given time.

Definition at line 104 of file options.h.

Input file format.

Current choices include text, comman separated values, or xml.

Definition at line 111 of file options.h.

const char* input_dtd_fname

XML input file DTD.

Definition at line 114 of file options.h.

Output file format.

Current choices include text, comman separated values, or xml.

Definition at line 121 of file options.h.

const char* labels_fname

XML file containin the haplo group labels.

Definition at line 124 of file options.h.

const char* labels_dtd_fname

XML labels file DTD.

Definition at line 127 of file options.h.

Columns in input CSV file containing sample IDs.

Definition at line 130 of file options.h.

uint32_t label_col

Column in input CSV file containing the haplo labels.

Definition at line 133 of file options.h.

uint32_t first_marker_col

Column in input CSV file containing the first marker.

Definition at line 136 of file options.h.

uint32_t num_markers

Number of marker columns in the input CSV file.

Definition at line 139 of file options.h.

Marker columns to use.

Definition at line 142 of file options.h.

const char* aux_input_fname

Auxiliary input file.

Definition at line 145 of file options.h.

Columns in input CSV file containing sample IDs.

Definition at line 148 of file options.h.

uint32_t aux_label_col

Column in input CSV file containing the haplo labels.

Definition at line 151 of file options.h.

Column in input CSV file containing the first marker.

Definition at line 154 of file options.h.

uint32_t aux_num_markers

Number of marker columns in the input CSV file.

Definition at line 157 of file options.h.

Marker columns to use.

Definition at line 160 of file options.h.

uint32_t num_gmm_markers

Number of marker columns in the input CSV file.

Definition at line 163 of file options.h.

const char* nb_freq_fname

Naive Bayes non-parametric frequency model tree information.

Definition at line 166 of file options.h.

const char* nb_freq_dtd_fname

XML DTD for nb_freq_fname.

Definition at line 169 of file options.h.

const char* nb_gauss_fname

Naive Bayes Gaussian model tree information.

Definition at line 172 of file options.h.

const char* nb_gauss_dtd_fname

XML DTD for nb_gauss_fname.

Definition at line 175 of file options.h.

const char* nb_gmm_fname

Naive Bayes Gaussian mixture model tree information.

Definition at line 178 of file options.h.

const char* nb_gmm_dtd_fname

XML DTD for nb_gmm_fname.

Definition at line 181 of file options.h.

const char* mv_gmm_fname

Multivariate Gaussian mixture model tree information.

Definition at line 184 of file options.h.

const char* mv_gmm_dtd_fname

XML DTD for mv_gmm_fname.

Definition at line 187 of file options.h.

const char* mv_mmm_fname

Multivariate multinomial mixture model tree information.

Definition at line 190 of file options.h.

const char* mv_mmm_dtd_fname

XML DTD for mv_mmm_fname.

Definition at line 193 of file options.h.

const char* nearest_fname

Nearest neighbor model information.

Definition at line 218 of file options.h.

const char* nearest_dtd_fname

XML DTD for the nearest neighbor model.

Definition at line 221 of file options.h.

uint32_t nearest_max_d

Maximum allowed nearest neighbor distance for a prediction.

Definition at line 224 of file options.h.

const char* bmm_tree_fname

Name of the Bernoulli mixture model tree file.

Definition at line 227 of file options.h.

const char* bmm_info_fname

Name of the Bernoulli mixture model info file.

Definition at line 230 of file options.h.

const char* bmm_conf_thresh_fname

Name of the Bernoulli mixture model confidence threshold file.

Definition at line 233 of file options.h.

const char* gmm_bmm_tree_fname

Name of the Gaussian and Bernoulli mixture model tree file.

Definition at line 236 of file options.h.

const char* gmm_bmm_info_fname

Name of the Gaussian and Bernoulli mixture model info file.

Definition at line 239 of file options.h.

Name of the Gaussian and Bernoulli mixture model confidence threshold file.

Definition at line 245 of file options.h.

const char* model_dirname

Director to find the models in.

Definition at line 248 of file options.h.

struct { ... } opts