<<<<< Input Tree (Top_node = 29) >>>>>

( seq0020{28}:0.1529, ( seq0018{26}:0.1741, ( ( seq0015{23}:0.1492, ( seq0013{20}:0.1827, seq0014{21}:0.1659 ){22}:0.0049 ){24}:0.0297, ( ( seq0008{16}:0.0865, seq0009{17}:0.1286 ){18}:0.0335, ( ( seq0005{10}:0.0368, ( seq0006{11}:0.0286, seq0007{12}:0.0362 ){13}:0.0065 ){14}:0.0368, ( ( seq0000{1}:0.0054, seq0001{2}:0.0081 ){3}:0.0232, ( seq0002{4}:0.0189, ( seq0003{5}:0.0124, seq0004{6}:0.0108 ){7}:0.0070 ){8}:0.0270 ){9}:0.0205 ){15}:0.0703 ){19}:0.0383 ){25}:0.0314 ){27}:0.0130 ){29};


<<<<< Input MSA >>>>>

#{Sequences} = 15 .
#{Sites in the segment}_ref = 58 ,
#{Sites in the segment}_rec = 54 .


<< Correspondence between sequence IDs and sequence indices >>

Indx:	Seq_ID

0:	seq0000
1:	seq0001
2:	seq0002
3:	seq0003
4:	seq0004
5:	seq0005
6:	seq0006
7:	seq0007
8:	seq0008
9:	seq0009
10:	seq0013
11:	seq0014
12:	seq0015
13:	seq0018
14:	seq0020


<< Original Segment of the Reference Alignment: >>

(position)     0000000000111111111122222222223333333333444444444455555555
               0123456789012345678901234567890123456789012345678901234567
                                                                         
seq0000        TACTTAATAG---TCGTCGCTAATTG-G--GGAAGGAGGAGGGCT---TATAAAAGAC
seq0001        TACTTAATAG---TCGTCGCTAATTG-G--GGAAGGAGGAGGGCT---TATAAAAGAC
seq0002        TACTTAATAG---TCGTCGCTAATTG-G--GGAAGGAGGAGGGCT---TATAAAAGAC
seq0003        TACTTAATAG---TCGTCGCTAATTG-G--GGAAGGAGGAGGGCT---TATAAAAGAC
seq0004        TACTTAATAG---TCCTCGCTAATTG-G--GGAAGGAGGAGGGCT---TATAAAAGAC
seq0005        TACTTAATAG---GCGTCGCTAATTG-GCGGGAAGGAGGCGGGCT---GATAAAAGAC
seq0006        TACTTAATAG---TCGTCGCTAATTG-G--GGAAGGAGGCGGGCT---GATAAAAGAC
seq0007        TACTTAATAG---TCGTCGCTACTTG-G--GGAACAAGGCGGGCT---GATAAAAGAC
seq0008        TACTTCATAG---TCGTCACTGATTG-G--GGAAGGAGGA--GCTTTCGATAAAA-AG
seq0009        TACTCACTAG---TCGTCGCTAATTG-G--GGAAGGAGGA--GCT---GTGAAAAGAC
seq0013        TACTTAAGAG---TTGTCGCTAATTGTG--GGAAGGAG-A--ACT---GATAAAAGC-
seq0014        --------------------------------------------T---GATAAAAGAC
seq0015        TACTTAATAT---CTCTCGCTAATTG-C--GGTAGGAGGA--GCT---GATAAAAGAC
seq0018        TTCTTAATAGTCTTGGTCGCTAATTG-G--GGAAGGACGA--GTT---GCTAAGAGAC
seq0020        TACTTAA------------------------------------------------GAC


<< Original Segment of the Reconstructed Alignment: >>

(position)     000000000011111111112222222222333333333344444444445555
               012345678901234567890123456789012345678901234567890123
                                                                     
seq0000        TACTTAATAGTC---GTCGCTAATTG--GGGAAGGAGGAGGGCTTATAAAAGAC
seq0001        TACTTAATAGTC---GTCGCTAATTG--GGGAAGGAGGAGGGCTTATAAAAGAC
seq0002        TACTTAATAGTC---GTCGCTAATTG--GGGAAGGAGGAGGGCTTATAAAAGAC
seq0003        TACTTAATAGTC---GTCGCTAATTG--GGGAAGGAGGAGGGCTTATAAAAGAC
seq0004        TACTTAATAGTC---CTCGCTAATTG--GGGAAGGAGGAGGGCTTATAAAAGAC
seq0005        TACTTAATAGGC---GTCGCTAATTGGCGGGAAGGAGGCGGGCTGATAAAAGAC
seq0006        TACTTAATAGTC---GTCGCTAATTG--GGGAAGGAGGCGGGCTGATAAAAGAC
seq0007        TACTTAATAGTC---GTCGCTACTTG--GGGAACAAGGCGGGCTGATAAAAGAC
seq0008        TACTTCATAGTC---GTCACTGATTG--GGGAAGGAGGAGCTTTCGATAAAAAG
seq0009        TACTCACTAGTC---GTCGCTAATTG--GGGAAGGAGGAG--CTGTGAAAAGAC
seq0013        TACTTAAGAGTT---GTCGCTAATTG--TGGGAAGGAGAA--CTGATAAAAG-C
seq0014        T-------------------------------------------GATAAAAGAC
seq0015        TACTTAATATCT---CTCGCTAATTG--CGGTAGGAGGAG--CTGATAAAAGAC
seq0018        TTCTTAATAGTCTTGGTCGCTAATTG--GGGAAGGACGAG--TTGCTAAGAGAC
seq0020        TACTTA--------------------------------------------AGAC


<<<<< Preliminary (0): Map the residue numbers onto the reference & reconstructed MSAs... >>>>>

<<<<< Preliminary (1): Map the position shifts (from reference to reconstructed) onto the Reconstructed MSA... >>>>>

<< Output of 'map_shifts_respos_bw_2msas' >>

($shift_lf, $shift_rf) = (0, -4) .

[ Shifts in the Reconstructed MSA ]

(position)	    0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49

seq0000   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0001   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0002   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0003   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0004   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0005   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0006   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0007   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -4   -4   -4   -4   -4   -4
seq0008   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -3   -3   -3   -3   -3   -3   -3   -3   -3   -3   -3
seq0009   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -3    -    -   -1   -1   -4   -4   -4   -4   -4   -4
seq0013   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    2    2    0    0    0    0    0    0    0    0   -1   -3    -    -   -1   -1   -4   -4   -4   -4   -4   -4
seq0014   	  -44    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -   -4   -4   -4   -4   -4   -4
seq0015   	    0    0    0    0    0    0    0    0    0    0   -3   -3    -    -    -    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -3    -    -   -1   -1   -4   -4   -4   -4   -4   -4
seq0018   	    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    -    -    1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -1   -3    -    -   -1   -1   -4   -4   -4   -4   -4   -4
seq0020   	    0    0    0    0    0    0    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -    -



(position)	   50   51   52   53

seq0000   	   -4   -4   -4   -4
seq0001   	   -4   -4   -4   -4
seq0002   	   -4   -4   -4   -4
seq0003   	   -4   -4   -4   -4
seq0004   	   -4   -4   -4   -4
seq0005   	   -4   -4   -4   -4
seq0006   	   -4   -4   -4   -4
seq0007   	   -4   -4   -4   -4
seq0008   	   -3   -3   -4   -4
seq0009   	   -4   -4   -4   -4
seq0013   	   -4   -4    -   -3
seq0014   	   -4   -4   -4   -4
seq0015   	   -4   -4   -4   -4
seq0018   	   -4   -4   -4   -4
seq0020   	   44   -4   -4   -4



<<<<< Preliminary (2): Put together the mapped position shifts into some Classes ... >>>>>

<< Output of 'br_list_classes_shift_respos' >>

$commoner_shift_flank = 0 .


