Haplo Prediction
predict haplogroups
|
00001 /* 00002 * This work is licensed under a Creative Commons 00003 * Attribution-Noncommercial-Share Alike 3.0 United States License. 00004 * 00005 * http://creativecommons.org/licenses/by-nc-sa/3.0/us/ 00006 * 00007 * You are free: 00008 * 00009 * to Share - to copy, distribute, display, and perform the work 00010 * to Remix - to make derivative works 00011 * 00012 * Under the following conditions: 00013 * 00014 * Attribution. You must attribute the work in the manner specified by the 00015 * author or licensor (but not in any way that suggests that they endorse you 00016 * or your use of the work). 00017 * 00018 * Noncommercial. You may not use this work for commercial purposes. 00019 * 00020 * Share Alike. If you alter, transform, or build upon this work, you may 00021 * distribute the resulting work only under the same or similar license to 00022 * this one. 00023 * 00024 * For any reuse or distribution, you must make clear to others the license 00025 * terms of this work. The best way to do this is by including this header. 00026 * 00027 * Any of the above conditions can be waived if you get permission from the 00028 * copyright holder. 00029 * 00030 * Apart from the remix rights granted under this license, nothing in this 00031 * license impairs or restricts the author's moral rights. 00032 */ 00033 00034 00046 #ifndef OPTIONS_H 00047 #define OPTIONS_H 00048 00049 00050 #include <config.h> 00051 00052 #include <stdlib.h> 00053 #include <stdio.h> 00054 #include <inttypes.h> 00055 00056 #include <jwsc/base/error.h> 00057 #include <jwsc/base/option.h> 00058 #include <jwsc/vector/vector.h> 00059 00060 #include "output.h" 00061 #include "input.h" 00062 00063 00064 #ifdef HAPLO_HAVE_PTHREAD 00065 #define NUM_THREAD_OPTS 1 00066 #else 00067 #define NUM_THREAD_OPTS 0 00068 #endif 00069 00070 #define NUM_SHARED_OPTS_NO_ARG 4 00071 #define NUM_SHARED_OPTS_WITH_ARG 12 + NUM_THREAD_OPTS 00072 00073 00075 struct 00076 { 00081 uint8_t header_in; 00082 00087 uint8_t header_out; 00088 00094 uint8_t exclude_one; 00095 00101 uint32_t seed; 00102 00104 uint32_t num_threads; 00105 00111 Haplo_input_format input_format; 00112 00114 const char* input_dtd_fname; 00115 00121 Haplo_output_format output_format; 00122 00124 const char* labels_fname; 00125 00127 const char* labels_dtd_fname; 00128 00130 Vector_u32* id_cols; 00131 00133 uint32_t label_col; 00134 00136 uint32_t first_marker_col; 00137 00139 uint32_t num_markers; 00140 00142 Vector_u32* marker_cols; 00143 00145 const char* aux_input_fname; 00146 00148 Vector_u32* aux_id_cols; 00149 00151 uint32_t aux_label_col; 00152 00154 uint32_t aux_first_marker_col; 00155 00157 uint32_t aux_num_markers; 00158 00160 Vector_u32* aux_marker_cols; 00161 00163 uint32_t num_gmm_markers; 00164 00166 const char* nb_freq_fname; 00167 00169 const char* nb_freq_dtd_fname; 00170 00172 const char* nb_gauss_fname; 00173 00175 const char* nb_gauss_dtd_fname; 00176 00178 const char* nb_gmm_fname; 00179 00181 const char* nb_gmm_dtd_fname; 00182 00184 const char* mv_gmm_fname; 00185 00187 const char* mv_gmm_dtd_fname; 00188 00190 const char* mv_mmm_fname; 00191 00193 const char* mv_mmm_dtd_fname; 00194 00195 #ifdef HAPLO_ENABLE_SVM 00196 00197 const char* svm_fname; 00198 00200 const char* svm_dtd_fname; 00201 #endif 00202 00203 #ifdef HAPLO_ENABLE_WEKA 00204 00205 const char* weka_j48_fname; 00206 00208 const char* weka_part_fname; 00209 00211 const char* weka_jar_fname; 00212 00214 const char* weka_dtd_fname; 00215 #endif 00216 00218 const char* nearest_fname; 00219 00221 const char* nearest_dtd_fname; 00222 00224 uint32_t nearest_max_d; 00225 00227 const char* bmm_tree_fname; 00228 00230 const char* bmm_info_fname; 00231 00233 const char* bmm_conf_thresh_fname; 00234 00236 const char* gmm_bmm_tree_fname; 00237 00239 const char* gmm_bmm_info_fname; 00240 00245 const char* gmm_bmm_conf_thresh_fname; 00246 00248 const char* model_dirname; 00249 } 00250 opts; 00251 00253 Error* process_exclude_one_opt(); 00254 00256 Error* process_aux_input_opt(Option_arg arg); 00257 00259 Error* process_aux_id_cols_opt(Option_arg arg); 00260 00262 Error* process_aux_label_col_opt(Option_arg arg); 00263 00265 Error* process_aux_first_marker_col_opt(Option_arg arg); 00266 00268 Error* process_aux_num_markers_opt(Option_arg arg); 00269 00271 Error* process_aux_marker_cols_opt(Option_arg arg); 00272 00274 Error* process_num_gmm_bmm_markers_opt(Option_arg arg); 00275 00277 Error* process_model_dir_opt(Option_arg arg); 00278 00280 Error* process_nb_freq_opt(Option_arg arg); 00281 00283 Error* process_nb_freq_dtd_opt(Option_arg arg); 00284 00286 Error* process_nb_gauss_opt(Option_arg arg); 00287 00289 Error* process_nb_gauss_dtd_opt(Option_arg arg); 00290 00292 Error* process_nb_gmm_opt(Option_arg arg); 00293 00295 Error* process_nb_gmm_dtd_opt(Option_arg arg); 00296 00298 Error* process_mv_gmm_opt(Option_arg arg); 00299 00301 Error* process_mv_gmm_dtd_opt(Option_arg arg); 00302 00304 Error* process_mv_mmm_opt(Option_arg arg); 00305 00307 Error* process_mv_mmm_dtd_opt(Option_arg arg); 00308 00309 #ifdef HAPLO_ENABLE_SVM 00310 00311 Error* process_svm_opt(Option_arg arg); 00312 00314 Error* process_svm_dtd_opt(Option_arg arg); 00315 #endif 00316 00317 #ifdef HAPLO_ENABLE_WEKA 00318 00319 Error* process_weka_j48_opt(Option_arg arg); 00320 00322 Error* process_weka_part_opt(Option_arg arg); 00323 00325 Error* process_weka_jar_opt(Option_arg arg); 00326 00328 Error* process_weka_dtd_opt(Option_arg arg); 00329 #endif 00330 00332 Error* process_nearest_opt(Option_arg arg); 00333 00335 Error* process_nearest_dtd_opt(Option_arg arg); 00336 00338 Error* process_nearest_max_d_opt(Option_arg arg); 00339 00341 Error* process_bmm_tree_opt(Option_arg arg); 00342 00344 Error* process_bmm_info_opt(Option_arg arg); 00345 00347 Error* process_bmm_conf_thresh_opt(Option_arg arg); 00348 00350 Error* process_gmm_bmm_tree_opt(Option_arg arg); 00351 00353 Error* process_gmm_bmm_info_opt(Option_arg arg); 00354 00356 Error* process_gmm_bmm_conf_thresh_opt(Option_arg arg); 00357 00359 void init_options(Option_no_arg* opts_no_arg, Option_with_arg* opts_with_arg); 00360 00361 00362 #endif