main.cc 999 Bytes
Newer Older
damien's avatar
damien committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "error.h"
#include "geno_matrix.h"
#include "bayes/output.h"
#include "map-likelihood/cli.h"

int main(int argc, const char** argv)
{
    gamete_LV_database gamete_LV;
    auto settings = mapqa_settings_t::from_args(argc, argv);
    
    if (!settings) {
        print_usage();
        return -1;
    }
    {
        ifile gam(MESSAGE(settings->work_directory << "/" << settings->name << ".cache/gamete.data"));
        rw_base() (gam, gamete_LV);
    }
    MSG_DEBUG("Have gamete_LV");
    MSG_DEBUG(gamete_LV.data);
21
22
    MSG_DEBUG("Marker order: " << settings->group.raw.marker_name);
    MSG_DEBUG("Distances: " << settings->group.raw.marker_locus);
damien's avatar
damien committed
23
24
25
    
    const auto& locvec = settings->group.raw.marker_locus;
    const auto& nvec = settings->group.raw.marker_name;
26
27
28
    double lh = gamete_LV.map_likelihood(nvec, locvec);
    MSG_DEBUG("Computed likelihood (log): " << lh);
    MSG_DEBUG("Computed likelihood (log10): " << (lh / log(10.)));
damien's avatar
damien committed
29
30
31
32
33

    return 0;
}

#include "output_impl.h"