Commit 90db7d98 authored by Damien Leroux's avatar Damien Leroux
Browse files

Added some simulated data and a hidden output in spell-marker to double-check the results.

parent 0c100333
This diff is collapsed.
......@@ -524,6 +524,17 @@ arguments = {
};
constraint_t<bn_settings_t> checks[] = {
{
"No marker to work on.",
"Specify at least one genotype data file",
CONSTRAINT_PREDICATE(bn_settings_t) {
return s->marker_names.size() > 0;
}
},
};
argument_parser<bn_settings_t> arg_map(arguments);
......@@ -543,6 +554,9 @@ bn_settings_t* bn_settings_t::from_args(int argc, const char** argv)
if (ret) {
ret->prg_name = basename(argv[0]);
ret->command_line.assign(argv, argv + argc);
for (const auto& kv: ret->observed_mark) {
ret->marker_observation_specs[kv.second.format_name] = marker_obs_formats::get_format(ret->pedigree, kv.second.format_name);
}
if (ret->output_mode == 0) {
ret->output_mode = bn_settings_t::OutputPopData;
}
......
......@@ -34,7 +34,8 @@ int main(int argc, const char** argv)
msg_handler_t::debug_enabled() = false;
bn_settings_t* settings = NULL;
try {
settings = bn_settings_t::from_args(argc, argv);
settings = bn_settings_t::from_args(argc, argv);
msg_handler_t::check(true);
} catch (file::error& fe) {
MSG_ERROR("An error happened while reading input files. " << fe.what(), "");
return -1;
......@@ -98,6 +99,8 @@ int main(int argc, const char** argv)
settings->marker_names.assign(tmp.begin(), tmp.end());
/*MSG_DEBUG("MARKER NAMES " << settings->marker_names);*/
constraint_t<bn_settings_t>::check(settings);
for (size_t mn = 0; mn < settings->marker_names.size(); ++mn) {
settings->marker_index[settings->marker_names[mn]] = mn;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment