Subsections


mcmc

Provide a map distribution using Markov Chain Monte Carlo. It works only in the comparative mapping approach (Section 2.7), for that a reference order dataset has to be loaded and merged with the biological dataset.

Synopsis:

The mcmc command is invoked either as:

Description:

The mcmc command is Markov Chain Monte Carlo algorithm for estimating the posterior distribution of the marker order. It starts from the best map found in the CarthaGene heap. In order to visit maps, it uses a stochastic-biased complex (2-opt submap reversals, single marker re-insertions, and submap transpositions) operator based on 2-point likelihood genetic / Radiated Hybrid data. The random generator number is initialized with the RandomSeed parameter (should be a strictly positive integer). The number of iterations of MCMC is controlled by the NbIter parameter. At the end, it gives a list of maps with their posterior probability. The first Burning iterations are not used to estimate the map distribution. The maps are inserted in the CarthaGene heap. The map distribution is written to a file names PID.mcmc where PID is the Process ID of the current carthagene session.

The format of the output file is as follows: the first line recalls the starting map, then each line is a map from the distribution, sorted in decreasing (multipoint) posterior probability. For each line, it is indicated (in that order): the posterior probability using the multipoint likelihood, the posterior probability using the 2-pt approximation of the likelihood, the weight measuring the ratio of these two probabilities, the number of breakpoints with the reference order and finally the map given as the positions of the markers relative to the starting map (from 0 to N-1) where N is the number of markers.

Arguments :

Returns:

An output file containing the map distribution.

Example:

CG> dsload Data/rh12_true.cg
{1 haploid RH 51 93 /home/tschiex/Dev/carthagene/doc/user/exemple/Data/rh12...
CG> dsload Data/order12_ref.cg
{2 order 51 /home/tschiex/Dev/carthagene/doc/user/exemple/Data/order12_ref.cg}
CG> dsmergor 1 2
{3 merged by order 51 93}
CG>

#select the comparative mapping criterion
CG> dsbplambda 2 1 1
New coefficient factor value is -2.682486.
1.0
CG>

#find a first good map
CG> lkhn 1 -1
[-522.68]
Best map with log10-likelihood = -522.68
TSP: optimum= 517.192000 lowerbound= 517.192000 gap= 0.000000% totaltime= 0.01

Map -1 : log10-likelihood =  -522.68
-------:
 Set : Marker List ...
   1 : UniSTS208788 UniSTS180373 UniSTS160192 UniSTS160197 UniSTS165815 Uni...
   2 : UniSTS208788 UniSTS180373 UniSTS160192 UniSTS160197 UniSTS165815 Uni...
Optimum found, equal to 517192! The minimum 1-tree is a tour.

CG>

#compute map distribution starting from this initial map
#see result in ProcessID.mcmc output file
CG> mcmc 1 1000 500
[-488.80]
bits: 384
key#: 0 2pt_loglike: -488.80
Maximum transposed segment size = 20
[-488.52]

Burning: 0.00 % completed. time elapsed:0.01 sec. logLik : -488.524999[-487...

Burning: 2.00 % completed. time elapsed:0.13 sec. logLik : -487.154692[-486...

Burning: 4.00 % completed. time elapsed:0.24 sec. logLik : -486.903920
Burning: 6.00 % completed. time elapsed:0.36 sec. logLik : -487.154692
Burning: 8.00 % completed. time elapsed:0.48 sec. logLik : -486.903920
Burning: 10.00 % completed. time elapsed:0.59 sec. logLik : -487.154692
Burning: 12.00 % completed. time elapsed:0.71 sec. logLik : -487.154692
Burning: 14.00 % completed. time elapsed:0.83 sec. logLik : -488.524999
Burning: 16.00 % completed. time elapsed:0.95 sec. logLik : -487.331215
Burning: 18.00 % completed. time elapsed:1.06 sec. logLik : -488.733234
Burning: 20.00 % completed. time elapsed:1.18 sec. logLik : -486.903920
Burning: 22.00 % completed. time elapsed:1.29 sec. logLik : -486.903920
Burning: 24.00 % completed. time elapsed:1.41 sec. logLik : -486.903920
Burning: 26.00 % completed. time elapsed:1.53 sec. logLik : -488.718765
Burning: 28.00 % completed. time elapsed:1.64 sec. logLik : -487.416990
Burning: 30.00 % completed. time elapsed:1.76 sec. logLik : -487.154692
Burning: 32.00 % completed. time elapsed:1.88 sec. logLik : -489.117745
Burning: 34.00 % completed. time elapsed:2.00 sec. logLik : -489.757063
Burning: 36.00 % completed. time elapsed:2.11 sec. logLik : -488.274227
Burning: 38.00 % completed. time elapsed:2.23 sec. logLik : -488.314754
Burning: 40.00 % completed. time elapsed:2.35 sec. logLik : -487.331215
Burning: 42.00 % completed. time elapsed:2.46 sec. logLik : -487.775753
Burning: 44.00 % completed. time elapsed:2.58 sec. logLik : -487.331215
Burning: 46.00 % completed. time elapsed:2.70 sec. logLik : -487.331215
Burning: 48.00 % completed. time elapsed:2.81 sec. logLik : -487.154692
Burning: 50.00 % completed. time elapsed:2.93 sec. logLik : -486.903920
Burning: 52.00 % completed. time elapsed:3.05 sec. logLik : -487.956194
Burning: 54.00 % completed. time elapsed:3.16 sec. logLik : -487.631123
Burning: 56.00 % completed. time elapsed:3.27 sec. logLik : -486.903920
Burning: 58.00 % completed. time elapsed:3.39 sec. logLik : -488.469264
Burning: 60.00 % completed. time elapsed:3.50 sec. logLik : -487.154692
Burning: 62.00 % completed. time elapsed:3.61 sec. logLik : -487.154692
Burning: 64.00 % completed. time elapsed:3.73 sec. logLik : -486.903920
Burning: 66.00 % completed. time elapsed:3.85 sec. logLik : -487.956194
Burning: 68.00 % completed. time elapsed:3.96 sec. logLik : -487.956194
Burning: 70.00 % completed. time elapsed:4.08 sec. logLik : -488.916313
Burning: 72.00 % completed. time elapsed:4.20 sec. logLik : -486.903920
Burning: 74.00 % completed. time elapsed:4.31 sec. logLik : -486.903920
Burning: 76.00 % completed. time elapsed:4.43 sec. logLik : -486.903920
Burning: 78.00 % completed. time elapsed:4.55 sec. logLik : -486.903920
Burning: 80.00 % completed. time elapsed:4.66 sec. logLik : -486.903920
Burning: 82.00 % completed. time elapsed:4.78 sec. logLik : -487.154692
Burning: 84.00 % completed. time elapsed:4.90 sec. logLik : -486.903920
Burning: 86.00 % completed. time elapsed:5.01 sec. logLik : -487.348458
Burning: 88.00 % completed. time elapsed:5.12 sec. logLik : -488.922490
Burning: 90.00 % completed. time elapsed:5.24 sec. logLik : -487.348458
Burning: 92.00 % completed. time elapsed:5.35 sec. logLik : -487.348458
Burning: 94.00 % completed. time elapsed:5.46 sec. logLik : -490.025363
Burning: 96.00 % completed. time elapsed:5.58 sec. logLik : -487.348458
Burning: 98.00 % completed. time elapsed:5.69 sec. logLik : -488.351918
Main iterations: 0.00 % completed.     2 maps visited. time elapsed:5.81 se...
Main iterations: 2.00 % completed.    16 maps visited. time elapsed:5.95 se...
Main iterations: 4.00 % completed.    26 maps visited. time elapsed:6.08 se...
Main iterations: 6.00 % completed.    35 maps visited. time elapsed:6.22 se...
Main iterations: 8.00 % completed.    47 maps visited. time elapsed:6.35 se...
Main iterations: 10.00 % completed.    56 maps visited. time elapsed:6.49 s...
Main iterations: 12.00 % completed.    62 maps visited. time elapsed:6.63 s...
Main iterations: 14.00 % completed.    62 maps visited. time elapsed:6.76 s...
Main iterations: 16.00 % completed.    69 maps visited. time elapsed:6.90 s...
Main iterations: 18.00 % completed.    75 maps visited. time elapsed:7.04 s...
Main iterations: 20.00 % completed.    77 maps visited. time elapsed:7.18 s...
Main iterations: 22.00 % completed.    80 maps visited. time elapsed:7.31 s...
Main iterations: 24.00 % completed.    83 maps visited. time elapsed:7.45 s...
Main iterations: 26.00 % completed.    86 maps visited. time elapsed:7.58 s...
Main iterations: 28.00 % completed.    93 maps visited. time elapsed:7.72 s...
Main iterations: 30.00 % completed.    93 maps visited. time elapsed:7.86 s...
Main iterations: 32.00 % completed.    96 maps visited. time elapsed:7.99 s...
Main iterations: 34.00 % completed.   100 maps visited. time elapsed:8.13 s...
Main iterations: 36.00 % completed.   105 maps visited. time elapsed:8.27 s...
Main iterations: 38.00 % completed.   106 maps visited. time elapsed:8.40 s...
Main iterations: 40.00 % completed.   108 maps visited. time elapsed:8.54 s...
Main iterations: 42.00 % completed.   111 maps visited. time elapsed:8.67 s...
Main iterations: 44.00 % completed.   113 maps visited. time elapsed:8.81 s...
Main iterations: 46.00 % completed.   115 maps visited. time elapsed:8.95 s...
Main iterations: 48.00 % completed.   117 maps visited. time elapsed:9.08 s...
Main iterations: 50.00 % completed.   119 maps visited. time elapsed:9.22 s...
Main iterations: 52.00 % completed.   120 maps visited. time elapsed:9.36 s...
Main iterations: 54.00 % completed.   123 maps visited. time elapsed:9.50 s...
Main iterations: 56.00 % completed.   125 maps visited. time elapsed:9.63 s...
Main iterations: 58.00 % completed.   126 maps visited. time elapsed:9.77 s...
Main iterations: 60.00 % completed.   127 maps visited. time elapsed:9.91 s...
Main iterations: 62.00 % completed.   128 maps visited. time elapsed:10.05 ...
Main iterations: 64.00 % completed.   129 maps visited. time elapsed:10.18 ...
Main iterations: 66.00 % completed.   130 maps visited. time elapsed:10.32 ...
Main iterations: 68.00 % completed.   137 maps visited. time elapsed:10.46 ...
Main iterations: 70.00 % completed.   139 maps visited. time elapsed:10.60 ...
Main iterations: 72.00 % completed.   141 maps visited. time elapsed:10.73 ...
Main iterations: 74.00 % completed.   141 maps visited. time elapsed:10.87 ...
Main iterations: 76.00 % completed.   154 maps visited. time elapsed:11.00 ...
Main iterations: 78.00 % completed.   161 maps visited. time elapsed:11.14 ...
Main iterations: 80.00 % completed.   161 maps visited. time elapsed:11.28 ...
Main iterations: 82.00 % completed.   162 maps visited. time elapsed:11.41 ...
Main iterations: 84.00 % completed.   162 maps visited. time elapsed:11.55 ...
Main iterations: 86.00 % completed.   163 maps visited. time elapsed:11.69 ...
Main iterations: 88.00 % completed.   164 maps visited. time elapsed:11.83 ...
Main iterations: 90.00 % completed.   164 maps visited. time elapsed:11.96 ...
Main iterations: 92.00 % completed.   164 maps visited. time elapsed:12.10 ...
Main iterations: 94.00 % completed.   165 maps visited. time elapsed:12.24 ...
Main iterations: 96.00 % completed.   166 maps visited. time elapsed:12.38 ...
Main iterations: 98.00 % completed.   167 maps visited. time elapsed:12.51 ...
100.00 completed.   168 maps visited. time elapsed:12.65 sec.
MCMC done
Gibbs: accepted/proposed = 0.001267
Computing IS weigths:

0.000000 completed
0.595238 completed
1.190476 completed
1.785714 completed
2.380952 completed
2.976190 completed
3.571429 completed
4.166667 completed
4.761905 completed
5.357143 completed
5.952381 completed
6.547619 completed
7.142857 completed
7.738095 completed
8.333333 completed
8.928571 completed
9.523810 completed
10.119048 completed
10.714286 completed
11.309524 completed
11.904762 completed
12.500000 completed
13.095238 completed
13.690476 completed
14.285714 completed
14.880952 completed
15.476190 completed
16.071429 completed
16.666667 completed
17.261905 completed
17.857143 completed
18.452381 completed
19.047619 completed
19.642857 completed
20.238095 completed
20.833333 completed
21.428571 completed
22.023810 completed
22.619048 completed
23.214286 completed
23.809524 completed
24.404762 completed
25.000000 completed
25.595238 completed
26.190476 completed
26.785714 completed
27.380952 completed
27.976190 completed
28.571429 completed
29.166667 completed
29.761905 completed
30.357143 completed
30.952381 completed
31.547619 completed
32.142857 completed
32.738095 completed
33.333333 completed
33.928571 completed
34.523810 completed
35.119048 completed
35.714286 completed
36.309524 completed
36.904762 completed
37.500000 completed
38.095238 completed
38.690476 completed
39.285714 completed
39.880952 completed
40.476190 completed
41.071429 completed
41.666667 completed
42.261905 completed
42.857143 completed
43.452381 completed
44.047619 completed
44.642857 completed
45.238095 completed
45.833333 completed
46.428571 completed
47.023810 completed
47.619048 completed
48.214286 completed
48.809524 completed
49.404762 completed
50.000000 completed
50.595238 completed
51.190476 completed
51.785714 completed
52.380952 completed
52.976190 completed
53.571429 completed
54.166667 completed
54.761905 completed
55.357143 completed
55.952381 completed
56.547619 completed
57.142857 completed
57.738095 completed
58.333333 completed
58.928571 completed
59.523810 completed
60.119048 completed
60.714286 completed
61.309524 completed
61.904762 completed
62.500000 completed
63.095238 completed
63.690476 completed
64.285714 completed
64.880952 completed
65.476190 completed
66.071429 completed
66.666667 completed
67.261905 completed
67.857143 completed
68.452381 completed
69.047619 completed
69.642857 completed
70.238095 completed
70.833333 completed
71.428571 completed
72.023810 completed
72.619048 completed
73.214286 completed
73.809524 completed
74.404762 completed
75.000000 completed
75.595238 completed
76.190476 completed
76.785714 completed
77.380952 completed
77.976190 completed
78.571429 completed
79.166667 completed
79.761905 completed
80.357143 completed
80.952381 completed
81.547619 completed
82.142857 completed
82.738095 completed
83.333333 completed
83.928571 completed
84.523810 completed
85.119048 completed
85.714286 completed
86.309524 completed
86.904762 completed
87.500000 completed
88.095238 completed
88.690476 completed
89.285714 completed
89.880952 completed
90.476190 completed
91.071429 completed
91.666667 completed
92.261905 completed
92.857143 completed
93.452381 completed
94.047619 completed
94.642857 completed
95.238095 completed
95.833333 completed
96.428571 completed
97.023810 completed
97.619048 completed
98.214286 completed
98.809524 completed
99.404762 completed
Done.

 Printing:      1 /168 maps
 Printing:      2 /168 maps
 Printing:      3 /168 maps
 Printing:      4 /168 maps
 Printing:      5 /168 maps
 Printing:      6 /168 maps
 Printing:      7 /168 maps
 Printing:      8 /168 maps
 Printing:      9 /168 maps
 Printing:     10 /168 maps
 Printing:     11 /168 maps
 Printing:     12 /168 maps
 Printing:     13 /168 maps
 Printing:     14 /168 maps
 Printing:     15 /168 maps
 Printing:     16 /168 maps
 Printing:     17 /168 maps
 Printing:     18 /168 maps
 Printing:     19 /168 maps
 Printing:     20 /168 maps
 Printing:     21 /168 maps
 Printing:     22 /168 maps
 Printing:     23 /168 maps
 Printing:     24 /168 maps
 Printing:     25 /168 maps
 Printing:     26 /168 maps
 Printing:     27 /168 maps
 Printing:     28 /168 maps
 Printing:     29 /168 maps
 Printing:     30 /168 maps
 Printing:     31 /168 maps
 Printing:     32 /168 maps
 Printing:     33 /168 maps
 Printing:     34 /168 maps
 Printing:     35 /168 maps
 Printing:     36 /168 maps
 Printing:     37 /168 maps
 Printing:     38 /168 maps
 Printing:     39 /168 maps
 Printing:     40 /168 maps
 Printing:     41 /168 maps
 Printing:     42 /168 maps
 Printing:     43 /168 maps
 Printing:     44 /168 maps
 Printing:     45 /168 maps
 Printing:     46 /168 maps
 Printing:     47 /168 maps
 Printing:     48 /168 maps
 Printing:     49 /168 maps
 Printing:     50 /168 maps
 Printing:     51 /168 maps
 Printing:     52 /168 maps
 Printing:     53 /168 maps
 Printing:     54 /168 maps
 Printing:     55 /168 maps
 Printing:     56 /168 maps
 Printing:     57 /168 maps
 Printing:     58 /168 maps
 Printing:     59 /168 maps
 Printing:     60 /168 maps
 Printing:     61 /168 maps
 Printing:     62 /168 maps
 Printing:     63 /168 maps
 Printing:     64 /168 maps
 Printing:     65 /168 maps
 Printing:     66 /168 maps
 Printing:     67 /168 maps
 Printing:     68 /168 maps
 Printing:     69 /168 maps
 Printing:     70 /168 maps
 Printing:     71 /168 maps
 Printing:     72 /168 maps
 Printing:     73 /168 maps
 Printing:     74 /168 maps
 Printing:     75 /168 maps
 Printing:     76 /168 maps
 Printing:     77 /168 maps
 Printing:     78 /168 maps
 Printing:     79 /168 maps
 Printing:     80 /168 maps
 Printing:     81 /168 maps
 Printing:     82 /168 maps
 Printing:     83 /168 maps
 Printing:     84 /168 maps
 Printing:     85 /168 maps
 Printing:     86 /168 maps
 Printing:     87 /168 maps
 Printing:     88 /168 maps
 Printing:     89 /168 maps
 Printing:     90 /168 maps
 Printing:     91 /168 maps
 Printing:     92 /168 maps
 Printing:     93 /168 maps
 Printing:     94 /168 maps
 Printing:     95 /168 maps
 Printing:     96 /168 maps
 Printing:     97 /168 maps
 Printing:     98 /168 maps
 Printing:     99 /168 maps
 Printing:    100 /168 maps
 Printing:    101 /168 maps
 Printing:    102 /168 maps
 Printing:    103 /168 maps
 Printing:    104 /168 maps
 Printing:    105 /168 maps
 Printing:    106 /168 maps
 Printing:    107 /168 maps
 Printing:    108 /168 maps
 Printing:    109 /168 maps
 Printing:    110 /168 maps
 Printing:    111 /168 maps
 Printing:    112 /168 maps
 Printing:    113 /168 maps
 Printing:    114 /168 maps
 Printing:    115 /168 maps
 Printing:    116 /168 maps
 Printing:    117 /168 maps
 Printing:    118 /168 maps
 Printing:    119 /168 maps
 Printing:    120 /168 maps
 Printing:    121 /168 maps
 Printing:    122 /168 maps
 Printing:    123 /168 maps
 Printing:    124 /168 maps
 Printing:    125 /168 maps
 Printing:    126 /168 maps
 Printing:    127 /168 maps
 Printing:    128 /168 maps
 Printing:    129 /168 maps
 Printing:    130 /168 maps
 Printing:    131 /168 maps
 Printing:    132 /168 maps
 Printing:    133 /168 maps
 Printing:    134 /168 maps
 Printing:    135 /168 maps
 Printing:    136 /168 maps
 Printing:    137 /168 maps
 Printing:    138 /168 maps
 Printing:    139 /168 maps
 Printing:    140 /168 maps
 Printing:    141 /168 maps
 Printing:    142 /168 maps
 Printing:    143 /168 maps
 Printing:    144 /168 maps
 Printing:    145 /168 maps
 Printing:    146 /168 maps
 Printing:    147 /168 maps
 Printing:    148 /168 maps
 Printing:    149 /168 maps
 Printing:    150 /168 maps
 Printing:    151 /168 maps
 Printing:    152 /168 maps
 Printing:    153 /168 maps
 Printing:    154 /168 maps
 Printing:    155 /168 maps
 Printing:    156 /168 maps
 Printing:    157 /168 maps
 Printing:    158 /168 maps
 Printing:    159 /168 maps
 Printing:    160 /168 maps
 Printing:    161 /168 maps
 Printing:    162 /168 maps
 Printing:    163 /168 maps
 Printing:    164 /168 maps
 Printing:    165 /168 maps
 Printing:    166 /168 maps
 Printing:    167 /168 maps
 Printing:    168 /168 maps
totaltime= 12.84 sec.

CG>

See also:

Thomas Schiex 2009-10-27