<<<<< Preliminary (3'): For each MINI-class of shifts, parsimoniously infer the branch(es) separating the affected sequences from the rest. >>>>>

<<<<< ADDITIONAL Preliminary Process (3.5'): Split mini-classes each of which consists of unnaturally remote sequences... >>>>>

... NO CHANGES were made ...


<<<<< Preliminary (4): Merge the MINI-classes of shifts. >>>>>

<<<<< Preliminary (5'): Identify 'trivial' MINI-blocks. >>>>>

<<<<< Preliminary (6): Identify gap-pattern blocks, calculate their Dollo parsimony scenarios, and the initial parsimony candidate scenario of each gapped segment in the segmental MSAs (reference & reconstructed). >>>>>

<<<<< Preliminary (7'): Lump together some neighboring MINI-blocks affecting the identical set of sequences. >>>>>

<< Output of 'lump_together_similar_blocks': Content of @{$composite_miniblocks} (#{composite_miniblocks} = 16) >>

Indx_cmp_miniblock	beg_cmb	end_cmb	mrca	indices,constituent,miniblocks	list,position,shifts	merger,types	indices,involved,seqs

0	0	0	21	0	-44	n/a	11
1	10	11	25	6	-3	n/a	0,1,2,3,4,5,6,7,8,9,10,12
2	26	43	10	13	-1	n/a	5
3	28	28	27	16	1	n/a	0,1,2,3,4,6,7,8,9,12,13
4	28	38	20	17,15,12	2,0,-1	0,0	10
5	29	43	15	11	-1	n/a	0,1,2,3,4,6,7
6	29	38	27	9	-1	n/a	8,9,12,13
7	39	51	16	7	-3	n/a	8
8	39	39	27	5	-3	n/a	9,10,12,13
9	42	43	27	10	-1	n/a	9,10,12,13
10	44	53	27	1	-4	n/a	0,1,2,3,4,5,6,7,9,11,12,13
11	44	51	20	4	-4	n/a	10
12	50	50	28	18	44	n/a	14
13	51	53	28	2	-4	n/a	14
14	52	53	16	3	-4	n/a	8
15	53	53	20	8	-3	n/a	10



<<<<< Preliminary (8): Reorganize the list of insertions/deletions in the initial candidate of parsimonious scenarios, for reference and reconstructed MSAs. >>>>>

<<< (1) For Reference MSA >>>

<<< (2) For Reconstructed MSA >>>

<<<<< Preliminary (9): Identify the pairs of 'equivalent' indel events in the reference & reconstructed MSAs...  >>>>>

<<<<< (i) MAIN PROCESS (1st Round)!!!: Associate each Composite 'MINI-Block' with (an) appropriate type(s) of MSA error(s)... (#{composite blocks} = 16) >>>>>


[[ Results of the Main Process (1st Round) ]]

[ Contents of @cblk_wise_cts_invlvd_indels ]

Indx_cmp_blk	#{rlv_indels}_ref	#{rlv_indels}_rec	#{rltd_indels}_ref	#{rltd_indels}_rec	#{other_involved}_ref	#{other_involved}_rec

0	1	1	0	0	0	0
1	0	0	1	1	0	0
2	1	1	0	0	0	0
3	0	0	1	0	0	0
4	1	0	0	0	0	0
5	1	0	0	0	0	0
6
7	2	0	0	0	0	0
8	1	0	0	1	0	0
9	0	0	0	1	0	0
10
11	0	1	0	1	0	0
12	1	1	0	0	0	0
13	1	0	0	0	0	0
14	1	0	0	0	0	0
15	1	1	0	0	0	0


[ Skipped Composite-Blocks (#{cblocks} = 2): 6, 10 . ]


[ Contents of @cblk_wise_msa_errors ]

Indx_cmp_blk	Indx_error	len_cblk_ref	len_cblk_rec	Type	br1:beg1:end1:stat_ue1/br2:beg2:end2:stat_ue2/...(ref)	br1:beg1:end1:stat_ue1/br2:beg2:end2:stat_ue2/...(rec)

0	0	1	1	Complex(???)	21:0:43:X	21:1:43:X
1	0	2	2	Shift(gap-aligned)(?)	26:10:12:-	26:12:14:-
2	0	18	18	Shift(???)	10:28:29:-	10:26:27:-
3	0	1	1	NO_ASSOCIATED_EVENT(???)	20:26:26:-	None
4	0	14	11	Complex(???)	20:26:26:-	None
5	0	15	15	Complex(???)	15:40:41:-	None
6	Skipped!!(MULTIPLE_RELEVANT_BRANCHES(#{branches}=2))
7	0	13	13	Complex(???)	16:55:55:X/16:45:47:-	None
8	0	1	1	Complex(???)	15:40:41:-	19:40:41:-
9	0	2	2	NO_ASSOCIATED_EVENT(???)	None	19:40:41:-
10	Skipped!!(NO_RELEVANT_BRANCH)
11	0	8	8	Complex(???)	None	20:52:52:X/21:1:43:X
12	0	1	1	Shift	27:7:54:-	27:6:49:-
13	0	3	3	Complex(???)	27:7:54:-	None
14	0	2	2	Complex(???)	16:55:55:X	None
15	0	1	1	Shift	20:57:57:X	20:52:52:X


[ Contents of %indel_ref2assoc_cblks ]

Br:beg:end(ref)	indices,of,associated,composite-blocks

21:0:43	0
27:7:54	12,13
26:10:12	1
20:26:26	3,4
10:28:29	2
22:38:38	None
15:40:41	5,8
16:45:47	7
16:55:55	7,14
20:57:57	15


[ Contents of %indel_rec2assoc_cblks ]

Br:beg:end(rec)	indices,of,associated,composite-blocks

21:1:43	0,11
27:6:49	12
26:12:14	1
10:26:27	2
19:40:41	8,9
17:40:41	None
20:52:52	11,15


<<<< (ii) MAIN PROCESS (2nd Round)!!: Attempt to 'hard-link' skipped composite 'MINI-Block's to non-skipped ones, and to resolve Composite 'MINI-Block's associated with 'Complex' errors... >>>>

[[ Interim Results ]]

[ Contents of %cb2hard_linked (#{keys} = 1) ]

Indx_cmp_blk	=> [indices,cblks,hard,linked,by,the,key]

6	=> [5],


[ Contents of %cb2hard_linking (#{keys} = 1) ]

Indx_cmp_blk	=> [indices,cblks,hard,linking,the,key]

5	=> [6],


[ 'Soft-linked' pairs of composite-blocks (#{pairs} = 3) ]

Indx_cblk_A	indx_cblk_B

5	8
7	14
12	13


[[ Results of the Main Process (2nd Round) ]]

[ For the 1 th pair: (5, 8) ]

[ For the 2 th pair: (7, 14) ]


{ The representative path is: 7  -> 14 }


( Rough frameworks of the 1st- & 2nd-moved c-blocks )

Subject_c-block	beg_cb	end_cb	shift_le	shift_re	rlv_branch	indices,invlvd,seqs,le	indices,invlvd,seqs,re

1st(intermediate)	39	51	-3	-3	16	8	8
2nd(reconstructed)	52	53	-4	-4	16	8	8


( Errors associated with the c-blocks )

Subject_c-block	Type	br1:beg1:end1:stat_ue1/br2:beg2:end2:stat_ue2/...(before)	br1:beg1:end1:stat_ue1/br2:beg2:end2:stat_ue2/...(after)

1st(intermediate)	Complex(???)	16:55:55:X/16:45:47:-	16:52:53:X
2nd(reconstructed)	Complex(???)	16:56:57:-	None


[ For the 3 th pair: (12, 13) ]


{ The representative path is: 13  -> 12 }


( Rough frameworks of the 1st- & 2nd-moved c-blocks )

Subject_c-block	beg_cb	end_cb	shift_le	shift_re	rlv_branch	indices,invlvd,seqs,le	indices,invlvd,seqs,re

1st(intermediate)	51	53	-4	-4	28	14	14
2nd(reconstructed)	50	50	44	44	28	14	14


( Errors associated with the c-blocks )

Subject_c-block	Type	br1:beg1:end1:stat_ue1/br2:beg2:end2:stat_ue2/...(before)	br1:beg1:end1:stat_ue1/br2:beg2:end2:stat_ue2/...(after)

1st(intermediate)	Shift(???)	27:7:54:-	27:7:50:-
2nd(reconstructed)	Shift	27:7:50:-	27:6:49:-


