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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Display a reconciled tree form recPhyloXML format

use light_phylogeny::{ArenaTree,Options,Config,read_recphyloxml_multi,recphyloxml_processing,
    phyloxml_processing,reset_pos};

fn main() {

    let transfers = vec![];
    let mut options: Options = Options::new();
    options.species_internal = true;
    let config: Config = Config::new();

    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/recgs_mult_host_dtl.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi.svg".to_string());
     // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi.svg".to_string());

    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/ex2comp.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi_2.svg".to_string());
         // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi_2.svg".to_string());


    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/ex3comp.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi_3.svg".to_string());
         // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi_3.svg".to_string());


    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/ex4comp.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi_4.svg".to_string());
         // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi_4.svg".to_string());

    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/ex5comp.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi_5.svg".to_string());
         // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi_5.svg".to_string());

    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/ex6comp.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi_6.svg".to_string());
         // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi_6.svg".to_string());


    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/ex7comp.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi_7.svg".to_string());
         // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi_7.svg".to_string());

    let mut sp_tree: ArenaTree<String> = ArenaTree::default();
    let mut gene_trees:std::vec::Vec<ArenaTree<String>> = Vec::new();
    let mut global_roots: std::vec::Vec<usize> = Vec::new();
    read_recphyloxml_multi("examples/ex8comp.recphyloxml".to_string(),
        &mut sp_tree, &mut gene_trees, &mut global_roots);
    // Version recphylo
    recphyloxml_processing(&mut sp_tree, &mut gene_trees, &mut options, &config, true,
         &transfers, "read_recphyloxml_multi_8.svg".to_string());
         // Version phylo
    reset_pos(&mut sp_tree);
    phyloxml_processing(&mut sp_tree, &mut options, &config,
        "read_phyloxml_multi_8.svg".to_string());

    println!("Please open output files 'read_recphyloxml_multi.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi.svg' with your browser");

    println!("Please open output files 'read_recphyloxml_multi_2.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi_2.svg' with your browser");

    println!("Please open output files 'read_recphyloxml_multi_3.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi_3.svg' with your browser");

    println!("Please open output files 'read_recphyloxml_multi_4.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi_4.svg' with your browser");

    println!("Please open output files 'read_recphyloxml_multi_5.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi_5.svg' with your browser");

    println!("Please open output files 'read_recphyloxml_multi_6.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi_6.svg' with your browser");

    println!("Please open output files 'read_recphyloxml_multi_7.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi_7.svg' with your browser");

    println!("Please open output files 'read_recphyloxml_multi_8.svg' with your browser");
    println!("Please open output files 'read_phyloxml_multi_8.svg' with your browser");

}