[med-svn] [gwamar] 02/09: Imported Upstream version 1.15.1+dfsg

Andreas Tille tille at debian.org
Tue Dec 8 15:49:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository gwamar.

commit 953c5519bfa92c9af114fe932fb7d52e32b461ad
Author: Andreas Tille <tille at debian.org>
Date:   Mon Dec 7 12:24:02 2015 +0100

    Imported Upstream version 1.15.1+dfsg
---
 .project                                           |   24 +
 .pydevproject                                      |    5 +
 config/config_params.txt                           |   11 +-
 config/config_tools.txt                            |    8 +
 .../input/point_mutations.txt.REMOVED.git-id       |    1 +
 .../input/point_mutations.txt.REMOVED.git-id       |    1 +
 gwamar.py                                          |  605 +++--
 other/cctsweep/bm.sh                               |  104 -
 other/cctsweep/cct.sh                              |  114 -
 other/cctsweep/init.sh                             |   29 -
 other/cctsweep/wm.sh                               |   63 -
 other/comp_data/Rifampicin/tmp_tab_mtu173.aux      |    1 -
 other/comp_data/Rifampicin/tmp_tab_mtu173.log      |  480 ----
 other/comp_data/Rifampicin/tmp_tab_mtu_broad.aux   |    1 -
 other/comp_data/Rifampicin/tmp_tab_mtu_broad.log   |  480 ----
 other/comp_data/comp_rpoB_figure.aux               |    1 -
 other/comp_data/comp_rpoB_figure.log               |  456 ----
 other/comp_data/comp_rpoB_table.aux                |    1 -
 other/comp_data/comp_rpoB_table.log                |  455 ----
 other/comp_data/tmp_comp_rpoB_figure.aux           |    1 -
 other/comp_data/tmp_comp_rpoB_figure.log           |  452 ----
 other/comp_data/tmp_comp_rpoB_table.aux            |    1 -
 other/comp_data/tmp_comp_rpoB_table.log            |  481 ----
 other/comp_data/tmp_comp_rpoB_table2.aux           |    1 -
 other/comp_data/tmp_comp_rpoB_table2.log           |  481 ----
 other/res_data/spn/portable.xls.REMOVED.git-id     |    1 +
 other/res_data/spn/portable2.xls.REMOVED.git-id    |    1 +
 other/visR/backup/Xtr.png                          |  Bin 2243 -> 0 bytes
 other/visR/backup/chimp.png                        |  Bin 2243 -> 0 bytes
 other/visR/backup/colored-predictions.py           |  198 --
 other/visR/backup/dog.png                          |  Bin 2243 -> 0 bytes
 other/visR/backup/ete_test.py                      |  140 -
 other/visR/backup/fish.png                         |  Bin 2243 -> 0 bytes
 other/visR/backup/fly.png                          |  Bin 2243 -> 0 bytes
 .../backup/generate-excel-tables-scored-genes.py   |  232 --
 other/visR/backup/img_faces.png                    |  Bin 24277 -> 0 bytes
 other/visR/backup/mouse.png                        |  Bin 2243 -> 0 bytes
 other/visR/backup/out.pdf                          |  Bin 14327 -> 0 bytes
 other/visR/backup/save-tree-mutations_old.py       |  433 ----
 other/visR/backup/score-subset-mutations.py        |  518 ----
 other/visR/backup/show-dates.py                    |  261 --
 other/visR/backup/show-mutations.py                |  259 --
 other/visR/backup/show-tree-mutations.py           |  209 --
 other/visR/backup/show-tree-mutations_new.py       |  206 --
 other/visR/backup/test.svg                         | 2666 --------------------
 other/visR/backup/where-located.py                 |   96 -
 other/visR/curves/.fuse_hidden000185b700000003     |  116 -
 other/visR/curves/pr_bars.R                        |   80 -
 other/visR/curves/pr_scores_paper.R                |  151 --
 other/visR/curves/pr_scores_rand.R                 |  151 --
 other/visR/curves/roc_scores_rand.R                |  108 -
 other/visR/data_stats/data_abailable.R             |   30 -
 other/visR/data_stats/data_abailable_corr.R        |   33 -
 other/visR/data_stats/data_corr.R                  |   37 -
 other/visR/data_stats/data_ranks.R                 |   29 -
 other/visR/data_stats/panels_res_stats.R           |   60 -
 other/visR/data_stats/res_stats.R                  |   46 -
 other/visR/drug_spec/data_drugs_sens_ami_Rv3919c.R |   53 -
 other/visR/drug_spec/data_drugs_sens_ami_Rvnr01.R  |   53 -
 other/visR/drug_spec/data_drugs_sens_ami_Rvnr02.R  |   53 -
 other/visR/drug_spec/data_drugs_sens_emb_Rv3795.R  |   52 -
 other/visR/drug_spec/data_drugs_sens_flq_Rv0005.R  |   52 -
 other/visR/drug_spec/data_drugs_sens_flq_Rv0006.R  |   53 -
 other/visR/drug_spec/data_drugs_sens_iso_Rv1483.R  |   53 -
 other/visR/drug_spec/data_drugs_sens_iso_Rv1484.R  |   53 -
 other/visR/drug_spec/data_drugs_sens_iso_Rv1908c.R |   54 -
 other/visR/drug_spec/data_drugs_sens_pza_Rv2043c.R |   51 -
 other/visR/drug_spec/data_drugs_sens_rif_Rv0667.R  |   52 -
 other/visR/drug_spec/data_scores_variants_fig.R    |   57 -
 other/visR/genome/gene_positions.R                 |   22 -
 other/visR/genome/gene_positions_em59.R            |   35 -
 other/visR/genome/gene_positions_str238.R          |   23 -
 other/visR/genome/genome_positions.R               |   43 -
 other/visR/genome/genome_positions_full.R          |   43 -
 other/visR/prec_recall/data_prec_recall.R          |  121 -
 other/visR/prec_recall/data_prec_recall_diff.R     |   88 -
 .../prec_recall/data_prec_recall_norm_scores.R     |   71 -
 other/visR/prec_recall/data_prec_recall_pvalues.R  |   69 -
 other/visR/prec_recall/data_prec_recall_scores.R   |   57 -
 .../prec_recall/data_prec_recall_spec_pvalues.R    |   72 -
 .../prec_recall/data_prec_recall_spec_scores.R     |   48 -
 other/visR/pvalues/data_hist_pvalues.R             |  106 -
 other/visR/roc/roc_pvalues.R                       |  108 -
 other/visR/roc/roc_scores.R                        |  123 -
 other/visR/roc/roc_scores_all.R                    |  102 -
 other/visR/scores_cmp/data_scores_comp.R           |   32 -
 other/visR/scores_cmp/data_scores_comp_fig.R       |   40 -
 other/visR/scores_cmp/data_scores_comp_fig2_all.R  |   48 -
 other/visR/scores_cmp/data_scores_comp_fig2_high.R |   47 -
 other/visR/scores_corr/data_rank_corr.R            |   21 -
 other/visR/scores_corr/data_ranks_simple.R         |   24 -
 other/visR/scores_corr/score_correlations.R        |   35 -
 other/visR/test.R                                  |   26 -
 src/drsoft/analysis/a1_save_details_scores_all.py  |   50 +-
 src/drsoft/analysis/a2_save_details_scores_sel.py  |   58 +-
 src/drsoft/analysis/a3_save_associations_all.py    |   55 +-
 src/drsoft/analysis/a4_save_associations_sel.py    |   65 +-
 src/drsoft/comparison/cmp0_save_associations.py    |   61 +-
 ...c-recall_stats.py => cmp1_prec_recall_stats.py} |   44 +-
 src/drsoft/comparison/cmp2_auc_stats.py            |   17 +-
 src/drsoft/comparison/cmp3_draw_figures.py         |   67 +-
 src/drsoft/comparison/show0_gold_associations.py   |   43 +-
 .../backup => src/drsoft/compensatory}/__init__.py |    0
 .../compensatory/show0_save_putative_muts.py       |   44 +-
 src/drsoft/compensatory/show1_latex_rpoB_figure.py |   23 +-
 src/drsoft/compensatory/show2_latex_rpoB_table.py  |   26 +-
 .../compensatory/show2_latex_rpoB_table_sel.py     |   26 +-
 src/drsoft/compensatory/show3_latex_rpoB_table2.py |   65 +-
 src/drsoft/compensatory/show4_rpoB_rels.py         |   82 +-
 src/drsoft/compensatory/show5_rpoB_pvalues.py      |   26 +-
 src/drsoft/format_comp/a0_mutations_latex_sel.py   |   43 +-
 src/drsoft/format_comp/a1_mutation_types.py        |   47 +-
 src/drsoft/format_comp/a2_mutation_patterns.py     |   45 +-
 src/drsoft/format_comp/a3_mutation_rel1.py         |   47 +-
 src/drsoft/format_comp/a4_mutation_rel2.py         |   48 +-
 src/drsoft/format_comp/a5_mutation_rel3.py         |   47 +-
 src/drsoft/format_comp/a7_graphvis.py              |   82 +-
 src/drsoft/format_comp/a8_graphvis_pvalue.py       |   58 +-
 src/drsoft/format_comp/a9_graphviz_new.py          |   58 +-
 src/drsoft/format_input/generate_geo_trees.py      |   21 +-
 src/drsoft/format_input/generate_latex_data.py     |   27 +-
 src/drsoft/format_input/generate_res_data.py       |   83 +-
 src/drsoft/format_input/generate_res_trees.py      |   15 +-
 src/drsoft/format_input/show1_save_mutatinos.py    |  146 --
 src/drsoft/format_input/show2_mutations_tree.py    |  211 --
 src/drsoft/format_input/show3_resistance_tree.py   |  102 -
 src/drsoft/format_input/show4_latex_mutations.py   |  364 ---
 src/drsoft/format_input/show5_res_tree_graphviz.py |   99 -
 .../format_input/show6_res_mut_tree_graphviz.py    |  198 --
 src/drsoft/format_input/show7_latex_rpoB.py        |  198 --
 .../drsoft/format_results}/__init__.py             |    0
 .../format_results/a1_mutations_latex_sel.py       |   42 +-
 src/drsoft/modelling/cct.py                        |   51 +-
 src/drsoft/modelling/fcct.py                       |  355 ---
 src/drsoft/modelling/habib.py                      |   27 +-
 src/drsoft/modelling/model_logic.py                |   23 +-
 src/drsoft/modelling/oldhabib.py                   |  233 --
 src/drsoft/modelling/snew.py                       |  157 --
 src/drsoft/modelling/stgh.py                       |   18 +-
 src/drsoft/modelling/tgh.py                        |   70 +-
 src/drsoft/modelling/tgh2.py                       |  353 ---
 src/drsoft/modelling/treeutils.py                  |  731 ------
 src/drsoft/modelling/xcct.py                       |  339 ---
 .../visR/backup => src/drsoft/other}/__init__.py   |    0
 src/drsoft/other/show0_gold_associations.py        |   41 +-
 src/drsoft/permtest/perm1_generate_res_profiles.py |   42 +-
 .../permtest/perm2_compute_perm_rep_scores.py      |   45 +-
 .../permtest/perm3_save_perm_rep_rankings.py       |   49 +-
 .../permtest/perm4_compute_perm_comb_scores.py     |   42 +-
 .../permtest/perm5_combine_perm_rep_scores.py      |   33 +-
 src/drsoft/permtest/perm6_calc_pvalues.py          |   36 +-
 src/drsoft/prepare/p0_convert_gold_associations.py |   36 +-
 src/drsoft/prepare/p0_save_strains_ordered.py      |   96 +-
 src/drsoft/prepare/p1_prepare_experiments.py       |  120 +-
 src/drsoft/prepare/p2_convert_profiles_genes.py    |  210 +-
 src/drsoft/prepare/p3_convert_profiles_muts.py     |  271 +-
 src/drsoft/prepare/p4_gen_binary_trees.py          |  148 +-
 src/drsoft/prepare/p5_cmp_resistance_profiles.py   |  125 +-
 src/drsoft/scoring/sc1_compute_std_scores.py       |   43 +-
 src/drsoft/scoring/sc2_save_std_rankings.py        |   50 +-
 src/drsoft/scoring/sc3_compute_perm_scores.py      |   24 +-
 src/drsoft/scoring/sc4_save_perm_rankings.py       |   46 +-
 src/drsoft/scoring/sc5_compute_norm_scores.py      |   48 +-
 src/drsoft/structs/rel_graph.py                    |    2 -
 src/drsoft/structs/res_tree.py                     |    1 -
 src/drsoft/utils/gwamar_ann_utils.py               |    4 +-
 src/drsoft/utils/gwamar_bin_utils.py               |   12 +-
 src/drsoft/utils/gwamar_comp_utils.py              |    6 -
 src/drsoft/utils/gwamar_generator_utils.py         |   19 -
 src/drsoft/utils/gwamar_muts_io_utils.py           |    8 +-
 src/drsoft/utils/gwamar_muts_utils.py              |    2 -
 src/drsoft/utils/gwamar_params_utils.py            |   12 +-
 src/drsoft/utils/gwamar_pws.py                     |    9 +-
 src/drsoft/utils/gwamar_res_io_utils.py            |   71 +-
 src/drsoft/utils/gwamar_res_utils.py               |    6 +-
 src/drsoft/utils/gwamar_scoring.py                 |   71 +-
 src/drsoft/utils/gwamar_scoring_flat_utils.py      |   28 +-
 src/drsoft/utils/gwamar_scoring_tree_utils.py      |  101 +-
 src/drsoft/utils/gwamar_stat_utils.py              |   20 -
 src/drsoft/utils/gwamar_strains_io_utils.py        |    6 +-
 src/drsoft/utils/gwamar_tree_io_utils.py           |   13 +-
 src/drsoft/utils/gwamar_utils.py                   |    2 +-
 {other/visR/backup => src/prebroad}/__init__.py    |    0
 .../backup => src/prebroad/prepare}/__init__.py    |    0
 src/prebroad/prepare/p1_download_files.py          |   31 +-
 src/prebroad/prepare/p2_save_strains.py            |   21 +-
 src/prebroad/prepare/p3_save_resdata.py            |   26 +-
 .../prepare/p4_combine_resistance_profiles.py      |   25 +-
 src/prebroad/prepare/p5_save_point_mutations_aa.py |   23 +-
 src/prebroad/tree/t0_save_point_mutations_nt.py    |   25 +-
 src/prebroad/tree/t1_prepare_alignments.py         |   31 +-
 src/prebroad/tree/t2_compute_subset_tree.py        |   35 +-
 src/prebroad/tree/t3_resolve_clusters.py           |   31 +-
 src/prebroad/tree/t4_save_strains_ordered.py       |   23 +-
 src/visR/accuracy/auc_simmat.R                     |  314 +++
 195 files changed, 2022 insertions(+), 17909 deletions(-)

diff --git a/.project b/.project
new file mode 100644
index 0000000..3508e69
--- /dev/null
+++ b/.project
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>gwamar</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>de.walware.statet.r.builders.RSupport</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+		<nature>de.walware.statet.base.StatetNature</nature>
+		<nature>de.walware.statet.r.RNature</nature>
+	</natures>
+</projectDescription>
diff --git a/.pydevproject b/.pydevproject
new file mode 100644
index 0000000..40e9f40
--- /dev/null
+++ b/.pydevproject
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?><pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+</pydev_project>
diff --git a/config/config_params.txt b/config/config_params.txt
index 9701b2f..951d816 100644
--- a/config/config_params.txt
+++ b/config/config_params.txt
@@ -26,21 +26,16 @@ RAND:10             # number of repetitions for score comparision
 NEG:1000            # number of negatives selected randomly
 TOP:50              # number of top associations taked into account  
 OW:N                # overwrite / not overwrite
-SUBSETS:s3          # methods of score comparison
+SUBSETS:p14,p15     # methods of score comparison
+
+DEFAULT_TREE_SOFT:phyml
 
 A_OUTPUT_TYPE:txt
 
 TREE_ID:
 CMP_PROFILES:Fluoroquinolones,Streptomycin,Isoniazid,Ethambutol,Rifampicin,Pyrazinamide           # drug resistance profiles used for comparison
-PHYLIP_PATH:/home/misias/phylip/exe/
-PHYLIP_EXE:PHYLIP_PATH:/dnamlk
-PHYML_PATH:/home/misias/phyml/
-PHYML_EXE:PHYML_PATH:/phyml
-RAXML_PATH:/home/misias/raxml/
-RAXML_EXE:RAXML_PATH:/raxml
 RAXML_REP:11
 RAXML_TYPE:MR
-TREE_SOFT:phyml
 
 PREBROAD_SUB:all
 PREBROAD_DIR:GWAMAR_PATH:prebroad/
diff --git a/config/config_tools.txt b/config/config_tools.txt
new file mode 100644
index 0000000..e1740be
--- /dev/null
+++ b/config/config_tools.txt
@@ -0,0 +1,8 @@
+PHYLIP_PATH:/usr/lib/phylip/bin/
+PHYLIP_EXE:PHYLIP_PATH:/dnamlk
+
+PHYML_PATH:/usr/bin
+PHYML_EXE:PHYML_PATH:/phyml
+
+RAXML_PATH:/usr/bin
+RAXML_EXE:RAXML_PATH:/raxml
diff --git a/datasets/mtu173/input/point_mutations.txt.REMOVED.git-id b/datasets/mtu173/input/point_mutations.txt.REMOVED.git-id
new file mode 100644
index 0000000..dee060d
--- /dev/null
+++ b/datasets/mtu173/input/point_mutations.txt.REMOVED.git-id
@@ -0,0 +1 @@
+f432c32bd8ad735ea4a42253c41f874cb3f6f791
\ No newline at end of file
diff --git a/datasets/sau461/input/point_mutations.txt.REMOVED.git-id b/datasets/sau461/input/point_mutations.txt.REMOVED.git-id
new file mode 100644
index 0000000..4a6852f
--- /dev/null
+++ b/datasets/sau461/input/point_mutations.txt.REMOVED.git-id
@@ -0,0 +1 @@
+250ef086e5b530e8eba8f2226f6b1723650a218f
\ No newline at end of file
diff --git a/gwamar.py b/gwamar.py
index 0a31cb9..92d5510 100644
--- a/gwamar.py
+++ b/gwamar.py
@@ -1,359 +1,344 @@
 import sys
 import os
 import time
-import platform
+from src.drsoft.utils import gwamar_params_utils
+from src.drsoft.utils.gwamar_utils import logExecutionTime
 
-def getGWAMARPathRun(run_path, cmd_path):
-    full_path = os.path.abspath(os.path.join(run_path, cmd_path))
-    gwamar_path = os.path.dirname(full_path)
-    return gwamar_path + "/"
+sys.path += [os.path.abspath(os.curdir)]
 
-run_path = os.path.abspath(os.curdir)
-cmd_path = sys.argv[0]
-gwamar_path = getGWAMARPathRun(run_path, cmd_path)
-os.chdir(gwamar_path)
-
-sys.path += ["src/"]
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import logExecutionTime
-
-if sys.version.startswith("3"):
-    raw_input = input
-
-def createCommandParams(attrs, parameters):
-    new_cmd = ""
-    for key in attrs:
-        if key in parameters:
-            new_cmd += " " + key + "=" + parameters[key]
-    return new_cmd
+def createCommandParams(attrs, parameters):
+  new_cmd = ""
+  for key in attrs:
+    if key in parameters:
+      new_cmd += " " + key + "=" + parameters[key]
+  return new_cmd
 
 def prepare(parameters):
-    os.chdir(os.path.abspath("src/drsoft/prepare/"))
-
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP", "TREE_ID"]
-    passed_params = createCommandParams(params, parameters)
-
-    t0_time = time.time()
-    if os.system(python_cmd + " p0_save_strains_ordered.py" + passed_params): exit()
-    if os.system(python_cmd + " p1_prepare_experiments.py" + passed_params): exit()
-    if os.system(python_cmd + " p2_convert_profiles_genes.py" + passed_params): exit()
-    if os.system(python_cmd + " p3_convert_profiles_muts.py" + passed_params): exit()
-    if os.system(python_cmd + " p4_gen_binary_trees.py" + passed_params): exit()
-    if os.system(python_cmd + " p5_cmp_resistance_profiles.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "prepare")
-    
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "prepare")
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
+   "MT", "EP", "TREE_ID"]
+  passed_params = createCommandParams(params, parameters)
+
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/p0_save_strains_ordered.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p1_prepare_experiments.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p2_convert_profiles_genes.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p3_convert_profiles_muts.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p4_gen_binary_trees.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p5_cmp_resistance_profiles.py" + passed_params): exit()
+  t1_time = time.time()
+  logExecutionTime(t1_time - t0_time, "prepare")
+  
 def scores_std(parameters):
-    os.chdir(os.path.abspath("src/drsoft/scoring/"))
-
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-    "MT", "EP"]
-    passed_params = createCommandParams(params, parameters)
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "scoring")
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", "MT", "EP"]
+  passed_params = createCommandParams(params, parameters)
 
-    print(passed_params)
-    t0_time = time.time()
-    if os.system(python_cmd + " sc1_compute_std_scores.py" + passed_params): exit()
-    if os.system(python_cmd + " sc2_save_std_rankings.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "scores_std")
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/sc1_compute_std_scores.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/sc2_save_std_rankings.py" + passed_params): exit()
+  t1_time = time.time()
+  logExecutionTime(t1_time - t0_time, "scores_std")
 
 def scores_ranks(parameters):
-    os.chdir(os.path.abspath("src/drsoft/scoring/"))
-
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP"]
-    passed_params = createCommandParams(params, parameters)
-
-    print(passed_params)
-    t0_time = time.time()
-    if os.system(python_cmd + " sc2_save_std_rankings.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "scores_ranks")
-    
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "scoring")
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", "MT", "EP"]
+  passed_params = createCommandParams(params, parameters)
+
+  print(passed_params)
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/sc2_save_std_rankings.py" + passed_params): exit()
+  t1_time = time.time()
+  
+  logExecutionTime(t1_time - t0_time, "scores_ranks")
+  
 def scores_pvalues(parameters):
-    os.chdir(os.path.abspath("src/drsoft/scoring/"))
-
-    params = ["D", "REVORDER", "SCORES",  "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP"]
-    passed_params = createCommandParams(params, parameters)
-
-    t0_time = time.time()
-    if os.system(python_cmd + " sc3_compute_perm_scores.py" + passed_params): exit()
-    if os.system(python_cmd + " sc4_save_perm_rankings.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "scores_pvalues")
-    
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "scoring")
+  
+  params = ["D", "REVORDER", "SCORES",  "OW", "W", "GEN_BIN_PROFILES", "MT", "EP"]
+  passed_params = createCommandParams(params, parameters)
+
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/sc3_compute_perm_scores.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/sc4_save_perm_rankings.py" + passed_params): exit()
+  t1_time = time.time()
+
+  logExecutionTime(t1_time - t0_time, "scores_pvalues")
+  
 def scores_norm(parameters):
-    os.chdir(os.path.abspath("src/drsoft/scoring/"))
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "scoring")
 
-    params = ["D", "REVORDER", "SCORES",  "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP"]
-    passed_params = createCommandParams(params, parameters)
+  params = ["D", "REVORDER", "SCORES",  "OW", "W", "GEN_BIN_PROFILES", "MT", "EP"]
+  passed_params = createCommandParams(params, parameters)
+  
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/sc7_compute_norm_scores.py" + passed_params): exit()
+  t1_time = time.time()
 
-    t0_time = time.time()
-    if os.system(python_cmd + " sc7_compute_norm_scores.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "scores_norm")
-    
+  logExecutionTime(t1_time - t0_time, "scores_norm")
 
 def perm_test(parameters):
-    os.chdir(os.path.abspath("src/drsoft/permtest/"))
-
-    params = ["D", "REVORDER", "SCORES",  "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP"]
-    passed_params = createCommandParams(params, parameters)
-
-    t0_time = time.time()
-    if os.system(python_cmd + " perm1_generate_res_profiles.py" + passed_params): exit()
-    if os.system(python_cmd + " perm2_compute_perm_rep_scores.py" + passed_params): exit()
-    if os.system(python_cmd + " perm3_save_perm_rep_rankings.py" + passed_params): exit()
-    if os.system(python_cmd + " perm4_compute_perm_comb_scores.py" + passed_params): exit()
-    if os.system(python_cmd + " perm5_combine_perm_rep_scores.py" + passed_params): exit()
-    if os.system(python_cmd + " perm6_calc_pvalues.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "perm_test")
-    
-def analysis1(parameters):
-    os.chdir(os.path.abspath("src/drsoft/analysis/"))
-
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP", "SCORE_SORT"]
-    passed_params = createCommandParams(params, parameters)
-
-    t0_time = time.time()
-    if os.system(python_cmd + " a1_save_details_scores_all.py" + passed_params): exit()
-    if os.system(python_cmd + " a2_save_details_scores_sel.py" + passed_params): exit()
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "permtest")
+  
+  params = ["D", "REVORDER", "SCORES",  "OW", "W", "GEN_BIN_PROFILES", "MT", "EP"]
+  passed_params = createCommandParams(params, parameters)
+  
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/perm1_generate_res_profiles.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/perm2_compute_perm_rep_scores.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/perm3_save_perm_rep_rankings.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/perm4_compute_perm_comb_scores.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/perm5_combine_perm_rep_scores.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/perm6_calc_pvalues.py" + passed_params): exit()
+  t1_time = time.time()
  
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "analysis")
+  logExecutionTime(t1_time - t0_time, "perm_test")
+
+def analysis1(parameters):
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "analysis")
+  
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", "MT", "EP", "SCORE_SORT"]
+  passed_params = createCommandParams(params, parameters)
+  
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/a1_save_details_scores_all.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/a2_save_details_scores_sel.py" + passed_params): exit()
+  t1_time = time.time()
+
+  logExecutionTime(t1_time - t0_time, "analysis")
 
 def analysis2(parameters):
-    os.chdir(os.path.abspath("src/drsoft/analysis/"))
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "analysis")
 
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP", "SCORE_SORT"]
-    passed_params = createCommandParams(params, parameters)
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
+   "MT", "EP", "SCORE_SORT"]
+  passed_params = createCommandParams(params, parameters)
 
-    t0_time = time.time()
-    if os.system(python_cmd + " a3_save_associations_all.py" + passed_params): exit()
-    if os.system(python_cmd + " a4_save_associations_sel.py" + passed_params): exit()
-    
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "analysis2")
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/a3_save_associations_all.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/a4_save_associations_sel.py" + passed_params): exit()
+  t1_time = time.time()
+  
+  logExecutionTime(t1_time - t0_time, "analysis2")
 
 def other(parameters):
-    os.chdir(os.path.abspath("src/drsoft/other/"))
-
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP"]
-    passed_params = createCommandParams(params, parameters)
-
-    t0_time = time.time()
-    if os.system(python_cmd + " show0_gold_associations.py" + passed_params): exit()
-    
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "other")
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "other")
+  
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", "MT", "EP"]
+  passed_params = createCommandParams(params, parameters)
+
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/show0_gold_associations.py" + passed_params): exit()
+  t1_time = time.time()
+  
+  logExecutionTime(t1_time - t0_time, "other")
 
 def comparisonF(parameters):
-    os.chdir(os.path.abspath("src/drsoft/comparison/"))
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "comparison")
 
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-    "MT",  "EP", "RAND", "SUBSETS", "STATS"]
-    passed_params = createCommandParams(params, parameters)
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
+  "MT",  "EP", "RAND", "SUBSETS", "STATS"]
+  passed_params = createCommandParams(params, parameters)
 
-    t0_time = time.time()
-    #if os.system(python_cmd + " cmp2_auc_stats.py" + passed_params): exit()
-    if os.system(python_cmd + " cmp3_draw_figures.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "comparisonF")
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/cmp3_draw_figures.py" + passed_params): exit()
+  t1_time = time.time()
+    
+  logExecutionTime(t1_time - t0_time, "comparisonF")
 
 def comparison3(parameters):
-    os.chdir(os.path.abspath("src/drsoft/comparison/"))
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "comparison")
 
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT",  "EP", "RAND", "SUBSETS", "STATS"]
-    passed_params = createCommandParams(params, parameters)
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
+   "MT",  "EP", "RAND", "SUBSETS", "STATS"]
+  passed_params = createCommandParams(params, parameters)
 
-    t0_time = time.time()
-    if os.system(python_cmd + " cmp2_auc_stats.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "comparison2")
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/cmp2_auc_stats.py" + passed_params): exit()
+  t1_time = time.time()
+  
+  logExecutionTime(t1_time - t0_time, "comparison3")
 
 def comparison2(parameters):
-    os.chdir(os.path.abspath("src/drsoft/comparison/"))
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "comparison")
 
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT",  "EP", "RAND", "SUBSETS", "STATS"]
-    passed_params = createCommandParams(params, parameters)
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
+   "MT",  "EP", "RAND", "SUBSETS", "STATS"]
+  passed_params = createCommandParams(params, parameters)
 
-    t0_time = time.time()
-    if os.system(python_cmd + " cmp1_prec-recall_stats.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "comparison2")
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/cmp1_prec_recall_stats.py" + passed_params): exit()
+  t1_time = time.time()
+  
+  logExecutionTime(t1_time - t0_time, "comparison2")
 
 def comparison1(parameters):
-    os.chdir(os.path.abspath("src/drsoft/comparison/"))
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "comparison")
 
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
-     "MT", "EP", "SUBSETS"]
-    passed_params = createCommandParams(params, parameters)
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GEN_BIN_PROFILES", 
+   "MT", "EP", "SUBSETS"]
+  passed_params = createCommandParams(params, parameters)
 
-    t0_time = time.time()
-    if os.system(python_cmd + " cmp0_save_associations.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "comparison1")
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/cmp0_save_associations.py" + passed_params): exit()
+  t1_time = time.time()
+  
+  logExecutionTime(t1_time - t0_time, "comparison1")
 
 def comp_mutations(parameters):
-    os.chdir(os.path.abspath("src/drsoft/compensatory/"))
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "drsoft", "compensatory")
 
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GWAMAR_DATASETS"]
-    passed_params = createCommandParams(params, parameters)
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GWAMAR_DATASETS"]
+  passed_params = createCommandParams(params, parameters)
 
-    t0_time = time.time()
-    if os.system(python_cmd + " show0_save_putative_muts.py" + passed_params): exit()
-    if os.system(python_cmd + " show1_latex_rpoB_figure.py" + passed_params): exit()
-    if os.system(python_cmd + " show2_latex_rpoB_table.py" + passed_params): exit()
-    #if os.system(python_cmd + " show3_show_comp_rels.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "comp_mutations")
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/show0_save_putative_muts.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/show1_latex_rpoB_figure.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/show2_latex_rpoB_table.py" + passed_params): exit()
+  t1_time = time.time()
 
+  logExecutionTime(t1_time - t0_time, "comp_mutations")
 
 def preparebroad(parameters):
-    os.chdir(os.path.abspath("src/prebroad/prepare/"))
-
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GWAMAR_DATASETS", 
-     "RAXML_TYPE", "RAXML_REP", "TREE_SOFT"]
-    passed_params = createCommandParams(params, parameters)
-
-    t0_time = time.time()
-    if os.system(python_cmd + " p1_download_files.py" + passed_params): exit()
-    if os.system(python_cmd + " p2_save_strains.py" + passed_params): exit()
-    if os.system(python_cmd + " p3_save_resdata.py" + passed_params): exit()
-    if os.system(python_cmd + " p4_combine_resistance_profiles.py" + passed_params): exit()
-    if os.system(python_cmd + " p5_save_point_mutations_aa.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "preparebroad")
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "prebroad", "prepare")
 
-def preparebroadtree(parameters):
-    os.chdir(os.path.abspath("src/prebroad/tree/"))
-
-    params = ["D", "REVORDER", "SCORES", "OW", "W", "GWAMAR_DATASETS", 
-     "RAXML_TYPE", "RAXML_REP", "TREE_SOFT"]
-    passed_params = createCommandParams(params, parameters)
-
-    t0_time = time.time()
-    if os.system(python_cmd + " t0_save_point_mutations_nt.py" + passed_params): exit()
-    if os.system(python_cmd + " t1_prepare_alignments.py" + passed_params): exit()
-    if os.system(python_cmd + " t2_compute_subset_tree.py" + passed_params): exit()
-    if os.system(python_cmd + " t3_resolve_clusters.py" + passed_params): exit()
-    if os.system(python_cmd + " t4_save_strains_ordered.py" + passed_params): exit()
-    t1_time = time.time()
-    os.chdir("../../../")
-    logExecutionTime(t1_time - t0_time, "preparebroadtree")
-
-def print_help(parameters):
-    print("You have not specified the -a parameter or specified it as =h (help)")
-    print("For more help, please visit "+"http://bioputer.mimuw.edu.pl/gwamar/")
-
-if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    WORKERS = int(parameters["W"])
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GWAMAR_DATASETS", "RAXML_TYPE", 
+            "RAXML_REP", "DEFAULT_TREE_SOFT"]
+  passed_params = createCommandParams(params, parameters)
 
-    python_cmd = sys.executable
-    action = parameters["A"].upper()
-    
-    if action == "P":
-        datasets = parameters.get("D").split(",")
-        for dataset in datasets:
-            parameters["D"] = dataset
-            prepare(parameters)
-    elif action in ["H", "HELP"]:
-        print_help(parameters)
-    elif action == "O":
-        other(parameters)
-    elif action == "S":
-        datasets = parameters.get("D").split(",")
-        for dataset in datasets:
-            parameters["D"] = dataset
-            scores_std(parameters)
-    elif action == "SR":
-        datasets = parameters.get("D").split(",")
-        for dataset in datasets:
-            parameters["D"] = dataset
-            scores_ranks(parameters)
-    elif action == "SN":
-        scores_norm(parameters)
-    elif action == "SP":
-        scores_pvalues(parameters)
-    elif action == "PV":
-        perm_test(parameters)
-    elif action in ["A1", "AS1"]:
-        datasets = parameters.get("D").split(",")
-        for dataset in datasets:
-            parameters["D"] = dataset
-            analysis1(parameters)
-    elif action in ["A2", "AS2"]:
-        datasets = parameters.get("D").split(",")
-        for dataset in datasets:
-            parameters["D"] = dataset
-            analysis2(parameters)
-    elif action in ["A", "AS"]:
-        datasets = parameters.get("D").split(",")
-        for dataset in datasets:
-            parameters["D"] = dataset
-            analysis1(parameters)
-            analysis2(parameters)
-    elif action in ["C", "CMP"]:
-        datasets = parameters.get("D").split(",")
-        for dataset in datasets:
-            parameters["D"] = dataset
-            comparison1(parameters)
-            comparison2(parameters)
-            comparison3(parameters)
-        parameters["D"] = ",".join(datasets)
-        comparisonF(parameters)
-    elif action in ["C1", "CMP1"]:
-        datasets = list(parameters.get("D").split(","))
-        for dataset in datasets:
-            parameters["D"] = dataset
-            comparison1(parameters)
-    elif action in ["C2", "CMP2"]:
-        datasets = list(parameters.get("D").split(","))
-        for dataset in datasets:
-            parameters["D"] = dataset
-            comparison2(parameters)
-    elif action in ["C2", "CMP3"]:
-        datasets = list(parameters.get("D").split(","))
-        for dataset in datasets:
-            parameters["D"] = dataset
-            comparison3(parameters)
-    elif action in ["CF", "CMPF"]:
-        comparisonF(parameters)
-    elif action == "CM":
-        comp_mutations(parameters)
-    elif action == "PB":
-        preparebroad(parameters)
-        preparebroadtree(parameters)
-    elif action == "PBT":
-        preparebroadtree(parameters)
-    else:
-        print("Unknown action: " + action);
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/p1_download_files.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p2_save_strains.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p3_save_resdata.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p4_combine_resistance_profiles.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/p5_save_point_mutations_aa.py" + passed_params): exit()
+  t1_time = time.time()
+
+  logExecutionTime(t1_time - t0_time, "preparebroad")
+
+def preparebroadtree(parameters):
+  appdir = os.path.abspath(os.curdir)
+  srcdir = os.path.join(appdir, "src", "prebroad", "tree")
+
+  params = ["D", "REVORDER", "SCORES", "OW", "W", "GWAMAR_DATASETS", 
+   "RAXML_TYPE", "RAXML_REP", "DEFAULT_TREE_SOFT"]
+  passed_params = createCommandParams(params, parameters)
+
+  t0_time = time.time()
+  if os.system(python_cmd + " " + srcdir + "/t0_save_point_mutations_nt.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/t1_prepare_alignments.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/t2_compute_subset_tree.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/t3_resolve_clusters.py" + passed_params): exit()
+  if os.system(python_cmd + " " + srcdir + "/t4_save_strains_ordered.py" + passed_params): exit()
+  t1_time = time.time()
+  
+  logExecutionTime(t1_time - t0_time, "preparebroadtree")
+
+def print_help():
+  print("You have not specified the action '-a' parameter.")
+  print("Example gwamar invocation: python gwamar.py -a p -w 4 -d mtu173")
+  print("For more help, please read the manual: <gwamar>/manual/manual.pdf")
+
+if __name__ == '__main__':
+  parameters = gwamar_params_utils.overwriteParameters(sys.argv)
+  action = parameters.get("A", None)
+  if action == None:
+    print_help()
+    sys.exit(-1)
+  
+  parameters = gwamar_params_utils.readParameters()
+  
+  WORKERS = int(parameters["W"])
+
+  python_cmd = sys.executable
+  action = action.upper()
+
+  if action == "P":
+    datasets = parameters.get("D").split(",")
+    for dataset in datasets:
+      parameters["D"] = dataset
+      prepare(parameters)
+  elif action == "O":
+    other(parameters)
+  elif action == "S":
+    datasets = parameters.get("D").split(",")
+    for dataset in datasets:
+      parameters["D"] = dataset
+      scores_std(parameters)
+  elif action == "SR":
+    datasets = parameters.get("D").split(",")
+    for dataset in datasets:
+      parameters["D"] = dataset
+      scores_ranks(parameters)
+  elif action == "SN":
+    scores_norm(parameters)
+  elif action == "SP":
+    scores_pvalues(parameters)
+  elif action == "PV":
+    perm_test(parameters)
+  elif action in ["A1", "AS1"]:
+    datasets = parameters.get("D").split(",")
+    for dataset in datasets:
+      parameters["D"] = dataset
+      analysis1(parameters)
+  elif action in ["A2", "AS2"]:
+    datasets = parameters.get("D").split(",")
+    for dataset in datasets:
+      parameters["D"] = dataset
+      analysis2(parameters)
+  elif action in ["A", "AS"]:
+    datasets = parameters.get("D").split(",")
+    for dataset in datasets:
+      parameters["D"] = dataset
+      analysis1(parameters)
+      analysis2(parameters)
+  elif action in ["C", "CMP"]:
+    datasets = parameters.get("D").split(",")
+    for dataset in datasets:
+      parameters["D"] = dataset
+      comparison1(parameters)
+      comparison2(parameters)
+      comparison3(parameters)
+      parameters["D"] = ",".join(datasets)
+      comparisonF(parameters)
+  elif action in ["C1", "CMP1"]:
+    datasets = list(parameters.get("D").split(","))
+    for dataset in datasets:
+      parameters["D"] = dataset
+      comparison1(parameters)
+  elif action in ["C2", "CMP2"]:
+    datasets = list(parameters.get("D").split(","))
+    for dataset in datasets:
+      parameters["D"] = dataset
+      comparison2(parameters)
+  elif action in ["C2", "CMP3"]:
+    datasets = list(parameters.get("D").split(","))
+    for dataset in datasets:
+      parameters["D"] = dataset
+      comparison3(parameters)
+  elif action in ["CF", "CMPF"]:
+    comparisonF(parameters)
+  elif action == "CM":
+    comp_mutations(parameters)
+  elif action == "PB":
+    preparebroad(parameters)
+    preparebroadtree(parameters)
+  elif action == "PBT":
+    preparebroadtree(parameters)
+  else:
+    print("Unknown action: " + action);
diff --git a/other/cctsweep/bm.sh b/other/cctsweep/bm.sh
deleted file mode 100644
index 8beeb04..0000000
--- a/other/cctsweep/bm.sh
+++ /dev/null
@@ -1,104 +0,0 @@
-set lide deslist[0 %1];
-if (’Bcal[’lide[0]’]’ <0)
-if(’lide[0]’<(ntax+1))
-set B[’lide[0]’ 0 0 0 0] 1;
-set Bcal[’lide[0]’] 1;
-else
-recurse ’lide[0]’ %2 %3 %4 %5 %6;
-set lide deslist[0 %1];
-end;
-end;
-if (’Bcal[’lide[1]’]’ <0)
-if(’lide[1]’<(ntax+1))
-set B[’lide[1]’ 0 0 0 0] 1;
-set Bcal[’lide[1]’] 1;
-else
-recurse ’lide[1]’ %2 %3 %4 %5 %6;
-set lide deslist[0 %1];
-end;
-end;
-set ancstate states[%6 %1 0];
-if (’ancstate’>2)
-set ancstate 1;
-end;
-set decstat1 states[%6 ’lide[0]’ 0];
-if (’decstat1’>2)
-set decstat1 1;
-end;
-set decstat2 states[%6 ’lide[1]’ 0];
-if (’decstat2’>2)
-set decstat2 1;
-end;
-set isblack1 ’decstat1’-’ancstate’;
-set isblack2 ’decstat2’-’ancstate’;
-if(%1 > ntax)
-loop 0 %2
-loop 0 %3
-loop 0 %4
-loop 0 %5
-loop 0 #3
-loop 0 #4
-loop 0 #1
-loop 0 #2
-set temp ’temp’+(’B[’lide[0]’ #7 #8\
-#5 #6 ]’*’B[’lide[1]’ (#1-#7) (#2-#8)\
-(#3-#5) (#4-#6)]’);
-stop;
-stop;
-stop;
-stop;
-if ((#3-1)>=0)
-loop 0 (#3-1)
-loop 0 #4
-if ((#1-’isblack2’)>=0)
-loop 0 (#1-’isblack2’)
-loop 0 #2
-set temp ’temp’+(’B[’lide[0]’ #7 #8\
-#5 #6 ]’*’B[’lide[1]’ (#2-#8) ((#1-\
-’isblack2’)-#7) (#4-#6) (#3-#5-1)]’);
-stop;
-stop;
-end;
-stop;
-stop;
-end;
-if((#3-1)>=0)
-loop 0 (#3-1)
-loop 0 #4
-if ((#1-’isblack1’)>=0)
-loop 0 (#1-’isblack1’)
-loop 0 #2
-set temp ’temp’+(’B[’lide[0]’ #8 #7\
-#6 #5 ]’*’B[’lide[1]’ ((#1-’isblack1’)\
--#7) (#2-#8) (#3-#5-1) (#4-#6)]’);
-stop;
-stop;
-end;
-stop;
-stop;
-end;
-if ((#3-2)>=0)
-loop 0 (#3-2)
-loop 0 #4
-if ((#1-’isblack1’-’isblack2’)>=0)
-loop 0 (#1-’isblack1’-’isblack2’)
-loop 0 #2
-set temp ’temp’+(’B[’lide[0]’ #8 #7\
-#6 #5 ]’*’B[’lide[1]’ (#2-#8) ((#1\
--’isblack1’-’isblack2’)-#7) (#4-#6)\
-(#3-#5-2)]’);
-stop;
-stop;
-end;
-stop;
-stop;
-end;
-set B[%1 #1 #2 #3 #4] ’temp’;
-set temp 0;
-stop;
-stop;
-stop;
-stop;
-end;
-set Bcal[%1] 1;
-proc/;
diff --git a/other/cctsweep/cct.sh b/other/cctsweep/cct.sh
deleted file mode 100644
index 4dd742b..0000000
--- a/other/cctsweep/cct.sh
+++ /dev/null
@@ -1,114 +0,0 @@
-loop 1 nchar
-set wgain 0;
-set wloss 0;
-set bgain 0;
-set bloss 0;
-set root states[#1 (ntax+1) 0];
-if (’root’ > 2)
-set root 1;
-end;
-loop (ntax+1) nnodes[0]
-set lide deslist[0 #2];
-set charstanc states[#1 #2 0];
-if(’charstanc’ > 2)
-set charstanc ’root’;
-end;
-set charstdec states[#1 ’lide[0]’ 0];
-if (’charstdec’ > 3)
-set charstdec ’charstanc’;
-else
-if (’charstdec’ > 2)
-set charstdec ’root’;
-end;
-end;
-set ancstate states[0 #2 0];
-if (’ancstate’>2)
-set ancstate 1;
-end;
-set decstat1 states[0 ’lide[0]’ 0];
-if (’decstat1’>2)
-set decstat1 1;
-end;
-set decstat2 states[0 ’lide[1]’ 0];
-if (’decstat2’>2)
-set decstat2 1;
-end;
-set isblack1 ’decstat1’-’ancstate’;
-set isblack2 ’decstat2’-’ancstate’;
-if(’charstanc’<’charstdec’)
-set wgain ’wgain’+1;
-if (’isblack1’==1)
-set bgain ’bgain’+1;
-end;
-else
-if(’charstanc’>’charstdec’)
-set wloss ’wloss’+1;
-if (’isblack1’==1)
-set bloss ’bloss’+1;
-end;
-end;
-end;
-set charstdec states[#1 ’lide[1]’ 0];
-if (’charstdec’ > 3)
-set charstdec ’charstanc’;
-else
-if (’charstdec’ > 2)
-set charstdec ’root’;
-end;
-end;
-if(’charstanc’<’charstdec’)
-set wgain ’wgain’+1;
-if (’isblack2’==1)
-set bgain ’bgain’+1;
-end;
-else
-if(’charstanc’>’charstdec’)
-set wloss ’wloss’+1;
-if (’isblack2’==1)
-set bloss ’bloss’+1;
-end;
-end;
-end;
-stop;
-set btot 0;
-set temp ’btot’;
-if (states[#1 (ntax+1) 0]==2)
-if ((’bgain’-’bloss’)>=0)
-loop (’bgain’-’bloss’) ’wgain’
-loop 0 (#2-(’bgain’-’bloss’))
-set btot ’btot’+’B[(ntax+1) #3 #2 ’wloss’ ’wgain’]’;
-stop;
-stop;
-else
-loop (’bloss’-’bgain’) ’wloss’
-loop 0 (#2-(’bloss’-’bgain’))
-set btot ’btot’+’B[(ntax+1) #2 #3 ’wloss’ ’wgain’]’;
-stop;
-stop;
-end;
-else
-if ((’bgain’-’bloss’)>=0)
-loop (’bgain’-’bloss’) ’wgain’
-loop 0 (#2-(’bgain’-’bloss’))
-set btot ’btot’+’B[(ntax+1) #2 #3 ’wgain’ ’wloss’]’;
-stop;
-stop;
-else
-loop (’bloss’-’bgain’) ’wloss’
-loop 0 (#2-(’bloss’-’bgain’))
-set btot ’btot’+’B[(ntax+1) #3 #2 ’wgain’ ’wloss’]’;
-stop;
-stop;
-end;
-end;
-set temp ’btot’;
-if (states[#1 (ntax+1) 0]==2)
-set cct ’btot’/’W[(ntax+1) ’wgain’ ’wloss’ 1]’;
-quote #1 1 ’wgain’ ’wloss’ ’bgain’ ’bloss’\
-’W[(ntax+1) ’wgain’ ’wloss’ 1]’ ’btot’ ’cct’;
-else
-set cct ’btot’/’W[(ntax+1) ’wgain’ ’wloss’ 0]’;
-quote #1 0 ’wgain’ ’wloss’ ’bgain’ ’bloss’\
-’W[(ntax+1) ’wgain’ ’wloss’ 0]’ ’btot’ ’cct’;
-end;
-stop;
diff --git a/other/cctsweep/init.sh b/other/cctsweep/init.sh
deleted file mode 100644
index 3090f07..0000000
--- a/other/cctsweep/init.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-var =
-0 temp
-+charstanc
-+charstdec
-+Bcal[(nnodes[0]+1)]
-+B[(nnodes[0]+1) tg tg bg bg]
-+lide[2]
-+Wcal[(nnodes[0]+1)]
-+W[(nnodes[0]+1) tgain tgain 2]
-+numb[(nnodes[0]+1)]
-+wloss
-+wgain
-+bloss
-+bgain
-+stroot
-+ancstate
-+decstat1
-+decstat2
-+isblack1
-+isblack2
-+gainloss
-+bgainloss
-+btot
-+cct
-+root;
-loop 0 (nnodes[0])
-set Bcal[#1] (-1);
-set Wcal[#1] (-1);
-stop;
diff --git a/other/cctsweep/wm.sh b/other/cctsweep/wm.sh
deleted file mode 100644
index 3605a78..0000000
--- a/other/cctsweep/wm.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-set temp 0;
-set lide deslist[0 %1];
-if (’Wcal[’lide[0]’]’ <0)
-if(’lide[0]’<(ntax+1))
-set W[’lide[0]’ 0 0 0] 1;
-set W[’lide[0]’ 0 0 1] 1;
-set Wcal[’lide[0]’] 1;
-else
-recurse ’lide[0]’ %2 %3;
-set lide deslist[0 %1];
-end;
-end;
-if (’Wcal[’lide[1]’]’ <0)
-if(’lide[1]’<(ntax+1))
-set W[’lide[1]’ 0 0 0] 1;
-set W[’lide[1]’ 0 0 1] 1;
-set Wcal[’lide[1]’] 1;
-else
-recurse ’lide[1]’ %2 %3;
-set lide deslist[0 %1];
-end;
-end;
-if(%1 > ntax)
-loop 0 %2
-loop 0 %3
-loop 0 #1
-loop 0 #2
-set temp ’temp’+(’W[’lide[0]’ #3 #4 0]’*’W[’lide[1]’\
-(#1-#3) (#2-#4) 0]’);
-stop;
-stop;
-if ((#1-1)>=0)
-loop 0 (#1-1)
-loop 0 #2
-set temp ’temp’+(’W[’lide[0]’ #3 #4 0]’*’W[’lide[1]’\
-(#1-#3-1) (#2-#4) 1]’);
-stop;
-stop;
-end;
-if((#1-1)>=0)
-loop 0 (#1-1)
-loop 0 #2
-set temp ’temp’+(’W[’lide[0]’ #3 #4 1]’*’W[’lide[1]’\
-(#1-#3-1) (#2-#4) 0]’);
-stop;
-stop;
-end;
-if ((#1-2)>=0)
-loop 0 (#1-2)
-loop 0 #2
-set temp ’temp’+(’W[’lide[0]’ #3 #4 1]’*’W[’lide[1]’\
-(#1-#3-2) (#2-#4) 1]’);
-stop;
-stop;
-end;
-set W[%1 #1 #2 0] ’temp’;
-set W[%1 #2 #1 1] ’temp’;
-set temp 0;
-stop;
-stop;
-end;
-set Wcal[%1] 1;
-proc/;
diff --git a/other/comp_data/Rifampicin/tmp_tab_mtu173.aux b/other/comp_data/Rifampicin/tmp_tab_mtu173.aux
deleted file mode 100644
index f23e546..0000000
--- a/other/comp_data/Rifampicin/tmp_tab_mtu173.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax 
diff --git a/other/comp_data/Rifampicin/tmp_tab_mtu173.log b/other/comp_data/Rifampicin/tmp_tab_mtu173.log
deleted file mode 100644
index 308e363..0000000
--- a/other/comp_data/Rifampicin/tmp_tab_mtu173.log
+++ /dev/null
@@ -1,480 +0,0 @@
-This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.7.16)  11 MAR 2015 19:45
-entering extended mode
- restricted \write18 enabled.
- %&-line parsing enabled.
-**/home/misias/gwamar/other/comp_data//Rifampicin/tmp_tab_mtu173.tex
-(/home/misias/gwamar/other/comp_data//Rifampicin/tmp_tab_mtu173.tex
-LaTeX2e <2011/06/27>
-Babel <3.9h> and hyphenation patterns for 78 languages loaded.
-(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex
-\pgfutil at everybye=\toks14
-)
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def
-\pgfutil at abb=\box26
-
-(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty
-Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
-))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex
-Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
-))
-Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
-
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks15
-)
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
-File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
-)
-\Gread at gobject=\count87
-))
-\Gin at req@height=\dimen103
-\Gin at req@width=\dimen104
-)
-(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
-Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
-\pgfkeys at pathtoks=\toks16
-\pgfkeys at temptoks=\toks17
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
-\pgfkeys at tmptoks=\toks18
-))
-\pgf at x=\dimen105
-\pgf at y=\dimen106
-\pgf at xa=\dimen107
-\pgf at ya=\dimen108
-\pgf at xb=\dimen109
-\pgf at yb=\dimen110
-\pgf at xc=\dimen111
-\pgf at yc=\dimen112
-\w at pgf@writea=\write3
-\r at pgf@reada=\read1
-\c at pgf@counta=\count88
-\c at pgf@countb=\count89
-\c at pgf@countc=\count90
-\c at pgf@countd=\count91
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg
-File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
-)
-Package pgfsys Info: Driver file for pgf: pgfsys-pdftex.def on input line 900.
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
-File: pgfsys-pdftex.def 2009/05/22  (rcs-revision 1.26)
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
-File: pgfsys-common-pdf.def 2008/05/19  (rcs-revision 1.10)
-)))
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
-File: pgfsyssoftpath.code.tex 2008/07/18  (rcs-revision 1.7)
-\pgfsyssoftpath at smallbuffer@items=\count92
-\pgfsyssoftpath at bigbuffer@items=\count93
-)
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
-File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
-))
-(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
-Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package xcolor Info: Driver file: pdftex.def on input line 225.
-Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
-Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
-Package xcolor Info: Model `RGB' extended on input line 1353.
-Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
-Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
-Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
-Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
-Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
-Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
-Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
-
-(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex
-\pgfmath at dimen=\dimen113
-\pgfmath at count=\count94
-\pgfmath at box=\box27
-\pgfmath at toks=\toks19
-\pgfmath at stack@operand=\toks20
-\pgfmath at stack@operation=\toks21
-)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)))
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfloat.code.tex
-\c at pgfmathroundto@lastzeros=\count95
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
-File: pgfcorepoints.code.tex 2010/04/09  (rcs-revision 1.20)
-\pgf at picminx=\dimen114
-\pgf at picmaxx=\dimen115
-\pgf at picminy=\dimen116
-\pgf at picmaxy=\dimen117
-\pgf at pathminx=\dimen118
-\pgf at pathmaxx=\dimen119
-\pgf at pathminy=\dimen120
-\pgf at pathmaxy=\dimen121
-\pgf at xx=\dimen122
-\pgf at xy=\dimen123
-\pgf at yx=\dimen124
-\pgf at yy=\dimen125
-\pgf at zx=\dimen126
-\pgf at zy=\dimen127
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
-File: pgfcorepathconstruct.code.tex 2010/08/03  (rcs-revision 1.24)
-\pgf at path@lastx=\dimen128
-\pgf at path@lasty=\dimen129
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
-File: pgfcorepathusage.code.tex 2008/04/22  (rcs-revision 1.12)
-\pgf at shorten@end at additional=\dimen130
-\pgf at shorten@start at additional=\dimen131
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
-File: pgfcorescopes.code.tex 2010/09/08  (rcs-revision 1.34)
-\pgfpic=\box28
-\pgf at hbox=\box29
-\pgf at layerbox@main=\box30
-\pgf at picture@serial at count=\count96
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
-File: pgfcoregraphicstate.code.tex 2008/04/22  (rcs-revision 1.9)
-\pgflinewidth=\dimen132
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
-File: pgfcoretransformations.code.tex 2009/06/10  (rcs-revision 1.11)
-\pgf at pt@x=\dimen133
-\pgf at pt@y=\dimen134
-\pgf at pt@temp=\dimen135
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
-File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
-File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
-File: pgfcorepathprocessing.code.tex 2008/10/09  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
-File: pgfcorearrows.code.tex 2008/04/23  (rcs-revision 1.11)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
-File: pgfcoreshade.code.tex 2008/11/23  (rcs-revision 1.13)
-\pgf at max=\dimen136
-\pgf at sys@shading at range@num=\count97
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
-File: pgfcoreimage.code.tex 2010/03/25  (rcs-revision 1.16)
-
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
-File: pgfcoreexternal.code.tex 2010/09/01  (rcs-revision 1.17)
-\pgfexternal at startupbox=\box31
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
-File: pgfcorelayers.code.tex 2010/08/27  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
-File: pgfcoretransparency.code.tex 2008/01/17  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
-File: pgfcorepatterns.code.tex 2009/07/02  (rcs-revision 1.3)
-)))
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
-File: pgfmoduleshapes.code.tex 2010/09/09  (rcs-revision 1.13)
-\pgfnodeparttextbox=\box32
-)
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex
-File: pgfmoduleplot.code.tex 2010/10/22  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
-Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
-\pgf at nodesepstart=\dimen137
-\pgf at nodesepend=\dimen138
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
-Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
-))
-(/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex
-Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
-\pgffor at iter=\dimen139
-\pgffor at skip=\dimen140
-\pgffor at stack=\toks22
-\pgffor at toks=\toks23
-))
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
-Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
-
-(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
-File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
-\pgf at plot@mark at count=\count98
-\pgfplotmarksize=\dimen141
-)
-\tikz at lastx=\dimen142
-\tikz at lasty=\dimen143
-\tikz at lastxsaved=\dimen144
-\tikz at lastysaved=\dimen145
-\tikzleveldistance=\dimen146
-\tikzsiblingdistance=\dimen147
-\tikz at figbox=\box33
-\tikz at tempbox=\box34
-\tikztreelevel=\count99
-\tikznumberofchildren=\count100
-\tikznumberofcurrentchild=\count101
-\tikz at fig@count=\count102
-
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex
-File: pgfmodulematrix.code.tex 2010/08/24  (rcs-revision 1.4)
-\pgfmatrixcurrentrow=\count103
-\pgfmatrixcurrentcolumn=\count104
-\pgf at matrix@numberofcolumns=\count105
-)
-\tikz at expandcount=\count106
-
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopat
-hs.code.tex
-File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
-))) (/usr/share/texlive/texmf-dist/tex/latex/booktabs/booktabs.sty
-Package: booktabs 2005/04/14 v1.61803 publication quality tables
-\heavyrulewidth=\dimen148
-\lightrulewidth=\dimen149
-\cmidrulewidth=\dimen150
-\belowrulesep=\dimen151
-\belowbottomsep=\dimen152
-\aboverulesep=\dimen153
-\abovetopsep=\dimen154
-\cmidrulesep=\dimen155
-\cmidrulekern=\dimen156
-\defaultaddspace=\dimen157
-\@cmidla=\count107
-\@cmidlb=\count108
-\@aboverulesep=\dimen158
-\@belowrulesep=\dimen159
-\@thisruleclass=\count109
-\@lastruleclass=\count110
-\@thisrulewidth=\dimen160
-)
-(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm at cnth=\count111
-\Gm at cntv=\count112
-\c at Gm@tempcnt=\count113
-\Gm at bindingoffset=\dimen161
-\Gm at wd@mp=\dimen162
-\Gm at odd@mp=\dimen163
-\Gm at even@mp=\dimen164
-\Gm at layoutwidth=\dimen165
-\Gm at layoutheight=\dimen166
-\Gm at layouthoffset=\dimen167
-\Gm at layoutvoffset=\dimen168
-\Gm at dimlist=\toks24
-)
-(/usr/share/texlive/texmf-dist/tex/latex/base/fixltx2e.sty
-Package: fixltx2e 2006/09/13 v1.1m fixes to LaTeX
-LaTeX Info: Redefining \em on input line 420.
-)
-(./tmp_tab_mtu173.aux)
-\openout1 = `tmp_tab_mtu173.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
- ABD: EveryShipout initializing macros
-(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count114
-\scratchdimen=\dimen169
-\scratchbox=\box35
-\nofMPsegments=\count115
-\nofMParguments=\count116
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count117
-\MPscratchDim=\dimen170
-\MPnumerator=\count118
-\makeMPintoPDFobject=\count119
-\everyMPtoPDFconversion=\toks26
-) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
-)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf at primitive is available.
-Package pdftexcmds Info: \pdf at ifprimitive is available.
-Package pdftexcmds Info: \pdfdraftmode found.
-)
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
-
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
-Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
-))
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)))
-Package grfext Info: Graphics extension search list:
-(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext)             \AppendGraphicsExtensions on input line 452.
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
-File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
-e
-))
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper: custom
-* layout: <same size as paper>
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes: 
-* h-part:(L,W,R)=(14.45377pt, 549.25246pt, 14.45377pt)
-* v-part:(T,H,B)=(14.45377pt, 1055.14246pt, 14.45377pt)
-* \paperwidth=578.15999pt
-* \paperheight=1084.04999pt
-* \textwidth=549.25246pt
-* \textheight=1055.14246pt
-* \oddsidemargin=-57.81622pt
-* \evensidemargin=-57.81622pt
-* \topmargin=-94.81622pt
-* \headheight=12.0pt
-* \headsep=25.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=65.0pt
-* \marginparsep=11.0pt
-* \columnsep=10.0pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumnfalse
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <7> on input line 8.
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <5> on input line 8.
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./tmp_tab_mtu173.aux) ) 
-Here is how much of TeX's memory you used:
- 10269 strings out of 493304
- 193149 string characters out of 6139871
- 247234 words of memory out of 5000000
- 13537 multiletter control sequences out of 15000+600000
- 3640 words of font info for 14 fonts, out of 8000000 for 9000
- 957 hyphenation exceptions out of 8191
- 56i,10n,55p,473b,122s stack positions out of 5000i,500n,10000p,200000b,80000s
-</
-usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/sha
-re/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb></usr/share/texli
-ve/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb>
-Output written on tmp_tab_mtu173.pdf (1 page, 34042 bytes).
-PDF statistics:
- 23 PDF objects out of 1000 (max. 8388607)
- 16 compressed objects within 1 object stream
- 0 named destinations out of 1000 (max. 500000)
- 13 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/other/comp_data/Rifampicin/tmp_tab_mtu_broad.aux b/other/comp_data/Rifampicin/tmp_tab_mtu_broad.aux
deleted file mode 100644
index f23e546..0000000
--- a/other/comp_data/Rifampicin/tmp_tab_mtu_broad.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax 
diff --git a/other/comp_data/Rifampicin/tmp_tab_mtu_broad.log b/other/comp_data/Rifampicin/tmp_tab_mtu_broad.log
deleted file mode 100644
index bd840bd..0000000
--- a/other/comp_data/Rifampicin/tmp_tab_mtu_broad.log
+++ /dev/null
@@ -1,480 +0,0 @@
-This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.7.16)  4 MAR 2015 06:15
-entering extended mode
- restricted \write18 enabled.
- %&-line parsing enabled.
-**/home/misias/gwamar/other/comp_data//Rifampicin/tmp_tab_mtu_broad.tex
-(/home/misias/gwamar/other/comp_data//Rifampicin/tmp_tab_mtu_broad.tex
-LaTeX2e <2011/06/27>
-Babel <3.9h> and hyphenation patterns for 78 languages loaded.
-(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex
-\pgfutil at everybye=\toks14
-)
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def
-\pgfutil at abb=\box26
-
-(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty
-Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
-))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex
-Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
-))
-Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
-
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks15
-)
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
-File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
-)
-\Gread at gobject=\count87
-))
-\Gin at req@height=\dimen103
-\Gin at req@width=\dimen104
-)
-(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
-Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
-\pgfkeys at pathtoks=\toks16
-\pgfkeys at temptoks=\toks17
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
-\pgfkeys at tmptoks=\toks18
-))
-\pgf at x=\dimen105
-\pgf at y=\dimen106
-\pgf at xa=\dimen107
-\pgf at ya=\dimen108
-\pgf at xb=\dimen109
-\pgf at yb=\dimen110
-\pgf at xc=\dimen111
-\pgf at yc=\dimen112
-\w at pgf@writea=\write3
-\r at pgf@reada=\read1
-\c at pgf@counta=\count88
-\c at pgf@countb=\count89
-\c at pgf@countc=\count90
-\c at pgf@countd=\count91
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg
-File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
-)
-Package pgfsys Info: Driver file for pgf: pgfsys-pdftex.def on input line 900.
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
-File: pgfsys-pdftex.def 2009/05/22  (rcs-revision 1.26)
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
-File: pgfsys-common-pdf.def 2008/05/19  (rcs-revision 1.10)
-)))
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
-File: pgfsyssoftpath.code.tex 2008/07/18  (rcs-revision 1.7)
-\pgfsyssoftpath at smallbuffer@items=\count92
-\pgfsyssoftpath at bigbuffer@items=\count93
-)
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
-File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
-))
-(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
-Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package xcolor Info: Driver file: pdftex.def on input line 225.
-Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
-Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
-Package xcolor Info: Model `RGB' extended on input line 1353.
-Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
-Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
-Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
-Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
-Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
-Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
-Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
-
-(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex
-\pgfmath at dimen=\dimen113
-\pgfmath at count=\count94
-\pgfmath at box=\box27
-\pgfmath at toks=\toks19
-\pgfmath at stack@operand=\toks20
-\pgfmath at stack@operation=\toks21
-)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)))
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfloat.code.tex
-\c at pgfmathroundto@lastzeros=\count95
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
-File: pgfcorepoints.code.tex 2010/04/09  (rcs-revision 1.20)
-\pgf at picminx=\dimen114
-\pgf at picmaxx=\dimen115
-\pgf at picminy=\dimen116
-\pgf at picmaxy=\dimen117
-\pgf at pathminx=\dimen118
-\pgf at pathmaxx=\dimen119
-\pgf at pathminy=\dimen120
-\pgf at pathmaxy=\dimen121
-\pgf at xx=\dimen122
-\pgf at xy=\dimen123
-\pgf at yx=\dimen124
-\pgf at yy=\dimen125
-\pgf at zx=\dimen126
-\pgf at zy=\dimen127
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
-File: pgfcorepathconstruct.code.tex 2010/08/03  (rcs-revision 1.24)
-\pgf at path@lastx=\dimen128
-\pgf at path@lasty=\dimen129
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
-File: pgfcorepathusage.code.tex 2008/04/22  (rcs-revision 1.12)
-\pgf at shorten@end at additional=\dimen130
-\pgf at shorten@start at additional=\dimen131
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
-File: pgfcorescopes.code.tex 2010/09/08  (rcs-revision 1.34)
-\pgfpic=\box28
-\pgf at hbox=\box29
-\pgf at layerbox@main=\box30
-\pgf at picture@serial at count=\count96
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
-File: pgfcoregraphicstate.code.tex 2008/04/22  (rcs-revision 1.9)
-\pgflinewidth=\dimen132
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
-File: pgfcoretransformations.code.tex 2009/06/10  (rcs-revision 1.11)
-\pgf at pt@x=\dimen133
-\pgf at pt@y=\dimen134
-\pgf at pt@temp=\dimen135
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
-File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
-File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
-File: pgfcorepathprocessing.code.tex 2008/10/09  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
-File: pgfcorearrows.code.tex 2008/04/23  (rcs-revision 1.11)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
-File: pgfcoreshade.code.tex 2008/11/23  (rcs-revision 1.13)
-\pgf at max=\dimen136
-\pgf at sys@shading at range@num=\count97
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
-File: pgfcoreimage.code.tex 2010/03/25  (rcs-revision 1.16)
-
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
-File: pgfcoreexternal.code.tex 2010/09/01  (rcs-revision 1.17)
-\pgfexternal at startupbox=\box31
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
-File: pgfcorelayers.code.tex 2010/08/27  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
-File: pgfcoretransparency.code.tex 2008/01/17  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
-File: pgfcorepatterns.code.tex 2009/07/02  (rcs-revision 1.3)
-)))
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
-File: pgfmoduleshapes.code.tex 2010/09/09  (rcs-revision 1.13)
-\pgfnodeparttextbox=\box32
-)
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex
-File: pgfmoduleplot.code.tex 2010/10/22  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
-Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
-\pgf at nodesepstart=\dimen137
-\pgf at nodesepend=\dimen138
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
-Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
-))
-(/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex
-Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
-\pgffor at iter=\dimen139
-\pgffor at skip=\dimen140
-\pgffor at stack=\toks22
-\pgffor at toks=\toks23
-))
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
-Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
-
-(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
-File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
-\pgf at plot@mark at count=\count98
-\pgfplotmarksize=\dimen141
-)
-\tikz at lastx=\dimen142
-\tikz at lasty=\dimen143
-\tikz at lastxsaved=\dimen144
-\tikz at lastysaved=\dimen145
-\tikzleveldistance=\dimen146
-\tikzsiblingdistance=\dimen147
-\tikz at figbox=\box33
-\tikz at tempbox=\box34
-\tikztreelevel=\count99
-\tikznumberofchildren=\count100
-\tikznumberofcurrentchild=\count101
-\tikz at fig@count=\count102
-
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex
-File: pgfmodulematrix.code.tex 2010/08/24  (rcs-revision 1.4)
-\pgfmatrixcurrentrow=\count103
-\pgfmatrixcurrentcolumn=\count104
-\pgf at matrix@numberofcolumns=\count105
-)
-\tikz at expandcount=\count106
-
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopat
-hs.code.tex
-File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
-))) (/usr/share/texlive/texmf-dist/tex/latex/booktabs/booktabs.sty
-Package: booktabs 2005/04/14 v1.61803 publication quality tables
-\heavyrulewidth=\dimen148
-\lightrulewidth=\dimen149
-\cmidrulewidth=\dimen150
-\belowrulesep=\dimen151
-\belowbottomsep=\dimen152
-\aboverulesep=\dimen153
-\abovetopsep=\dimen154
-\cmidrulesep=\dimen155
-\cmidrulekern=\dimen156
-\defaultaddspace=\dimen157
-\@cmidla=\count107
-\@cmidlb=\count108
-\@aboverulesep=\dimen158
-\@belowrulesep=\dimen159
-\@thisruleclass=\count109
-\@lastruleclass=\count110
-\@thisrulewidth=\dimen160
-)
-(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm at cnth=\count111
-\Gm at cntv=\count112
-\c at Gm@tempcnt=\count113
-\Gm at bindingoffset=\dimen161
-\Gm at wd@mp=\dimen162
-\Gm at odd@mp=\dimen163
-\Gm at even@mp=\dimen164
-\Gm at layoutwidth=\dimen165
-\Gm at layoutheight=\dimen166
-\Gm at layouthoffset=\dimen167
-\Gm at layoutvoffset=\dimen168
-\Gm at dimlist=\toks24
-)
-(/usr/share/texlive/texmf-dist/tex/latex/base/fixltx2e.sty
-Package: fixltx2e 2006/09/13 v1.1m fixes to LaTeX
-LaTeX Info: Redefining \em on input line 420.
-)
-(./tmp_tab_mtu_broad.aux)
-\openout1 = `tmp_tab_mtu_broad.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
-LaTeX Font Info:    ... okay on input line 6.
- ABD: EveryShipout initializing macros
-(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count114
-\scratchdimen=\dimen169
-\scratchbox=\box35
-\nofMPsegments=\count115
-\nofMParguments=\count116
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count117
-\MPscratchDim=\dimen170
-\MPnumerator=\count118
-\makeMPintoPDFobject=\count119
-\everyMPtoPDFconversion=\toks26
-) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
-)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf at primitive is available.
-Package pdftexcmds Info: \pdf at ifprimitive is available.
-Package pdftexcmds Info: \pdfdraftmode found.
-)
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
-
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
-Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
-))
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)))
-Package grfext Info: Graphics extension search list:
-(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext)             \AppendGraphicsExtensions on input line 452.
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
-File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
-e
-))
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper: custom
-* layout: <same size as paper>
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes: 
-* h-part:(L,W,R)=(14.45377pt, 549.25246pt, 14.45377pt)
-* v-part:(T,H,B)=(14.45377pt, 1055.14246pt, 14.45377pt)
-* \paperwidth=578.15999pt
-* \paperheight=1084.04999pt
-* \textwidth=549.25246pt
-* \textheight=1055.14246pt
-* \oddsidemargin=-57.81622pt
-* \evensidemargin=-57.81622pt
-* \topmargin=-94.81622pt
-* \headheight=12.0pt
-* \headsep=25.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=65.0pt
-* \marginparsep=11.0pt
-* \columnsep=10.0pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumnfalse
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <7> on input line 8.
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <5> on input line 8.
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./tmp_tab_mtu_broad.aux) 
-) 
-Here is how much of TeX's memory you used:
- 10269 strings out of 493304
- 193176 string characters out of 6139871
- 250233 words of memory out of 5000000
- 13537 multiletter control sequences out of 15000+600000
- 3640 words of font info for 14 fonts, out of 8000000 for 9000
- 957 hyphenation exceptions out of 8191
- 56i,10n,55p,476b,122s stack positions out of 5000i,500n,10000p,200000b,80000s
-</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/
-share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb></usr/share/te
-xlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb>
-Output written on tmp_tab_mtu_broad.pdf (1 page, 34516 bytes).
-PDF statistics:
- 23 PDF objects out of 1000 (max. 8388607)
- 16 compressed objects within 1 object stream
- 0 named destinations out of 1000 (max. 500000)
- 13 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/other/comp_data/comp_rpoB_figure.aux b/other/comp_data/comp_rpoB_figure.aux
deleted file mode 100644
index f23e546..0000000
--- a/other/comp_data/comp_rpoB_figure.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax 
diff --git a/other/comp_data/comp_rpoB_figure.log b/other/comp_data/comp_rpoB_figure.log
deleted file mode 100644
index 2cdc12d..0000000
--- a/other/comp_data/comp_rpoB_figure.log
+++ /dev/null
@@ -1,456 +0,0 @@
-This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.7.16)  23 FEB 2015 02:13
-entering extended mode
- restricted \write18 enabled.
- %&-line parsing enabled.
-**/home/misias/gwamar/other/comp_data//comp_rpoB_figure.tex
-(/home/misias/gwamar/other/comp_data//comp_rpoB_figure.tex
-LaTeX2e <2011/06/27>
-Babel <3.9h> and hyphenation patterns for 78 languages loaded.
-(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex
-\pgfutil at everybye=\toks14
-)
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def
-\pgfutil at abb=\box26
-
-(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty
-Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
-))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex
-Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
-))
-Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
-
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks15
-)
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
-File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
-)
-\Gread at gobject=\count87
-))
-\Gin at req@height=\dimen103
-\Gin at req@width=\dimen104
-)
-(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
-Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
-\pgfkeys at pathtoks=\toks16
-\pgfkeys at temptoks=\toks17
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
-\pgfkeys at tmptoks=\toks18
-))
-\pgf at x=\dimen105
-\pgf at y=\dimen106
-\pgf at xa=\dimen107
-\pgf at ya=\dimen108
-\pgf at xb=\dimen109
-\pgf at yb=\dimen110
-\pgf at xc=\dimen111
-\pgf at yc=\dimen112
-\w at pgf@writea=\write3
-\r at pgf@reada=\read1
-\c at pgf@counta=\count88
-\c at pgf@countb=\count89
-\c at pgf@countc=\count90
-\c at pgf@countd=\count91
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg
-File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
-)
-Package pgfsys Info: Driver file for pgf: pgfsys-pdftex.def on input line 900.
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
-File: pgfsys-pdftex.def 2009/05/22  (rcs-revision 1.26)
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
-File: pgfsys-common-pdf.def 2008/05/19  (rcs-revision 1.10)
-)))
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
-File: pgfsyssoftpath.code.tex 2008/07/18  (rcs-revision 1.7)
-\pgfsyssoftpath at smallbuffer@items=\count92
-\pgfsyssoftpath at bigbuffer@items=\count93
-)
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
-File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
-))
-(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
-Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package xcolor Info: Driver file: pdftex.def on input line 225.
-Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
-Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
-Package xcolor Info: Model `RGB' extended on input line 1353.
-Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
-Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
-Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
-Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
-Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
-Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
-Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
-
-(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex
-\pgfmath at dimen=\dimen113
-\pgfmath at count=\count94
-\pgfmath at box=\box27
-\pgfmath at toks=\toks19
-\pgfmath at stack@operand=\toks20
-\pgfmath at stack@operation=\toks21
-)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)))
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfloat.code.tex
-\c at pgfmathroundto@lastzeros=\count95
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
-File: pgfcorepoints.code.tex 2010/04/09  (rcs-revision 1.20)
-\pgf at picminx=\dimen114
-\pgf at picmaxx=\dimen115
-\pgf at picminy=\dimen116
-\pgf at picmaxy=\dimen117
-\pgf at pathminx=\dimen118
-\pgf at pathmaxx=\dimen119
-\pgf at pathminy=\dimen120
-\pgf at pathmaxy=\dimen121
-\pgf at xx=\dimen122
-\pgf at xy=\dimen123
-\pgf at yx=\dimen124
-\pgf at yy=\dimen125
-\pgf at zx=\dimen126
-\pgf at zy=\dimen127
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
-File: pgfcorepathconstruct.code.tex 2010/08/03  (rcs-revision 1.24)
-\pgf at path@lastx=\dimen128
-\pgf at path@lasty=\dimen129
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
-File: pgfcorepathusage.code.tex 2008/04/22  (rcs-revision 1.12)
-\pgf at shorten@end at additional=\dimen130
-\pgf at shorten@start at additional=\dimen131
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
-File: pgfcorescopes.code.tex 2010/09/08  (rcs-revision 1.34)
-\pgfpic=\box28
-\pgf at hbox=\box29
-\pgf at layerbox@main=\box30
-\pgf at picture@serial at count=\count96
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
-File: pgfcoregraphicstate.code.tex 2008/04/22  (rcs-revision 1.9)
-\pgflinewidth=\dimen132
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
-File: pgfcoretransformations.code.tex 2009/06/10  (rcs-revision 1.11)
-\pgf at pt@x=\dimen133
-\pgf at pt@y=\dimen134
-\pgf at pt@temp=\dimen135
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
-File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
-File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
-File: pgfcorepathprocessing.code.tex 2008/10/09  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
-File: pgfcorearrows.code.tex 2008/04/23  (rcs-revision 1.11)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
-File: pgfcoreshade.code.tex 2008/11/23  (rcs-revision 1.13)
-\pgf at max=\dimen136
-\pgf at sys@shading at range@num=\count97
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
-File: pgfcoreimage.code.tex 2010/03/25  (rcs-revision 1.16)
-
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
-File: pgfcoreexternal.code.tex 2010/09/01  (rcs-revision 1.17)
-\pgfexternal at startupbox=\box31
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
-File: pgfcorelayers.code.tex 2010/08/27  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
-File: pgfcoretransparency.code.tex 2008/01/17  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
-File: pgfcorepatterns.code.tex 2009/07/02  (rcs-revision 1.3)
-)))
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
-File: pgfmoduleshapes.code.tex 2010/09/09  (rcs-revision 1.13)
-\pgfnodeparttextbox=\box32
-)
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex
-File: pgfmoduleplot.code.tex 2010/10/22  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
-Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
-\pgf at nodesepstart=\dimen137
-\pgf at nodesepend=\dimen138
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
-Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
-))
-(/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex
-Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
-\pgffor at iter=\dimen139
-\pgffor at skip=\dimen140
-\pgffor at stack=\toks22
-\pgffor at toks=\toks23
-))
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
-Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
-
-(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
-File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
-\pgf at plot@mark at count=\count98
-\pgfplotmarksize=\dimen141
-)
-\tikz at lastx=\dimen142
-\tikz at lasty=\dimen143
-\tikz at lastxsaved=\dimen144
-\tikz at lastysaved=\dimen145
-\tikzleveldistance=\dimen146
-\tikzsiblingdistance=\dimen147
-\tikz at figbox=\box33
-\tikz at tempbox=\box34
-\tikztreelevel=\count99
-\tikznumberofchildren=\count100
-\tikznumberofcurrentchild=\count101
-\tikz at fig@count=\count102
-
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex
-File: pgfmodulematrix.code.tex 2010/08/24  (rcs-revision 1.4)
-\pgfmatrixcurrentrow=\count103
-\pgfmatrixcurrentcolumn=\count104
-\pgf at matrix@numberofcolumns=\count105
-)
-\tikz at expandcount=\count106
-
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopat
-hs.code.tex
-File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
-))) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm at cnth=\count107
-\Gm at cntv=\count108
-\c at Gm@tempcnt=\count109
-\Gm at bindingoffset=\dimen148
-\Gm at wd@mp=\dimen149
-\Gm at odd@mp=\dimen150
-\Gm at even@mp=\dimen151
-\Gm at layoutwidth=\dimen152
-\Gm at layoutheight=\dimen153
-\Gm at layouthoffset=\dimen154
-\Gm at layoutvoffset=\dimen155
-\Gm at dimlist=\toks24
-)
-(./comp_rpoB_figure.aux)
-\openout1 = `comp_rpoB_figure.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
- ABD: EveryShipout initializing macros
-(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count110
-\scratchdimen=\dimen156
-\scratchbox=\box35
-\nofMPsegments=\count111
-\nofMParguments=\count112
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count113
-\MPscratchDim=\dimen157
-\MPnumerator=\count114
-\makeMPintoPDFobject=\count115
-\everyMPtoPDFconversion=\toks26
-) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
-)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf at primitive is available.
-Package pdftexcmds Info: \pdf at ifprimitive is available.
-Package pdftexcmds Info: \pdfdraftmode found.
-)
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
-
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
-Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
-))
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)))
-Package grfext Info: Graphics extension search list:
-(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext)             \AppendGraphicsExtensions on input line 452.
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
-File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
-e
-))
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper: custom
-* layout: <same size as paper>
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes: 
-* h-part:(L,W,R)=(14.45377pt, 679.33868pt, 14.45377pt)
-* v-part:(T,H,B)=(14.45377pt, 303.5349pt, 14.45377pt)
-* \paperwidth=708.24622pt
-* \paperheight=332.44243pt
-* \textwidth=679.33868pt
-* \textheight=303.5349pt
-* \oddsidemargin=-57.81622pt
-* \evensidemargin=-57.81622pt
-* \topmargin=-94.81622pt
-* \headheight=12.0pt
-* \headsep=25.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=65.0pt
-* \marginparsep=11.0pt
-* \columnsep=10.0pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumnfalse
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-
-Overfull \hbox (10.06128pt too wide) in paragraph at lines 5--323
-[] 
- []
-
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./comp_rpoB_figure.aux) )
- 
-Here is how much of TeX's memory you used:
- 10443 strings out of 493304
- 196720 string characters out of 6139871
- 263774 words of memory out of 5000000
- 13716 multiletter control sequences out of 15000+600000
- 4255 words of font info for 16 fonts, out of 8000000 for 9000
- 957 hyphenation exceptions out of 8191
- 56i,7n,68p,515b,479s stack positions out of 5000i,500n,10000p,200000b,80000s
-</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/
-share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
-Output written on comp_rpoB_figure.pdf (1 page, 25473 bytes).
-PDF statistics:
- 19 PDF objects out of 1000 (max. 8388607)
- 13 compressed objects within 1 object stream
- 0 named destinations out of 1000 (max. 500000)
- 13 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/other/comp_data/comp_rpoB_table.aux b/other/comp_data/comp_rpoB_table.aux
deleted file mode 100644
index f23e546..0000000
--- a/other/comp_data/comp_rpoB_table.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax 
diff --git a/other/comp_data/comp_rpoB_table.log b/other/comp_data/comp_rpoB_table.log
deleted file mode 100644
index cd2dce1..0000000
--- a/other/comp_data/comp_rpoB_table.log
+++ /dev/null
@@ -1,455 +0,0 @@
-This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.7.16)  25 FEB 2015 11:51
-entering extended mode
- restricted \write18 enabled.
- %&-line parsing enabled.
-**/home/misias/gwamar/other/comp_data//comp_rpoB_table.tex
-(/home/misias/gwamar/other/comp_data//comp_rpoB_table.tex
-LaTeX2e <2011/06/27>
-Babel <3.9h> and hyphenation patterns for 78 languages loaded.
-(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex
-\pgfutil at everybye=\toks14
-)
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def
-\pgfutil at abb=\box26
-
-(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty
-Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
-))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex
-Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
-))
-Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
-
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks15
-)
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
-File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
-)
-\Gread at gobject=\count87
-))
-\Gin at req@height=\dimen103
-\Gin at req@width=\dimen104
-)
-(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
-Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
-\pgfkeys at pathtoks=\toks16
-\pgfkeys at temptoks=\toks17
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
-\pgfkeys at tmptoks=\toks18
-))
-\pgf at x=\dimen105
-\pgf at y=\dimen106
-\pgf at xa=\dimen107
-\pgf at ya=\dimen108
-\pgf at xb=\dimen109
-\pgf at yb=\dimen110
-\pgf at xc=\dimen111
-\pgf at yc=\dimen112
-\w at pgf@writea=\write3
-\r at pgf@reada=\read1
-\c at pgf@counta=\count88
-\c at pgf@countb=\count89
-\c at pgf@countc=\count90
-\c at pgf@countd=\count91
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg
-File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
-)
-Package pgfsys Info: Driver file for pgf: pgfsys-pdftex.def on input line 900.
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
-File: pgfsys-pdftex.def 2009/05/22  (rcs-revision 1.26)
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
-File: pgfsys-common-pdf.def 2008/05/19  (rcs-revision 1.10)
-)))
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
-File: pgfsyssoftpath.code.tex 2008/07/18  (rcs-revision 1.7)
-\pgfsyssoftpath at smallbuffer@items=\count92
-\pgfsyssoftpath at bigbuffer@items=\count93
-)
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
-File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
-))
-(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
-Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package xcolor Info: Driver file: pdftex.def on input line 225.
-Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
-Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
-Package xcolor Info: Model `RGB' extended on input line 1353.
-Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
-Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
-Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
-Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
-Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
-Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
-Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
-
-(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex
-\pgfmath at dimen=\dimen113
-\pgfmath at count=\count94
-\pgfmath at box=\box27
-\pgfmath at toks=\toks19
-\pgfmath at stack@operand=\toks20
-\pgfmath at stack@operation=\toks21
-)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)))
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfloat.code.tex
-\c at pgfmathroundto@lastzeros=\count95
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
-File: pgfcorepoints.code.tex 2010/04/09  (rcs-revision 1.20)
-\pgf at picminx=\dimen114
-\pgf at picmaxx=\dimen115
-\pgf at picminy=\dimen116
-\pgf at picmaxy=\dimen117
-\pgf at pathminx=\dimen118
-\pgf at pathmaxx=\dimen119
-\pgf at pathminy=\dimen120
-\pgf at pathmaxy=\dimen121
-\pgf at xx=\dimen122
-\pgf at xy=\dimen123
-\pgf at yx=\dimen124
-\pgf at yy=\dimen125
-\pgf at zx=\dimen126
-\pgf at zy=\dimen127
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
-File: pgfcorepathconstruct.code.tex 2010/08/03  (rcs-revision 1.24)
-\pgf at path@lastx=\dimen128
-\pgf at path@lasty=\dimen129
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
-File: pgfcorepathusage.code.tex 2008/04/22  (rcs-revision 1.12)
-\pgf at shorten@end at additional=\dimen130
-\pgf at shorten@start at additional=\dimen131
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
-File: pgfcorescopes.code.tex 2010/09/08  (rcs-revision 1.34)
-\pgfpic=\box28
-\pgf at hbox=\box29
-\pgf at layerbox@main=\box30
-\pgf at picture@serial at count=\count96
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
-File: pgfcoregraphicstate.code.tex 2008/04/22  (rcs-revision 1.9)
-\pgflinewidth=\dimen132
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
-File: pgfcoretransformations.code.tex 2009/06/10  (rcs-revision 1.11)
-\pgf at pt@x=\dimen133
-\pgf at pt@y=\dimen134
-\pgf at pt@temp=\dimen135
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
-File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
-File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
-File: pgfcorepathprocessing.code.tex 2008/10/09  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
-File: pgfcorearrows.code.tex 2008/04/23  (rcs-revision 1.11)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
-File: pgfcoreshade.code.tex 2008/11/23  (rcs-revision 1.13)
-\pgf at max=\dimen136
-\pgf at sys@shading at range@num=\count97
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
-File: pgfcoreimage.code.tex 2010/03/25  (rcs-revision 1.16)
-
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
-File: pgfcoreexternal.code.tex 2010/09/01  (rcs-revision 1.17)
-\pgfexternal at startupbox=\box31
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
-File: pgfcorelayers.code.tex 2010/08/27  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
-File: pgfcoretransparency.code.tex 2008/01/17  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
-File: pgfcorepatterns.code.tex 2009/07/02  (rcs-revision 1.3)
-)))
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
-File: pgfmoduleshapes.code.tex 2010/09/09  (rcs-revision 1.13)
-\pgfnodeparttextbox=\box32
-)
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex
-File: pgfmoduleplot.code.tex 2010/10/22  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
-Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
-\pgf at nodesepstart=\dimen137
-\pgf at nodesepend=\dimen138
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
-Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
-))
-(/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex
-Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
-\pgffor at iter=\dimen139
-\pgffor at skip=\dimen140
-\pgffor at stack=\toks22
-\pgffor at toks=\toks23
-))
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
-Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
-
-(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
-File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
-\pgf at plot@mark at count=\count98
-\pgfplotmarksize=\dimen141
-)
-\tikz at lastx=\dimen142
-\tikz at lasty=\dimen143
-\tikz at lastxsaved=\dimen144
-\tikz at lastysaved=\dimen145
-\tikzleveldistance=\dimen146
-\tikzsiblingdistance=\dimen147
-\tikz at figbox=\box33
-\tikz at tempbox=\box34
-\tikztreelevel=\count99
-\tikznumberofchildren=\count100
-\tikznumberofcurrentchild=\count101
-\tikz at fig@count=\count102
-
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex
-File: pgfmodulematrix.code.tex 2010/08/24  (rcs-revision 1.4)
-\pgfmatrixcurrentrow=\count103
-\pgfmatrixcurrentcolumn=\count104
-\pgf at matrix@numberofcolumns=\count105
-)
-\tikz at expandcount=\count106
-
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopat
-hs.code.tex
-File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
-))) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm at cnth=\count107
-\Gm at cntv=\count108
-\c at Gm@tempcnt=\count109
-\Gm at bindingoffset=\dimen148
-\Gm at wd@mp=\dimen149
-\Gm at odd@mp=\dimen150
-\Gm at even@mp=\dimen151
-\Gm at layoutwidth=\dimen152
-\Gm at layoutheight=\dimen153
-\Gm at layouthoffset=\dimen154
-\Gm at layoutvoffset=\dimen155
-\Gm at dimlist=\toks24
-)
-(./comp_rpoB_table.aux)
-\openout1 = `comp_rpoB_table.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
- ABD: EveryShipout initializing macros
-(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count110
-\scratchdimen=\dimen156
-\scratchbox=\box35
-\nofMPsegments=\count111
-\nofMParguments=\count112
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count113
-\MPscratchDim=\dimen157
-\MPnumerator=\count114
-\makeMPintoPDFobject=\count115
-\everyMPtoPDFconversion=\toks26
-) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
-)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf at primitive is available.
-Package pdftexcmds Info: \pdf at ifprimitive is available.
-Package pdftexcmds Info: \pdfdraftmode found.
-)
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
-
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
-Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
-))
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)))
-Package grfext Info: Graphics extension search list:
-(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext)             \AppendGraphicsExtensions on input line 452.
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
-File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
-e
-))
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper: custom
-* layout: <same size as paper>
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes: 
-* h-part:(L,W,R)=(14.45377pt, 549.25246pt, 14.45377pt)
-* v-part:(T,H,B)=(14.45377pt, 1633.30246pt, 14.45377pt)
-* \paperwidth=578.15999pt
-* \paperheight=1662.20999pt
-* \textwidth=549.25246pt
-* \textheight=1633.30246pt
-* \oddsidemargin=-57.81622pt
-* \evensidemargin=-57.81622pt
-* \topmargin=-94.81622pt
-* \headheight=12.0pt
-* \headsep=25.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=65.0pt
-* \marginparsep=11.0pt
-* \columnsep=10.0pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumnfalse
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <7> on input line 6.
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <5> on input line 6.
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./comp_rpoB_table.aux) ) 
-Here is how much of TeX's memory you used:
- 10184 strings out of 493304
- 191993 string characters out of 6139871
- 308976 words of memory out of 5000000
- 13459 multiletter control sequences out of 15000+600000
- 3640 words of font info for 14 fonts, out of 8000000 for 9000
- 957 hyphenation exceptions out of 8191
- 56i,6n,55p,511b,122s stack positions out of 5000i,500n,10000p,200000b,80000s
-<
-/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/sh
-are/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb>
-Output written on comp_rpoB_table.pdf (1 page, 35254 bytes).
-PDF statistics:
- 19 PDF objects out of 1000 (max. 8388607)
- 13 compressed objects within 1 object stream
- 0 named destinations out of 1000 (max. 500000)
- 13 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/other/comp_data/tmp_comp_rpoB_figure.aux b/other/comp_data/tmp_comp_rpoB_figure.aux
deleted file mode 100644
index f23e546..0000000
--- a/other/comp_data/tmp_comp_rpoB_figure.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax 
diff --git a/other/comp_data/tmp_comp_rpoB_figure.log b/other/comp_data/tmp_comp_rpoB_figure.log
deleted file mode 100644
index 7eed02b..0000000
--- a/other/comp_data/tmp_comp_rpoB_figure.log
+++ /dev/null
@@ -1,452 +0,0 @@
-This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.7.16)  3 MAR 2015 18:17
-entering extended mode
- restricted \write18 enabled.
- %&-line parsing enabled.
-**/home/misias/gwamar/other/comp_data//tmp_comp_rpoB_figure.tex
-(/home/misias/gwamar/other/comp_data//tmp_comp_rpoB_figure.tex
-LaTeX2e <2011/06/27>
-Babel <3.9h> and hyphenation patterns for 78 languages loaded.
-(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex
-\pgfutil at everybye=\toks14
-)
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def
-\pgfutil at abb=\box26
-
-(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty
-Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
-))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex
-Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
-))
-Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
-
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks15
-)
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
-File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
-)
-\Gread at gobject=\count87
-))
-\Gin at req@height=\dimen103
-\Gin at req@width=\dimen104
-)
-(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
-Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
-\pgfkeys at pathtoks=\toks16
-\pgfkeys at temptoks=\toks17
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
-\pgfkeys at tmptoks=\toks18
-))
-\pgf at x=\dimen105
-\pgf at y=\dimen106
-\pgf at xa=\dimen107
-\pgf at ya=\dimen108
-\pgf at xb=\dimen109
-\pgf at yb=\dimen110
-\pgf at xc=\dimen111
-\pgf at yc=\dimen112
-\w at pgf@writea=\write3
-\r at pgf@reada=\read1
-\c at pgf@counta=\count88
-\c at pgf@countb=\count89
-\c at pgf@countc=\count90
-\c at pgf@countd=\count91
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg
-File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
-)
-Package pgfsys Info: Driver file for pgf: pgfsys-pdftex.def on input line 900.
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
-File: pgfsys-pdftex.def 2009/05/22  (rcs-revision 1.26)
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
-File: pgfsys-common-pdf.def 2008/05/19  (rcs-revision 1.10)
-)))
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
-File: pgfsyssoftpath.code.tex 2008/07/18  (rcs-revision 1.7)
-\pgfsyssoftpath at smallbuffer@items=\count92
-\pgfsyssoftpath at bigbuffer@items=\count93
-)
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
-File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
-))
-(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
-Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package xcolor Info: Driver file: pdftex.def on input line 225.
-Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
-Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
-Package xcolor Info: Model `RGB' extended on input line 1353.
-Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
-Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
-Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
-Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
-Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
-Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
-Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
-
-(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex
-\pgfmath at dimen=\dimen113
-\pgfmath at count=\count94
-\pgfmath at box=\box27
-\pgfmath at toks=\toks19
-\pgfmath at stack@operand=\toks20
-\pgfmath at stack@operation=\toks21
-)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)))
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfloat.code.tex
-\c at pgfmathroundto@lastzeros=\count95
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
-File: pgfcorepoints.code.tex 2010/04/09  (rcs-revision 1.20)
-\pgf at picminx=\dimen114
-\pgf at picmaxx=\dimen115
-\pgf at picminy=\dimen116
-\pgf at picmaxy=\dimen117
-\pgf at pathminx=\dimen118
-\pgf at pathmaxx=\dimen119
-\pgf at pathminy=\dimen120
-\pgf at pathmaxy=\dimen121
-\pgf at xx=\dimen122
-\pgf at xy=\dimen123
-\pgf at yx=\dimen124
-\pgf at yy=\dimen125
-\pgf at zx=\dimen126
-\pgf at zy=\dimen127
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
-File: pgfcorepathconstruct.code.tex 2010/08/03  (rcs-revision 1.24)
-\pgf at path@lastx=\dimen128
-\pgf at path@lasty=\dimen129
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
-File: pgfcorepathusage.code.tex 2008/04/22  (rcs-revision 1.12)
-\pgf at shorten@end at additional=\dimen130
-\pgf at shorten@start at additional=\dimen131
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
-File: pgfcorescopes.code.tex 2010/09/08  (rcs-revision 1.34)
-\pgfpic=\box28
-\pgf at hbox=\box29
-\pgf at layerbox@main=\box30
-\pgf at picture@serial at count=\count96
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
-File: pgfcoregraphicstate.code.tex 2008/04/22  (rcs-revision 1.9)
-\pgflinewidth=\dimen132
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
-File: pgfcoretransformations.code.tex 2009/06/10  (rcs-revision 1.11)
-\pgf at pt@x=\dimen133
-\pgf at pt@y=\dimen134
-\pgf at pt@temp=\dimen135
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
-File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
-File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
-File: pgfcorepathprocessing.code.tex 2008/10/09  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
-File: pgfcorearrows.code.tex 2008/04/23  (rcs-revision 1.11)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
-File: pgfcoreshade.code.tex 2008/11/23  (rcs-revision 1.13)
-\pgf at max=\dimen136
-\pgf at sys@shading at range@num=\count97
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
-File: pgfcoreimage.code.tex 2010/03/25  (rcs-revision 1.16)
-
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
-File: pgfcoreexternal.code.tex 2010/09/01  (rcs-revision 1.17)
-\pgfexternal at startupbox=\box31
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
-File: pgfcorelayers.code.tex 2010/08/27  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
-File: pgfcoretransparency.code.tex 2008/01/17  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
-File: pgfcorepatterns.code.tex 2009/07/02  (rcs-revision 1.3)
-)))
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
-File: pgfmoduleshapes.code.tex 2010/09/09  (rcs-revision 1.13)
-\pgfnodeparttextbox=\box32
-)
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex
-File: pgfmoduleplot.code.tex 2010/10/22  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
-Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
-\pgf at nodesepstart=\dimen137
-\pgf at nodesepend=\dimen138
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
-Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
-))
-(/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex
-Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
-\pgffor at iter=\dimen139
-\pgffor at skip=\dimen140
-\pgffor at stack=\toks22
-\pgffor at toks=\toks23
-))
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
-Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
-
-(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
-File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
-\pgf at plot@mark at count=\count98
-\pgfplotmarksize=\dimen141
-)
-\tikz at lastx=\dimen142
-\tikz at lasty=\dimen143
-\tikz at lastxsaved=\dimen144
-\tikz at lastysaved=\dimen145
-\tikzleveldistance=\dimen146
-\tikzsiblingdistance=\dimen147
-\tikz at figbox=\box33
-\tikz at tempbox=\box34
-\tikztreelevel=\count99
-\tikznumberofchildren=\count100
-\tikznumberofcurrentchild=\count101
-\tikz at fig@count=\count102
-
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex
-File: pgfmodulematrix.code.tex 2010/08/24  (rcs-revision 1.4)
-\pgfmatrixcurrentrow=\count103
-\pgfmatrixcurrentcolumn=\count104
-\pgf at matrix@numberofcolumns=\count105
-)
-\tikz at expandcount=\count106
-
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopat
-hs.code.tex
-File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
-))) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm at cnth=\count107
-\Gm at cntv=\count108
-\c at Gm@tempcnt=\count109
-\Gm at bindingoffset=\dimen148
-\Gm at wd@mp=\dimen149
-\Gm at odd@mp=\dimen150
-\Gm at even@mp=\dimen151
-\Gm at layoutwidth=\dimen152
-\Gm at layoutheight=\dimen153
-\Gm at layouthoffset=\dimen154
-\Gm at layoutvoffset=\dimen155
-\Gm at dimlist=\toks24
-)
-(./tmp_comp_rpoB_figure.aux)
-\openout1 = `tmp_comp_rpoB_figure.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
-LaTeX Font Info:    ... okay on input line 4.
- ABD: EveryShipout initializing macros
-(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count110
-\scratchdimen=\dimen156
-\scratchbox=\box35
-\nofMPsegments=\count111
-\nofMParguments=\count112
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count113
-\MPscratchDim=\dimen157
-\MPnumerator=\count114
-\makeMPintoPDFobject=\count115
-\everyMPtoPDFconversion=\toks26
-) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
-)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf at primitive is available.
-Package pdftexcmds Info: \pdf at ifprimitive is available.
-Package pdftexcmds Info: \pdfdraftmode found.
-)
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
-
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
-Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
-))
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)))
-Package grfext Info: Graphics extension search list:
-(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext)             \AppendGraphicsExtensions on input line 452.
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
-File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
-e
-))
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper: custom
-* layout: <same size as paper>
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes: 
-* h-part:(L,W,R)=(14.45377pt, 679.33868pt, 14.45377pt)
-* v-part:(T,H,B)=(14.45377pt, 303.5349pt, 14.45377pt)
-* \paperwidth=708.24622pt
-* \paperheight=332.44243pt
-* \textwidth=679.33868pt
-* \textheight=303.5349pt
-* \oddsidemargin=-57.81622pt
-* \evensidemargin=-57.81622pt
-* \topmargin=-94.81622pt
-* \headheight=12.0pt
-* \headsep=25.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=65.0pt
-* \marginparsep=11.0pt
-* \columnsep=10.0pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumnfalse
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
-(./tmp_comp_rpoB_figure.aux) ) 
-Here is how much of TeX's memory you used:
- 10456 strings out of 493304
- 196981 string characters out of 6139871
- 266669 words of memory out of 5000000
- 13729 multiletter control sequences out of 15000+600000
- 4255 words of font info for 16 fonts, out of 8000000 for 9000
- 957 hyphenation exceptions out of 8191
- 56i,7n,68p,519b,502s stack positions out of 5000i,500n,10000p,200000b,80000s
-</usr/share/texlive/texmf-dist/fonts/type1/public
-/amsfonts/cm/cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfo
-nts/cm/cmr10.pfb>
-Output written on tmp_comp_rpoB_figure.pdf (1 page, 26242 bytes).
-PDF statistics:
- 19 PDF objects out of 1000 (max. 8388607)
- 13 compressed objects within 1 object stream
- 0 named destinations out of 1000 (max. 500000)
- 13 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/other/comp_data/tmp_comp_rpoB_table.aux b/other/comp_data/tmp_comp_rpoB_table.aux
deleted file mode 100644
index f23e546..0000000
--- a/other/comp_data/tmp_comp_rpoB_table.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax 
diff --git a/other/comp_data/tmp_comp_rpoB_table.log b/other/comp_data/tmp_comp_rpoB_table.log
deleted file mode 100644
index 6ca0bbb..0000000
--- a/other/comp_data/tmp_comp_rpoB_table.log
+++ /dev/null
@@ -1,481 +0,0 @@
-This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.7.16)  11 MAR 2015 19:51
-entering extended mode
- restricted \write18 enabled.
- %&-line parsing enabled.
-**/home/misias/gwamar/other/comp_data//tmp_comp_rpoB_table.tex
-(/home/misias/gwamar/other/comp_data//tmp_comp_rpoB_table.tex
-LaTeX2e <2011/06/27>
-Babel <3.9h> and hyphenation patterns for 78 languages loaded.
-(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex
-\pgfutil at everybye=\toks14
-)
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def
-\pgfutil at abb=\box26
-
-(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty
-Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
-))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex
-Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
-))
-Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
-
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks15
-)
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
-File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
-)
-\Gread at gobject=\count87
-))
-\Gin at req@height=\dimen103
-\Gin at req@width=\dimen104
-)
-(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
-Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
-\pgfkeys at pathtoks=\toks16
-\pgfkeys at temptoks=\toks17
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
-\pgfkeys at tmptoks=\toks18
-))
-\pgf at x=\dimen105
-\pgf at y=\dimen106
-\pgf at xa=\dimen107
-\pgf at ya=\dimen108
-\pgf at xb=\dimen109
-\pgf at yb=\dimen110
-\pgf at xc=\dimen111
-\pgf at yc=\dimen112
-\w at pgf@writea=\write3
-\r at pgf@reada=\read1
-\c at pgf@counta=\count88
-\c at pgf@countb=\count89
-\c at pgf@countc=\count90
-\c at pgf@countd=\count91
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg
-File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
-)
-Package pgfsys Info: Driver file for pgf: pgfsys-pdftex.def on input line 900.
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
-File: pgfsys-pdftex.def 2009/05/22  (rcs-revision 1.26)
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
-File: pgfsys-common-pdf.def 2008/05/19  (rcs-revision 1.10)
-)))
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
-File: pgfsyssoftpath.code.tex 2008/07/18  (rcs-revision 1.7)
-\pgfsyssoftpath at smallbuffer@items=\count92
-\pgfsyssoftpath at bigbuffer@items=\count93
-)
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
-File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
-))
-(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
-Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package xcolor Info: Driver file: pdftex.def on input line 225.
-Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
-Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
-Package xcolor Info: Model `RGB' extended on input line 1353.
-Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
-Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
-Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
-Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
-Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
-Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
-Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
-
-(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex
-\pgfmath at dimen=\dimen113
-\pgfmath at count=\count94
-\pgfmath at box=\box27
-\pgfmath at toks=\toks19
-\pgfmath at stack@operand=\toks20
-\pgfmath at stack@operation=\toks21
-)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)))
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfloat.code.tex
-\c at pgfmathroundto@lastzeros=\count95
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
-File: pgfcorepoints.code.tex 2010/04/09  (rcs-revision 1.20)
-\pgf at picminx=\dimen114
-\pgf at picmaxx=\dimen115
-\pgf at picminy=\dimen116
-\pgf at picmaxy=\dimen117
-\pgf at pathminx=\dimen118
-\pgf at pathmaxx=\dimen119
-\pgf at pathminy=\dimen120
-\pgf at pathmaxy=\dimen121
-\pgf at xx=\dimen122
-\pgf at xy=\dimen123
-\pgf at yx=\dimen124
-\pgf at yy=\dimen125
-\pgf at zx=\dimen126
-\pgf at zy=\dimen127
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
-File: pgfcorepathconstruct.code.tex 2010/08/03  (rcs-revision 1.24)
-\pgf at path@lastx=\dimen128
-\pgf at path@lasty=\dimen129
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
-File: pgfcorepathusage.code.tex 2008/04/22  (rcs-revision 1.12)
-\pgf at shorten@end at additional=\dimen130
-\pgf at shorten@start at additional=\dimen131
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
-File: pgfcorescopes.code.tex 2010/09/08  (rcs-revision 1.34)
-\pgfpic=\box28
-\pgf at hbox=\box29
-\pgf at layerbox@main=\box30
-\pgf at picture@serial at count=\count96
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
-File: pgfcoregraphicstate.code.tex 2008/04/22  (rcs-revision 1.9)
-\pgflinewidth=\dimen132
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
-File: pgfcoretransformations.code.tex 2009/06/10  (rcs-revision 1.11)
-\pgf at pt@x=\dimen133
-\pgf at pt@y=\dimen134
-\pgf at pt@temp=\dimen135
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
-File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
-File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
-File: pgfcorepathprocessing.code.tex 2008/10/09  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
-File: pgfcorearrows.code.tex 2008/04/23  (rcs-revision 1.11)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
-File: pgfcoreshade.code.tex 2008/11/23  (rcs-revision 1.13)
-\pgf at max=\dimen136
-\pgf at sys@shading at range@num=\count97
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
-File: pgfcoreimage.code.tex 2010/03/25  (rcs-revision 1.16)
-
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
-File: pgfcoreexternal.code.tex 2010/09/01  (rcs-revision 1.17)
-\pgfexternal at startupbox=\box31
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
-File: pgfcorelayers.code.tex 2010/08/27  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
-File: pgfcoretransparency.code.tex 2008/01/17  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
-File: pgfcorepatterns.code.tex 2009/07/02  (rcs-revision 1.3)
-)))
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
-File: pgfmoduleshapes.code.tex 2010/09/09  (rcs-revision 1.13)
-\pgfnodeparttextbox=\box32
-)
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex
-File: pgfmoduleplot.code.tex 2010/10/22  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
-Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
-\pgf at nodesepstart=\dimen137
-\pgf at nodesepend=\dimen138
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
-Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
-))
-(/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex
-Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
-\pgffor at iter=\dimen139
-\pgffor at skip=\dimen140
-\pgffor at stack=\toks22
-\pgffor at toks=\toks23
-))
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
-Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
-
-(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
-File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
-\pgf at plot@mark at count=\count98
-\pgfplotmarksize=\dimen141
-)
-\tikz at lastx=\dimen142
-\tikz at lasty=\dimen143
-\tikz at lastxsaved=\dimen144
-\tikz at lastysaved=\dimen145
-\tikzleveldistance=\dimen146
-\tikzsiblingdistance=\dimen147
-\tikz at figbox=\box33
-\tikz at tempbox=\box34
-\tikztreelevel=\count99
-\tikznumberofchildren=\count100
-\tikznumberofcurrentchild=\count101
-\tikz at fig@count=\count102
-
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex
-File: pgfmodulematrix.code.tex 2010/08/24  (rcs-revision 1.4)
-\pgfmatrixcurrentrow=\count103
-\pgfmatrixcurrentcolumn=\count104
-\pgf at matrix@numberofcolumns=\count105
-)
-\tikz at expandcount=\count106
-
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopat
-hs.code.tex
-File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
-))) (/usr/share/texlive/texmf-dist/tex/latex/booktabs/booktabs.sty
-Package: booktabs 2005/04/14 v1.61803 publication quality tables
-\heavyrulewidth=\dimen148
-\lightrulewidth=\dimen149
-\cmidrulewidth=\dimen150
-\belowrulesep=\dimen151
-\belowbottomsep=\dimen152
-\aboverulesep=\dimen153
-\abovetopsep=\dimen154
-\cmidrulesep=\dimen155
-\cmidrulekern=\dimen156
-\defaultaddspace=\dimen157
-\@cmidla=\count107
-\@cmidlb=\count108
-\@aboverulesep=\dimen158
-\@belowrulesep=\dimen159
-\@thisruleclass=\count109
-\@lastruleclass=\count110
-\@thisrulewidth=\dimen160
-)
-(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm at cnth=\count111
-\Gm at cntv=\count112
-\c at Gm@tempcnt=\count113
-\Gm at bindingoffset=\dimen161
-\Gm at wd@mp=\dimen162
-\Gm at odd@mp=\dimen163
-\Gm at even@mp=\dimen164
-\Gm at layoutwidth=\dimen165
-\Gm at layoutheight=\dimen166
-\Gm at layouthoffset=\dimen167
-\Gm at layoutvoffset=\dimen168
-\Gm at dimlist=\toks24
-)
-(/usr/share/texlive/texmf-dist/tex/latex/base/fixltx2e.sty
-Package: fixltx2e 2006/09/13 v1.1m fixes to LaTeX
-LaTeX Info: Redefining \em on input line 420.
-)
-(./tmp_comp_rpoB_table.aux)
-\openout1 = `tmp_comp_rpoB_table.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
- ABD: EveryShipout initializing macros
-(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count114
-\scratchdimen=\dimen169
-\scratchbox=\box35
-\nofMPsegments=\count115
-\nofMParguments=\count116
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count117
-\MPscratchDim=\dimen170
-\MPnumerator=\count118
-\makeMPintoPDFobject=\count119
-\everyMPtoPDFconversion=\toks26
-) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
-)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf at primitive is available.
-Package pdftexcmds Info: \pdf at ifprimitive is available.
-Package pdftexcmds Info: \pdfdraftmode found.
-)
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
-
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
-Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
-))
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)))
-Package grfext Info: Graphics extension search list:
-(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext)             \AppendGraphicsExtensions on input line 452.
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
-File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
-e
-))
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper: custom
-* layout: <same size as paper>
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes: 
-* h-part:(L,W,R)=(14.45377pt, 549.25246pt, 14.45377pt)
-* v-part:(T,H,B)=(14.45377pt, 1777.84247pt, 14.45377pt)
-* \paperwidth=578.15999pt
-* \paperheight=1806.75pt
-* \textwidth=549.25246pt
-* \textheight=1777.84247pt
-* \oddsidemargin=-57.81622pt
-* \evensidemargin=-57.81622pt
-* \topmargin=-94.81622pt
-* \headheight=12.0pt
-* \headsep=25.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=65.0pt
-* \marginparsep=11.0pt
-* \columnsep=10.0pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumnfalse
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <7> on input line 9.
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <5> on input line 9.
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
-(./tmp_comp_rpoB_table.aux) ) 
-Here is how much of TeX's memory you used:
- 10269 strings out of 493304
- 193161 string characters out of 6139871
- 296222 words of memory out of 5000000
- 13537 multiletter control sequences out of 15000+600000
- 3640 words of font info for 14 fonts, out of 8000000 for 9000
- 957 hyphenation exceptions out of 8191
- 56i,10n,55p,467b,132s stack positions out of 5000i,500n,10000p,200000b,80000s
-</usr/share/texlive/texmf-dist/fonts/type1/public/
-amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfont
-s/cm/cmr5.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr
-7.pfb>
-Output written on tmp_comp_rpoB_table.pdf (1 page, 37968 bytes).
-PDF statistics:
- 23 PDF objects out of 1000 (max. 8388607)
- 16 compressed objects within 1 object stream
- 0 named destinations out of 1000 (max. 500000)
- 13 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/other/comp_data/tmp_comp_rpoB_table2.aux b/other/comp_data/tmp_comp_rpoB_table2.aux
deleted file mode 100644
index f23e546..0000000
--- a/other/comp_data/tmp_comp_rpoB_table2.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax 
diff --git a/other/comp_data/tmp_comp_rpoB_table2.log b/other/comp_data/tmp_comp_rpoB_table2.log
deleted file mode 100644
index a6536ee..0000000
--- a/other/comp_data/tmp_comp_rpoB_table2.log
+++ /dev/null
@@ -1,481 +0,0 @@
-This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.7.16)  11 MAR 2015 19:50
-entering extended mode
- restricted \write18 enabled.
- %&-line parsing enabled.
-**/home/misias/gwamar/other/comp_data//tmp_comp_rpoB_table2.tex
-(/home/misias/gwamar/other/comp_data//tmp_comp_rpoB_table2.tex
-LaTeX2e <2011/06/27>
-Babel <3.9h> and hyphenation patterns for 78 languages loaded.
-(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c at part=\count79
-\c at section=\count80
-\c at subsection=\count81
-\c at subsubsection=\count82
-\c at paragraph=\count83
-\c at subparagraph=\count84
-\c at figure=\count85
-\c at table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf/tex/latex/pgf/frontendlayer/tikz.sty
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgf.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfrcs.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex
-\pgfutil at everybye=\toks14
-)
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-latex.def
-\pgfutil at abb=\box26
-
-(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty
-Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
-))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex
-Package: pgfrcs 2010/10/25 v2.10 (rcs-revision 1.24)
-))
-Package: pgf 2008/01/15 v2.10 (rcs-revision 1.12)
-
-(/usr/share/texmf/tex/latex/pgf/basiclayer/pgfcore.sty
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV at toks@=\toks15
-)
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
-File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
-)
-\Gread at gobject=\count87
-))
-\Gin at req@height=\dimen103
-\Gin at req@width=\dimen104
-)
-(/usr/share/texmf/tex/latex/pgf/systemlayer/pgfsys.sty
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
-Package: pgfsys 2010/06/30 v2.10 (rcs-revision 1.37)
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
-\pgfkeys at pathtoks=\toks16
-\pgfkeys at temptoks=\toks17
-
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
-\pgfkeys at tmptoks=\toks18
-))
-\pgf at x=\dimen105
-\pgf at y=\dimen106
-\pgf at xa=\dimen107
-\pgf at ya=\dimen108
-\pgf at xb=\dimen109
-\pgf at yb=\dimen110
-\pgf at xc=\dimen111
-\pgf at yc=\dimen112
-\w at pgf@writea=\write3
-\r at pgf@reada=\read1
-\c at pgf@counta=\count88
-\c at pgf@countb=\count89
-\c at pgf@countc=\count90
-\c at pgf@countd=\count91
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg
-File: pgf.cfg 2008/05/14  (rcs-revision 1.7)
-)
-Package pgfsys Info: Driver file for pgf: pgfsys-pdftex.def on input line 900.
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
-File: pgfsys-pdftex.def 2009/05/22  (rcs-revision 1.26)
-
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
-File: pgfsys-common-pdf.def 2008/05/19  (rcs-revision 1.10)
-)))
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
-File: pgfsyssoftpath.code.tex 2008/07/18  (rcs-revision 1.7)
-\pgfsyssoftpath at smallbuffer@items=\count92
-\pgfsyssoftpath at bigbuffer@items=\count93
-)
-(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
-File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)
-))
-(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
-Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
-File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
-)
-Package xcolor Info: Driver file: pdftex.def on input line 225.
-Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
-Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
-Package xcolor Info: Model `RGB' extended on input line 1353.
-Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
-Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
-Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
-Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
-Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
-Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
-Package: pgfcore 2010/04/11 v2.10 (rcs-revision 1.7)
-
-(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex
-\pgfmath at dimen=\dimen113
-\pgfmath at count=\count94
-\pgfmath at box=\box27
-\pgfmath at toks=\toks19
-\pgfmath at stack@operand=\toks20
-\pgfmath at stack@operation=\toks21
-)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)))
-(/usr/share/texmf/tex/generic/pgf/math/pgfmathfloat.code.tex
-\c at pgfmathroundto@lastzeros=\count95
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
-File: pgfcorepoints.code.tex 2010/04/09  (rcs-revision 1.20)
-\pgf at picminx=\dimen114
-\pgf at picmaxx=\dimen115
-\pgf at picminy=\dimen116
-\pgf at picmaxy=\dimen117
-\pgf at pathminx=\dimen118
-\pgf at pathmaxx=\dimen119
-\pgf at pathminy=\dimen120
-\pgf at pathmaxy=\dimen121
-\pgf at xx=\dimen122
-\pgf at xy=\dimen123
-\pgf at yx=\dimen124
-\pgf at yy=\dimen125
-\pgf at zx=\dimen126
-\pgf at zy=\dimen127
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
-File: pgfcorepathconstruct.code.tex 2010/08/03  (rcs-revision 1.24)
-\pgf at path@lastx=\dimen128
-\pgf at path@lasty=\dimen129
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
-File: pgfcorepathusage.code.tex 2008/04/22  (rcs-revision 1.12)
-\pgf at shorten@end at additional=\dimen130
-\pgf at shorten@start at additional=\dimen131
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
-File: pgfcorescopes.code.tex 2010/09/08  (rcs-revision 1.34)
-\pgfpic=\box28
-\pgf at hbox=\box29
-\pgf at layerbox@main=\box30
-\pgf at picture@serial at count=\count96
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
-File: pgfcoregraphicstate.code.tex 2008/04/22  (rcs-revision 1.9)
-\pgflinewidth=\dimen132
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
-File: pgfcoretransformations.code.tex 2009/06/10  (rcs-revision 1.11)
-\pgf at pt@x=\dimen133
-\pgf at pt@y=\dimen134
-\pgf at pt@temp=\dimen135
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
-File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
-File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
-File: pgfcorepathprocessing.code.tex 2008/10/09  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
-File: pgfcorearrows.code.tex 2008/04/23  (rcs-revision 1.11)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
-File: pgfcoreshade.code.tex 2008/11/23  (rcs-revision 1.13)
-\pgf at max=\dimen136
-\pgf at sys@shading at range@num=\count97
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
-File: pgfcoreimage.code.tex 2010/03/25  (rcs-revision 1.16)
-
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
-File: pgfcoreexternal.code.tex 2010/09/01  (rcs-revision 1.17)
-\pgfexternal at startupbox=\box31
-))
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
-File: pgfcorelayers.code.tex 2010/08/27  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
-File: pgfcoretransparency.code.tex 2008/01/17  (rcs-revision 1.2)
-)
-(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
-File: pgfcorepatterns.code.tex 2009/07/02  (rcs-revision 1.3)
-)))
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
-File: pgfmoduleshapes.code.tex 2010/09/09  (rcs-revision 1.13)
-\pgfnodeparttextbox=\box32
-)
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex
-File: pgfmoduleplot.code.tex 2010/10/22  (rcs-revision 1.8)
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
-Package: pgfcomp-version-0-65 2007/07/03 v2.10 (rcs-revision 1.7)
-\pgf at nodesepstart=\dimen137
-\pgf at nodesepend=\dimen138
-)
-(/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
-Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)
-))
-(/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty
-(/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
-(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))
-(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex
-Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)
-\pgffor at iter=\dimen139
-\pgffor at skip=\dimen140
-\pgffor at stack=\toks22
-\pgffor at toks=\toks23
-))
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
-Package: tikz 2010/10/13 v2.10 (rcs-revision 1.76)
-
-(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
-File: pgflibraryplothandlers.code.tex 2010/05/31 v2.10 (rcs-revision 1.15)
-\pgf at plot@mark at count=\count98
-\pgfplotmarksize=\dimen141
-)
-\tikz at lastx=\dimen142
-\tikz at lasty=\dimen143
-\tikz at lastxsaved=\dimen144
-\tikz at lastysaved=\dimen145
-\tikzleveldistance=\dimen146
-\tikzsiblingdistance=\dimen147
-\tikz at figbox=\box33
-\tikz at tempbox=\box34
-\tikztreelevel=\count99
-\tikznumberofchildren=\count100
-\tikznumberofcurrentchild=\count101
-\tikz at fig@count=\count102
-
-(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex
-File: pgfmodulematrix.code.tex 2010/08/24  (rcs-revision 1.4)
-\pgfmatrixcurrentrow=\count103
-\pgfmatrixcurrentcolumn=\count104
-\pgf at matrix@numberofcolumns=\count105
-)
-\tikz at expandcount=\count106
-
-(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopat
-hs.code.tex
-File: tikzlibrarytopaths.code.tex 2008/06/17 v2.10 (rcs-revision 1.2)
-))) (/usr/share/texlive/texmf-dist/tex/latex/booktabs/booktabs.sty
-Package: booktabs 2005/04/14 v1.61803 publication quality tables
-\heavyrulewidth=\dimen148
-\lightrulewidth=\dimen149
-\cmidrulewidth=\dimen150
-\belowrulesep=\dimen151
-\belowbottomsep=\dimen152
-\aboverulesep=\dimen153
-\abovetopsep=\dimen154
-\cmidrulesep=\dimen155
-\cmidrulekern=\dimen156
-\defaultaddspace=\dimen157
-\@cmidla=\count107
-\@cmidlb=\count108
-\@aboverulesep=\dimen158
-\@belowrulesep=\dimen159
-\@thisruleclass=\count109
-\@lastruleclass=\count110
-\@thisrulewidth=\dimen160
-)
-(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
-Package: geometry 2010/09/12 v5.6 Page Geometry
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in PDF mode is detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
-)
-\Gm at cnth=\count111
-\Gm at cntv=\count112
-\c at Gm@tempcnt=\count113
-\Gm at bindingoffset=\dimen161
-\Gm at wd@mp=\dimen162
-\Gm at odd@mp=\dimen163
-\Gm at even@mp=\dimen164
-\Gm at layoutwidth=\dimen165
-\Gm at layoutheight=\dimen166
-\Gm at layouthoffset=\dimen167
-\Gm at layoutvoffset=\dimen168
-\Gm at dimlist=\toks24
-)
-(/usr/share/texlive/texmf-dist/tex/latex/base/fixltx2e.sty
-Package: fixltx2e 2006/09/13 v1.1m fixes to LaTeX
-LaTeX Info: Redefining \em on input line 420.
-)
-(./tmp_comp_rpoB_table2.aux)
-\openout1 = `tmp_comp_rpoB_table2.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7.
-LaTeX Font Info:    ... okay on input line 7.
- ABD: EveryShipout initializing macros
-(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count114
-\scratchdimen=\dimen169
-\scratchbox=\box35
-\nofMPsegments=\count115
-\nofMParguments=\count116
-\everyMPshowfont=\toks25
-\MPscratchCnt=\count117
-\MPscratchDim=\dimen170
-\MPnumerator=\count118
-\makeMPintoPDFobject=\count119
-\everyMPtoPDFconversion=\toks26
-) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
-)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf at primitive is available.
-Package pdftexcmds Info: \pdf at ifprimitive is available.
-Package pdftexcmds Info: \pdfdraftmode found.
-)
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
-Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
-
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty
-Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
-Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)
-))
-(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)
-
-(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)))
-Package grfext Info: Graphics extension search list:
-(grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE
-G,.JBIG2,.JB2,.eps]
-(grfext)             \AppendGraphicsExtensions on input line 452.
-
-(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
-File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
-e
-))
-*geometry* driver: auto-detecting
-*geometry* detected driver: pdftex
-*geometry* verbose mode - [ preamble ] result:
-* driver: pdftex
-* paper: custom
-* layout: <same size as paper>
-* layoutoffset:(h,v)=(0.0pt,0.0pt)
-* modes: 
-* h-part:(L,W,R)=(14.45377pt, 549.25246pt, 14.45377pt)
-* v-part:(T,H,B)=(14.45377pt, 1777.84247pt, 14.45377pt)
-* \paperwidth=578.15999pt
-* \paperheight=1806.75pt
-* \textwidth=549.25246pt
-* \textheight=1777.84247pt
-* \oddsidemargin=-57.81622pt
-* \evensidemargin=-57.81622pt
-* \topmargin=-94.81622pt
-* \headheight=12.0pt
-* \headsep=25.0pt
-* \topskip=10.0pt
-* \footskip=30.0pt
-* \marginparwidth=65.0pt
-* \marginparsep=11.0pt
-* \columnsep=10.0pt
-* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
-* \hoffset=0.0pt
-* \voffset=0.0pt
-* \mag=1000
-* \@twocolumnfalse
-* \@twosidefalse
-* \@mparswitchfalse
-* \@reversemarginfalse
-* (1in=72.27pt=25.4mm, 1cm=28.453pt)
-
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <7> on input line 9.
-LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <5> on input line 9.
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
-(./tmp_comp_rpoB_table2.aux) ) 
-Here is how much of TeX's memory you used:
- 10269 strings out of 493304
- 193170 string characters out of 6139871
- 257222 words of memory out of 5000000
- 13537 multiletter control sequences out of 15000+600000
- 3640 words of font info for 14 fonts, out of 8000000 for 9000
- 957 hyphenation exceptions out of 8191
- 56i,10n,55p,468b,132s stack positions out of 5000i,500n,10000p,200000b,80000s
-</usr/share/texlive/texmf-dist/fonts/type1/public
-/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfon
-ts/cm/cmr5.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
-r7.pfb>
-Output written on tmp_comp_rpoB_table2.pdf (1 page, 36223 bytes).
-PDF statistics:
- 23 PDF objects out of 1000 (max. 8388607)
- 16 compressed objects within 1 object stream
- 0 named destinations out of 1000 (max. 500000)
- 13 words of extra memory for PDF output out of 10000 (max. 10000000)
-
diff --git a/other/res_data/spn/portable.xls.REMOVED.git-id b/other/res_data/spn/portable.xls.REMOVED.git-id
new file mode 100644
index 0000000..f8fcc23
--- /dev/null
+++ b/other/res_data/spn/portable.xls.REMOVED.git-id
@@ -0,0 +1 @@
+dafd845bae4acd093eb70af265ea3dec5293ead9
\ No newline at end of file
diff --git a/other/res_data/spn/portable2.xls.REMOVED.git-id b/other/res_data/spn/portable2.xls.REMOVED.git-id
new file mode 100644
index 0000000..750f2ca
--- /dev/null
+++ b/other/res_data/spn/portable2.xls.REMOVED.git-id
@@ -0,0 +1 @@
+931e2949f1472373db7218470326c2be422bc64a
\ No newline at end of file
diff --git a/other/visR/backup/Xtr.png b/other/visR/backup/Xtr.png
deleted file mode 100644
index 34089f3..0000000
Binary files a/other/visR/backup/Xtr.png and /dev/null differ
diff --git a/other/visR/backup/chimp.png b/other/visR/backup/chimp.png
deleted file mode 100644
index 34089f3..0000000
Binary files a/other/visR/backup/chimp.png and /dev/null differ
diff --git a/other/visR/backup/colored-predictions.py b/other/visR/backup/colored-predictions.py
deleted file mode 100644
index 55f871e..0000000
--- a/other/visR/backup/colored-predictions.py
+++ /dev/null
@@ -1,198 +0,0 @@
-import sys
-import os
-import copy
-
-from multiprocessing import Pool
-from ressoft.utils.file_utils import ensure_dir
-try:
-    from queue import Queue
-except ImportError:
-    from Queue import Queue
-
-sys.path.append("../../")
-from ressoft.utils.pvalue_utlis import hyperTestPvalue
-
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-
-def readParameters(param_tab):
-    parameters = {}
-    for param_el in param_tab:
-        tokens = param_el.split("=")
-        if len(tokens)==2:
-            key = tokens[0]
-            value = tokens[1]
-            parameters[key] = value
-        
-    return parameters
-
-def coloredPredictions2(res_profiles, output_format_fn):
-    output_format_fh = open(output_format_fn, "w")
-    
-    output_format_fh.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n')
-    output_format_fh.write("<head>\n")
-    output_format_fh.write('<script src="sorttable.js" type="text/javascript"> </script>\n')
-    output_format_fh.write('<script src="jquery-1.7.1.js" type="text/javascript"> </script>\n')
-    output_format_fh.write('<script type="text/javascript">\n')
-    output_format_fh.write('$(document).ready(function(){\n')
-    output_format_fh.write('init();\n')
-    output_format_fh.write('});\n')
-    output_format_fh.write('</script>\n')
-    output_format_fh.write('<link rel="stylesheet" type="text/css" href="vert_text.css" />\n')
-    output_format_fh.write("</head>\n")
-    output_format_fh.write("<body>\n")
-    output_format_fh.write('<table>\n')
-    output_format_fh.write('<th> </th>')
-
-    for res_profile in res_profiles:
-        drug_name = res_profile.drug_name
-        output_format_fh.write('<th style="width:20px"><div class="verticalText">'+drug_name+'</div></th>')
-    
-    for strain_index in range(0, strains.count(), 1):
-        strain_id = strains.getStrain(strain_index)
-        print(strain_id)
-        #strain_id = strains.strain_ids[strain_index]
-        strain_index = strains.getPosition(strain_id)
-        output_format_fh.write('<tr>')
-        output_format_fh.write('<td>'+strain_id+"</td>")
-        for res_profile in res_profiles:
-            if strain_index in res_profile.getResistant():
-                if strain_index in res_profile.predicted_strains:
-                    output_format_fh.write('<td style="background-color: rgb(255,170,170); width:20px">'+'r'+'</td>')
-                else:
-                    output_format_fh.write('<td style="background-color: rgb(255,0,0); width:20px">'+'R'+'</td>')
-            elif strain_index in res_profile.getSusceptible():
-                if strain_index in res_profile.predicted_strains:
-                    output_format_fh.write('<td style="background-color: rgb(170,255,170); width:20px">'+'s'+'</td>')
-                else:
-                    output_format_fh.write('<td style="background-color: rgb(0,255,0); width:20px">'+'S'+'</td>')                
-            else:
-                output_format_fh.write('<td style="width:20px">'+'?'+'</td>')
-    
-        output_format_fh.write('</tr>')    
-
-    output_format_fh.write('</table>\n')
-    output_format_fh.write("</body>\n")
-    output_format_fh.write("</html>\n")
-    
-    output_format_fh.close()
-
-
-def coloredPredictions(res_profiles, output_format_fn):
-    output_format_fh = open(output_format_fn, "w")
-    
-    output_format_fh.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n')
-    output_format_fh.write("<head>\n")
-    output_format_fh.write('<script src="sorttable.js" type="text/javascript"> </script>\n')
-    output_format_fh.write('<script src="jquery-1.7.1.js" type="text/javascript"> </script>\n')
-    output_format_fh.write('<script type="text/javascript">\n')
-    output_format_fh.write('$(document).ready(function(){\n')
-    output_format_fh.write('init();\n')
-    output_format_fh.write('});\n')
-    output_format_fh.write('</script>\n')
-    output_format_fh.write('<link rel="stylesheet" type="text/css" href="vert_text.css" />\n')
-    output_format_fh.write("</head>\n")
-    output_format_fh.write("<body>\n")
-    output_format_fh.write('<table border-collapse=collapse;>\n')
-    #output_format_fh.write('<tr>\n')
-    #output_format_fh.write('<img src="tree.png" style="width=80px; height:600px">\n')
-    
-    
-    #output_format_fh.write('<td style="width:100px; border-bottom-color: black; border-left-color:black; border-top-color:black;">\n')
-    output_format_fh.write('<td style="width:100px;">\n')
-        #output_format_fh.write('</td>\n')
-#    output_format_fh.write('<table>\n')
-#    output_format_fh.write('<th style="height:100px">\n')
-#    output_format_fh.write('</th>\n')
-#    output_format_fh.write('<tr>\n')
-    #output_format_fh.write('</tr>\n')
-    #output_format_fh.write('</table>\n')
-    output_format_fh.write('<img src="tree.png" style="margin-top:120px; width=80px; height:1700px">\n')
-    output_format_fh.write('</td>\n')
-    output_format_fh.write('<td>\n')
-    output_format_fh.write('<table  border-collapse=collapse;>\n')
-    output_format_fh.write('<tr>\n')
-    #output_format_fh.write('<td style="width:150px; border-top-color:white;">Phylo</td>\n')
-    output_format_fh.write('<td style="width:150px;">Strain:</td>\n')
-
-    for res_profile in res_profiles:
-        drug_name = res_profile.drug_name
-        output_format_fh.write('<th style="width:20px"><div class="verticalText">'+drug_name+'</div></th>')
-    
-    print("LEN", len(strains.strain_ids))
-    for strain_index in range(0, len(strains.strain_ids), 1):
-        
-        strain_id = strains.getStrain(strain_index)
-        print(strain_id)
-        #strain_id = strains.strain_ids[strain_index]
-        strain_index = strains.getPosition(strain_id)
-        output_format_fh.write('<tr>')
-        output_format_fh.write('<td>'+strain_id+"</td>")
-        for res_profile in res_profiles:
-            if strain_index in res_profile.getResistant():
-                if strain_index in res_profile.predicted_strains:
-                    output_format_fh.write('<td style="background-color: rgb(255,170,170); width:20px">'+'r'+'</td>')
-                else:
-                    output_format_fh.write('<td style="background-color: rgb(255,0,0); width:20px">'+'R'+'</td>')
-            elif strain_index in res_profile.getSusceptible():
-                if strain_index in res_profile.predicted_strains:
-                    output_format_fh.write('<td style="background-color: rgb(170,255,170); width:20px">'+'s'+'</td>')
-                else:
-                    output_format_fh.write('<td style="background-color: rgb(0,255,0); width:20px">'+'S'+'</td>')                
-            else:
-                output_format_fh.write('<td style="width:20px">'+'?'+'</td>')
-    
-        output_format_fh.write('</tr>')    
-    #for drug_name in res_profiles:
-    #    drug_res_profile = res_profiles[drug_name]
-    #    
-    #    
-    #    output_format_fh.write(drug_name)
-    output_format_fh.write('</td>\n')
-    output_format_fh.write('</tr>\n')
-    output_format_fh.write('</table>\n')
-    output_format_fh.write("</body>\n")
-    output_format_fh.write("</html>\n")
-    
-    output_format_fh.close()
-
-
-    
-
-species = "mtb80"
-input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-output_dir = os.path.abspath("../../../data_output/"+species+"_html/")+"/"
-
-ensure_dir(output_dir)
-
-input_fh = open(input_dir + "strains-all.txt")
-strains = readStrains(input_fh)
-input_fh.close()
-
-input_fh = open(input_dir + "res_profiles_ret.txt")
-res_profiles = readResistanceProfiles(input_fh, strains)
-input_fh.close()
-
-print(input_dir)
-
-input_fh = open(input_dir + "pred_res_profiles.txt")
-pred_res_profiles = readResistanceProfiles(input_fh, strains)
-input_fh.close()
-
-
-#strains_ord_fh = open(input_dir + "names-strains-ord.txt")
-#strains_ord = readStrainNamesOrd(strains_ord_fh)
-#strains_ord_fh.close()
-    
-    
-output_format_fn = output_dir + "colored_res_profiles2.html"
-coloredPredictions(res_profiles, output_format_fn)
-pred_output_format_fn = output_dir + "colored_pred_res_profiles2.html"
-coloredPredictions(pred_res_profiles, pred_output_format_fn)
-        
-        
-        
\ No newline at end of file
diff --git a/other/visR/backup/dog.png b/other/visR/backup/dog.png
deleted file mode 100644
index 34089f3..0000000
Binary files a/other/visR/backup/dog.png and /dev/null differ
diff --git a/other/visR/backup/ete_test.py b/other/visR/backup/ete_test.py
deleted file mode 100644
index 6c83dac..0000000
--- a/other/visR/backup/ete_test.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# Import Tree instance and faces module
-from ete2 import Tree
-from ete2 import PhyloTree
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from ete2 import faces, layouts
-from ete2 import Tree, faces, TreeStyle
-
-# Loads an example tree
-nw = """
-(((Dre:0.008339,Dme:0.300613)1.000000:0.596401,
-(Cfa:0.640858,Hsa:0.753230)1.000000:0.182035)1.000000:0.106234,
-((Dre:0.271621,Cfa:0.046042)1.000000:0.953250,
-(Hsa:0.061813,Mms:0.110769)1.000000:0.204419)1.000000:0.973467);
-"""
-t = Tree(nw)
-
-# You can create any random tree containing the same leaf names, and
-# layout will work equally
-#
-# t = Tree()
-# Creates a random tree with 8 leaves using a given set of names
-# t.populate(8, ["Dme", "Dre", "Hsa", "Ptr", "Cfa", "Mms"])
-
-# Set the path in which images are located
-img_path = "./"
-# Create faces based on external images
-humanFace = faces.ImgFace(img_path+"human.png")
-mouseFace = faces.ImgFace(img_path+"mouse.png")
-dogFace = faces.ImgFace(img_path+"dog.png")
-chimpFace = faces.ImgFace(img_path+"chimp.png")
-fishFace = faces.ImgFace(img_path+"fish.png")
-flyFace = faces.ImgFace(img_path+"fly.png")
-
-# Create a faces ready to read the name attribute of nodes
-#nameFace = faces.TextFace(open("text").readline().strip(), fsize=20, fgcolor="#009000")
-nameFace = faces.AttrFace("name", fsize=20, fgcolor="#009000")
-
-# Create a conversion between leaf names and real names
-code2name = {
-        "Dre":"Drosophila melanogaster",
-        "Dme":"Danio rerio",
-        "Hsa":"Homo sapiens",
-        "Ptr":"Pan troglodytes",
-        "Mms":"Mus musculus",
-        "Cfa":"Canis familiaris"
-        }
-
-# Creates a dictionary with the descriptions of each leaf name
-code2desc = {
-        "Dre":"""The zebrafish, also known as Danio rerio,
-is a tropical freshwater fish belonging to the
-minnow family (Cyprinidae).""",
-        "Dme":"""True flies are insects of the order Diptera,
-possessing a single pair of wings on the
-mesothorax and a pair of halteres, derived from
-the hind wings, on the metathorax""",
-        "Hsa":"""A human is a member of a species
-of bipedal primates in the family Hominidae.""",
-        "Ptr":"""Chimpanzee, sometimes colloquially
-chimp, is the common name for the
-two extant species of ape in the genus Pan.""",
-        "Mms":"""A mouse is a small mammal belonging to the
-order of rodents.""",
-        "Cfa": """The dog (Canis lupus familiaris) is a
-domesticated subspecies of the Gray Wolf,
-a member of the Canidae family of the
-orderCarnivora."""
-        }
-
-# Creates my own layout function. I will use all previously created
-# faces and will set different node styles depending on the type of
-# node.
-def mylayout(node):
-    # If node is a leaf, add the nodes name and a its scientific
-    # name
-    if node.is_leaf():
-        # Add an static face that handles the node name
-        faces.add_face_to_node(nameFace, node, column=0)
-        # We can also create faces on the fly
-        longNameFace = faces.TextFace(node.name)
-        faces.add_face_to_node(longNameFace, node, column=0)
-
-        # text faces support multiline. We add a text face
-        # with the whole description of each leaf.
-        descFace = faces.TextFace(node.name, fsize=10)
-        descFace.margin_top = 10
-        descFace.margin_bottom = 10
-        descFace.border.margin = 1
-
-        # Note that this faces is added in "aligned" mode
-        faces.add_face_to_node(descFace, node, column=0, aligned=True)
-
-        # Sets the style of leaf nodes
-        node.img_style["size"] = 12
-        node.img_style["shape"] = "circle"
-    #If node is an internal node
-    else:
-        # Sets the style of internal nodes
-        pass
-#        node.img_style["size"] = 6
-#        node.img_style["shape"] = "circle"
-#        node.img_style["fgcolor"] = "#000000"
-
-    # If an internal node contains more than 4 leaves, add the
-    # images of the represented species sorted in columns of 2
-    # images max.
-    if len(node)>=4:
-        col = 0
-        for i, name in enumerate(set(node.get_leaf_names())):
-            if i>0 and i%2 == 0:
-                col += 1
-            # Add the corresponding face to the node
-            if name.startswith("Dme"):
-                faces.add_face_to_node(flyFace, node, column=col)
-            elif name.startswith("Dre"):
-                faces.add_face_to_node(fishFace, node, column=col)
-            elif name.startswith("Mms"):
-                faces.add_face_to_node(mouseFace, node, column=col)
-            elif name.startswith("Ptr"):
-                faces.add_face_to_node(chimpFace, node, column=col)
-            elif name.startswith("Hsa"):
-                faces.add_face_to_node(humanFace, node, column=col)
-            elif name.startswith("Cfa"):
-                faces.add_face_to_node(dogFace, node, column=col)
-
-            # Modifies this node's style
-            node.img_style["size"] = 16
-            node.img_style["shape"] = "sphere"
-            node.img_style["fgcolor"] = "#AA0000"
-
-    # If leaf is "Hsa" (homo sapiens), highlight it using a
-    # different background.
-    #if node.is_leaf() and node.name.startswith("Hsa"):
-    #    node.img_style["bgcolor"] = "#9db0cf"
-
-# And, finally, Visualize the tree using my own layout function
-ts = TreeStyle()
-ts.layout_fn = mylayout
-t.render("img_faces.png", w=600, tree_style = ts)
-t.show(tree_style = ts)
diff --git a/other/visR/backup/fish.png b/other/visR/backup/fish.png
deleted file mode 100644
index 34089f3..0000000
Binary files a/other/visR/backup/fish.png and /dev/null differ
diff --git a/other/visR/backup/fly.png b/other/visR/backup/fly.png
deleted file mode 100644
index 34089f3..0000000
Binary files a/other/visR/backup/fly.png and /dev/null differ
diff --git a/other/visR/backup/generate-excel-tables-scored-genes.py b/other/visR/backup/generate-excel-tables-scored-genes.py
deleted file mode 100644
index 197c315..0000000
--- a/other/visR/backup/generate-excel-tables-scored-genes.py
+++ /dev/null
@@ -1,232 +0,0 @@
-import sys
-import os
-import copy
-sys.path.append("../../")
-from ressoft.utils.pvalue_utlis import hyperTestPvalue
-from multiprocessing import Pool
-
-
-
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-from ressoft.utils.file_utils import *
-
-def readParameters(param_tab):
-    parameters = {}
-    for param_el in param_tab:
-        tokens = param_el.split("=")
-        if len(tokens)==2:
-            key = tokens[0]
-            value = tokens[1]
-            parameters[key] = value
-        
-    return parameters
-
-parameters = readParameters(sys.argv)
-
-print(parameters)
-
- 
-def filterTopGeneProfiles(gene_profiles, n):
-    subset = set([])
-    
-    for gene_profile in gene_profiles:
-        if gene_profile.norm_wsupport > 0.0:
-            subset.add(gene_profile)
-    subset_sorted = sorted(subset, key=lambda gp:(-gp.wsupport, -gp.cover_support))    
-    return subset_sorted[:n]
-            
-def filterGeneProfilesByPvalue(gene_profiles, drug_res_genes, target_genes):
-    subset = set([])
-    for gene_profile in gene_profiles[:10]:
-        subset.add(gene_profile)
-    subset_sorted = sorted(subset, key=lambda gp:(gp.pvalue_wsupport, -gp.cover_support))
-    return subset_sorted[:10]
-            
-    return None
-
-
-def loadGeneFunctions(input_fh):
-    gene_ids = {}
-    for line in input_fh.readlines():
-        if not line:
-            continue
-        line = line.strip()
-        tokens = line.split("\t")
-        if len(tokens) <= 1:
-            continue
-        gene_id = tokens[0]
-        function_id = tokens[3].lower()
-        function_id = function_id.replace("_", "\_")
-        if not gene_id in gene_ids:
-            gene_ids[gene_id] = function_id
-    return gene_ids
-
-def decorateScors(parameters):
-    species = parameters["SPECIES"] 
-    details = parameters["DETAILS"]
-    subset = parameters["SUBSET"]
-    hide = int(parameters["HIDE"]) 
-    theta = float(parameters["THETA"])
-    zeta = float(parameters["ZETA"])
-    tscore_type = parameters["TSCORE_TYPE"]
-    beta = int(parameters["BETA"])  
-    pred = parameters["PRED"]
-    dist = int(parameters["DIST"])
-    type_param = parameters["TYPE"]
-    exp_prefix = parameters["EXP_PREFIX"]
-    grouping_type = parameters["GROUPING"] 
-    supp_type = parameters["SUPP_TYPE"]
-    drug_name = parameters["DRUG_NAME"]
-    m_type = parameters["TYPE"]     
-    
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-    format_dir = os.path.abspath("../../../data_output/"+species+"_format/")+"/"    
-    
-    input_fh = open(input_dir + "strains-all.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    diffTime("Input reading...")
-    
-    input_fh = open(input_dir + "pred_res_profiles.txt")
-    res_profiles = readResistanceProfiles(input_fh, strains, map=True)
-    input_fh.close()
-    
-    cluster_fh = open(input_dir + "conn_comp-det-"+str(0)+".txt")
-    clusters, id_cluster_map = readClusters(cluster_fh, strains)
-    cluster_fh.close()
-    
-    strains_ord_fh = open(input_dir + "names-strains-ord.txt")
-    strains_ord = readStrainNamesOrd(strains_ord_fh)
-    strains_ord_fh.close()
-    
-    if os.path.exists(input_dir + "cc_mutability.txt"):
-        mutability_fh = open(input_dir + "cc_mutability.txt")
-        mutabilities = readMutabilities(mutability_fh, clusters, id_cluster_map, strains_ord)
-        mutability_fh.close()
-    else:
-        mutabilities = None
-    
-    if os.path.exists(input_dir + "gene_mapped_functions.txt"):
-        input_fh = open(input_dir + "gene_mapped_functions.txt")
-        gene_functions = loadGeneFunctions(input_fh)
-        input_fh.close()
-    else:
-        gene_functions = None
-
-    diffTime(drug_name)
-    print(res_profiles)
-    drug_res_profile = copy.deepcopy(res_profiles[drug_name])
-    drug_name = drug_res_profile.drug_name
-
-    input_res_fn = output_dir +"/det/"+str(exp_prefix)+"-"+str(hide)+"-"+str(dist)+"-"+grouping_type+"-"+details+"-"+subset+"-"+m_type+"-"+pred+"-"+str(beta)+"-"+str(theta)+"-"+str(zeta)+"-"+str(tscore_type)+"-"+drug_name+".txt"
-    print("HERE", input_res_fn)
-    if not os.path.exists(input_res_fn):
-        print("HERE2")
-        return None
-
-    input_res_fh = open(input_res_fn)
-    output_res_fn = format_dir +"/html/"+str(exp_prefix)+"-"+str(hide)+"-"+str(dist)+"-"+grouping_type+"-"+details+"-"+subset+"-"+m_type+"-"+pred+"-"+str(beta)+"-"+str(theta)+"-"+str(zeta)+"-"+str(tscore_type)+"-"+drug_name+".html"
-    output_fh = open(output_res_fn, "w")            
-
-    hidden_strains, gene_profiles, gene_targets, drug_res_genes = readFeaturesOne(drug_name, strains, input_res_fh)
-
-    genes_to_show = filterTopGeneProfiles(gene_profiles, 500)
-    printHtml(genes_to_show, drug_name, strains, output_fh, show_profiles=True, hidden_res_profile=drug_res_profile, drug_res_genes=drug_res_genes, drug_targets=gene_targets, gene_functions=gene_functions, type=type, mutabilities=mutabilities)
-    input_res_fh.close()
-
-    output_fh.close()
-    return None
-
-
-
-if __name__ == '__main__':            
-    parameters = readParameters(sys.argv)
-    if "SPECIES" in parameters and not parameters["SPECIES"] in ["mtb","sta"]:
-        species = parameters["SPECIES"]
-    else:
-        species = "mtb80"
-    #species = "mtb80"
-        
-    if "W" in parameters:
-        WORKERS = int(parameters["W"])
-    else:
-        WORKERS = 8
-
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-    format_dir = os.path.abspath("../../../data_output/"+species+"_format/")+"/"
-    ensure_dir(format_dir)
-    ensure_dir(format_dir +"/html/")
-    
-    details_param = "S"
-    hide_param = 0
-    dist_params = ["0"]
-    exp_prefix = "FINAL3"
-    grouping_param = "G"
-    subset_param = "N"
-    pred_params = ["A","B"]
-    theta_params = ["0.2","0.5","0.8"]
-    type_params = ["G","S"]
-    zeta_params = ["0.0"]
-    tscore_params = ["P"]
-
-    TASKS = []
-    TASK = {}
-
-    input_fh = open(input_dir + "res_profiles_ret.txt")
-    drug_names = readDrugNames(input_fh)
-    input_fh.close()
-    print(drug_names)
-
-    for theta_param in theta_params:
-        for tscore_param in  tscore_params:
-            for zeta_param in zeta_params:
-                for dist_param in dist_params:
-                    for type_param in type_params:
-                        if type_param == "G" and dist_param == "20":
-                            continue
-                        for pred_param in pred_params:
-                            for beta_param in range(-1, 0, 1):
-                                for supp_type_param in ["wsupport", "support", "or", "tscore", "gene_tscore"]:
-                                    if supp_type_param != "tscore" and theta_param != "0.5":
-                                        continue  
-                                    for drug_name in drug_names:
-                                        TASK["SPECIES"] = species
-                                        TASK["PHASE"] = str(0)
-                                        TASK["DETAILS"] = str(details_param)
-                                        TASK["HIDE"] = str(hide_param)
-                                        TASK["DIST"] = str(dist_param)
-                                        TASK["GROUPING"] = str(grouping_param)
-                                        TASK["EXP_PREFIX"] = exp_prefix 
-                                        TASK["TYPE"] = type_param
-                                        TASK["PRED"] = pred_param
-                                        TASK["BETA"] = beta_param
-                                        TASK["THETA"] = theta_param  
-                                        TASK["ZETA"] = zeta_param  
-                                        TASK["TSCORE_TYPE"] = tscore_param
-                                        TASK["SUPP_TYPE"] = supp_type_param
-                                        TASK["SUBSET"] = subset_param
-                                        TASK["DRUG_NAME"] = drug_name
-                                        
-                                        TASKS.append(TASK.copy())
-                            
-    for TASK in TASKS:
-        print(TASK)
-    if WORKERS > 1:              
-        pool = Pool(processes=WORKERS)   
-        for r in pool.imap(decorateScors, TASKS):
-            print(r)
-    else:
-        for T in TASKS:
-            decorateScors(T)
-        
-    print("END")
-    
-
diff --git a/other/visR/backup/img_faces.png b/other/visR/backup/img_faces.png
deleted file mode 100644
index c0942c7..0000000
Binary files a/other/visR/backup/img_faces.png and /dev/null differ
diff --git a/other/visR/backup/mouse.png b/other/visR/backup/mouse.png
deleted file mode 100644
index 34089f3..0000000
Binary files a/other/visR/backup/mouse.png and /dev/null differ
diff --git a/other/visR/backup/out.pdf b/other/visR/backup/out.pdf
deleted file mode 100644
index 7221ce4..0000000
Binary files a/other/visR/backup/out.pdf and /dev/null differ
diff --git a/other/visR/backup/save-tree-mutations_old.py b/other/visR/backup/save-tree-mutations_old.py
deleted file mode 100644
index 2b9be1f..0000000
--- a/other/visR/backup/save-tree-mutations_old.py
+++ /dev/null
@@ -1,433 +0,0 @@
-import sys
-import os
-import copy
-import random
-from multiprocessing import Pool
-from ete2 import Tree
-from ete2 import PhyloTree
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from ete2 import faces, layouts
-
-sys.path.append("../../")
-
-from soft.utils.camber_params_utils import *
-from ressoft.utils.file_utils import ensure_dir
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import readClusters, readClusterNames
-
-
-def calcResistantNodeLeaves(phylo_tree):
-    mutated_nodes = set([])
-    mutated_node_leaves = {}
-    queue = deque([])
-    for node in phylo_tree.nodes.values():
-        node.visited = 0
-
-    for i in phylo_tree.leaf_ids:
-        node = phylo_tree.nodes[i]
-        queue.append(node.parent)
-                
-    while queue:
-        node = queue.popleft()
-        if node == None:
-            continue
-        node.visited += 1
-        if node.visited < len(node.children):
-            continue
-        i = node.node_id
-        
-        children_list = list(node.children)
-        node_mut = node.complete_res_state
-
-        for j in range(len(children_list)):    
-            node_j = children_list[j]  
-                        
-            node_j_mut = node_j.complete_res_state
-            
-            if node_j_mut == 'R' and node_mut == 'S':
-                mutated_nodes.add(node_j)
-        queue.append(node.parent)
-    
-    for node in mutated_nodes:
-        mutated_node_leaves[node.node_id] = node.getLeaves()
-    
-    return mutated_node_leaves
-
-def calcMutatedNodeLeaves(phylo_tree):
-    mutated_nodes = set([])
-    mutated_node_leaves = {}
-    queue = deque([])
-    for node in phylo_tree.nodes.values():
-        node.visited = 0
-
-    for i in phylo_tree.leaf_ids:
-        node = phylo_tree.nodes[i]
-        queue.append(node.parent)
-                
-    while queue:
-        node = queue.popleft()
-        if node == None:
-            continue
-        node.visited += 1
-        if node.visited < len(node.children):
-            continue
-        i = node.node_id
-        
-        children_list = list(node.children)
-        node_mut = node.complete_mut_state
-
-        for j in range(len(children_list)):    
-            node_j = children_list[j]  
-                        
-            node_j_mut = node_j.complete_mut_state
-            
-            if node_j_mut == '1' and node_mut == '0':
-                mutated_nodes.add(node_j)
-        queue.append(node.parent)
-    
-    for node in mutated_nodes:
-        mutated_node_leaves[node.node_id] = node.getLeaves()
-    
-    return mutated_node_leaves
-
-
-def scoreMutations(drug_res_profile, drug_name, drug_targets, drug_res_genes, tree, all_mutations, gene_presence, strains, output_format_fh=None, parameters=None):
-    dataset = parameters["D"] 
-    details = parameters["DETAILS"]
-    subset = parameters["SUBSET"]
-    hide = int(parameters["HIDE"]) 
-    beta = int(parameters["BETA"]) 
-    pred = parameters["PRED"]
-    theta = float(parameters["THETA"])
-    dist = int(parameters["DIST"])
-    zeta = float(parameters["ZETA"])
-    tscore_type = parameters["TSCORE_TYPE"]
-    exp_prefix = parameters["EXP_PREFIX"]
-    grouping_type = parameters["GROUPING"] 
-    m_type = parameters["TYPE"]
-         
-    dataset_dir = os.path.abspath("../camber-pred/datasets/"+dataset)+"/"
-
-    if beta == -1:
-        beta_str = str("%.2f" % float(len(drug_res_profile.getResistant())/float(len(drug_res_profile.getSusceptible()))))
-        beta = float(beta_str)
-
-    tree.setObservedResProfile(drug_res_profile.full_profile)
-    calcSubleavesResCount(tree)
-    calcSubnodesCount(tree)
-
-    newtree = removeUnResLeaves(tree)
-     
-    calcSubleavesResCount(newtree)
-    calcSubnodesCount(newtree)
-    calcDetParsResModel(newtree)
-    newtree.calcContributions(drug_res_profile, beta)
-
-    calcRefSatesMutations(all_mutations, drug_res_profile)
-    calcBinSatesMutations(all_mutations, drug_res_profile)
-    calcGenesCoverSupports(all_mutations, drug_res_profile, beta)
-
-    con_mutations, neu_mutations, ess_mutations = categorizeMultiMutations(all_mutations, drug_res_profile)
-    imp_mutations = con_mutations + neu_mutations + ess_mutations
-    gene_profiles = geneMutations(imp_mutations)
-    con_gene_profiles = geneMutations(con_mutations)
-    
-    gene_profiles = groupGeneMutations(gene_profiles, dist, con_gene_profiles, grouping_type)
-    
-    computeGeneProfiles(gene_profiles)
-    computeGeneProfilesEss(gene_profiles)
-    
-    calcGenesCoverSupports(gene_profiles, drug_res_profile, beta)
-    calcGenesWeightedSupports(gene_profiles, drug_res_profile, newtree, beta)
-    calcGenesTreeScore(gene_profiles, drug_res_profile, newtree, theta=theta, zeta=zeta)
-    calcOddsRatio(gene_profiles, drug_res_profile)
-    
-    for gene_profile in gene_profiles:
-        muts_sorted = sorted(gene_profile.mutations, key=lambda mutation:mutation.tscore)
-        gene_profile.start = muts_sorted[0].position
-        gene_profile.end = muts_sorted[0].position
-        gene_profile.desc = muts_sorted[0].desc
-        
-    
-    if grouping_type == "G":
-        gene_profiles_sorted = sorted(gene_profiles, key=lambda gp:-gp.best_mutation.wsupport)
-        genes_to_show = list(gene_profiles_sorted)[:1000]        
-    elif details == "N":
-        genes_to_show = filerGenesToShow(gene_profiles, drug_res_profile, drug_res_genes=drug_res_genes, drug_targets=drug_targets)
-    elif details == "H":
-        genes_to_show = filerGenesToShowHigh(gene_profiles, max_support, max_support2=max_support2, drug_res_genes=drug_res_genes, drug_targets=drug_targets)
-    elif details == "Y":
-        genes_to_show = filerGenesToShowBySupport(gene_profiles, 1, drug_res_genes=drug_res_genes, target_genes=drug_targets)
-    elif details == "S":
-        gene_profiles_sorted = sorted(gene_profiles, key=lambda gp:-gp.wsupport)
-        genes_to_show = list(gene_profiles_sorted)[:1000]
-
-    alignments = {}
-
-    for leaf_id in newtree.leaf_ids:
-        strain_id = strains.getStrain(leaf_id)
-        alignments[strain_id] = ""
-    
-    for i in range(0, min(10, len(genes_to_show)), 1):
-        gene_profile = genes_to_show[i]
-        gp_score = gene_profile.tscore
-        
-        for strain_index in newtree.leaf_ids:
-            strain_id = strains.getStrain(strain_index)
-            alignments[strain_id] += gene_profile.bin_profile[strain_index]
-#        
-    fasta_txt = ""
-    for strain_id in alignments:
-        fasta_txt += ">" + strain_id + "\n" + alignments[strain_id] + "\n"
-#    
-    output_fh = open(dataset_dir +"/tree_mapping/"+drug_name+"_aln"+".txt", "w")            
-    output_fh.write(fasta_txt)
-    output_fh.close()
-
-    output_fh = open(dataset_dir +"/tree_mapping/"+drug_name+"_muts"+".txt", "w")
-    for i in range(0, min(10, len(genes_to_show)), 1):
-        gene_profile = genes_to_show[i]
-        
-        newtree.setObservedMutProfile(gene_profile.bin_profile)
-        calcSubleavesMutCount(newtree)
-        calcDetParsMutModel(newtree)
-        mutated_node_leaves = calcMutatedNodeLeaves(newtree)
-        line_text = gene_profile.gene_id + "_" + str(gene_profile.start)
-        for mutated_node_id in mutated_node_leaves.keys():
-            line_text += "\t"
-            for leaf_id in mutated_node_leaves[mutated_node_id]:
-                
-                line_text += strains.getStrain(leaf_id) + ";"
-            line_text = line_text[:-1]
-            
-        output_fh.write(line_text + "\n")
-    output_fh.close()
-
-    output_fh = open(dataset_dir +"/tree_mapping/"+drug_name+"_res"+".txt", "w")            
-    resistant_node_leaves = calcResistantNodeLeaves(newtree)
-    line_text = ""
-    for resistant_node_id in resistant_node_leaves.keys():
-        line_text += "\t"
-        for leaf_id in resistant_node_leaves[resistant_node_id]:
-            line_text += strains.getStrain(leaf_id) + ";"
-        line_text = line_text[:-1]   
-    output_fh.write(line_text + "\n") 
-    output_fh.close()
-
-    output_fh = open(dataset_dir +"/tree_mapping/"+drug_name+"_tree"+".txt", "w")            
-    output_fh.write(newtree.toString(strains = strains, lengths = False, int_labels = True)+"\n");
-    output_fh.close()
-
-
-    return None
-
-
-def evaluateMethod(drug_name, res_profiles, drug_targets, drug_res_genes, tree, all_mutations, gene_presence, strains, parameters):
-    dataset = parameters["D"] 
-    details = parameters["DETAILS"]
-    subset = parameters["SUBSET"]
-    hide = int(parameters["HIDE"]) 
-    theta = parameters["THETA"]
-    beta = int(parameters["BETA"])  
-    pred = parameters["PRED"]
-    zeta = float(parameters["ZETA"])
-    tscore_type = parameters["TSCORE_TYPE"]
-    dist = int(parameters["DIST"])
-    exp_prefix = parameters["EXP_PREFIX"]
-    grouping_type = parameters["GROUPING"] 
-    m_type = parameters["TYPE"] 
-    
-    input_dir = os.path.abspath("../../../data_input/"+dataset+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+dataset+"_out/")+"/"
-        
-    drug_res_profile = copy.deepcopy(res_profiles[drug_name])
-    scoreMutations(drug_res_profile, drug_name, drug_targets[drug_name], drug_res_genes[drug_name], tree, all_mutations, gene_presence, strains, parameters=parameters)
-#     output_format_fh.close()
-
-def scoreDrug(parameters):
-    dataset = parameters["D"] 
-    subset = parameters["SUBSET"]
-    m_type = (parameters["TYPE"])
-    pred = (parameters["PRED"])
-    drug_name = parameters["DRUG_NAME"]
-
-    dataset_dir = os.path.abspath("../camber-pred/datasets/"+dataset)+"/"
-
-    input_fh = open(dataset_dir + "strain_profiles_ord.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
-    input_fh = open(dataset_dir + "strain_names_ord.txt")
-    strain_names_ord = readStrainNamesOrd(input_fh)
-    input_fh.close()
-
-    if pred == "B":
-        input_fn = dataset_dir + "res_profiles_ret.txt"
-    else:
-        input_fn = dataset_dir + "pred_res_profiles.txt"
-        
-    input_fh = open(input_fn)
-    res_profiles_list = readResistanceProfiles(input_fh, strains)
-    input_fh.close()
-    
-    res_profiles = {}
-    for res_profile in res_profiles_list:
-        res_profiles[res_profile.drug_name] = res_profile
-    
-    cluster_fh = open(dataset_dir + "cluster_names.txt")
-    cluster_names, cluster_ids, cluster_ids_rev = readClusterNames(cluster_fh, strains)
-    cluster_fh.close()
-    
-    input_fh = open(dataset_dir + "drug_targets.txt")
-    drug_targets = loadDrugTargets(input_fh, cluster_ids_rev)
-    input_fh.close()
-    
-    input_fh = open(dataset_dir + "drug_res_genes.txt")
-    drug_res_genes = loadDrugResGenes(input_fh, cluster_ids_rev)
-    input_fh.close()
-   
-    input_fh = open(dataset_dir + "drug_res_rel.txt")
-    drug_res_rel = loadDrugTargets(input_fh, cluster_ids_rev)
-    input_fh.close()
-    
-    print("DRUG RES GENES: ", drug_res_genes)
-    print("DRUG TARGETS: ", drug_targets)
-
-    if subset == "Y":
-        input_fh = open(dataset_dir + 'subset_imp_genes_neigh.txt')
-        gene_subset = readGeneSubset(input_fh, cluster_ids_rev)
-        input_fh.close()
-    else:
-        gene_subset = None
-        
-    input_fh = open(dataset_dir + 'phylo_tree.txt')
-    tree = readPhyloTree(input_fh, strains)
-    input_fh.close()
-        
-    input_fh = open(dataset_dir + 'man-all-mutations.txt')
-    all_mutations, gene_presence = readMultiMutations(input_fh, strains, cluster_names=cluster_names, cluster_ids=cluster_ids, cluster_ids_rev=cluster_ids_rev, strains_ord=strain_names_ord, gene_subset=gene_subset, m_type=m_type, syn=False)
-    input_fh.close()
-    
-    print("READ", len(all_mutations))
-    sys.stdout.flush()
-    
-    imp_mutations = filterMutations(all_mutations, strains)
-    
-    diffTime("FILTERED")
-    print("MUTATIONS: ", len(imp_mutations))
-    evaluateMethod(drug_name, res_profiles, drug_targets, drug_res_genes, tree, imp_mutations, gene_presence, strains, parameters)
-    diffTime("EVALUATED")
-    
-    return drug_name
-    
-if __name__ == '__main__':
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    
-    if "W" in parameters:
-        WORKERS = int(parameters["W"])
-    else:
-        WORKERS = 4
-    WORKERS = 1
-    #dataset = "sta_plas_184"
-    
-    if "DATASET" in parameters and not parameters["D"] in ["mtb","sta","ba"]:
-        dataset = parameters["D"]
-    else:
-        dataset = "spe"
-        
-    dataset = "mtb79"
-    dataset_dir = os.path.abspath("../camber-pred/datasets/"+dataset)+"/"
-
-    print(dataset_dir)
-    
-    ensure_dir(dataset_dir)
-    ensure_dir(dataset_dir + "/html_subset/")
-    ensure_dir(dataset_dir + "/r_subset/")
-    ensure_dir(dataset_dir + "/tree_mapping/")
-    ensure_dir(dataset_dir + "/det/")
-    #scripts_dir = "/research/wongls-group/wozniak/scripts_pred/"
-    #scripts_dir = "../../"+dataset+"-scripts_pred/"
-    #ensure_dir(scripts_dir)
-    
-    cur_dir = os.path.abspath(os.curdir) +"/"
-    
-    hide_params = set(["0"])
-    dist_params = set(["0"])
-    pred_params = set(["B"])
-    beta_params = set(["-1"])
-    grouping_params = set(["N"])
-    details_params = set(["S"])
-    subset_params = set(["N"])
-    type_params = set(["S"])
-    theta_params = ["0.5"]
-    zeta_params = ["0.0"]
-    tscore_params = ["P"]
-    exp_prefix = "FINAL7"
-    
-    input_fh = open(dataset_dir + "res_profiles_ret.txt")
-    drug_names = readDrugNames(input_fh)
-    input_fh.close()
-    print(drug_names)
-        
-    TASKS = []
-    
-    TASK = {}
-    count = 0
-    for theta_param in theta_params:
-        for beta_param in beta_params:
-            for pred_param in pred_params:
-                for type_param in type_params:
-                    for hide_param in hide_params:
-                        for dist_param in dist_params:
-                            for tscore_param in  tscore_params:
-                                for zeta_param in zeta_params:
-                                    for grouping_param in grouping_params:
-                                        for details_param in details_params:
-                                            for subset_param in subset_params:
-                                                for drug_name in drug_names:
-                                                    if not drug_name in ["Ofloxacin"]:
-                                                        continue 
-                                                    if type_param == "G" and dist_param != "0":
-                                                        continue
-                                                    if grouping_param == "G" and dist_param != "0":
-                                                        continue
-                                                    #if drug_name == "Rifampicin":
-                                                    #    continue
-                                                    TASK["D"] = dataset
-                                                    TASK["DETAILS"] = str(details_param)
-                                                    TASK["HIDE"] = str(hide_param)
-                                                    TASK["SUBSET"] = str(subset_param)
-                                                    TASK["DIST"] = str(dist_param)
-                                                    TASK["GROUPING"] = str(grouping_param)
-                                                    TASK["EXP_PREFIX"] = exp_prefix 
-                                                    TASK["TYPE"] = type_param
-                                                    TASK["PRED"] = pred_param
-                                                    TASK["BETA"] = beta_param
-                                                    TASK["THETA"] = theta_param
-                                                    TASK["TSCORE_TYPE"] = tscore_param
-                                                    TASK["ZETA"] = zeta_param  
-                                                    TASK["DRUG_NAME"] = drug_name
-                                                    #output_det_fn = output_dir + "/det/"+str(exp_prefix)+"-"+str(0)+"-"+str(dist_param)+"-"+grouping_param+"-"+details_param+"-"+subset_param+"-"+type_param+"-"+pred_param+"-"+str(beta_param)+"-"+drug_name+".txt"
-        
-                                                    TASKS.append(TASK.copy())
-            
-                                                  #  scoreDrug(TASK)
-
-    for TASK in TASKS:
-        print(TASK)
-    if WORKERS > 1:                               
-        pool = Pool(processes=WORKERS)   
-        for r in pool.imap(scoreDrug, TASKS):
-            print(r)
-    else:
-        for T in TASKS:
-            scoreDrug(T)
-
-
-
diff --git a/other/visR/backup/score-subset-mutations.py b/other/visR/backup/score-subset-mutations.py
deleted file mode 100644
index bd79fe0..0000000
--- a/other/visR/backup/score-subset-mutations.py
+++ /dev/null
@@ -1,518 +0,0 @@
-import sys
-import os
-import copy
-from multiprocessing import Pool
-
-
-sys.path.append("../../../../camber2/src/")
-sys.path.append("../../")
-
-from soft.utils.camber_params_utils import *
-from ressoft.utils.file_utils import ensure_dir
-from soft.utils.camber_utils import *
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-from ressoft.modelling.model_logic import *
-
-def printScoresGene(genes_to_show, drug_name, output_det_fh, only_mutated = False):
-    sorted_gene_profiles = sorted(genes_to_show, key=lambda gene_profile:(gene_profile.gene_id, gene_profile.start))
-
-    output_det_fh.write("gene_id\tdesc\tposition\ttree_score\twsupport\tsupport\tor\n")
-    
-    genes_map = {}
-    
-    for gene_profile in sorted_gene_profiles:
-        if not gene_profile.gene_id in genes_map:
-            genes_map[gene_profile.gene_id] = []
-        genes_map[gene_profile.gene_id].append(gene_profile)
-
-        
-    for gene_id in genes_map.keys():
-        last_pos = -1
-        for gene_profile in genes_map[gene_id]:
-            gene_profile_id = gene_profile.gene_profile_id
-            gene_id = gene_profile.gene_id
-            
-            tokens = gene_profile_id.split("-")
-            if len(tokens) == 2:
-                gene_id_text = tokens[1]
-            else:
-                gene_id_text = tokens[0]
-            gene_profile.setGeneIDText(gene_id_text)
-            
-            if only_mutated == False:
-                while last_pos + 1 < gene_profile.start:
-                    text_line = gene_profile.gene_name + "\t"
-                    text_line += "no" + "\t"
-                    text_line += str(last_pos + 1) + "\t"
-                    text_line += str("%.2f" % 0) + "\t"
-                    text_line += str("%.2f" % 0) + "\t"
-                    text_line += str("%.2f" % 0) + "\t"
-                    text_line += str("%.2f" % 0) + "\t"
-                    output_det_fh.write(text_line + "\n")
-                    last_pos += 1 
-    
-            text_line = gene_profile.gene_name + "\t"
-            text_line += gene_profile.desc + "\t"
-            text_line += str(gene_profile.start) + "\t"
-            text_line += str("%.2f" % gene_profile.tscore) + "\t"
-            text_line += str("%.2f" % gene_profile.wsupport) + "\t"
-            text_line += str("%.2f" % gene_profile.support) + "\t"
-            text_line += str("%.2f" % gene_profile.odds_support) + "\t"
-            output_det_fh.write(text_line + "\n")
-    return None
-        
-def printHtmlStephen(genes_to_show, drug_name, strains, output_det_fh, show_profiles = True, hidden_res_profile = None, drug_res_genes=None, drug_targets=None, strain_index = None, predicted_res_profile = None, gene_functions = None, type="G", mutabilities=None):
-    sorted_gene_profiles = sorted(genes_to_show, key=lambda gene_profile:(gene_profile.gene_id, gene_profile.start))
-    output_det_fh.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n')
-    output_det_fh.write("<head>\n")
-    output_det_fh.write('<script src="sorttable.js" type="text/javascript"> </script>\n')
-    output_det_fh.write('<script src="jquery-1.7.1.js" type="text/javascript"> </script>\n')
-    output_det_fh.write('<script src="row_expand.js" type="text/javascript"> </script>\n')
-    output_det_fh.write('<script type="text/javascript">\n')
-    output_det_fh.write('$(document).ready(function(){\n')
-    output_det_fh.write('init();\n')
-    output_det_fh.write('});\n')
-    output_det_fh.write('</script>\n')
-    output_det_fh.write('<link rel="stylesheet" type="text/css" href="vert_text.css" />\n')
-    output_det_fh.write("</head>\n")
-    output_det_fh.write("<body>\n")
-    output_det_fh.write('<table>\n')
-    output_det_fh.write('<tr>\n')
-    output_det_fh.write('<th style="width:100px">Gene identifier</th>\n')
-
-    if len(sorted_gene_profiles) > 0:
-        if sorted_gene_profiles[0].start != None:
-            output_det_fh.write('<th style="width:40px">Position</th>\n')
-        if sorted_gene_profiles[0].desc != None and sorted_gene_profiles[0].desc != "":
-            output_det_fh.write('<th style="width:40px">Description</th>\n')
-    
-    if type == "S":
-        if gene_functions != None: 
-            output_det_fh.write('<th style="width:200px">Gene functional annotation</th>\n')
-        if mutabilities != None:
-            output_det_fh.write('<th style="width:200px">Gene mutabilities/th>\n')            
-            
-        output_det_fh.write('<th style="width:40px">Weighted support</th>\n')
-        output_det_fh.write('<th style="width:40px">Tree score</th>\n')
-        output_det_fh.write('<th style="width:40px">Odds ratio</th>\n')
-        output_det_fh.write('<th style="width:40px">Drug-resistance determinant?</th>\n')
-    else:        
-        if gene_functions != None:
-            output_det_fh.write('<th style="width:200px">Gene functional annotation</th>\n')
-        if mutabilities != None: 
-            output_det_fh.write('<th style="width:200px">Gene mutabilities/th>\n')     
-        output_det_fh.write('<th style="width:40px">Weighted support</th>\n')
-        output_det_fh.write('<th style="width:40px">Tree score</th>\n')
-        output_det_fh.write('<th style="width:40px">Odds ratio</th>\n')
-        output_det_fh.write('<th style="width:40px">Drug-resistance determinant?</th>\n')
-
-    if hidden_res_profile != None:
-        for strain_index in range(0, strains.count(), 1):
-            strain_id = strains.getStrain(strain_index)
-            strain_id = strain_id.strip()
-            if strain_index in hidden_res_profile.getSusceptible():
-                if strain_index in hidden_res_profile.predicted_strains or strain_index in hidden_res_profile.hidden_strains:
-                    output_det_fh.write('<th style="background-color: rgb(170,255,170); width:65px">'+strain_id+' (s)</th>')
-                else:
-                    output_det_fh.write('<th style="background-color: rgb(0,255,0); width:65px">'+strain_id+' (S)</th>')
-            elif strain_index in hidden_res_profile.getResistant():
-                if strain_index in hidden_res_profile.predicted_strains or strain_index in hidden_res_profile.hidden_strains:
-                    output_det_fh.write('<th style="background-color: rgb(255,170,170); width:65px">'+strain_id+' (r)</th>')
-                else:
-                    output_det_fh.write('<th style="background-color: rgb(255,0,0); width:65px">'+strain_id+' (R)</th>') 
-            else:
-                output_det_fh.write('<td style="width:65px">'+strain_id+' (?)</td>') 
-
-    output_det_fh.write('</tr>\n')    
-    
-    count = 0
-    for gene_profile in sorted_gene_profiles:
-        count += 1
-        gene_profile_id = gene_profile.gene_profile_id
-        gene_id = gene_profile.gene_id
-        
-        tokens = gene_profile_id.split("-")
-        if len(tokens) == 2:
-            gene_id_text = tokens[1]
-        else:
-            gene_id_text = tokens[0]
-        gene_profile.setGeneIDText(gene_id_text)
-
-        output_det_fh.write('<tr>\n')
-        if type == "S":        
-            if gene_profile.gene_id != gene_profile.gene_name:
-                output_det_fh.write('<td style="width:200px">'+gene_profile.gene_id+"("+gene_profile.gene_name+")"+'</td>')
-            else:
-                output_det_fh.write('<td style="width:200px">'+gene_profile.gene_id+"("+gene_profile.gene_name+")"+'</td>')                
-            if gene_profile.start != gene_profile.end:
-                output_det_fh.write('<td style="width:200px">'+"["+str(gene_profile.start)+":"+str(gene_profile.end)+"]"+'</td>')
-            else:
-                output_det_fh.write('<td style="width:200px">'+str(gene_profile.start)+'</td>')
-        else:
-            output_det_fh.write('<td style="width:200px">'+gene_profile.gene_id_text+'</td>')
-            
-            if gene_profile.start != None:
-                output_det_fh.write('<td style="width:20px">'+str(gene_profile.start)+'</td>\n')
-        if gene_profile.desc != None and gene_profile.desc != "":
-            output_det_fh.write('<td style="width:20px">'+str(gene_profile.desc)+'</td>\n')
-                
-        if gene_functions != None:
-            if gene_id in gene_functions:
-                output_det_fh.write('<td style="width:200px">'+gene_functions[gene_id]+'</td>')
-            else:
-                output_det_fh.write('<td style="width:200px">unknown</td>')
-        if mutabilities != None:
-            if gene_id in mutabilities:
-                output_det_fh.write('<td style="width:200px">'+str("%.8f" % mutabilities[gene_id])+' </td>')
-            else:
-                output_det_fh.write('<td style="width:200px">NA</td>')
-             
-        output_det_fh.write('<td style="width:20px; border-left-width: 3px;">'+str(gene_profile.wsupport).replace(".",",")+'</td>')
-        output_det_fh.write('<td style="width:20px">'+str(gene_profile.tscore).replace(".",",")+'</td>')
-        output_det_fh.write('<td style="width:20px">'+str(gene_profile.odds_support).replace(".",",")+'</td>')
-  #      output_det_fh.write('<td style="width:20px">'+str(gene_profile.pvalue_wsupport).replace(".",",")+'</td>')
-  #      output_det_fh.write('<td style="width:20px">'+str(gene_profile.pvalue_wsupport_corr).replace(".",",")+'</td>')
-        
-        is_det = False
-        #print(drug_targets)
-        #print(drug_res_genes)
-        if (drug_targets != None and gene_profile in drug_targets) or (drug_res_genes != None and gene_profile in drug_res_genes):
-            is_det = True
-#        if drug_targets != None and gene_id in drug_targets:
-#            (start, end) = drug_targets[gene_id]
-#            (s, e) = gene_profile.positionRange()
-#            if s>=start and e<=end:
-#                is_det = True
-#        if drug_res_genes != None and gene_id in drug_res_genes:
-#            is_det = True
-
-        if is_det:
-            output_det_fh.write('<td style="width:20px">YES</td>')
-        else:
-            output_det_fh.write('<td style="width:20px">NO</td>')
-
-
-        #output_det_fh.write('<td style="width:20px">'+gene_profile.diff_type+'</td>')
-        for strain_id in range(0, strains.count(), 1):
-            if gene_profile.getDescState(strain_id) == "?":
-                if gene_profile.getBinState(strain_id) == '1':
-                    output_det_fh.write('<td style="background-color: rgb(230,180,180); width:20px">'+"1:"+str(gene_profile.getState(strain_id))+'</td>')
-                elif gene_profile.getBinState(strain_id) == '0':
-                    output_det_fh.write('<td style="background-color: rgb(140,230,190); width:20px">'+"0:"+str(gene_profile.getState(strain_id))+'</td>')                
-                else:
-                    output_det_fh.write('<td style="background-color: rgb(200,200,190); width:20px">'+"0:"+str(gene_profile.getState(strain_id))+'</td>')
-            else:
-                if gene_profile.getBinState(strain_id) == '1':
-                    output_det_fh.write('<td style="background-color: rgb(230,180,180); width:20px">'+"1:"+str(gene_profile.getState(strain_id))+":"+str(gene_profile.getDescState(strain_id))+'</td>')
-                elif gene_profile.getBinState(strain_id) == '0':
-                    output_det_fh.write('<td style="background-color: rgb(140,230,190); width:20px">'+"0:"+str(gene_profile.getState(strain_id))+":"+str(gene_profile.getDescState(strain_id))+'</td>')                
-                else:
-                    output_det_fh.write('<td style="background-color: rgb(200,200,190); width:20px">'+"0:"+str(gene_profile.getState(strain_id))+":"+str(gene_profile.getDescState(strain_id))+'</td>')
-        output_det_fh.write('</tr>\n')        
-        
-
-    output_det_fh.write('</table>\n')
-    output_det_fh.write("</body>\n")
-    output_det_fh.write("</html>\n")
-
-def scoreMutations(drug_res_profile, drug_name, drug_targets, drug_res_genes, tree, all_mutations, gene_presence, strains, output_format_fh=None, parameters=None):
-    species = parameters["SPECIES"] 
-    details = parameters["DETAILS"]
-    subset = parameters["SUBSET"]
-    hide = int(parameters["HIDE"]) 
-    beta = int(parameters["BETA"]) 
-    pred = parameters["PRED"]
-    theta = float(parameters["THETA"])
-    dist = int(parameters["DIST"])
-    zeta = float(parameters["ZETA"])
-    tscore_type = parameters["TSCORE_TYPE"]
-    exp_prefix = parameters["EXP_PREFIX"]
-    grouping_type = parameters["GROUPING"] 
-    m_type = parameters["TYPE"]
-         
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-
-    if beta == -1:
-        beta_str = str("%.2f" % float(len(drug_res_profile.getResistant())/float(len(drug_res_profile.getSusceptible()))))
-        beta = float(beta_str)
-
-    tree.setObservedResProfile(drug_res_profile.full_profile)
-    calcSubleavesResCount(tree)
-    calcSubnodesCount(tree)
-
-    newtree = removeUnResLeaves(tree)
-     
-    calcSubleavesResCount(newtree)
-    calcSubnodesCount(newtree)
-    calcDetParsResModel(newtree)
-    newtree.calcContributions(drug_res_profile, beta)
-
-    calcRefSatesMutations(all_mutations, drug_res_profile)
-    calcBinSatesMutations(all_mutations, drug_res_profile)
-    calcGenesCoverSupports(all_mutations, drug_res_profile, beta)
-
-    con_mutations, neu_mutations, ess_mutations = categorizeMultiMutations(all_mutations, drug_res_profile)
-    imp_mutations = con_mutations + neu_mutations + ess_mutations
-    gene_profiles = geneMutations(imp_mutations)
-    con_gene_profiles = geneMutations(con_mutations)
-    
-    gene_profiles = groupGeneMutations(gene_profiles, dist, con_gene_profiles, grouping_type)
-    print("AAA", len(gene_profiles))
-    
-    computeGeneProfiles(gene_profiles)
-    computeGeneProfilesEss(gene_profiles)
-    
-    calcGenesCoverSupports(gene_profiles, drug_res_profile, beta)
-    calcGenesWeightedSupports(gene_profiles, drug_res_profile, newtree, beta)
-    calcGenesTreeScore(gene_profiles, drug_res_profile, newtree, theta=theta, zeta=zeta)
-    calcOddsRatio(gene_profiles, drug_res_profile)
-    
-    for gene_profile in gene_profiles:
-        muts_sorted = sorted(gene_profile.mutations, key=lambda mutation:mutation.tscore)
-        gene_profile.start = muts_sorted[0].position
-        gene_profile.end = muts_sorted[0].position
-        gene_profile.desc = muts_sorted[0].desc
-        
-    
-    if grouping_type == "G":
-        gene_profiles_sorted = sorted(gene_profiles, key=lambda gp:-gp.best_mutation.wsupport)
-        genes_to_show = list(gene_profiles_sorted)[:7000]        
-    elif details == "N":
-        genes_to_show = filerGenesToShow(gene_profiles, drug_res_profile, drug_res_genes=drug_res_genes, drug_targets=drug_targets)
-    elif details == "H":
-        genes_to_show = filerGenesToShowHigh(gene_profiles, max_support, max_support2=max_support2, drug_res_genes=drug_res_genes, drug_targets=drug_targets)
-    elif details == "Y":
-        genes_to_show = filerGenesToShowBySupport(gene_profiles, 1, drug_res_genes=drug_res_genes, target_genes=drug_targets)
-    elif details == "S":
-        gene_profiles_sorted = sorted(gene_profiles, key=lambda gp:-gp.wsupport)
-        genes_to_show = list(gene_profiles_sorted)[:7000]
-
-    
-    output_res_fn = output_dir +"/html_subset/"+str(exp_prefix)+"-"+str(hide)+"-"+str(dist)+"-"+grouping_type+"-"+details+"-"+subset+"-"+m_type+"-"+pred+"-"+str(beta)+"-"+str(theta)+"-"+str(zeta)+"-"+str(tscore_type)+"-"+drug_name+".html"
-    output_fh = open(output_res_fn, "w")            
-    printHtmlStephen(genes_to_show, drug_name, strains, output_fh, show_profiles=True, hidden_res_profile=drug_res_profile, drug_res_genes=drug_res_genes, drug_targets=None, gene_functions=None, type=m_type, mutabilities=None)
-    output_fh.close()
-
-    output_res_fn = output_dir +"/r_subset/"+drug_name+".txt"
-    output_fh = open(output_res_fn, "w")            
-    printScoresGene(genes_to_show, drug_name, output_fh, only_mutated = False)
-    output_fh.close()
-
-
-    return None
-
-
-def evaluateMethod(drug_name, res_profiles, drug_targets, drug_res_genes, tree, all_mutations, gene_presence, strains, parameters):
-    species = parameters["SPECIES"] 
-    details = parameters["DETAILS"]
-    subset = parameters["SUBSET"]
-    hide = int(parameters["HIDE"]) 
-    theta = parameters["THETA"]
-    beta = int(parameters["BETA"])  
-    pred = parameters["PRED"]
-    zeta = float(parameters["ZETA"])
-    tscore_type = parameters["TSCORE_TYPE"]
-    dist = int(parameters["DIST"])
-    exp_prefix = parameters["EXP_PREFIX"]
-    grouping_type = parameters["GROUPING"] 
-    m_type = parameters["TYPE"] 
-    
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-        
-    drug_res_profile = copy.deepcopy(res_profiles[drug_name])
-    scoreMutations(drug_res_profile, drug_name, drug_targets[drug_name], drug_res_genes[drug_name], tree, all_mutations, gene_presence, strains, parameters=parameters)
-#     output_format_fh.close()
-
-def scoreDrug(parameters):
-    species = parameters["SPECIES"] 
-    subset = parameters["SUBSET"]
-    m_type = (parameters["TYPE"])
-    pred = (parameters["PRED"])
-    drug_name = parameters["DRUG_NAME"]
-
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-
-    input_fh = open(input_dir + "strains-all.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    if pred == "B":
-        input_fn = input_dir + "pred_res_profiles.txt"
-    else:
-        input_fn = input_dir + "pred_res_profiles.txt"
-    input_fh = open(input_fn)
-    res_profiles_list = readResistanceProfiles(input_fh, strains)
-    input_fh.close()
-    
-    res_profiles = {}
-    for res_profile in res_profiles_list:
-        res_profiles[res_profile.drug_name] = res_profile
-    
-    cluster_fh = open(input_dir + "conn_comp-det.txt")
-    clusters, id_cluster_map = readClusters(cluster_fh, strains)
-    cluster_fh.close()
-    
-    anns_fn = input_dir+"names_anns.txt"
-    if os.path.exists(anns_fn):
-        anns_fh = open(anns_fn)
-        names_mapping = readNamesMapping(anns_fh)
-        anns_fh.close()
-    else:
-        names_mapping = None
-    
-    strains_ord_fh = open(input_dir + "names-strains-ord.txt")
-    strains_ord = readStrainNamesOrd(strains_ord_fh)
-    strains_ord_fh.close()
-    
-    input_fh = open(input_dir + "drug_targets.txt")
-    drug_targets = loadDrugTargets(input_fh, clusters, id_cluster_map, strains_ord)
-    input_fh.close()
-    
-    input_fh = open(input_dir + "drug_res_genes.txt")
-    drug_res_genes = loadDrugResGenes(input_fh, clusters, id_cluster_map, strains_ord)
-    input_fh.close()
-    
-    print("DRUG RES GENES", drug_res_genes)
-
-    input_fh = open(input_dir + 'phylo_tree.txt')
-    tree = readPhyloTree(input_fh, strains)
-    input_fh.close()
-    
-    if subset == "Y":
-        input_fh = open(input_dir + 'subset.txt')
-        gene_subset = readGeneSubset(input_fh, clusters, id_cluster_map, strains_ord)
-        input_fh.close()
-    else:
-        gene_subset = None
-        
- #   gene_subset = set(gene_subset) & set(drug_res_genes[drug_name].keys())
-        
-    input_fh = open(input_dir + 'man-all-mutations.txt')
-    all_mutations, gene_presence = readMultiMutations(input_fh, strains, clusters=clusters, id_cluster_map=id_cluster_map, strains_ord=strains_ord, names_mapping=names_mapping, gene_subset=gene_subset, m_type=m_type, syn = True)
-    input_fh.close()
-    
-    print("READ")
-    sys.stdout.flush()
-    
-    imp_mutations = filterMutations(all_mutations, strains)
-    
-    
-    diffTime("FILTERED")
-    print("MUTATIONS: ", len(imp_mutations))
-    evaluateMethod(drug_name, res_profiles, drug_targets, drug_res_genes, tree, imp_mutations, gene_presence, strains, parameters)
-    diffTime("EVALUATED")
-    
-    return drug_name
-    
-if __name__ == '__main__':
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    
-    if "W" in parameters:
-        WORKERS = int(parameters["W"])
-    else:
-        WORKERS = 4
-    #WORKERS = 1
-    #species = "sta_plas_184"
-    
-    if "SPECIES" in parameters and not parameters["SPECIES"] in ["mtb","sta","ba"]:
-        species = parameters["SPECIES"]
-    else:
-        species = "sta100"
-        
-   # species = "sta_plas_184"
-    
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-    format_dir = os.path.abspath("../../../data_output/"+species+"_format/")+"/"
-    
-    ensure_dir(output_dir)
-    ensure_dir(output_dir +"/html_subset/")
-    ensure_dir(output_dir +"/r_subset/")
-    ensure_dir(output_dir + "/det/")
-    #scripts_dir = "/research/wongls-group/wozniak/scripts_pred/"
-    #scripts_dir = "../../"+species+"-scripts_pred/"
-    #ensure_dir(scripts_dir)
-    
-    cur_dir = os.path.abspath(os.curdir) +"/"
-    
-    hide_params = set(["0"])
-    dist_params = set(["0"])
-    pred_params = set(["A"])
-    beta_params = set(["-1"])
-    grouping_params = set(["N"])
-    details_params = set(["S"])
-    subset_params = set(["Y"])
-    type_params = set(["S"])
-    theta_params = ["0.5"]
-    zeta_params = ["0.0"]
-    tscore_params = ["P"]
-    exp_prefix = "FINAL4"
-    
-    input_fh = open(input_dir + "pred_res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
-    input_fh.close()
-    print(drug_names)
-        
-    TASKS = []
-    
-    TASK = {}
-    count = 0
-    for theta_param in theta_params:
-        for beta_param in beta_params:
-            for pred_param in pred_params:
-                for type_param in type_params:
-                    for hide_param in hide_params:
-                        for dist_param in dist_params:
-                            for tscore_param in  tscore_params:
-                                for zeta_param in zeta_params:
-                                    for grouping_param in grouping_params:
-                                        for details_param in details_params:
-                                            for subset_param in subset_params:
-                                                for drug_name in drug_names:
-                                                    if type_param == "G" and dist_param != "0":
-                                                        continue
-                                                    if grouping_param == "G" and dist_param != "0":
-                                                        continue
-                                                    #if drug_name == "Rifampicin":
-                                                    #    continue
-                                                    TASK["SPECIES"] = species
-                                                    TASK["DETAILS"] = str(details_param)
-                                                    TASK["HIDE"] = str(hide_param)
-                                                    TASK["SUBSET"] = str(subset_param)
-                                                    TASK["DIST"] = str(dist_param)
-                                                    TASK["GROUPING"] = str(grouping_param)
-                                                    TASK["EXP_PREFIX"] = exp_prefix 
-                                                    TASK["TYPE"] = type_param
-                                                    TASK["PRED"] = pred_param
-                                                    TASK["BETA"] = beta_param
-                                                    TASK["THETA"] = theta_param
-                                                    TASK["TSCORE_TYPE"] = tscore_param
-                                                    TASK["ZETA"] = zeta_param  
-                                                    TASK["DRUG_NAME"] = drug_name
-                                                    #output_det_fn = output_dir + "/det/"+str(exp_prefix)+"-"+str(0)+"-"+str(dist_param)+"-"+grouping_param+"-"+details_param+"-"+subset_param+"-"+type_param+"-"+pred_param+"-"+str(beta_param)+"-"+drug_name+".txt"
-        
-                                                    TASKS.append(TASK.copy())
-            
-                                                  #  scoreDrug(TASK)
-
-    for TASK in TASKS:
-        print(TASK)
-    if WORKERS > 1:                               
-        pool = Pool(processes=WORKERS)   
-        for r in pool.imap(scoreDrug, TASKS):
-            print(r)
-    else:
-        for T in TASKS:
-            scoreDrug(T)
-
diff --git a/other/visR/backup/show-dates.py b/other/visR/backup/show-dates.py
deleted file mode 100644
index 5368aee..0000000
--- a/other/visR/backup/show-dates.py
+++ /dev/null
@@ -1,261 +0,0 @@
-import sys
-import os
-import copy
-from ete2 import Tree
-from ete2 import PhyloTree
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from soft.utils.camber_params_utils import *
-from ressoft.utils.file_utils import ensure_dir
-from soft.utils.camber_utils import *
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-from ressoft.modelling.model_logic import *
-from ressoft.modelling.habib import *
-from ressoft.utils.pvalue_utlis import hyperTestPvalue
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-
-
-
-nstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-nstyle["size"] = 10
-nstyle["fgcolor"] = "black"
-
-resstyle = NodeStyle()
-#resstyle["shape"] = "sphere"
-resstyle["size"] = 20
-resstyle["fgcolor"] = "red"
-
-suscstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-suscstyle["size"] = 20
-suscstyle["fgcolor"] = "green"
-
-interstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-interstyle["size"] = 20
-interstyle["fgcolor"] = "yellow"
-
-
-def loadDrugsATC(input_fh):
-    #drugs_list = []
-    drugs_map = {}
-    for line in input_fh.readlines():
-        if not line:
-            continue
-        line = line.strip()
-        tokens = line.split()
-        if len(tokens) == 0:
-            continue
-        drug_name = tokens[0]
-        atc_name = tokens[1]
-        if atc_name == "x":
-            continue
-        if not drug_name in drugs_map:
-            drugs_map[drug_name] = atc_name
-    drugs_list = sorted(drugs_map, key=lambda dn:drugs_map[dn])
-    return drugs_list, drugs_map
-    
-def loadDrugsFromData(input_fh):
-    drugs_list = []
-    
-    for line in input_fh.readlines():
-        if not line:
-            continue
-        line = line.strip()
-        tokens = line.split()
-        if len(tokens) > 0:
-            drug_name = tokens[0]
-            strain_id = tokens[1]
-            res_info = tokens[2]
-            cite = tokens[3]
-            if not drug_name in drugs_list:
-                drugs_list.append(drug_name)
-    
-    return drugs_list
-
-def loadResProfiles(input_fh):
-    res_profiles = {}
-    
-    for line in input_fh.readlines():
-        if not line:
-            continue
-        line = line.strip()
-        line = line.split("#")[0]
-        tokens = line.split()
-        if not len(tokens) in [3,4]:
-            continue
-        drug_name = tokens[0]
-        
-        res_profiles[drug_name] = {}
-        res_profiles[drug_name]["R"] = set([])
-        res_profiles[drug_name]["S"] = set([])
-        res_profiles[drug_name]["I"] = set([])
-        
-        if len(tokens) == 3:
-            strains_res_tokens = tokens[1].split(";")
-            strains_susc_tokens = tokens[2].split(";")
-            
-            for strains_res_token in strains_res_tokens:
-                strain_id = strains_res_token.strip("*")
-                if len(strain_id) > 0:
-                    res_profiles[drug_name]["R"].add(strain_id)
-            for strains_susc_token in strains_susc_tokens:
-                strain_id = strains_susc_token.strip("*")
-                if len(strain_id) > 0:
-                    res_profiles[drug_name]["S"].add(strain_id)
-        elif len(tokens) == 4:
-            strains_res_tokens = tokens[1].split(";")
-            strains_susc_tokens = tokens[2].split(";")
-            strains_int_tokens = tokens[3].split(";")
-            
-            for strains_res_token in strains_res_tokens:
-                strain_id = strains_res_token.strip("*")
-                if len(strain_id) > 0:
-                    res_profiles[drug_name]["R"].add(strain_id)
-            for strains_susc_token in strains_susc_tokens:
-                strain_id = strains_susc_token.strip("*")
-                if len(strain_id) > 0:
-                    res_profiles[drug_name]["S"].add(strain_id)
-            for strains_int_token in strains_int_tokens:
-                strain_id = strains_int_token.strip("*")
-                if len(strain_id) > 0:
-                    res_profiles[drug_name]["I"].add(strain_id)            
-    return res_profiles
-
-def loadResData(input_fh):
-    res_data_map = {}
-    
-    for line in input_fh.readlines():
-        if not line:
-            continue
-        tokens = line.strip().split("\t")
-        
-        if len(tokens) == 4:
-            try:
-                drug_name = tokens[0]
-                if len(drug_name) > 0 and drug_name[0] == "#":
-                    continue
-                
-                strain_id = tokens[1].replace("/", "")
-                res_info = tokens[2]
-                cite = tokens[3]
-                if not strain_id in res_data_map:
-                    res_data_map[strain_id] = {}
-                if not drug_name in res_data_map[strain_id]:
-                    res_data_map[strain_id][drug_name] = set([])
-                res_data_map[strain_id][drug_name].add((res_info, cite))
-            except:
-                print("ERROR", line)
-        elif len(tokens) == 5:
-            
-            try:
-                drug_name = tokens[0]
-                if len(drug_name) > 0 and drug_name[0] == "#":
-                    continue
-                
-                strain_id = tokens[1].replace("/", "")
-                res_info = tokens[2] + ":" + tokens[3]
-                cite = tokens[4]
-                if not strain_id in res_data_map:
-                    res_data_map[strain_id] = {}
-                if not drug_name in res_data_map[strain_id]:
-                    res_data_map[strain_id][drug_name] = set([])
-                res_data_map[strain_id][drug_name].add((res_info, cite))
-            except:
-                print("ERROR", line)   
-    return res_data_map
-
-def translateDataIntoResProfiles(res_data):
-    res_profiles = {}
-    for strain_id in res_data:
-        for drug_name in res_data[strain_id]:
-            if drug_name != "Penicillin1":
-                continue
-            res_count = 0 
-            susc_count = 0
-            int_count = 0 
-            unk_count = 0
-                
-            if not drug_name in res_profiles:
-                res_profiles[drug_name] = {}
-                res_profiles[drug_name]["R"] = set([])
-                res_profiles[drug_name]["S"] = set([])
-                res_profiles[drug_name]["I"] = set([])            
-            for (drug_res_info, cite_info) in res_data[strain_id][drug_name]:
-                tokens = drug_res_info.split(":")
-                
-                if tokens[0] == "R":
-                    res_count += 1 
-                elif tokens[0] == "S":
-                    susc_count += 1
-                elif tokens[0] == "I":
-                    int_count += 1
-                elif tokens[0] == "U":
-                    unk_count += 1
-            if res_count > 0 and susc_count == 0:
-                res_profiles[drug_name]["R"].add(strain_id)
-            elif res_count == 0 and susc_count > 0:
-                res_profiles[drug_name]["S"].add(strain_id)
-            elif res_count > 0 and susc_count > 0:
-                pass
-            elif int_count >0:
-                res_profiles[drug_name]["I"].add(strain_id)
-            elif unk_count > 0:
-                pass
-            else:
-                pass
-                                  
-    return res_profiles
-
-if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    dataset = "em59"
-    dataset_dir = os.path.abspath("../camber-pred/datasets/"+dataset)+"/"
-
-    input_fh = open(dataset_dir + "strain_profiles_ord.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
-    print(strains.strain_ids)
-
-    #res_profiles = translateDataIntoResProfiles(res_data)
-    
-  #  drug_name = "Cefotaxime"
-  
-    input_fh = open(dataset_dir + 'phylo_tree.txt')
-    tree = readPhyloTree(input_fh, strains)
-    input_fh.close()
-    
-    strain_dates_map = {}
-    
-    input_fh = open(dataset_dir + 'res_dates.txt')
-    for line in input_fh.readlines():
-        tokens = line.split()
-        strain_id = tokens[0]
-        date = tokens[1]
-        strain_dates_map[strain_id] = date
-    input_fh.close()
-    
-    print(strain_dates_map)
-   
-    output_fh = open(dataset_dir + 'phylo_tree_dates.txt', "w")
-    tree_dates = tree.root.toString(lengths=False, strains=strains, is_root=True, strains_map=strain_dates_map)
-    output_fh.write(tree_dates + "\n")
-    output_fh.close()
-   
\ No newline at end of file
diff --git a/other/visR/backup/show-mutations.py b/other/visR/backup/show-mutations.py
deleted file mode 100644
index 889fba0..0000000
--- a/other/visR/backup/show-mutations.py
+++ /dev/null
@@ -1,259 +0,0 @@
-import sys
-import os
-import copy
-import random
-from multiprocessing import Pool
-from ete2 import Tree
-from ete2 import PhyloTree
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from ete2 import faces, layouts
-
-sys.path.append("../../")
-
-from soft.utils.camber_params_utils import *
-from ressoft.utils.file_utils import ensure_dir
-from soft.utils.camber_utils import *
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-from ressoft.modelling.model_logic import *
-from ressoft.modelling.habib import *
-from ressoft.utils.pvalue_utlis import hyperTestPvalue
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-
-nstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-nstyle["size"] = 10
-nstyle["fgcolor"] = "black"
-
-resstyle = NodeStyle()
-#resstyle["shape"] = "sphere"
-resstyle["size"] = 20
-resstyle["fgcolor"] = "red"
-
-suscstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-suscstyle["size"] = 20
-suscstyle["fgcolor"] = "green"
-
-dupFace = faces.ImgFace("./Xtr.png")
-
-
-
-#suscstyle = NodeStyle()
-#suscstyle["shape"] = "sphere"
-#suscstyle["size"] = 20
-#suscstyle["fgcolor"] = "green"
-#suscstyle["hz_line_type"] = 1
-#suscstyle["hz_line_color"] = "#cccccc"
-
-ts = TreeStyle()
-ts.show_leaf_name = True
-
-def allRanks(parameters):
-    dataset = parameters["D"] 
-    details = parameters["DETAILS"]
-    subset = parameters["SUBSET"]
-    hide = int(parameters["HIDE"]) 
-    theta = parameters["THETA"]
-    beta = int(parameters["BETA"])  
-    pred = parameters["PRED"]
-    dist = int(parameters["DIST"])
-    exp_prefix = parameters["EXP_PREFIX"]
-    grouping_type = parameters["GROUPING"] 
-    supp_type = parameters["SUPP_TYPE"]
-    rt = parameters["RT_PARAM"] 
-    m_type = parameters["TYPE"] 
-    type_param = parameters["TYPE"] 
-    
-    dataset_dir = os.path.abspath("../camber-pred/datasets/"+dataset)+"/"
-
-    ensure_dir(dataset_dir + "/det/")
-    ensure_dir(dataset_dir + "/ranks/")
-    ensure_dir(dataset_dir + "/det_trees/")
-    
-    input_fh = open(dataset_dir + "strains-all.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    input_fh = open(dataset_dir + 'phylo_tree.txt')
-    tree = readPhyloTree(input_fh, strains)
-    input_fh.close()
-    
-    input_fh = open(dataset_dir + "res_profiles_ret.txt")
-    res_profiles = readResistanceProfiles(input_fh, strains)
-    input_fh.close()
-    
-   # sptree = PhyloTree(species_tree_nw)
-    #recon_tree, events = genetree.reconcile(sptree)
-    #recon_tree.link_to_alignment(alg)
-    
-    # Visualize the reconciled tree
-    #recon_tree.show()
-    #recon_tree.render("phylotree.png", w=2000)
-
-    print("here")
-
-    gene_names = set([])
-    for drug_res_profile in res_profiles:
-        drug_name = drug_res_profile.drug_name
-        print(drug_name)
-        if drug_name != "Isoniazid":
-            continue
-        
-        tree.setObservedResProfile(drug_res_profile.full_profile)
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-    
-        newtree = removeUnResLeaves(tree)    
-        
-        tree_txt = newtree.root.toString(lengths = False, is_root=True, strains=strains)
-        
-        genetree = PhyloTree(tree_txt + ";")
-        
-        for node in genetree.traverse():
-            node.add_face(dupFace, 1)
-            node.add_face(dupFace, 2)
-            node.add_face(dupFace, 3)
-            #faces.add_face_to_node(dupFace, node, 0)
-            node.set_style(nstyle)
-
-        for strain_index in drug_res_profile.res_strains_ids:
-            strain_id = strains.getStrain(strain_index)
-            for n in genetree.get_leaves_by_name(strain_id):
-                n.set_style(resstyle)
-        
-        for strain_index in drug_res_profile.sc_strains_ids:
-            strain_id = strains.getStrain(strain_index)
-            for n in genetree.get_leaves_by_name(strain_id):
-                n.set_style(suscstyle)
-    
-        #genetree.show(tree_style = ts)
-                
-        input_res_fn = dataset_dir +"/det/"+str(exp_prefix)+"-"+str(hide)+"-"+str(dist)+"-"+grouping_type+"-"+details+"-"+subset+"-"+type_param+"-"+pred+"-"+str(beta)+"-"+str(theta)+"-0.0-P/"+drug_name+".txt"
-        if not os.path.exists(input_res_fn) or os.path.getsize(input_res_fn) < 100:
-            print("NOT EXIST: ", input_res_fn)
-            continue
-        input_res_fh = open(input_res_fn)
-        print("www")
-        
-        ret = readFeaturesOne(drug_name, strains, input_res_fh)
-        if ret == None:
-         #   print("None RETURNED: ", input_res_fn)
-            continue
-        hidden_strains, gene_profiles, target_genes, drug_res_genes, drug_res_rel = ret
-        
-        alignments = {}
-
-        for leaf_id in newtree.leaf_ids:
-            strain_id = strains.getStrain(leaf_id)
-            alignments[strain_id] = ""
-        
-        gene_profiles_sorted = sorted(gene_profiles, key=lambda gp:-gp.supports_map[supp_type])
-        for i in range(0, min(10, len(gene_profiles_sorted)), 1):
-            gene_profile = gene_profiles_sorted[i]
-            gp_score = gene_profile.supports_map[supp_type]
-            
-            print("XXXXX", drug_name, gene_profile.gene_name, gene_profile.gene_id)
-            
-            for strain_index in newtree.leaf_ids:
-                strain_id = strains.getStrain(strain_index)
-                alignments[strain_id] += gene_profile.full_profile[strain_index]
-        
-#        
-        fasta_txt = ""
-        for strain_id in alignments:
-            fasta_txt += ">" + strain_id + "\n" + alignments[strain_id] + "\n"
-#    
-        
-        genetree.link_to_alignment(alignment=fasta_txt, alg_format="fasta")
-        genetree.render(dataset_dir + "/det_trees/"+str(exp_prefix)+"-"+str(hide)+"-"+str(dist)+"-"+grouping_type+"-"+details+"-"+subset+"-"+type_param+"-"+pred+"-"+str(beta)+"-"+str(theta)+"-0.0-P-"+drug_name+ ".pdf")
-        genetree.show()
-    return None
-
-
-
-if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    if "DATASET" in parameters and not parameters["D"] in ["mtb","sta"]:
-        dataset = parameters["D"]
-    else:
-        dataset = "spe"
-    dataset = "mtb79"
-        
-    if "W" in parameters:
-        WORKERS = int(parameters["W"])
-    else:
-        WORKERS = 1
-
-    dataset_dir = os.path.abspath("../camber-pred/datasets/"+dataset)+"/"
-    
-    ensure_dir(dataset_dir +"/trees/")
-
-    details_param = "S"
-    hide_param = 0
-    dist_params = ["0"]
-    exp_prefix = "FINAL5"
-    grouping_params = ["G"]
-    subset_param = "N"
-    pred_params = ["B"]
-    theta_params = ["0.5"]
-    type_params = ["S"]
-    rt_params = ["T"] 
-
-    TASKS = []
-    TASK = {}
-    for rt_param in rt_params:
-        for grouping_param in grouping_params:            
-            for theta_param in theta_params:
-                for dist_param in dist_params:
-                    for type_param in type_params:
-                        if type_param == "G" and dist_param == "20":
-                            continue
-                        for pred_param in pred_params:
-                            for beta_param in range(-1, 0, 1):
-                                for supp_type_param in ["tscore"]:
-                                    if supp_type_param != "tscore" and theta_param != "0.5":
-                                        continue  
-                                    TASK["D"] = dataset
-                                    TASK["PHASE"] = str(0)
-                                    TASK["DETAILS"] = str(details_param)
-                                    TASK["HIDE"] = str(hide_param)
-                                    TASK["DIST"] = str(dist_param)
-                                    TASK["GROUPING"] = str(grouping_param)
-                                    TASK["EXP_PREFIX"] = exp_prefix 
-                                    TASK["TYPE"] = type_param
-                                    TASK["PRED"] = pred_param
-                                    TASK["BETA"] = beta_param
-                                    TASK["THETA"] = theta_param  
-                                    TASK["SUPP_TYPE"] = supp_type_param
-                                    TASK["SUBSET"] = subset_param
-                                    TASK["RT_PARAM"] = rt_param
-                                    
-                                    TASKS.append(TASK.copy())
-                            
-    for TASK in TASKS:
-        print(TASK)
-        
-    if WORKERS > 1:                             
-        pool = Pool(processes=WORKERS)   
-        for r in pool.imap(allRanks, TASKS):
-            print(r)
-    else:
-        for T in TASKS:
-            allRanks(T)
-        
-    print("END")
-    
-    
-    
\ No newline at end of file
diff --git a/other/visR/backup/show-tree-mutations.py b/other/visR/backup/show-tree-mutations.py
deleted file mode 100644
index fdcd6a4..0000000
--- a/other/visR/backup/show-tree-mutations.py
+++ /dev/null
@@ -1,209 +0,0 @@
-import sys
-import os
-import copy
-import random
-from multiprocessing import Pool
-from ete2 import Tree
-from ete2 import PhyloTree, TreeNode, TreeFace
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from ete2 import faces, layouts
-
-sys.path.append("../../")
-
-from drsoft.utils.gwadrib_params_utils import *
-from drsoft.utils.gwadrib_res_io_utils import *
-from drsoft.utils.gwadrib_strains_io_utils import readStrains
-from drsoft.utils.gwadrib_utils import ensure_dir
-from drsoft.utils.gwadrib_tree_io_utils import readPhyloTrees
-from drsoft.modelling.model_logic import *
-
-mut_faces_map = {}
-img_path = "./"
-
-for i in range(1, 11, 1):
-    mut_fn = os.path.abspath("../../resources/muts/m"+str(i)+".png")
-    
-    if not os.path.exists(mut_fn):
-        print("not exists: ", mut_fn)
-    mut_faces_map[i] = faces.ImgFace(mut_fn)
-    
-print(mut_faces_map)
-
-resstyle = NodeStyle()
-resstyle["fgcolor"] = "#ffbeb1"
-resstyle["bgcolor"] = "#ffbeb1"
-
-suscstyle = NodeStyle()
-suscstyle["fgcolor"] = "lightgreen"
-suscstyle["bgcolor"] = "lightgreen"
-
-interstyle = NodeStyle()
-interstyle["fgcolor"] = "yellow"
-interstyle["bgcolor"] = "yellow"
-
-#def mylayout(node):
-#    if node.is_leaf():
-#        descFace = faces.TextFace(node.name, fsize=10)
-#        descFace.margin_top = 10
-#        descFace.margin_bottom = 10
-#        descFace.border.margin = 1
-#        faces.add_face_to_node(descFace, node, column=0, aligned=True)
-
-def showTreeMutations(params):
-    
-    drug_name = params["DRUG_NAME"]
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    
-    input_fh = open(input_dir + "strain_profiles_ord.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    input_fh = open(input_dir + "res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    ensure_dir(input_dir + "/res_muts/")
-    
-    input_fh = open(input_dir + 'phylo_tree.txt')
-    trees = readPhyloTrees(input_fh, strains)
-    input_fh.close()
-    
-    tree = trees[0]
-    
-    res_profile = None
-    for res_profile_tmp in res_profiles_list:
-        if res_profile_tmp.drug_name == drug_name:
-            res_profile = res_profile_tmp
-    
-    full_profile = res_profile.full_profile
-    tree.setObservedResProfile(full_profile)
-    tree.calcInnerNodesBU()
-    calcSubleavesResCount(tree)
-    calcSubnodesCount(tree)
-    
-    newtree = removeUnResLeaves(tree)
-    newtree.calcInnerNodesBU()
-    calcSubleavesResCount(newtree)
-    calcSubnodesCount(newtree)
-    calcDetParsResModel(newtree)
-   
-    phylotree = Tree(newtree.toString(strains=strains) + ";")
-    
-    mut_id = 0
-    input_fn = results_dir + "/trees_data/" + drug_name + ".txt"
-    input_fh = open(input_fn)
-    lines = input_fh.readlines()
-    input_fh.close()
-
-    line0 = lines[0]
-    tokens = line0.strip().split()
-    
-    if len(tokens) < 1: exit()
-    for mut_token in tokens:
-        strain_id_tokens = mut_token.split(";")
-        strain_ids = []
-        for strain_index_str in strain_id_tokens:
-            strain_ids.append(strains.getStrain(int(strain_index_str)))
-        nodes_list = []
-        for strain_id in strain_ids:
-            nodes_list.append(phylotree.get_leaves_by_name(strain_id)[0])
-        node0 = nodes_list[0]
-        node = node0.get_common_ancestor(node0)
-        for node1 in nodes_list[1:]:
-            node = node.get_common_ancestor(node1)
-        if phylotree.get_tree_root() == node:
-            nodes_list = phylotree.get_leaves_by_name(strain_ids[0])
-            for node in nodes_list:
-               # faces.add_face_to_node(mut_faces_map[mut_index], node, column=2)
-             #   node.add_face(mut_faces_map[mut_id], 0)
-                node.set_style(resstyle)
-                #node.add_face(mut_faces_map[mut_id], 0)
-        else:
-          #  faces.add_face_to_node(mut_faces_map[mut_index], node, column=2)
-            node.set_style(resstyle)  
-            #node.add_face(mut_faces_map[mut_id], 0)
-    
-    
-    for line in lines[1:]:
-        mut_id += 1
-        if mut_id > 10:
-            break
-        tokens = line.strip().split()
-        if len(tokens) < 1: continue
-        for mut_token in tokens:
-            strain_id_tokens = mut_token.split(";")
-            strain_ids = []
-            for strain_index_str in strain_id_tokens:
-                strain_ids.append(strains.getStrain(int(strain_index_str)))
-            nodes_list = []
-            for strain_id in strain_ids:
-                nodes_list.append(phylotree.get_leaves_by_name(strain_id)[0])
-            node0 = nodes_list[0]
-            node = node0.get_common_ancestor(node0)
-            for node1 in nodes_list[1:]:
-                node = node.get_common_ancestor(node1)
-            if phylotree.get_tree_root() == node:
-                nodes_list = phylotree.get_leaves_by_name(strain_ids[0])
-                for node in nodes_list:
-                   # faces.add_face_to_node(mut_faces_map[mut_index], node, column=2)
-                    node.add_face(mut_faces_map[mut_id], 0)
-                    #node.add_face(mut_faces_map[mut_id], 0)
-            else:
-              #  faces.add_face_to_node(mut_faces_map[mut_index], node, column=2)
-#                if getattr(node, "_temp_faces", None): 
-#                    print("xxx")
-#                    getattr(node._temp_faces, 0).add_face(mut_faces_map[mut_id], 0)
-
-                node.add_face(mut_faces_map[mut_id], 0)
-
-        
-    ts = TreeStyle()
-   # ts.show_leaf_name = False
-   # ts.layout_fn = mylayout
-   # ts.mode = "c"
-    phylotree.render(results_dir +"/trees_muts_pdf/"+drug_name + ".pdf", tree_style=ts)
-    #phylotree.show(tree_style=ts)
-    
-    return None
-
-    
-if __name__ == '__main__':
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-        
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-        
-    ensure_dir(results_dir +"/trees_muts_pdf/")
-    
-    input_fh = open(input_dir + "res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
-    input_fh.close()
-    
-    WORKERS = 1#int(parameters["W"])
-
-    TASKS = []
-    
-    TASK = {}
-    count = 0
-
-    for drug_name in drug_names:
-        TASK["DRUG_NAME"] = drug_name
-        TASKS.append(TASK.copy())
-                                                  #  scoreDrug(TASK)
-    for TASK in TASKS:
-        print(TASK)
-    if WORKERS > 1:                               
-        pool = Pool(processes=WORKERS)   
-        for r in pool.imap(showTreeMutations, TASKS):
-            print(r)
-    else:
-        for T in TASKS:
-            showTreeMutations(T)
-
diff --git a/other/visR/backup/show-tree-mutations_new.py b/other/visR/backup/show-tree-mutations_new.py
deleted file mode 100644
index a998229..0000000
--- a/other/visR/backup/show-tree-mutations_new.py
+++ /dev/null
@@ -1,206 +0,0 @@
-import sys
-import os
-import copy
-import random
-from multiprocessing import Pool
-from ete2 import Tree
-from ete2 import PhyloTree
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from ete2 import faces, layouts
-
-sys.path.append("../../")
-
-
-mut_faces_map = {}
-
-for i in range(1, 11, 1):
-    mut_fn = "../../resources/muts/m"+str(i)+".png"
-    if not os.path.exists(mut_fn):
-        print("not exists: ", mut_fn)
-    mut_faces_map[i] = faces.ImgFace(mut_fn)
-
-print(mut_faces_map)
-
-resstyle = NodeStyle()
-resstyle["fgcolor"] = "#ffbeb1"
-resstyle["bgcolor"] = "#ffbeb1"
-
-suscstyle = NodeStyle()
-suscstyle["fgcolor"] = "lightgreen"
-suscstyle["bgcolor"] = "lightgreen"
-
-interstyle = NodeStyle()
-interstyle["fgcolor"] = "yellow"
-interstyle["bgcolor"] = "yellow"
-
-nameFace = faces.AttrFace("name", fsize=20, fgcolor="#009000")
-
-img_path = "./"
-# Create faces based on external images
-humanFace = faces.ImgFace(img_path+"human.png")
-mouseFace = faces.ImgFace(img_path+"mouse.png")
-dogFace = faces.ImgFace(img_path+"dog.png")
-chimpFace = faces.ImgFace(img_path+"chimp.png")
-fishFace = faces.ImgFace(img_path+"fish.png")
-flyFace = faces.ImgFace(img_path+"fly.png")
-
-
-def mylayout(node):
-    # If node is a leaf, add the nodes name and a its scientific
-    # name
-    if node.is_leaf():
-        # Add an static face that handles the node name
-        faces.add_face_to_node(nameFace, node, column=0)
-        # We can also create faces on the fly
-        longNameFace = faces.TextFace(node.name)
-        faces.add_face_to_node(longNameFace, node, column=0)
-
-        # text faces support multiline. We add a text face
-        # with the whole description of each leaf.
-        descFace = faces.TextFace(node.name, fsize=10)
-        descFace.margin_top = 10
-        descFace.margin_bottom = 10
-        descFace.border.margin = 1
-
-        # Note that this faces is added in "aligned" mode
-        faces.add_face_to_node(descFace, node, column=0, aligned=True)
-
-        # Sets the style of leaf nodes
-        node.img_style["size"] = 12
-        node.img_style["shape"] = "circle"
-    #If node is an internal node
-    else:
-        # Sets the style of internal nodes
-        pass
-#        node.img_style["size"] = 6
-#        node.img_style["shape"] = "circle"
-#        node.img_style["fgcolor"] = "#000000"
-
-    # If an internal node contains more than 4 leaves, add the
-    # images of the represented species sorted in columns of 2
-    # images max.
-    if len(node)>=4:
-        col = 0
-        for i, name in enumerate(set(node.get_leaf_names())):
-            if i>0 and i%2 == 0:
-                col += 1
-            # Add the corresponding face to the node
-            if name.startswith("Dme"):
-                faces.add_face_to_node(flyFace, node, column=col)
-            elif name.startswith("Dre"):
-                faces.add_face_to_node(fishFace, node, column=col)
-            elif name.startswith("Mms"):
-                faces.add_face_to_node(mouseFace, node, column=col)
-            elif name.startswith("Ptr"):
-                faces.add_face_to_node(chimpFace, node, column=col)
-            elif name.startswith("Hsa"):
-                faces.add_face_to_node(humanFace, node, column=col)
-            elif name.startswith("Cfa"):
-                faces.add_face_to_node(dogFace, node, column=col)
-
-            # Modifies this node's style
-            node.img_style["size"] = 16
-            node.img_style["shape"] = "sphere"
-            node.img_style["fgcolor"] = "#AA0000"
-
-            
-def showTreeMutations(parameters):
-
-    nw = """
-    (((Dre:0.008339,Dme:0.300613)1.000000:0.596401,
-    (Cfa:0.640858,Hsa:0.753230)1.000000:0.182035)1.000000:0.106234,
-    ((Dre:0.271621,Cfa:0.046042)1.000000:0.953250,
-    (Hsa:0.061813,Mms:0.110769)1.000000:0.204419)1.000000:0.973467);
-    """
-    t = Tree(nw)
-
-    ts = TreeStyle()
-    ts.layout_fn = mylayout
-    t.render("img_faces.png", w=600, tree_style = ts)
-    t.show(tree_style = ts)
-    
-    return None
-#    
-#    muts = {}
-#    input_fn = dataset_dir +"/tree_mapping/"+drug_name+"_muts"+".txt"
-#    input_fh = open(input_fn)
-#    for line in input_fh.readlines():
-#        tokens = line.strip().split()
-#        if len(tokens) < 2:
-#            continue
-#        mut_id = tokens[0]
-#        if not mut_id in muts:
-#            muts[mut_id] = set([])
-#        for i in range(1, len(tokens), 1):
-#            muts[mut_id].add(tokens[i])
-#        
-#    input_fh.close()
-
-#    try:
-#        mut_index = 1
-#        
-#        for mut_id in muts:
-#            
-#            for leaf_tokens in muts[mut_id]:
-#                node = phylotree.get_common_ancestor(leaf_tokens.split(";"))
-#                if phylotree.get_tree_root() == node:
-#                    nodes_list = phylotree.get_leaves_by_name(leaf_tokens.split(";")[0])
-#                    for node in nodes_list:
-#                        print("here", node)
-#                       # faces.add_face_to_node(mut_faces_map[mut_index], node, column=2)
-#                        node.add_face(mut_faces_map[mut_index], 1)
-#
-#                else:
-#                  #  faces.add_face_to_node(mut_faces_map[mut_index], node, column=2)
-#                    print("www", node)
-#                    node.add_face(mut_faces_map[mut_index], 1)
-#           #     faces.add_face_to_node(mut_faces_map[mut_index], phylotree.get_tree_root(), column=1)
-#                #phylotree.add_face(mut_faces_map[mut_index], phylotree.get_tree_root(), 1)
-#                   
-#            mut_index += 1
-#
-#      #  phylotree.get_tree_root().set_style(resstyle)   
-#        
-#    except Exception as e:
-#        print("exception ! ", e)
-#        print(drug_name)
-#
-#    phylotree.get_tree_root().add_face(faces.ImgFace(mut_fn), 0)
-#    phylotree.get_tree_root().set_style(suscstyle)
-#
-#    ress = set([])
-#    input_fn = dataset_dir +"/tree_mapping/"+drug_name+"_res"+".txt"
-#    input_fh = open(input_fn)
-#    for line in input_fh.readlines():
-#        tokens = line.strip().split()
-#        if len(tokens) < 2:
-#            continue
-#        for i in range(0, len(tokens), 1):
-#            ress.add(tokens[i])
-#    input_fh.close()
-#
-#    try:
-#        for leaf_tokens in ress:
-#            node = phylotree.get_common_ancestor(leaf_tokens.split(";"))
-#            if phylotree.get_tree_root() == node:
-#                nodes_list = phylotree.get_leaves_by_name(leaf_tokens.split(";")[0])
-#                for node in nodes_list:
-#                    node.set_style(resstyle)
-#            else:
-#                node.set_style(resstyle)
-#    
-#
-#    except Exception as e:
-#        print(e)
-#        print(drug_name)
-#        
-
-
-    
-
-    
-if __name__ == '__main__':
-    
-                                                  #  scoreDrug(TASK)
-    showTreeMutations({})
-
diff --git a/other/visR/backup/test.svg b/other/visR/backup/test.svg
deleted file mode 100644
index 4bdfd1a..0000000
--- a/other/visR/backup/test.svg
+++ /dev/null
@@ -1,2666 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="320.322mm" height="198.967mm"
- viewBox="0 0 908.956 564"
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  version="1.2" baseProfile="tiny">
-<title>Qt Svg Document</title>
-<desc>Generated with Qt</desc>
-<defs>
-<radialGradient gradientUnits="userSpaceOnUse" cx="8" cy="8" r="8" fx="5" fy="5" xml:id="gradient1">
-    <stop offset="0.05" stop-color="#ffffff" stop-opacity="1" />
-    <stop offset="1" stop-color="#aa0000" stop-opacity="1" />
-</radialGradient>
-<radialGradient gradientUnits="userSpaceOnUse" cx="8" cy="8" r="8" fx="5" fy="5" xml:id="gradient2">
-    <stop offset="0.05" stop-color="#ffffff" stop-opacity="1" />
-    <stop offset="1" stop-color="#aa0000" stop-opacity="1" />
-</radialGradient>
-<radialGradient gradientUnits="userSpaceOnUse" cx="8" cy="8" r="8" fx="5" fy="5" xml:id="gradient3">
-    <stop offset="0.05" stop-color="#ffffff" stop-opacity="1" />
-    <stop offset="1" stop-color="#aa0000" stop-opacity="1" />
-</radialGradient>
-</defs>
-<g fill="none" stroke="black" stroke-width="1" fill-rule="evenodd" stroke-linecap="square" stroke-linejoin="bevel" >
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#ffffff" fill-opacity="1" stroke="none" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M0,0 L908.956,0 L908.956,564 L0,564 L0,0"/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#0000ff" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d=""/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="none" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M0,0 L908.956,0 L908.956,564 L0,564 L0,0"/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="none" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M0,0 L906.956,0 L906.956,512 L0,512 L0,0"/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,513)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,513)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,182.956,249)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="url(#gradient1)" stroke="#aa0000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,182.956,249)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M16,8 C16,12.4183 12.4183,16 8,16 C3.58172,16 0,12.4183 0,8 C0,3.58172 3.58172,0 8,0 C12.4183,0 16,3.58172 16,8 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,182.956,249)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,198.956,217)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,198.956,217)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,198.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,198.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,198.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,198.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,198.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,238.956,217)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,238.956,217)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,238.956,217)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,238.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,238.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,238.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,278.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,278.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,278.956,237)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,182.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,182.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,182.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,182.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="317.956,128 317.956,384 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,256 181.956,256 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,338.286,121)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="url(#gradient2)" stroke="#aa0000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,338.286,121)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M16,8 C16,12.4183 12.4183,16 8,16 C3.58172,16 0,12.4183 0,8 C0,3.58172 3.58172,0 8,0 C12.4183,0 16,3.58172 16,8 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,338.286,121)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,354.286,89)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,354.286,89)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,354.286,109)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,354.286,109)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,354.286,109)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,354.286,109)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,354.286,109)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,394.286,89)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,394.286,89)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,394.286,89)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,394.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,394.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,394.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,338.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,338.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,338.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,338.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="115.33,64 115.33,192 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,128 19.3299,128 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,542.804,63.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,542.804,63.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,542.804,63.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,542.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,542.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,542.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,542.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="111.519,32 111.519,96 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,64 108.519,64 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,547.321,27)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,547.321,27)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,547.321,27)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,1)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,33)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,49)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,49)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,559.321,49)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,547.321,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,547.321,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,547.321,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,547.321,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 1.51733,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,15)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,15)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,25)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,25)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,25)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="61.5173,32 333.152,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,1)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,600.502,91)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,600.502,91)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,600.502,91)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,65)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Dme</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,97)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Dme</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,113)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,113)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Dme</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,612.502,113)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,600.502,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,600.502,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,600.502,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,600.502,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 54.6982,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,79)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,79)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,89)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,89)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Dme</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,89)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="128.698,32 333.152,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,467.408,191.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,467.408,191.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,467.408,191.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,467.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,467.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,467.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,467.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="36.1223,32 36.1223,96 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,64 33.1223,64 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,587.016,155)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,587.016,155)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,587.016,155)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,129)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,161)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,177)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,177)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,599.016,177)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,587.016,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,587.016,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,587.016,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,587.016,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 116.608,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,143)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,143)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,153)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,153)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,153)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="172.608,32 408.548,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,607.462,219)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,607.462,219)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,607.462,219)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,193)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,225)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,241)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,241)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,619.462,241)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,607.462,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,607.462,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,607.462,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,607.462,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 137.054,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,207)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,207)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,217)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,217)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,217)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="198.054,32 408.548,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,496.083,377)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="url(#gradient3)" stroke="#aa0000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,496.083,377)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M16,8 C16,12.4183 12.4183,16 8,16 C3.58172,16 0,12.4183 0,8 C0,3.58172 3.58172,0 8,0 C12.4183,0 16,3.58172 16,8 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,496.083,377)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,512.083,345)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,512.083,345)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,512.083,365)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,512.083,365)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,512.083,365)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,512.083,365)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,512.083,365)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,552.083,345)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,552.083,345)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,552.083,345)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,552.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,552.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<image x="0" y="0" width="40" height="40" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAIUElEQVRYha2Xa2xcxRXHz5mZe+++7LW93k3szWNtsyEiJFESkyASCggUKoGoSluqtqCCUNVKRWrVqp9aIapKrcoXWrWoEtDmA6lKqQqKohBCQxseIQ9cJyHBdozjZ/y2d727d+9jnv2QKJSQxN6E+Ti65/70P+c/c86gMQZubI0ODVi2vbx1JSIuPYrdIBUAjr17MNm8PF7XUF9fv/QocoPUcmnh/X+/NTc3yzmvKfBGwbF4YnB43KtWay3ZklI9PTn+3LO/8t3K7du373zw602p9KVydncd96q+7 [...]
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,552.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,496.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,496.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,496.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,496.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="273.128,64 273.128,192 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,128 177.128,128 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,765.533,319.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,765.533,319.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,765.533,319.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,765.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,765.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,765.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,765.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="176.449,32 176.449,96 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,64 173.449,64 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,817.956,283)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,817.956,283)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,817.956,283)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,257)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,289)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,305)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,305)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,829.956,305)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,817.956,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,817.956,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,817.956,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,817.956,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 49.423,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,271)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,271)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,281)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,281)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Dre</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,281)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="109.423,32 110.423,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,776.91,347)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,776.91,347)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,776.91,347)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,321)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,353)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,369)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,369)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,788.91,369)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,776.91,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,776.91,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,776.91,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,776.91,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 8.3776,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,335)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,335)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,345)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,345)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Cfa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,345)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="64.3776,32 110.423,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,629.279,447.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,629.279,447.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,629.279,447.5)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,629.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,629.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,629.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,629.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="40.1952,32 40.1952,96 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,64 37.1952,64 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,643.526,411)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,643.526,411)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,643.526,411)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,385)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,417)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,433)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,433)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,655.526,433)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,643.526,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,643.526,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,643.526,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,643.526,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 11.2472,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,399)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,399)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,409)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,409)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Hsa</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,409)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="72.2472,32 246.677,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,652.434,475)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,652.434,475)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M12,6 C12,9.31371 9.31371,12 6,12 C2.68629,12 0,9.31371 0,6 C0,2.68629 2.68629,0 6,0 C9.31371,0 12,2.68629 12,6 "/>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,652.434,475)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#009000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,449)"
-font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
->
-<text fill="#009000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="27" font-family="Verdana" font-size="20" font-weight="400" font-style="normal" 
- >Mms</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,481)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Mms</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,497)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,497)"
-font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Arial" font-size="10" font-weight="400" font-style="normal" 
- >Mms</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,664.434,497)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,652.434,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,652.434,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,652.434,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,652.434,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="0,32 20.155,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,463)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,463)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,473)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,473)"
-font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="13" font-family="Verdana" font-size="10" font-weight="400" font-style="normal" 
- >Mms</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,878.956,473)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#808080" stroke-opacity="1" stroke-dasharray="1,2" stroke-dashoffset="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="non-scaling-stroke" points="94.155,32 246.677,32 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,1,257)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,129)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,65)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,33)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,545.804,97)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,434.286,193)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,161)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,470.408,225)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,318.956,385)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,321)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,289)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,768.533,353)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,592.083,449)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,417)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,632.279,481)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="none" points="0,5 50,5 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="none" points="0,0 0,10 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<polyline fill="none" vector-effect="none" points="50,0 50,10 " />
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,514)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,524)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,524)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-<text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="11" font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
- >0.27</text>
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,524)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-
-<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)"
-font-family="MS Shell Dlg 2" font-size="8.25" font-weight="400" font-style="normal" 
->
-</g>
-</g>
-</svg>
diff --git a/other/visR/backup/where-located.py b/other/visR/backup/where-located.py
deleted file mode 100644
index 42f4a2c..0000000
--- a/other/visR/backup/where-located.py
+++ /dev/null
@@ -1,96 +0,0 @@
-import sys
-import os
-import copy
-
-from multiprocessing import Pool
-
-sys.path.append("../../")
-from ressoft.utils.pvalue_utlis import hyperTestPvalue
-
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-
-def readParameters(param_tab):
-    parameters = {}
-    for param_el in param_tab:
-        tokens = param_el.split("=")
-        if len(tokens)==2:
-            key = tokens[0]
-            value = tokens[1]
-            parameters[key] = value
-        
-    return parameters
-
-
-parameters = readParameters(sys.argv)
-species = "sta_plas8"
-
-phase = 0
-input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-
-input_fh = open(input_dir + "strains-all.txt")
-strains = readStrains(input_fh)
-input_fh.close()
-
-def readCCPresence(cluster_fh, strains):
-    input_lines = cluster_fh.readlines()
-    cc_presence = {}
-    
-    if len(input_lines) == 0:
-        return None
-    else:
-        for line in input_lines:
-            tokens = line.split()
-            if tokens[3] in ["+", "-"]:
-                #print("XXX", tokens0)
-                strain_id = tokens[1]
-                cc_id = tokens[0]
-                genome_id = tokens[4]
-                gene_id = tokens[5]
-                if not cc_id in cc_presence:
-                    cc_presence[cc_id] = {}
-                if not strain_id in cc_presence[cc_id]:
-                    cc_presence[cc_id][strain_id] = {}
-                if not genome_id in cc_presence[cc_id][strain_id]:
-                    cc_presence[cc_id][strain_id][genome_id] = set([])
-                cc_presence[cc_id][strain_id][genome_id].add(gene_id)
-    return cc_presence
-            #return readClusters1(input_lines, strains)
-def readPlasmidMapping(input_fh):
-    plasmid_mapping = {}
-    for line in input_fh.readlines():
-        if not line:
-            continue
-        tokens = line.split()
-        if len(tokens) < 2:
-            continue
-        plasmid_id = tokens[0]
-        strain_id = tokens[1]
-        if not plasmid_id in plasmid_mapping:
-            plasmid_mapping[plasmid_id] = strain_id
-    return plasmid_mapping
-
-cluster_fh = open(input_dir + "conn_comp-det-"+str(phase)+".txt")
-cc_presence = readCCPresence(cluster_fh, strains)
-cluster_fh.close()
-
-   
-input_fh = open(input_dir + "plasmids.txt")
-plasmid_map = readPlasmidMapping(input_fh)
-input_fh.close()   
-
-for cc_id in cc_presence:
-    if cc_id in ["2400"]:
-        for strain_id in cc_presence[cc_id]:
-            for genome_id in cc_presence[cc_id][strain_id]:
-                if genome_id in plasmid_map:
-                    print("PLASMID", cc_id, strain_id, cc_presence[cc_id][strain_id][genome_id])
-                else:
-                    print("GENOME", cc_id, strain_id, cc_presence[cc_id][strain_id][genome_id])
-                    
-                    
diff --git a/other/visR/curves/.fuse_hidden000185b700000003 b/other/visR/curves/.fuse_hidden000185b700000003
deleted file mode 100644
index bcf89a4..0000000
--- a/other/visR/curves/.fuse_hidden000185b700000003
+++ /dev/null
@@ -1,116 +0,0 @@
-#install.packages(
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-
-args <- commandArgs(trailingOnly = TRUE)
-
-
-
-if (length(args) >=1) {
-	dataset = args[1]
-} else {
-	#dataset="sau461"
-	#dataset = "mtu173"
-	dataset = "broad_mtb"
-}
-
-if (length(args) >= 2) {
-	mut_type = args[2]
-} else {
-	mut_type = "P"
-}
-
-if (length(args) >= 3) {
-	subset = args[3]
-} else {
-	subset = "eq1"
-}
-
-if (length(args) >= 4) {
-	prefix = args[4]
-} else {
-	if (Sys.info()["sysname"] == "Linux") {
-		prefix = "/home/misias/gwadrib/"
-	} else {
-		prefix = "D:/Dropbox/Dropbox/gwadrib/"
-	}
-}
-
-inputdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/analysis/stats_", subset, "/", sep="")
-
-score_files = list.files(path = inputdir)
-
-print(score_files)
-
-score_areas = c()
-score_colors = c()
-
-outdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/analysis/figures/", sep="")
-dir.create(outdir, showWarnings = FALSE)
-#x11()
-output_fn = paste(outdir, "/pr_",dataset, "_", subset, ".pdf", sep="")
-pdf(output_fn, width=18,height=10)
-
-input_fn = paste(inputdir, "/",score_files[1], sep="")
-data = read.table(input_fn, header=FALSE, sep="\t")
-
-if (dataset == "broad_mtb") {
-	positives = 75
-	negatives = 870
-} else if (dataset == "mtu173") {
-	positives = 39
-	negatives = 1450
-} else if (ncol(data) > 4) {
-	positives = data[1,1] + data[1,4]
-	negatives = data[1,2] + data[1,3]
-} else {
-	positives = 0
-	negatives = 0
-}
-
-main_txt = paste("PR curves; positives: ", toString(positives), "; negatives: " , toString(negatives), sep="")
-
-plot(c(), xlab="tpr (recall) = TP/(TP+FN)", ylab="precision = TP/(TP+FP)", main=main_txt, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-for (score_file in score_files) {
-	score = score_file
-
-	if !(score %in% c()){
-		next
-	}
-
-	input_fn = paste(inputdir, "/",score_file, sep="")
-	data = read.table(input_fn, header=FALSE, sep="\t")
-
-	prec = c(data[1,2], data[,2])
-	recall = c(0.0, data[,3])
-	n = length(prec)
-
-
-	area = 0.0
-
-	for (i in 2:n) {
-		area = area + 0.5*(prec[i] + prec[i-1])*(recall[i]-recall[i-1])
-	}
-
-	color = rgb(runif(1),runif(1),runif(1)) 
-
-	score_desc = paste(score, " [AUC=" , round(area,2) , "]", sep="")
-	score_areas[[score_desc]] = area
-	score_colors[[score_desc]] = color
-
-	points(prec~recall, col=color, pch=18, lwd=1.5, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-}
-
-score_desc_sorted = names(sort(score_areas, decreasing = T))
-score_colors_sorted = c()
-
-for (score_desc in score_desc_sorted) {
-	score_colors_sorted = c(score_colors_sorted, score_colors[[score_desc]])		
-}
-
-legend("topright", fill=score_colors_sorted, legend = score_desc_sorted, ncol=4)
-
-dev.off()
-
diff --git a/other/visR/curves/pr_bars.R b/other/visR/curves/pr_bars.R
deleted file mode 100644
index 76ff9c4..0000000
--- a/other/visR/curves/pr_bars.R
+++ /dev/null
@@ -1,80 +0,0 @@
-#install.packages(
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-
-args <- commandArgs(trailingOnly = TRUE)
-
-if (length(args) >=1) {
-	dataset = args[1]
-} else {
-	#dataset="sau461"
-	#dataset = "mtu173"
-	dataset = "broad_mtb"
-}
-
-if (length(args) >= 2) {
-	mut_type = args[2]
-} else {
-	mut_type = "P"
-}
-
-if (length(args) >= 3) {
-	subset = args[3]
-} else {
-	subset = "sel3"
-}
-
-if (length(args) >= 4) {
-	prefix = args[4]
-} else {
-	if (Sys.info()["sysname"] == "Linux") {
-		prefix = "/home/misias/gwadrib/"
-	} else {
-		prefix = "D:/Dropbox/Dropbox/gwadrib/"
-	}
-}
-
-input_fn = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/", subset, ".txt", sep="")
-print(input_fn)
-#score_files = list.files(path = inputdir)
-#print(score_files)
-
-
-outdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/figures/", sep="")
-dir.create(outdir, showWarnings = FALSE)
-
-#input_fn = paste(inputdir, "/",score_files[1], sep="")
-data = read.table(input_fn, header=TRUE, sep="\t")
-
-if (dataset == "broad_mtb") {
-	if (subset == "sel3") {
-		positives = 75
-		negatives = 870
-	} else {
-		positives = 220
-		negatives = 725
-	}
-} else if (dataset == "mtu173") {
-	if (subset == "sel3") {
-		positives = 39
-		negatives = 1450
-	} else {
-		positives = 113
-		negatives = 1376	
-	}
-} else if (ncol(data) > 4) {
-	positives = data[1,1] + data[1,4]
-	negatives = data[1,2] + data[1,3]
-} else {
-	positives = 0
-	negatives = 0
-}
-
-scores_sel = c("mi_x0", "or_x0", "lh_x0", "r.fcctw2_x0", "ws_x0")
-
-output_fn = paste(outdir, "/pr_bars_",dataset, "_", subset, ".pdf", sep="")
-pdf(output_fn, width=18,height=10)
-boxplot(data[, scores_sel], par=2)
-#boxplot(data[,], par=2)
-dev.off()
diff --git a/other/visR/curves/pr_scores_paper.R b/other/visR/curves/pr_scores_paper.R
deleted file mode 100644
index a8380f2..0000000
--- a/other/visR/curves/pr_scores_paper.R
+++ /dev/null
@@ -1,151 +0,0 @@
-#install.packages(
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-
-args <- commandArgs(trailingOnly = TRUE)
-
-scoreFullName <- function(score) {
-	score_full = score
-	if (score == "mi") {
-		score_full = "mutual information";
-	} else if (score == "or") {
-		score_full = "odds ratio";
-	} else if (score == "lh") {
-		score_full = "hypergeometric score";
-	} else if (score == "r-fcctw2") {
-		score_full = "tree-generalized hypergeomtric score"
-	} else if (score == "ws"){
-		score_full = "weighted support"
-	} else if(score == "ws+lh+r-fcctw2+mi+or") {
-		score_full = "combined"
-	}
-	return(score_full);
-}
-
-if (length(args) >= 2) {
-	mut_type = args[2]
-} else {
-	mut_type = "P"
-}
-
-if (length(args) >= 3) {
-	subset = args[3]
-} else {
-	subset = "sel3"
-}
-
-if (length(args) >= 4) {
-	prefix = args[4]
-} else {
-	if (Sys.info()["sysname"] == "Linux") {
-		prefix = "/home/misias/gwadrib/"
-	} else {
-		prefix = "D:/Dropbox/Dropbox/gwadrib/"
-	}
-}
-
-
-outdir = paste(prefix,"datasets/paper/", sep="")
-dir.create(outdir, showWarnings = FALSE)
-
-output_fn = paste(outdir, "/pr_", subset, ".pdf", sep="")
-pdf(output_fn, width=18,height=10)
-par(mfrow=c(1,2))
-
-for (dataset in c("mtu173", "broad_mtb")) {
-
-	inputdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/stats_", subset, "/", sep="")
-
-	print(inputdir)
-	score_files = list.files(path = inputdir)
-
-	print(score_files)
-
-	score_areas = c()
-	score_colors = c()
-
-	input_fn = paste(inputdir, "/ws/0.txt", sep="")
-	print(input_fn)
-
-	data = read.table(input_fn, header=FALSE, sep="\t")
-
-	print("read")
-
-	if (dataset == "broad_mtb") {
-		if (subset == "sel3") {
-			positives = 75
-			negatives = 870
-		} else {
-			positives = 220
-			negatives = 725
-		}
-	} else if (dataset == "mtu173") {
-		if (subset == "sel3") {
-			positives = 39
-			negatives = 1450
-		} else {
-			positives = 113
-			negatives = 1376	
-		}
-	} else if (ncol(data) > 4) {
-		positives = data[1,1] + data[1,4]
-		negatives = data[1,2] + data[1,3]
-	} else {
-		positives = 0
-		negatives = 0
-	}
-
-	scores = c("mi", "or", "r-fcctw2", "ws", "lh")
-	#scores = c("mi_x0", "or_x0", "r-fcctw2_x0", "ws_x0", "lh_x0")
-
-	if (dataset == "mtu173"){ 
-		main_txt = paste("PR curves for the mtu173 dataset: ", toString(positives), " positives; " , toString(negatives), " negatives", sep="")
-	} else {
-		main_txt = paste("PR curves for the mtu_broad dataset: ", toString(positives), " positives; " , toString(negatives), " negatives", sep="")
-	}
-	plot(c(), cex.main=1.5, cex.lab = 1.3, xlab="tpr (recall) = TP/(TP+FN)", ylab="precision = TP/(TP+FP)", main=main_txt, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-	for (score_file in score_files) {
-		score = strsplit(score_file, "[.]")[[1]][1]
-		print(score)
-
-		if (score %in% scores){
-
-			input_fn = paste(inputdir, "/",score,".txt", sep="")
-			print(input_fn)
-			data = read.table(input_fn, header=FALSE, sep="\t")
-
-			prec = c(data[1,2], data[,2])
-			recall = c(0.0, data[,3])
-			n = length(prec)
-
-			area = 0.0
-
-			for (i in 2:n) {
-				area = area + 0.5*(prec[i] + prec[i-1])*(recall[i]-recall[i-1])
-			}
-
-			color = rgb(runif(1),runif(1),runif(1)) 
-
-			score_full = scoreFullName(score)
-			score_desc = paste(score_full, " [AUC=" , round(area,2) , "]", sep="")
-			score_areas[[score_desc]] = area
-			score_colors[[score_desc]] = color
-
-			points(prec~recall, col=color, pch=18, lwd=1.5, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-		}
-	}
-
-	score_desc_sorted = names(sort(score_areas, decreasing = T))
-	score_colors_sorted = c()
-
-	for (score_desc in score_desc_sorted) {
-		score_colors_sorted = c(score_colors_sorted, score_colors[[score_desc]])		
-	}
-
-	legend("topright", fill=score_colors_sorted, legend = score_desc_sorted, ncol=1, cex=1.2)
-
-}
-dev.off()
-
diff --git a/other/visR/curves/pr_scores_rand.R b/other/visR/curves/pr_scores_rand.R
deleted file mode 100644
index 74cf335..0000000
--- a/other/visR/curves/pr_scores_rand.R
+++ /dev/null
@@ -1,151 +0,0 @@
-#install.packages(
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-
-args <- commandArgs(trailingOnly = TRUE)
-
-scoreFullName <- function(score) {
-	score_full = score
-	if (score == "mi") {
-		score_full = "mutual information";
-	} else if (score == "or") {
-		score_full = "odds ratio";
-	} else if (score == "lh") {
-		score_full = "hypergeometric score";
-	} else if (score == "r-fcctw2") {
-		score_full = "tree-generalized hypergeomtric score"
-	} else if (score == "ws"){
-		score_full = "weighted support"
-	} else if(score == "ws+lh+r-fcctw2+mi+or") {
-		score_full = "combined"
-	}
-	return(score_full);
-}
-
-if (length(args) >=1) {
-	dataset = args[1]
-} else {
-	#dataset="sau461"
-	#dataset = "mtu173"
-	dataset = "broad_mtb"
-}
-
-if (length(args) >= 2) {
-	mut_type = args[2]
-} else {
-	mut_type = "P"
-}
-
-if (length(args) >= 3) {
-	subset = args[3]
-} else {
-	subset = "eq1"
-}
-
-if (length(args) >= 4) {
-	prefix = args[4]
-} else {
-	if (Sys.info()["sysname"] == "Linux") {
-		prefix = "/home/misias/gwadrib/"
-	} else {
-		prefix = "D:/Dropbox/Dropbox/gwadrib/"
-	}
-}
-
-inputdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/stats_", subset, "/", sep="")
-
-print(inputdir)
-score_files = list.files(path = inputdir)
-
-print(score_files)
-
-score_areas = c()
-score_colors = c()
-
-outdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/figures/", sep="")
-dir.create(outdir, showWarnings = FALSE)
-#x11()
-output_fn = paste(outdir, "/pr_",dataset, "_", subset, ".pdf", sep="")
-pdf(output_fn, width=18,height=10)
-
-input_fn = paste(inputdir, "/ws/0.txt", sep="")
-print(input_fn)
-
-data = read.table(input_fn, header=FALSE, sep="\t")
-
-print("read")
-
-if (dataset == "broad_mtb") {
-	if (subset == "sel3") {
-		positives = 75
-		negatives = 870
-	} else {
-		positives = 220
-		negatives = 725
-	}
-} else if (dataset == "mtu173") {
-	if (subset == "sel3") {
-		positives = 39
-		negatives = 1450
-	} else {
-		positives = 113
-		negatives = 1376	
-	}
-} else if (ncol(data) > 4) {
-	positives = data[1,1] + data[1,4]
-	negatives = data[1,2] + data[1,3]
-} else {
-	positives = 0
-	negatives = 0
-}
-
-scores = c("mi", "or", "r-fcctw2", "ws", "lh", "ws+lh+r-fcctw2+mi+or")
-#scores = c("mi_x0", "or_x0", "r-fcctw2_x0", "ws_x0", "lh_x0")
-
-main_txt = paste("PR curves; positives: ", toString(positives), "; negatives: " , toString(negatives), sep="")
-
-plot(c(), cex.lab = 1.5, xlab="tpr (recall) = TP/(TP+FN)", ylab="precision = TP/(TP+FP)", main=main_txt, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-for (score_file in score_files) {
-	score = strsplit(score_file, "[.]")[[1]][1]
-	print(score)
-
-	if (score %in% scores){
-
-		input_fn = paste(inputdir, "/",score,"/0.txt", sep="")
-		print(input_fn)
-		data = read.table(input_fn, header=FALSE, sep="\t")
-
-		prec = c(data[1,2], data[,2])
-		recall = c(0.0, data[,3])
-		n = length(prec)
-
-		area = 0.0
-
-		for (i in 2:n) {
-			area = area + 0.5*(prec[i] + prec[i-1])*(recall[i]-recall[i-1])
-		}
-
-		color = rgb(runif(1),runif(1),runif(1)) 
-
-		score_full = scoreFullName(score)
-		score_desc = paste(score_full, " [AUC=" , round(area,2) , "]", sep="")
-		score_areas[[score_desc]] = area
-		score_colors[[score_desc]] = color
-
-		points(prec~recall, col=color, pch=18, lwd=1.5, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-	}
-}
-
-score_desc_sorted = names(sort(score_areas, decreasing = T))
-score_colors_sorted = c()
-
-for (score_desc in score_desc_sorted) {
-	score_colors_sorted = c(score_colors_sorted, score_colors[[score_desc]])		
-}
-
-legend("topright", fill=score_colors_sorted, legend = score_desc_sorted, ncol=1, cex=2)
-
-dev.off()
-
diff --git a/other/visR/curves/roc_scores_rand.R b/other/visR/curves/roc_scores_rand.R
deleted file mode 100644
index 36c8401..0000000
--- a/other/visR/curves/roc_scores_rand.R
+++ /dev/null
@@ -1,108 +0,0 @@
-#install.packages(
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-
-args <- commandArgs(trailingOnly = TRUE)
-
-
-if (length(args) >=1) {
-	dataset = args[1]
-} else {
-	dataset = "mtu173"
-	#dataset = "broad_mtb"
-}
-
-if (length(args) >= 2) {
-	mut_type = args[2]
-} else {
-	mut_type = "P"
-}
-
-if (length(args) >= 3) {
-	subset = args[3]
-} else {
-	subset = "eq1"
-}
-
-if (length(args) >= 4) {
-	prefix = args[4]
-} else {
-	if (Sys.info()["sysname"] == "Linux") {
-		prefix = "/home/misias/gwadrib/"
-	} else {
-		prefix = "D:/Dropbox/Dropbox/gwadrib/"
-	}
-}
-
-## myScript.R
-
-inputdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/stats_", subset, "/", sep="")
-
-score_files = list.files(path = inputdir)
-
-score_areas = c()
-score_colors = c()
-
-outdir = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/figures/", sep="")
-
-output_fn = paste(outdir, "/roc_", dataset, "_", subset, ".pdf", sep="")
-pdf(output_fn, width=18,height=10)
-
-input_fn = paste(inputdir, "/",score_files[1],"/0.txt", sep="")
-print(input_fn)
-
-data = read.table(input_fn, header=FALSE, sep="\t")
-if (ncol(data) > 4) {
-	positives = data[1,1] + data[1,4]
-	negatives = data[1,2] + data[1,3]
-} else {
-	positives = 0
-	negatives = 0
-}
-
-main_txt = paste("ROC curves; positives: ", toString(positives), "; negatives: " , toString(negatives), sep="")
-plot(c(), xlab="fpr = FP/(FP+TN)", ylab="tpr (recall) = TP/(TP+FN)", main=main_txt, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-for (score_file in score_files) {
-	print(score_file)
-	score = score_file
-	input_fn = paste(inputdir, "/",score_file,"/0.txt", sep="")
-	data = read.table(input_fn, header=FALSE, sep="\t")
-
-	fp = data[,2]
-	tn = data[,3]
-	fpr = fp/(fp+tn)
-	tpr = data[,6]
-
-	fpr = c(0.0, fpr)
-	tpr = c(0.0, tpr)
-	n = length(fpr)
-
-	area = 0.0
-
-	for (i in 2:n) {
-		area = area + 0.5*(tpr[i] + tpr[i-1])*(fpr[i]-fpr[i-1])
-	}
-
-	color = rgb(runif(1),runif(1),runif(1)) 
-
-	score_desc = paste(score, " [AUC=" , round(area,2) , "]", sep="")
-	score_areas[[score_desc]] = area
-	score_colors[[score_desc]] = color
-
-	points(tpr~fpr, col=color, pch=18, lwd=1.5, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-}
-
-score_desc_sorted = names(sort(score_areas, decreasing = T))
-score_colors_sorted = c()
-
-for (score_desc in score_desc_sorted) {
-	score_colors_sorted = c(score_colors_sorted, score_colors[[score_desc]])		
-}
-
-legend("topright", fill=score_colors_sorted, legend = score_desc_sorted, ncol=4)
-
-dev.off()
-
-
diff --git a/other/visR/data_stats/data_abailable.R b/other/visR/data_stats/data_abailable.R
deleted file mode 100644
index 8b21348..0000000
--- a/other/visR/data_stats/data_abailable.R
+++ /dev/null
@@ -1,30 +0,0 @@
-#install.packages()
-2+2
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "broad_mtb"
-data_fn = paste(dataset, "/data_available.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-
-
-data_mat = t(as.matrix(data[,c(2,3,4)]))
-colnames(data_mat) <- data[,1]
-
-par(mar=c(12,8,1,1), oma=c(0,0,1,1), mgp=c(5,5,0))
-x11()
-barplot(data_mat, col=c("green", "yellow", "red", "grey"), cex=0.8, cex.lab=1.5, cex.axis=1.5, cex.main=1.5, cex.sub=1.5, las=2, ylab="number of strains")
-axis(1, at=3*1:3-1, labels=data[,1], las=2, cex.axis=1.5, cex.lab=2.5, cex.sub=2.5, cex=2.5)
-legend(34, 1.05, c("PATRIC annotations", "PATRIC annotations after eCAMBer"), cex=1.8,  bty="n", fill=c("green", "yellow", "red"));
-#barplot(data_mat2, col=c("green"), beside=TRUE)
-#
-#data_mat2 = t(as.matrix(data[,c(6,9,8)]))
-#colnames(data_mat2) <- data[,1]
-#
-#barplot(data_mat2, col=c("red", "green", "blue"))
-
-
-
-#barplot(data_mat, col=c("red", "brown", "green", "blue", "orange"),main=paste("Method: ", m, sep = " "))
-#legend("topleft", c("TP", "TN", "FP", "FN", "NO"), cex=0.6,  bty="n", fill=c("red", "brown", "green", "blue", "orange"));
diff --git a/other/visR/data_stats/data_abailable_corr.R b/other/visR/data_stats/data_abailable_corr.R
deleted file mode 100644
index 4b85b44..0000000
--- a/other/visR/data_stats/data_abailable_corr.R
+++ /dev/null
@@ -1,33 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "mtb79"
-data_fn = paste(dataset, "/data_available_corr.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-#data = data[,-1]
-
-x11()
-corrgram(data, order=TRUE, lower.panel=panel.shade, 
-		upper.panel=NULL, text.panel=panel.txt, 
-		main="Drug resistance profile correlations", cex=1.5)
-
-data_mat = t(as.matrix(data[,c(2,3,4)]))
-colnames(data_mat) <- data[,1]
-
-par(mar=c(12,8,1,1), oma=c(0,0,1,1), mgp=c(5,5,0))
-x11()
-barplot(data_mat, col=c("green", "red", "grey"), cex=0.8, cex.lab=1.5, cex.axis=1.5, cex.main=1.5, cex.sub=1.5, las=2, ylab="number of strains")
-axis(1, at=3*1:3-1, labels=data[,1], las=2, cex.axis=1.5, cex.lab=2.5, cex.sub=2.5, cex=2.5)
-legend(34, 1.05, c("PATRIC annotations", "PATRIC annotations after eCAMBer"), cex=1.8,  bty="n", fill=c("green", "red"));
-#barplot(data_mat2, col=c("green"), beside=TRUE)
-#
-#data_mat2 = t(as.matrix(data[,c(6,9,8)]))
-#colnames(data_mat2) <- data[,1]
-#
-#barplot(data_mat2, col=c("red", "green", "blue"))
-
-
-
-#barplot(data_mat, col=c("red", "brown", "green", "blue", "orange"),main=paste("Method: ", m, sep = " "))
-#legend("topleft", c("TP", "TN", "FP", "FN", "NO"), cex=0.6,  bty="n", fill=c("red", "brown", "green", "blue", "orange"));
diff --git a/other/visR/data_stats/data_corr.R b/other/visR/data_stats/data_corr.R
deleted file mode 100644
index 24a029c..0000000
--- a/other/visR/data_stats/data_corr.R
+++ /dev/null
@@ -1,37 +0,0 @@
-install.packages("corrgram")
-require(graphics); require(grDevices); require(corrgram)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "../camber-pred/datasets/broad_mtb"
-drug_name="Rifampicin"
-#data_fn = paste(dataset, "/det_bin_comb_ranks/",drug_name,"/FINAL7_S.txt", sep="")
-data_fn = paste(dataset, "/det_bin_comb/",drug_name,"/FINAL7_S.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-x11()
-corrgram(data[,c("odds_ratio", "mi", "wsupport", "tscore")], order=TRUE, lower.panel=panel.shade, 
-		upper.panel=NULL, text.panel=panel.txt, 
-		main="Drug resistance core rankings correlations", cex=1.5)
-
-#corrgram(data[,c("odds_ratio", "mi", "wsupport", "tscore", "ranks_sum_score")], order=TRUE, lower.panel=panel.shade, 
-#		upper.panel=NULL, text.panel=panel.txt, 
-#		main="Drug resistance core rankings correlations", cex=1.5)
-
-plot(data[,"wsupport"], data[,"tscore"])
-
-data[,"ranks_sum_score"]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-
-cutoff = 100
-
-data_h_acc = (data_h[,"tscore"] < cutoff) + (data_h[,"mi"] < cutoff) + (data_h[,"odds_ratio"] < cutoff) + (data_h[,"wsupport"] < cutoff) + (data_h[,"ranks_sum_score"] < cutoff)
-data_h_top = data_h[data_h_acc >= 5,]
-summary(data_h_top[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-data_a_acc = (data_a[,"tscore"] < cutoff) + (data_a[,"mi"] < cutoff) + (data_a[,"odds_ratio"] < cutoff) + (data_a[,"wsupport"] < cutoff) + (data_a[,"ranks_sum_score"] < cutoff)
-data_a_top = data_a[data_a_acc >= 5,]
-summary(data_a_top[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
diff --git a/other/visR/data_stats/data_ranks.R b/other/visR/data_stats/data_ranks.R
deleted file mode 100644
index 646fcec..0000000
--- a/other/visR/data_stats/data_ranks.R
+++ /dev/null
@@ -1,29 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-cutoff = 200
-
-data_a_acc = (data_a[,"tscore"] < cutoff) + (data_a[,"mi"] < cutoff) + (data_a[,"odds_ratio"] < cutoff) + (data_a[,"wsupport"] < cutoff)
-data_a_top = data_a[data_a_acc >= 4,]
-summary(data_a_top[,c("tscore", "mi","odds_ratio", "wsupport", "tmow", "tmo", "to", "tow")])
-
-
-data_h_acc = (data_h[,"tscore"] < cutoff) + (data_h[,"mi"] < cutoff) + (data_h[,"odds_ratio"] < cutoff) + (data_h[,"wsupport"] < cutoff)
-data_h_top = data_h[data_h_acc >= 0,]
-summary(data_h_top[,c("tscore", "mi","odds_ratio", "wsupport", "tmow", "tmo", "to", "tow")])
-
diff --git a/other/visR/data_stats/panels_res_stats.R b/other/visR/data_stats/panels_res_stats.R
deleted file mode 100644
index bc61d7e..0000000
--- a/other/visR/data_stats/panels_res_stats.R
+++ /dev/null
@@ -1,60 +0,0 @@
-require(graphics); require(grDevices)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-
-dataset = "broad_mtb"
-data_fn = paste("../../../",dataset,"/stats/res_stats.txt", sep="")
-
-data = read.table(data_fn, header=F)
-
-output_fn = paste("../../../",dataset,"/figures/panels_f1.pdf", sep="")
-
-rows1 = (data[,2] >= 10 & data[,3] >= 10)
-rows2 = (data[,2] < 10 | data[,3] < 10)
-data_mat1 = t(as.matrix(data[rows1,c(2,3,4)]))
-data_mat2 = t(as.matrix(data[rows2,c(2,3,4)]))
-colnames(data_mat1) <- as.vector(data[rows1,1])
-colnames(data_mat2) <- as.vector(data[rows2,1])
-
-y1_lim = max(data_mat1[1,]+data_mat1[2,] + data_mat1[3,]) + 100
-y2_lim = max(data_mat2[1,]+data_mat2[2,] + data_mat2[3,]) + 100
-
-pdf(output_fn, width=18, height=10)
-par(mfrow=c(1,2))
-par(mar=c(17.5,7,1,0), oma=c(0,0,0,0), mgp=c(5,1,0))
-
-colors = c("green", "red", "yellow")
-
-b <- barplot(data_mat1[c(1,2,3),], col=colors, ylim=c(0, y1_lim), cex.lab=2.5, cex.axis=2.2, cex.sub=2.5, las=2, xaxt="n", ylab="# isolates")
-axis(1, at=1.2*1:length(colnames(data_mat1))-0.5, labels=colnames(data_mat1), las=2, cex.axis=2.2, cex.lab=2.5, cex.sub=2.5, cex=2.5)
-
-rect(12, 0.99*y_lim, 24, 0.72*y_lim, col="white")
-legend(12, 0.99*y_lim, pt.cex=0.1, bg="white", border="black",   
-		c("susceptible strains",
-				"resistant strains",
-				"intermediate-resistant strains"), 
-		text.width=c(5,5,5),
-		bty="n", box.lwd=c(0,0,0,0), cex=2.7,  fill=colors, y.intersp=0.7, x.intersp=0.1)
-
-text(x=b,y=(data_mat1[1,])-data_mat1[1,]/2-35, labels=data_mat1[1,], pos=3, col="black", cex=1)
-text(x=b,y=(data_mat1[1,]+data_mat1[2,])-data_mat1[2,]/2-35, labels=data_mat1[2,], pos=3, col="black", cex=1) 
-text(x=b,y=(data_mat1[1,]+data_mat1[2,]+data_mat1[3,])-data_mat1[3,]/2-10, labels=data_mat1[3,], pos=3, col="black", cex=1) 
-
-b <- barplot(data_mat2[c(1,2,3),], col=colors, ylim=c(0, y2_lim), cex.lab=2.5, cex.axis=2.2, cex.sub=2.5, las=2, xaxt="n", ylab="# isolates")
-axis(1, at=1.2*1:length(colnames(data_mat2))-0.5, labels=colnames(data_mat2), las=2, cex.axis=2.2, cex.lab=2.5, cex.sub=2.5, cex=2.5)
-
-rect(12, 0.99*y_lim, 24, 0.72*y_lim, col="white")
-legend(12, 0.99*y_lim, pt.cex=0.1, bg="white", border="black",   
-		c("susceptible strains",
-				"resistant strains",
-				"intermediate-resistant strains"), 
-		text.width=c(5,5,5),
-		bty="n", box.lwd=c(0,0,0,0), cex=2.7,  fill=colors, y.intersp=0.7, x.intersp=0.1)
-
-text(x=b,y=(data_mat2[1,])-data_mat2[1,]/2-35, labels=data_mat2[1,], pos=3, col="black", cex=1)
-text(x=b,y=(data_mat2[1,]+data_mat2[2,])-data_mat2[2,]/2-35, labels=data_mat2[2,], pos=3, col="black", cex=1) 
-text(x=b,y=(data_mat2[1,]+data_mat2[2,]+data_mat2[3,])-data_mat2[3,]/2-10, labels=data_mat2[3,], pos=3, col="black", cex=1) 
-
-
-dev.off()
-
diff --git a/other/visR/data_stats/res_stats.R b/other/visR/data_stats/res_stats.R
deleted file mode 100644
index 53a3dad..0000000
--- a/other/visR/data_stats/res_stats.R
+++ /dev/null
@@ -1,46 +0,0 @@
-require(graphics); require(grDevices)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-
-dataset = "broad_mtb"
-data_fn = paste("../../../datasets/",dataset,"/stats/res_stats.txt", sep="")
-
-data = read.table(data_fn, header=F)
-
-output_fn = paste("../../../datasets/",dataset,"/figures/f1.pdf", sep="")
-
-rows1 = (data[,2] >= 1 & data[,3] >= 1)
-rows2 = (data[,2] < 10 | data[,3] < 10)
-data_mat1 = t(as.matrix(data[rows1,c(2,3,4)]))
-data_mat2 = t(as.matrix(data[rows2,c(2,3,4)]))
-colnames(data_mat1) <- as.vector(data[rows1,1])
-colnames(data_mat2) <- as.vector(data[rows2,1])
-
-y1_lim = max(data_mat1[1,]+data_mat1[2,] + data_mat1[3,]) + 100
-#y2_lim = max(data_mat2[1,]+data_mat2[2,] + data_mat2[3,]) + 100
-
-pdf(output_fn, width=18, height=10)
-par(mar=c(17.5,7,1,0), oma=c(0,0,0,0), mgp=c(5,1,0))
-
-colors = c("green", "red", "yellow")
-
-b <- barplot(data_mat1[c(1,2,3),], col=colors, ylim=c(0, y1_lim), cex.lab=2.5, cex.axis=2.2, cex.sub=2.5, las=2, xaxt="n", ylab="# isolates")
-axis(1, at=1.2*1:length(colnames(data_mat1))-0.5, labels=colnames(data_mat1), las=2, cex.axis=2.2, cex.lab=2.5, cex.sub=2.5, cex=2.5)
-
-n = length(data_mat1[1,])
-x = 18 / n
-
-rect(18-8*x, 0.99*y1_lim, 18-4*x, 0.72*y1_lim, col="white")
-legend(18-8*x, 0.99*y1_lim, pt.cex=0.1, bg="white", border="black",   
-		c("susceptible strains",
-				"resistant strains",
-				"intermediate-resistant strains"), 
-		text.width=c(5,5,5),
-		bty="n", box.lwd=c(0,0,0,0), cex=2.7,  fill=colors, y.intersp=0.7, x.intersp=0.1)
-
-text(x=b,y=(data_mat1[1,])-data_mat1[1,]/2, labels=data_mat1[1,], pos=3, col="black", cex=1)
-text(x=b,y=(data_mat1[1,]+data_mat1[2,])-data_mat1[2,]/2, labels=data_mat1[2,], pos=3, col="black", cex=1) 
-text(x=b,y=(data_mat1[1,]+data_mat1[2,]+data_mat1[3,])-data_mat1[3,]/2, labels=data_mat1[3,], pos=3, col="black", cex=1) 
-
-dev.off()
-
diff --git a/other/visR/drug_spec/data_drugs_sens_ami_Rv3919c.R b/other/visR/drug_spec/data_drugs_sens_ami_Rv3919c.R
deleted file mode 100644
index c73894f..0000000
--- a/other/visR/drug_spec/data_drugs_sens_ami_Rv3919c.R
+++ /dev/null
@@ -1,53 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=250
-
-#gene_id = "Rvnr02"
-gene_id = "Rv3919c"
-score_id = "tmow"
-drugs = "ami"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,2))
-
-drug_names = c("Amikacin", "Kanamycin", "Capreomycin", "Streptomycin")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = sqrt(1.0/data_dg[,c(score_id)])
-	scores_vec_a = sqrt(1.0/data_dg_a[,c(score_id)])
-	scores_vec_h = sqrt(1.0/data_dg_h[,c(score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""), ylim=c(0,1))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_ami_Rvnr01.R b/other/visR/drug_spec/data_drugs_sens_ami_Rvnr01.R
deleted file mode 100644
index 548fdae..0000000
--- a/other/visR/drug_spec/data_drugs_sens_ami_Rvnr01.R
+++ /dev/null
@@ -1,53 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=1600
-
-gene_id = "Rvnr01"
-#gene_id = "Rv3919c"
-score_id = "tmow"
-drugs = "ami"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,2))
-
-drug_names = c("Amikacin", "Kanamycin", "Capreomycin", "Streptomycin")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = sqrt(1.0/data_dg[,c(score_id)])
-	scores_vec_a = sqrt(1.0/data_dg_a[,c(score_id)])
-	scores_vec_h = sqrt(1.0/data_dg_h[,c(score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""), ylim=c(0,1))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_ami_Rvnr02.R b/other/visR/drug_spec/data_drugs_sens_ami_Rvnr02.R
deleted file mode 100644
index fb995fc..0000000
--- a/other/visR/drug_spec/data_drugs_sens_ami_Rvnr02.R
+++ /dev/null
@@ -1,53 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=3200
-
-gene_id = "Rvnr02"
-#gene_id = "Rv3919c"
-score_id = "tmow"
-drugs = "ami"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,2))
-
-drug_names = c("Amikacin", "Kanamycin", "Capreomycin", "Streptomycin")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = sqrt(1.0/data_dg[,c(score_id)])
-	scores_vec_a = sqrt(1.0/data_dg_a[,c(score_id)])
-	scores_vec_h = sqrt(1.0/data_dg_h[,c(score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""), ylim=c(0,1))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_emb_Rv3795.R b/other/visR/drug_spec/data_drugs_sens_emb_Rv3795.R
deleted file mode 100644
index e0e9e92..0000000
--- a/other/visR/drug_spec/data_drugs_sens_emb_Rv3795.R
+++ /dev/null
@@ -1,52 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(calibrate)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/"
-data_fn = paste(dataset, "expP/analysis/tbdb_scores_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=1100
-
-#gene_id = "Rv3795"
-gene_id = "Rv3795"
-score_id = "tmow"
-drugs = "emb"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(1,1))
-
-drug_names = c("Ethambutol")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = -log(data_dg[,c(pv_score_id)])
-	scores_vec_a = -log(data_dg_a[,c(pv_score_id)])
-	scores_vec_h = -log(data_dg_h[,c(pv_score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_flq_Rv0005.R b/other/visR/drug_spec/data_drugs_sens_flq_Rv0005.R
deleted file mode 100644
index fe47d68..0000000
--- a/other/visR/drug_spec/data_drugs_sens_flq_Rv0005.R
+++ /dev/null
@@ -1,52 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-dataset = "datasets/broad_mtb/"
-data_fn = paste(dataset, "expP/analysis/tbdb_scores_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=0
-y_lim=800 
-
-gene_id = "Rv0005"
-#gene_id = "Rv0006"
-score_id = "tmow"
-pv_score_id = "pv.tmow"
-drugs = "flq"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,1))
-
-drug_names = c("Rifampicin", "Rifabutin")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = -log(data_dg[,c(pv_score_id)])
-	scores_vec_a = -log(data_dg_a[,c(pv_score_id)])
-	scores_vec_h = -log(data_dg_h[,c(pv_score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), ylim=c(0,10), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_flq_Rv0006.R b/other/visR/drug_spec/data_drugs_sens_flq_Rv0006.R
deleted file mode 100644
index e248c86..0000000
--- a/other/visR/drug_spec/data_drugs_sens_flq_Rv0006.R
+++ /dev/null
@@ -1,53 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-dataset = "datasets/broad_mtb/"
-data_fn = paste(dataset, "expP/analysis/tbdb_scores_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=70
-y_lim=150 
-
-#gene_id = "Rv0005"
-gene_id = "Rv0006"
-score_id = "tmow"
-pv_score_id = "pv.tmow"
-drugs = "flq"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,2))
-
-drug_names = c("Ciprofloxacin", "Ofloxacin", "Levofloxacin", "Moxifloxacin")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = -log(data_dg[,c(pv_score_id)])
-	scores_vec_a = -log(data_dg_a[,c(pv_score_id)])
-	scores_vec_h = -log(data_dg_h[,c(pv_score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""), ylim=c(0,10))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_iso_Rv1483.R b/other/visR/drug_spec/data_drugs_sens_iso_Rv1483.R
deleted file mode 100644
index 1d2d4d0..0000000
--- a/other/visR/drug_spec/data_drugs_sens_iso_Rv1483.R
+++ /dev/null
@@ -1,53 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(calibrate)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=300
-
-#gene_id = "Rv1908c"
-#gene_id = "Rv3854c"
-gene_id = "Rv1483"
-score_id = "tmow"
-drugs = "iso"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,2))
-
-drug_names = c("Isoniazid", "Ethionamide", "Prothionamide")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = sqrt(1.0/data_dg[,c(score_id)])
-	scores_vec_a = sqrt(1.0/data_dg_a[,c(score_id)])
-	scores_vec_h = sqrt(1.0/data_dg_h[,c(score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""), ylim=c(0,1))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_iso_Rv1484.R b/other/visR/drug_spec/data_drugs_sens_iso_Rv1484.R
deleted file mode 100644
index c9000c0..0000000
--- a/other/visR/drug_spec/data_drugs_sens_iso_Rv1484.R
+++ /dev/null
@@ -1,53 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(calibrate)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=300
-
-#gene_id = "Rv1908c"
-#gene_id = "Rv3854c"
-gene_id = "Rv1484"
-score_id = "tmow"
-drugs = "iso"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,2))
-
-drug_names = c("Isoniazid", "Ethionamide", "Prothionamide")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = sqrt(1.0/data_dg[,c(score_id)])
-	scores_vec_a = sqrt(1.0/data_dg_a[,c(score_id)])
-	scores_vec_h = sqrt(1.0/data_dg_h[,c(score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""), ylim=c(0,1))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_iso_Rv1908c.R b/other/visR/drug_spec/data_drugs_sens_iso_Rv1908c.R
deleted file mode 100644
index 9a2ca5c..0000000
--- a/other/visR/drug_spec/data_drugs_sens_iso_Rv1908c.R
+++ /dev/null
@@ -1,54 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(calibrate)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/"
-data_fn = paste(dataset, "expP/analysis/tbdb_scores_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=800
-
-gene_id = "Rv1908c"
-#gene_id = "Rv3854c"
-#gene_id = "Rv1483"
-score_id = "tmow"
-pv_score_id = "pv.tmow"
-drugs = "iso"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,2))
-
-drug_names = c("Isoniazid", "Ethionamide", "Prothionamide")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = -log(data_dg[,c(pv_score_id)])
-	scores_vec_a = -log(data_dg_a[,c(pv_score_id)])
-	scores_vec_h = -log(data_dg_h[,c(pv_score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), ylim=c(0,15), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_pza_Rv2043c.R b/other/visR/drug_spec/data_drugs_sens_pza_Rv2043c.R
deleted file mode 100644
index 95c1c95..0000000
--- a/other/visR/drug_spec/data_drugs_sens_pza_Rv2043c.R
+++ /dev/null
@@ -1,51 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(calibrate)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=-50
-y_lim=200
-
-gene_id = "Rv2043c"
-score_id = "tmow"
-drugs = "pza"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(1,1))
-
-drug_names = c("Pyrazinamide")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = sqrt(1.0/data_dg[,c(score_id)])
-	scores_vec_a = sqrt(1.0/data_dg_a[,c(score_id)])
-	scores_vec_h = sqrt(1.0/data_dg_h[,c(score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""), ylim=c(0,1))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-dev.off()
diff --git a/other/visR/drug_spec/data_drugs_sens_rif_Rv0667.R b/other/visR/drug_spec/data_drugs_sens_rif_Rv0667.R
deleted file mode 100644
index 41a3594..0000000
--- a/other/visR/drug_spec/data_drugs_sens_rif_Rv0667.R
+++ /dev/null
@@ -1,52 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(calibrate)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/"
-data_fn = paste(dataset, "expP/analysis/tbdb_scores_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-x_lim=0
-y_lim=1200
-
-gene_id = "Rv0667"
-score_id = "tmow"
-pv_score_id = paste("pv.", score_id, sep="")
-drugs = "rif"
-
-cutoff = 1020
-
-pdf_fn = paste(dataset, "/figures/drug_sens_", drugs, "_", gene_id,"_", score_id,".pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-par(mfrow=c(2,1))
-
-drug_names = c("Rifampicin", "Rifabutin")
-for (drug_name in drug_names) {
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	scores_vec = -log(data_dg[,c(pv_score_id)])
-	scores_vec_a = -log(data_dg_a[,c(pv_score_id)])
-	scores_vec_h = -log(data_dg_h[,c(pv_score_id)])
-	
-	plot(data_dg[,c("position")], scores_vec, col="black", pch=16, xlim=c(x_lim,y_lim), ylim=c(0,10), main=drug_name, xlab="position", ylab=paste("score value: ",score_id, sep=""))
-	points(data_dg_a[,c("position")], scores_vec_a, col="blue", pch=16)
-	points(data_dg_h[,c("position")], scores_vec_h, col="red", pch=16)
-	textxy(data_dg[,c("position")], scores_vec, labs=data_dg[,c("position")])
-}
-
-dev.off()
diff --git a/other/visR/drug_spec/data_scores_variants_fig.R b/other/visR/drug_spec/data_scores_variants_fig.R
deleted file mode 100644
index 026e646..0000000
--- a/other/visR/drug_spec/data_scores_variants_fig.R
+++ /dev/null
@@ -1,57 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(stringr)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data_tmp = read.table(data_fn, header=TRUE, sep="\t")
-
-statesCount <- function(states) {
-	(nchar(as.character(states)) + 1) / 2
-}
-
-data_tmp["states_count"] <- sapply(data_tmp[, "non_ref_states_broad"], statesCount)
-data = data_tmp[with(data_tmp, order(data_tmp[,"tmow"])), ]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-dimnames = list(cutoffs, scores)
-data_h_means = matrix(nrow=length(cutoffs), ncol=length(scores), dimnames=dimnames)
-
-drug_pairs = list(list("Rifampicin", "Rv0667"), list("Ethambutol", "Rv3795"),
-		list("Ciprofloxacin", "Rv0006"), list("Isoniazid", "Rv1908c"),
-		list("Streptomycin", "Rvnr01"), list("Pyrazinamide", "Rv2043c")
-		)
-
-		pdf_fn = paste(dataset, "/figures/scores_variants.pdf", sep="")
-		pdf(pdf_fn,width=18,height=10)
-par(mfrow=c(3,2))
-for( drug_pair in drug_pairs) {
-
-	drug_name = drug_pair[1]
-	gene_id = drug_pair[2]
-	
-	data_d = data[data[,"drug_name"]==drug_name,]
-	data_dg = data_d[data_d[,"gene_id"]==gene_id,]
-	
-	data_dg_a = data_dg[data_dg[,"high"] == "Y" | data_dg[,"all"] == "Y",]
-	data_dg_h = data_dg[data_dg[,"high"] == "Y",]
-	
-	colors = c()
-	for(i in seq(length(data_dg[,"high"]))) {
-		if (data_dg[i,"high"] == "Y") {
-			colors = c(colors, "red")
-		} else if (data_dg[i,"high"] == "Y" | data_dg[i,"all"] == "Y"){
-			colors = c(colors, "blue")
-		} else{
-			colors = c(colors, "black")
-		}
-	}
-
-	plot(data_dg[, "states_count"], main=paste(drug_name, ", ", gene_id, sep=" "), xlab="Mutation ranking", ylab="Number of variants", pch=16, col=colors)
-	textxy(seq(length(data_dg[, "states_count"])), data_dg[, "states_count"], labs=data_dg[,c("position")])
-}
-
-dev.off()
-
diff --git a/other/visR/genome/gene_positions.R b/other/visR/genome/gene_positions.R
deleted file mode 100644
index e1849fa..0000000
--- a/other/visR/genome/gene_positions.R
+++ /dev/null
@@ -1,22 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "em57"
-drug_name = "Ciprofloxacin"
-#drug_name = "Streptomycin"
-#gene_id = "rpoB_Rv0667"
-#gene_id = "katG_Rv1908c"
-#gene_id = "phrB_SAR0744"
-gene_id = "WEB035_GERMS-WGS.pl_2095_0"
-#gene_id = "rrl_Rvnr02"
-#gene_id = "rpsL_Rv0682"
-score = "mi"
-
-data_fn = paste(dataset, "/det_bin_genes/",drug_name,"/FINAL7_S_",gene_id,".txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-data_t = data[, c("position",score)]
-x11()
-plot(data_t[,2]~data_t[,1], pch=16, type="h", lwd=2)
-points(data_t[,2]~data_t[,1], pch=16, cex=1.0)
diff --git a/other/visR/genome/gene_positions_em59.R b/other/visR/genome/gene_positions_em59.R
deleted file mode 100644
index 3d3d689..0000000
--- a/other/visR/genome/gene_positions_em59.R
+++ /dev/null
@@ -1,35 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "em59"
-drug_name = "Cefatoxime"
-drug_name = "Ciprofloxacin"
-drug_name = "Nalidixic acid"
-drug_name = "Levofloxacin"
-drug_name = "Piperacillin-tazobactam"
-drug_name = "Tigeccyline"
-drug_name = "Gentamicin"
-#drug_name = "Streptomycin"
-#gene_id = "rpoB_Rv0667"
-#gene_id = "katG_Rv1908c"
-#gene_id = "phrB_SAR0744"
-gene_id = "x_D505_07023"
-gene_id = "gyrA_D505_04539"
-gene_id = "x_D505_18590"
-gene_id = "x_D505_12535"
-#gene_id = "rrl_Rvnr02"
-#gene_id = "rpsL_Rv0682"
-scores = c("mi", "tscore", "odds_ratio")
-
-x11()
-par(mfrow=c(2,2))
-
-data_fn = paste(dataset, "/det_bin_genes/",drug_name,"/FINAL7_S_",gene_id,".txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-for (score in scores) {
-	data_t = data[, c("position",score)]
-	plot(data_t[,2]~data_t[,1], pch=16, type="h", lwd=2, xlab="Position", ylab="Score")
-	points(data_t[,2]~data_t[,1], pch=16, cex=1.0)
-}
diff --git a/other/visR/genome/gene_positions_str238.R b/other/visR/genome/gene_positions_str238.R
deleted file mode 100644
index b6816b8..0000000
--- a/other/visR/genome/gene_positions_str238.R
+++ /dev/null
@@ -1,23 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "str238"
-drug_name = "Penicillin1"
-
-score = "tscore"
-
-gene_ids = c("mraY_SPJ_0330", "pbp1a_SPJ_0355", "pbp1b_SPJ_2119", "ruvA_SPJ_0201", "x_SPJ_1921", "rluD2_SPJ_2019")
-
-x11()
-par(mfrow=c(2,3))
-
-
-for (gene_id in gene_ids) {
-	data_fn = paste(dataset, "/det_bin_genes/",drug_name,"/FINAL7_S_",gene_id,".txt", sep="")
-	data = read.table(data_fn, header=TRUE, sep="\t")
-	data_t = data[, c("position",score)]
-	
-	plot(data_t[,2]~data_t[,1], pch=16, type="h", lwd=2, xlab="Position", ylab="Score")
-	points(data_t[,2]~data_t[,1], pch=16, cex=1.0)
-}
diff --git a/other/visR/genome/genome_positions.R b/other/visR/genome/genome_positions.R
deleted file mode 100644
index e3f18d3..0000000
--- a/other/visR/genome/genome_positions.R
+++ /dev/null
@@ -1,43 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-#dataset = "mtb79"
-dataset = "sau439"
-drug_name = "mecA_SAR0039_360"
-#drug_name = "Streptomycin"
-#gene_id = "rpoB_Rv0667"
-#gene_id = "katG_Rv1908c"
-#gene_id = "phrB_SAR0744"
-#gene_id = "dnaX_SAR0477"
-#gene_id = "rrl_Rvnr02"
-#gene_id = "rpsL_Rv0682"
-score = "odds_ratio"
-#score = "mi"
-
-data_fn = paste( "datasets/", dataset, "/det_bin_show_full/",drug_name,"/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-data_t = data[, c("gene_id", "position", score)]
-#data_t = data_t[with(data_t, order(data_t[,"gene_id"])), ]
-data_t = data_t[with(data_t, order(data_t[,"position"])), ]
-
-gene_color_map = c()
-gene_colors = c()
-gene_id_colors = c()
-for (gene_id in data_t[, "gene_id"]) {
-	if (!gene_id %in% names(gene_color_map)) { 
-		gene_color_map[[gene_id]] <- rgb(runif(1),runif(1),runif(1))
-	}
-	gene_colors = c(gene_colors, gene_color_map[[gene_id]])
-}
-for (gene_id in names(gene_color_map)) {
-	gene_id_colors = c(gene_id_colors, gene_color_map[[gene_id]])
-}
-
-x11()
-plot(data_t[,3], pch=16, type="h", lwd=2)
-#plot(data_t[,3], pch=16, type="h", lwd=2, xlim=c(length(data_t[,1])-20, length(data_t[,1])),ylim=c(0,100))
-points(data_t[,3], pch=16, cex=1.0, col=gene_colors)
-legend("topright", names(gene_color_map), ncol=2, cex=0.7,  bty="n", fill=gene_id_colors);
-
diff --git a/other/visR/genome/genome_positions_full.R b/other/visR/genome/genome_positions_full.R
deleted file mode 100644
index 994ba55..0000000
--- a/other/visR/genome/genome_positions_full.R
+++ /dev/null
@@ -1,43 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-#dataset = "mtb79"
-dataset = "em57"
-drug_name = "Ciprofloxacin"
-#drug_name = "Streptomycin"
-#gene_id = "rpoB_Rv0667"
-#gene_id = "katG_Rv1908c"
-#gene_id = "phrB_SAR0744"
-#gene_id = "dnaX_SAR0477"
-#gene_id = "rrl_Rvnr02"
-#gene_id = "rpsL_Rv0682"
-score = "tscore"
-#score = "mi"
-
-data_fn = paste(dataset, "/det_bin_genome/",drug_name,"/FINAL7_S.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-data_t = data[, c("position", "gene_id", score)]
-#data_t = data_t[with(data_t, order(data_t[,"gene_id"])), ]
-data_t = data_t[with(data_t, order(data_t[,"gene_id"])), ]
-
-gene_color_map = c()
-gene_colors = c()
-gene_id_colors = c()
-for (gene_id in data_t[, "gene_id"]) {
-	if (!gene_id %in% names(gene_color_map)) { 
-		gene_color_map[[gene_id]] <- rgb(runif(1),runif(1),runif(1))
-	}
-	gene_colors = c(gene_colors, gene_color_map[[gene_id]])
-}
-for (gene_id in names(gene_color_map)) {
-	gene_id_colors = c(gene_id_colors, gene_color_map[[gene_id]])
-}
-
-x11()
-plot(data_t[,3], pch=16, type="h", lwd=2)
-#plot(data_t[,3], pch=16, type="h", lwd=2, xlim=c(length(data_t[,1])-20, length(data_t[,1])),ylim=c(0,100))
-points(data_t[,3], pch=16, cex=1.0, col=gene_colors)
-legend("topright", names(gene_color_map), ncol=2, cex=0.7,  bty="n", fill=gene_id_colors);
-
diff --git a/other/visR/prec_recall/data_prec_recall.R b/other/visR/prec_recall/data_prec_recall.R
deleted file mode 100644
index 09c2c06..0000000
--- a/other/visR/prec_recall/data_prec_recall.R
+++ /dev/null
@@ -1,121 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "../camber-pred/datasets/broad_mtb"
-drug_name = "Pyrazinamide"
-drug_name = "Rifampicin"
-drug_name = "Ethambutol"
-drug_name = "Isoniazid"
-drug_name = "Ofloxacin"
-
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_S.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-data_drug = data[data[,"drug_name"] == drug_name,]
-
-data_drug_a = data_drug[data_drug[,"high"] == "Y" | data_drug[,"all"] == "Y",]
-data_drug_h = data_drug[data_drug[,"high"] == "Y",]
-
-data_all = data
-data_all[,"wsupport"] = data_all[,"wsupport"]*5
-data_all[,"tscore"] = data_all[,"tscore"]*5
-data_all[,"odds_ratio"] = data_all[,"odds_ratio"]*5
-data_all[,"mi"] = data_all[,"mi"]*5
-data_all[,"ranks_sum_score"] = data_all[,"ranks_sum_score"]*5
-data_all_a = data_all[data_all[,"high"] == "Y" | data_all[,"all"] == "Y",]
-data_all_h = data_all[data_all[,"high"] == "Y",]
-
-data_drug_sel = data_all
-
-score_name = "tscore"
-ranks_sel = sort(data_drug_sel[, score_name])
-max_rank = max(ranks_sel)
-n = length(ranks_sel)
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i]
-	tp = tp + 1
-	fp = round(rank) - tp
-	prec = c(prec, tp / round(rank))
-	recall = c(recall, tp / n)
-	print(tp / n)	
-}
-
-x11()
-plot(prec~recall, col= "red", pch=17, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-abline(h=n/max_rank)
-
-score_name = "wsupport"
-ranks_sel = sort(data_drug_sel[, score_name])
-n = length(ranks_sel)
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i]
-	tp = tp + 1
-	fp = round(rank) - tp
-	prec = c(prec, tp / round(rank))
-	recall = c(recall, tp / n)
-	print(tp / n)	
-}
-points(prec~recall, col= "blue", pch=18, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "odds_ratio"
-ranks_sel = sort(data_drug_sel[, score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i]
-	tp = tp + 1
-	fp = round(rank) - tp
-	prec = c(prec, tp / round(rank))
-	recall = c(recall, tp / n)
-	print(tp / n)	
-}
-points(prec~recall, col= "green", pch=19, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "mi"
-ranks_sel = sort(data_drug_sel[, score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i]
-	tp = tp + 1
-	fp = round(rank) - tp
-	prec = c(prec, tp / round(rank))
-	recall = c(recall, tp / n)
-	print(tp / n)	
-}
-points(prec~recall, col= "black", pch=20, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "ranks_sum_score"
-ranks_sel = sort(data_drug_sel[, score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i]
-	tp = tp + 1
-	fp = round(rank) - tp
-	prec = c(prec, tp / round(rank))
-	recall = c(recall, tp / n)
-	print(tp / n)	
-}
-points(prec~recall, col= "orange", pch=15, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-#i2, u2, l2, r2 = compareSets(set(golden_genes), set(patric_ecamber_annotation.multigenes)) 
-#if i1+r1 > 0: prec_b = float(i1)/float(i1+r1)
-#else: prec_b = 0
-#if i1+l1 > 0: rec_b = float(i1)/float(i1+l1)
-#else: rec_b = 0
-
diff --git a/other/visR/prec_recall/data_prec_recall_diff.R b/other/visR/prec_recall/data_prec_recall_diff.R
deleted file mode 100644
index 7f6519c..0000000
--- a/other/visR/prec_recall/data_prec_recall_diff.R
+++ /dev/null
@@ -1,88 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/expP/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-data_all = data
-#data_all = data[data[,"drug_name"] %in% c("Rifampicin", "Isoniazid", "Ethambutol", "Ofloxacin", "Ciprofloxacin"),]
-data_all_a = data_all[data_all[,"high"] == "Y" | data_all[,"all"] == "Y",]
-data_all_h = data_all[data_all[,"high"] == "Y",]
-
-good_count = length(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y", "mi"])
-
-score_name = "pv.wsupport"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-
-x11()
-plot(prec~recall, col= "blue", pch=17, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "wsupport"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[n-i+1, score_name]
-	if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-points(prec~recall, col= "black", pch=18, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "pv.tmow"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-points(prec~recall, col= "red", pch=19, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "tmow"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-points(prec~recall, col= "yellow", pch=20, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
diff --git a/other/visR/prec_recall/data_prec_recall_norm_scores.R b/other/visR/prec_recall/data_prec_recall_norm_scores.R
deleted file mode 100644
index 400e6c1..0000000
--- a/other/visR/prec_recall/data_prec_recall_norm_scores.R
+++ /dev/null
@@ -1,71 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/expP/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P_all.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-#data_all = data[data[,"drug_name"]!="Pyrazinamide",]
-data_all = data
-data_all_a = data_all[data_all[,"high"] == "Y" | data_all[,"all"] == "Y",]
-data_all_h = data_all[data_all[,"high"] == "Y",]
-
-good_count = length(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y", "mi"])
-
-scolor = c()
-scolor[["norm_mtmow"]] = "green"
-scolor[["norm_tscore"]] = "blue"
-scolor[["norm_mtscore"]] = "lightblue"
-scolor[["norm_tor"]] = "lightblue"
-scolor[["norm_tmi"]] = "lightblue"
-scolor[["norm_wsupport"]] = "black"
-scolor[["norm_rand_wsupport"]] = "grey"
-scolor[["norm_or"]] = "red"
-scolor[["norm_mi"]] = "orange"
-scolor[["norm_tmi"]] = "pink"
-scolor[["norm_tor"]] = "pink"
-scolor[["norm_stor"]] = "pink"
-scolor[["norm_tmow"]] = "yellow"
-scores_desc = c()
-
-
-x11()
-plot(c(), xlab="recall", ylab="precission", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-lwdc = 2.5
-
-for (score_name in names(scolor)) {
-	area = 0.0
-	ranks_sel = data_all[order(data_all[score_name], data_all[db_type]), c(score_name, "all", "high")]
-	
-	n = length(ranks_sel[,score_name])
-	prec = c()
-	recall = c()
-	
-	tp = 0
-	last_rank = ranks_sel[n, score_name]
-	
-	for (i in 1:n) {
-		rank = ranks_sel[n-i+1, score_name]
-		if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-			tp = tp + 1
-		}
-		fp = i - tp
-		if (rank != last_rank) {
-			if (length(prec) == 0) {
-				prec = c(prec, tp / i)
-				recall = c(recall, 0.0)
-			}
-			prec = c(prec, tp / i)
-			recall = c(recall, tp / good_count)
-			k = length(prec)
-			area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-		}
-		last_rank = ranks_sel[n-i+1, score_name]
-	}
-	lwdc = lwdc - 0.05
-	scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area,2) , "]", sep=""))
-	points(prec~recall, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-}
-
-legend("topright", fill=scolor, legend = scores_desc)
diff --git a/other/visR/prec_recall/data_prec_recall_pvalues.R b/other/visR/prec_recall/data_prec_recall_pvalues.R
deleted file mode 100644
index d70fcf0..0000000
--- a/other/visR/prec_recall/data_prec_recall_pvalues.R
+++ /dev/null
@@ -1,69 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/expP/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P_sel.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-#data_all = data[data[,"drug_name"]!="Pyrazinamide",]
-data_all = data
-data_all_a = data_all[data_all[,"high"] == "Y" | data_all[,"all"] == "Y",]
-data_all_h = data_all[data_all[,"high"] == "Y",]
-
-good_count = length(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y", "mi"])
-
-scolor = c()
-scolor[["pv.hyper"]] = "orange"
-scolor[["pv.or"]] = "red"
-scolor[["pv.mi"]] = "orange"
-scolor[["pv.tscore"]] = "lightblue"
-scolor[["pv.mtscore"]] = "pink"
-scolor[["pv.rand_tscore_stoch"]] = "blue"
-scolor[["pv.mtmow"]] = "green"
-scolor[["pv.tmow"]] = "yellow"
-scolor[["pv.wsupport"]] = "black"
-
-
-scores_desc = c()
-x11()
-plot(c(), xlab="recall", ylab="precission", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-lwdc = 2.5
-
-for (score_name in names(scolor)) { 
-	ranks_sel = data_all[order(-data_all[score_name], data_all[db_type]), c(score_name, "all", "high")]
-	
-	n = length(ranks_sel[,score_name])
-	prec = c()
-	recall = c()
-	
-	area = 0.0
-	tp = 0
-	last_rank = ranks_sel[n, score_name]
-	
-	for (i in 1:n) {
-		rank = ranks_sel[n-i+1, score_name]
-		if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-			tp = tp + 1
-		}
-		fp = i - tp
-		if (rank != last_rank) {
-			if (length(prec) == 0) {
-				prec = c(prec, tp / i)
-				recall = c(recall, 0.0)
-			} 
-			prec = c(prec, tp / i)
-			recall = c(recall, tp / good_count)
-			k = length(prec)
-			area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-		}
-		last_rank = ranks_sel[n-i+1, score_name]
-	}
-	print(area)
-	lwdc = lwdc - 0.05
-	scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area,2) , "]", sep=""))
-	points(prec~recall, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-}
-
-legend("topright", fill=scolor, legend = scores_desc)
diff --git a/other/visR/prec_recall/data_prec_recall_scores.R b/other/visR/prec_recall/data_prec_recall_scores.R
deleted file mode 100644
index d064abd..0000000
--- a/other/visR/prec_recall/data_prec_recall_scores.R
+++ /dev/null
@@ -1,57 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-prefix = "D:/Dropbox/Dropbox/gwadrib/"
-dataset = paste(prefix,"datasets/broad_mtb/exP/stats/", sep="")
-
-scolor = c()
-scolor[["n.or"]] = "red"
-scolor[["n.mi"]] = "orange"
-scolor[["n.ts"]] = "blue"
-scolor[["n.ws"]] = "black"
-scolor[["n.r.cct"]] = "green"
-
-#score = "n.or"
-
-input_fn = paste(dataset, "/",score,".txt", sep="")
-data = read.table(data_fn, header=FALSE, sep="\t")
-
-
-x11()
-plot(c(), xlab="recall", ylab="precission", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-for (score_name in names(scolor)) { 
-	area = 0.0
-	
-	n = length(ranks_sel[,score_name])
-	prec = c()
-	recall = c()
-	
-	tp = 0
-	last_rank = ranks_sel[n, score_name]
-	
-	for (i in 1:n) {
-		rank = ranks_sel[n-i+1, score_name]
-		if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-			tp = tp + 1
-		}
-		fp = i - tp
-		if (rank != last_rank) {
-			if (length(prec) == 0) {
-				prec = c(prec, tp / i)
-				recall = c(recall, 0.0)
-			}
-			prec = c(prec, tp / i)
-			recall = c(recall, tp / good_count)
-			k = length(prec)
-			area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-		}
-		last_rank = ranks_sel[n-i+1, score_name]
-	}
-
-	scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area,2) , "]", sep=""))
-	points(prec~recall, col=scolor[[score_name]], pch=18, lwd=1.5, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-}
-
-legend("topright", fill=scolor, legend = scores_desc)
diff --git a/other/visR/prec_recall/data_prec_recall_spec_pvalues.R b/other/visR/prec_recall/data_prec_recall_spec_pvalues.R
deleted file mode 100644
index 3e8e523..0000000
--- a/other/visR/prec_recall/data_prec_recall_spec_pvalues.R
+++ /dev/null
@@ -1,72 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/expP/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P_sel.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-
-x11()
-#
-par(mfrow=c(3,3))
-
-
-for (drug_name in c("Rifampicin", "Isoniazid", "Pyrazinamide", "Levofloxacin", "Moxifloxacin", "Ciprofloxacin", "Ofloxacin", "Ethambutol", "Streptomycin")) {
-	plot(c(), xlab="recall", ylab="precission", xlim=c(0.0,1.0), ylim=c(0.0, 1.0), main=drug_name)
-	
-	data_all = data[data[,"drug_name"]==drug_name,]
-	data_all_a = data_all[data_all[,"high"] == "Y" | data_all[,"all"] == "Y",]
-	data_all_h = data_all[data_all[,"high"] == "Y",]
-	
-	good_count = length(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y", "mi"])
-	
-	scolor = c()
-	scolor[["pv.tscore"]] = "blue"
-	scolor[["pv.mtscore"]] = "lightblue"
-	scolor[["pv.wsupport"]] = "black"
-	scolor[["pv.or"]] = "red"
-	scolor[["pv.mi"]] = "orange"
-	scolor[["pv.tmow"]] = "yellow"
-	
-	lwdc = 2.5
-	scores_desc = c()
-	
-	for (score_name in names(scolor)) { 
-		ranks_sel = data_all[order(-data_all[score_name], data_all[db_type]), c(score_name, "all", "high")]
-		
-		n = length(ranks_sel[,score_name])
-		prec = c(1.0)
-		recall = c(0.0)
-		
-		area = 0.0
-		tp = 0
-		last_rank = ranks_sel[n, score_name]
-		
-		for (i in 1:n) {
-			rank = ranks_sel[n-i+1, score_name]
-			if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-				tp = tp + 1
-			}
-			fp = i - tp
-			if (rank != last_rank) {
-				if (length(prec) == 0) {
-					prec = c(prec, tp / i)
-					recall = c(recall, 0.0)
-				} 
-				prec = c(prec, tp / i)
-				recall = c(recall, tp / good_count)
-				k = length(prec)
-				area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-			}
-			last_rank = ranks_sel[n-i+1, score_name]
-		}
-		print(area)
-		lwdc = lwdc - 0.05
-		scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area,2) , "]", sep=""))
-		points(prec~recall, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-	}
-	legend("topright", fill=scolor, legend = scores_desc)
-	
-}
-
diff --git a/other/visR/prec_recall/data_prec_recall_spec_scores.R b/other/visR/prec_recall/data_prec_recall_spec_scores.R
deleted file mode 100644
index f6671db..0000000
--- a/other/visR/prec_recall/data_prec_recall_spec_scores.R
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#s
-par(mfrow=c(3,3))
-
-for (drug_name in c("Rifampicin", "Isoniazid", "Pyrazinamide", "Levofloxacin", "Moxifloxacin", "Ciprofloxacin", "Ofloxacin", "Ethambutol", "Streptomycin")) {
-	plot(c(), xlab="recall", ylab="precission", xlim=c(0.0,1.0), ylim=c(0.0, 1.0), main=drug_name)
-	
-	data_all = data[data[,"drug_name"]==drug_name,]
-	data_all_a = data_all[data_all[,"high"] == "Y" | data_all[,"all"] == "Y",]
-	data_all_h = data_all[data_all[,"high"] == "Y",]
-	
-	good_count = length(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y", "mi"])
-	
-	scolor = c()
-	scolor[["n.ts"]] = "blue"
-	scolor[["n.ws"]] = "black"
-	scolor[["n.or"]] = "red"
-	scolor[["n.mi"]] = "orange"
-	
-	for (score_name in names(scolor)) { 
-		area = 0.0
-		ranks_sel = data_all[order(data_all[score_name], data_all[db_type]), c(score_name, "all", "high")]
-		
-		n = length(ranks_sel[,score_name])
-		prec = c(1.0)
-		recall = c(0.0)
-		
-		tp = 0
-		last_rank = ranks_sel[n, score_name]
-		
-		for (i in 1:n) {
-			rank = ranks_sel[n-i+1, score_name]
-			if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-				tp = tp + 1
-			}
-			fp = i - tp
-			if (rank != last_rank) {
-				prec = c(prec, tp / i)
-				recall = c(recall, tp / good_count)
-				k = length(prec)
-				area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-			}
-			last_rank = ranks_sel[n-i+1, score_name]
-		}
-		print(paste(drug_name, score_name, area))
-		points(prec~recall, col=scolor[[score_name]], pch=18, lwd=2.0, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-	}
-}
diff --git a/other/visR/pvalues/data_hist_pvalues.R b/other/visR/pvalues/data_hist_pvalues.R
deleted file mode 100644
index a1e3f6d..0000000
--- a/other/visR/pvalues/data_hist_pvalues.R
+++ /dev/null
@@ -1,106 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/expP/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P_all.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-data_all = data[data[,"drug_name"]=="Rifampicin",]
-#data_all = data[data[,"drug_name"] %in% c("Rifampicin", "Isoniazid", "Ethambutol", "Ofloxacin", "Ciprofloxacin"),]
-data_all_a = data_all[data_all[,"high"] == "Y" | data_all[,"all"] == "Y",]
-data_all_h = data_all[data_all[,"high"] == "Y",]
-
-good_count = length(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y", "mi"])
-
-score_name = "pv.tscore"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-
-x11()
-plot(prec~recall, col= "blue", pch=17, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "pv.wsupport"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-points(prec~recall, col= "black", pch=18, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "pv.odds_ratio"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-points(prec~recall, col= "red", pch=19, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "pv.mi"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-points(prec~recall, col= "orange", pch=20, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-score_name = "pv.tmow"
-ranks_sel = data_all[order(data_all[score_name]), c(score_name, "all", "high")]
-n = length(ranks_sel[,score_name])
-prec = c()
-recall = c()
-
-tp = 0
-for (i in 1:n) {
-	rank = ranks_sel[i, score_name]
-	if (ranks_sel[i, db_type] == "Y" | ranks_sel[i, "high"] == "Y") {
-		tp = tp + 1
-	}
-	fp = i - tp
-	prec = c(prec, tp / i)
-	recall = c(recall, tp / good_count)	
-}
-points(prec~recall, col= "yellow", pch=20, xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
diff --git a/other/visR/roc/roc_pvalues.R b/other/visR/roc/roc_pvalues.R
deleted file mode 100644
index 4a91cf1..0000000
--- a/other/visR/roc/roc_pvalues.R
+++ /dev/null
@@ -1,108 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/expP1/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P_all.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-
-#data2 = data[data[,"drug_name"]!="Pyrazinamide",]
-data2 = data
-data_all = data2[(data2[,"gene_rel"]=="N" | data2[,db_type] == "Y") & !(data2[,db_type] == "Y" & data2[,"R1"] < 2),]
-
-good_count = nrow(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y",])
-neg_count = nrow(data_all[data_all[,"gene_rel"] == "N",])
-
-print(paste("All associations: ", nrow(data_all)))
-print(paste("Positives (high confidence): ", sum(data_all[,"high"] == "Y")))
-print(paste("Negatives (high confidence): ", sum(data_all[,"high"] == "N")))
-
-score_names = names(data_all)[5:(length(data_all)-9)]
-pv_score_names = sort(score_names[substr(score_names,1,2)=="pv"])
-
-scores_desc = c()
-x11()
-plot(c(), xlab="fpr", ylab="tpr", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-lwdc = 2.5
-
-n = nrow(data_all)
-m = n
-
-scolor = c()
-scores_fill = c()
-
-for (score_name in pv_score_names) {
-	scolor[[score_name]] <- rgb(runif(1),runif(1),runif(1)) 
-	ord = 1.0
-	if (substr(score_name,1,1)=="c" | substr(score_name,1,2)=="pv") {
-		ord = -1.0
-	}
-	ranks_sel = data_all[order(ord*data_all[score_name], data_all[db_type]), c(score_name, "all", "high", "gene_rel")]
-	
-	prec = c()
-	recall = c()
-	fpr = c()
-	tpr = c()
-	
-	area = 0.0
-	area_roc = 0.0
-	dist = 1.0
-	tp = 0
-	fp = 0
-	fn = good_count
-	tn = neg_count
-	
-	last_rank = ranks_sel[n, score_name]
-	
-	for (i in 1:m) {
-		rank = ranks_sel[n-i+1, score_name]
-		if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-			tp = tp + 1
-			fn = fn - 1
-		} else {
-			fp = fp + 1
-			tn = tn - 1
-		}
-		
-		if (rank != last_rank) {
-			if (length(prec) == 0) {
-				prec = c(prec, tp / i)
-				recall = c(recall, 0.0)
-				fpr = c(fpr, 0.0)
-				tpr = c(tpr, 0.0)
-			} 
-			prec = c(prec, tp / (tp + fp))
-			recall = c(recall, tp / (tp + fn))
-			tpr = c(tpr, tp / (tp + fn))
-			fpr = c(fpr, fp / (fp + tn))
-			k = length(prec)
-			dist_c = sqrt(2*(fp / (fp + tn))^2 + (1-tp / (tp + fn))^2)
-			dist = min(dist, dist_c)
-			area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-			area_roc = area_roc + 0.5*(tpr[k] + tpr[k-1])*(fpr[k]-fpr[k-1])
-		}
-		last_rank = ranks_sel[n-i+1, score_name]
-	}
-	
-	prec = c(prec, tp / (tp + fp))
-	recall = c(recall, tp / (tp + fn))
-	tpr = c(tpr, tp / (tp + fn))
-	fpr = c(fpr, fp / (fp + tn))
-	
-	k = length(tpr)
-	if (k > 1) {
-		area_roc = area_roc + 0.5*(tpr[k] + tpr[k-1])*(fpr[k]-fpr[k-1])
-		#print(paste(score_name, area))
-		#print(paste(score_name, area_roc))
-		lwdc = lwdc - 0.05
-		scores_fill = c(scores_fill, scolor[[score_name]])
-		scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area_roc,3) , "]", " [AUC=" , round(area,3) , "]", " [DIST=" , round(dist,3) , "]", sep=""))
-		points(tpr~fpr, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-		#points(prec~recall, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-	}
-}
-
-legend("bottomright", fill=scores_fill, legend=scores_desc, y.intersp=1, ncol=2)
-
diff --git a/other/visR/roc/roc_scores.R b/other/visR/roc/roc_scores.R
deleted file mode 100644
index f6bc3bc..0000000
--- a/other/visR/roc/roc_scores.R
+++ /dev/null
@@ -1,123 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-substrRight <- function(x, n){
-	substr(x, nchar(x)-n+1, nchar(x))
-}
-
-curve_type = "ROC"
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/exP/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P_all.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-
-data2 = data[data[,"drug_name"]!="Ethionamide",]
-#data2 = data
-data_all = data2[(data2[,"gene_rel"]=="N" | data2[,db_type] == "Y"), ]
-
-good_count = nrow(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y",])
-neg_count = nrow(data_all[data_all[,"gene_rel"] == "N",])
-
-print(paste("All associations: ", nrow(data_all)))
-print(paste("Positives (high confidence): ", sum(data_all[,db_type] == "Y")))
-print(paste("Negatives (high confidence): ", sum(data_all[,db_type] == "N")))
-
-score_names = names(data_all)[5:(length(data_all)-9)]
-#comb_score_names = score_names[substr(score_names,1,1)=="c"]
-sel_score_names = score_names[substr(score_names,1,2)!="pv" & substr(score_names,1,2) == "n." & !substrRight(score_names,1) %in% c("0", "1")]
-sc_score_names = sort(sel_score_names)
-
-scores_desc = c()
-x11()
-if (curve_type == "ROC") {
-	plot(c(), xlab="fpr = FP/(FP+TN)", ylab="tpr (recall) = TP/(TP+FN)", xlim=c(0.0,1.0), ylim=c(0.0, 1.0), main=paste("Positives: ", sum(data_all[,"high"] == "Y"), ", negatives: ", sum(data_all[,"high"] == "N"), sep=""))
-} else {
-	plot(c(), xlab="tpr (recall) = TP/(TP+FN)", ylab="precision = TP/(TP+FP)", xlim=c(0.0,1.0), ylim=c(0.0, 1.0), main=paste("Positives: ", sum(data_all[,"high"] == "Y"), ", negatives: ", sum(data_all[,"high"] == "N"), sep=""))
-}
-lwdc = 2.5
-
-n = nrow(data_all)
-m = 200
-
-scolor = c()
-scores_fill = c()
-
-for (score_name in sc_score_names) {
-	scolor[[score_name]] <- rgb(runif(1),runif(1),runif(1)) 
-	ord = 1.0
-	if (substr(score_name,1,1)=="c" | substr(score_name,1,2)=="pv") {
-		ord = -1.0
-	}
-	ranks_sel = data_all[order(ord*data_all[score_name], data_all[db_type]), c(score_name, "all", "high", "gene_rel")]
-	
-	prec = c()
-	recall = c()
-	fpr = c()
-	tpr = c()
-	
-	area = 0.0
-	area_roc = 0.0
-	dist = 1.0
-	tp = 0
-	fp = 0
-	fn = good_count
-	tn = neg_count
-	
-	last_rank = ranks_sel[n, score_name]
-	
-	for (i in 1:m) {
-		rank = ranks_sel[n-i+1, score_name]
-		if (ranks_sel[n-i+1, db_type] == "Y") {
-			tp = tp + 1
-			fn = fn - 1
-		} else {
-			fp = fp + 1
-			tn = tn - 1
-		}
-		
-		if (rank != last_rank) {
-			if (length(prec) == 0) {
-				prec = c(prec, tp / i)
-				recall = c(recall, 0.0)
-				fpr = c(fpr, 0.0)
-				tpr = c(tpr, 0.0)
-			} 
-			prec = c(prec, tp / (tp + fp))
-			recall = c(recall, tp / (tp + fn))
-			tpr = c(tpr, tp / (tp + fn))
-			fpr = c(fpr, fp / (fp + tn))
-			k = length(prec)
-			dist_c = sqrt(2*(fp / (fp + tn))^2 + (1-tp / (tp + fn))^2)
-			dist = min(dist, dist_c)
-			area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-			area_roc = area_roc + 0.5*(tpr[k] + tpr[k-1])*(fpr[k]-fpr[k-1])
-		}
-		last_rank = ranks_sel[n-i+1, score_name]
-	}
-	
-	prec = c(prec, tp / (tp + fp))
-	recall = c(recall, tp / (tp + fn))
-	tpr = c(tpr, tp / (tp + fn))
-	fpr = c(fpr, fp / (fp + tn))
-	
-	k = length(tpr)
-	if (k > 1) {
-		area_roc = area_roc + 0.5*(tpr[k] + tpr[k-1])*(fpr[k]-fpr[k-1])
-		#print(paste(score_name, area))
-		#print(paste(score_name, area_roc))
-		lwdc = lwdc - 0.05
-		scores_fill = c(scores_fill, scolor[[score_name]])
-		#scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area_roc,3) , "]", " [AUC=" , round(area,3) , "]", " [DIST=" , round(dist,3) , "]", sep=""))
-		scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area_roc,3) , "]", " [AUC=" , round(area,3) , "]", sep=""))
-		if (curve_type == "ROC") {
-			points(tpr~fpr, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-		} else {
-			points(prec~recall, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-		}
-	}
-}
-
-legend("bottomright", fill=scores_fill, legend=scores_desc, y.intersp=1, ncol=2)
-
diff --git a/other/visR/roc/roc_scores_all.R b/other/visR/roc/roc_scores_all.R
deleted file mode 100644
index b5a050c..0000000
--- a/other/visR/roc/roc_scores_all.R
+++ /dev/null
@@ -1,102 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb/expP/analysis/"
-data_fn = paste(dataset, "/tbdb_scores_P_all.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-db_type = "high"
-
-#data2 = data[data[,"drug_name"]!="Pyrazinamide",]
-data2 = data
-data_all = data2[(data2[,"gene_rel"]=="N" | data2[,db_type] == "Y") & !(data2[,db_type] == "Y" & data2[,"R1"] < 2),]
-
-good_count = nrow(data_all[data_all[,"high"] == "Y" | data_all[,db_type] == "Y",])
-neg_count = nrow(data_all[data_all[,"gene_rel"] == "N",])
-
-print(paste("All associations: ", nrow(data_all)))
-print(paste("Positives (high confidence): ", sum(data_all[,"high"] == "Y")))
-print(paste("Negatives (high confidence): ", sum(data_all[,"high"] == "N")))
-
-score_names = names(data_all)[5:(length(data_all)-9)]
-
-scores_desc = c()
-x11()
-plot(c(), xlab="fpr", ylab="tpr", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-
-lwdc = 2.5
-
-n = nrow(data_all)
-m = 1000
-
-scolor = c()
-scores_fill = c()
-
-for (score_name in score_names) {
-	scolor[[score_name]] <- rgb(runif(1),runif(1),runif(1)) 
-	ord = -1.0
-	if (score_name %in% c("hyper", "tmow", "mtmow")) {
-		ord = -1.0
-	}
-	ranks_sel = data_all[order(ord*data_all[score_name], data_all[db_type]), c(score_name, "all", "high", "gene_rel")]
-
-	prec = c()
-	recall = c()
-	fpr = c()
-	tpr = c()
-	
-	area = 0.0
-	area_roc = 0.0
-	dist = 1.0
-	tp = 0
-	fp = 0
-	fn = good_count
-	tn = neg_count
-	
-	last_rank = ranks_sel[n, score_name]
-	
-	for (i in 1:m) {
-		rank = ranks_sel[n-i+1, score_name]
-		if (ranks_sel[n-i+1, db_type] == "Y" | ranks_sel[n-i+1, "high"] == "Y") {
-			tp = tp + 1
-			fn = fn - 1
-		} else {
-			fp = fp + 1
-			tn = tn - 1
-		}
-		
-		if (rank != last_rank) {
-			if (length(prec) == 0) {
-				prec = c(prec, tp / i)
-				recall = c(recall, 0.0)
-				fpr = c(fpr, 0.0)
-				tpr = c(tpr, 0.0)
-			} 
-			prec = c(prec, tp / (tp + fp))
-			recall = c(recall, tp / (tp + fn))
-			tpr = c(tpr, tp / (tp + fn))
-			fpr = c(fpr, fp / (fp + tn))
-			k = length(prec)
-			dist_c = sqrt(2*(fp / (fp + tn))^2 + (1-tp / (tp + fn))^2)
-			dist = min(dist, dist_c)
-			area = area + 0.5*(prec[k] + prec[k-1])*(recall[k]-recall[k-1])
-			area_roc = area_roc + 0.5*(tpr[k] + tpr[k-1])*(fpr[k]-fpr[k-1])
-		}
-		last_rank = ranks_sel[n-i+1, score_name]
-	}
-	fpr = c(fpr, 1.0)
-	tpr = c(tpr, 1.0)
-	k = length(tpr)
-	if (k > 1) {
-		area_roc = area_roc + 0.5*(tpr[k] + tpr[k-1])*(fpr[k]-fpr[k-1])
-		print(paste(score_name, area))
-		print(paste(score_name, area_roc))
-		lwdc = lwdc - 0.05
-		scores_fill = c(scores_fill, scolor[[score_name]])
-		scores_desc = c(scores_desc, paste(score_name, " [AUC=" , round(area_roc,2) , "]", " [DIST=" , round(dist,2) , "]", sep=""))
-		points(tpr~fpr, col=scolor[[score_name]], pch=18, lwd=lwdc, type="l", xlim=c(0.0,1.0), ylim=c(0.0, 1.0))
-	}
-}
-
-legend("bottomright", fill=scores_fill, legend=scores_desc, y.intersp=1, ncol=2)
-
diff --git a/other/visR/scores_cmp/data_scores_comp.R b/other/visR/scores_cmp/data_scores_comp.R
deleted file mode 100644
index 4f53a5e..0000000
--- a/other/visR/scores_cmp/data_scores_comp.R
+++ /dev/null
@@ -1,32 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-cutoff = 30
-
-data_a_acc = (data_a[,"tscore"] < cutoff) + (data_a[,"mi"] < cutoff) + (data_a[,"odds_ratio"] < cutoff) + (data_a[,"wsupport"] < cutoff)
-data_a_top = data_a[data_a_acc >= 4,]
-
-
-data_h_acc = (data_h[,"tscore"] < cutoff) + (data_h[,"mi"] < cutoff) + (data_h[,"odds_ratio"] < cutoff) + (data_h[,"wsupport"] < cutoff)
-data_h_top = data_h[data_h_acc >= 4,]
-
-summary(data_a_top[,c("tscore", "mi","odds_ratio", "wsupport", "tmow", "tmo", "to", "tow")])
-summary(data_h_top[,c("tscore", "mi","odds_ratio", "wsupport", "tmow", "tmo", "to", "tow")])
-
-print(length(data_a_top[,"tscore"]))
-print(length(data_h_top[,"tscore"]))
diff --git a/other/visR/scores_cmp/data_scores_comp_fig.R b/other/visR/scores_cmp/data_scores_comp_fig.R
deleted file mode 100644
index 914809c..0000000
--- a/other/visR/scores_cmp/data_scores_comp_fig.R
+++ /dev/null
@@ -1,40 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes_ranks/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-cutoff = 1060
-
-data_a_acc = (data_a[,"tscore"] < cutoff) + (data_a[,"mi"] < cutoff) + (data_a[,"odds_ratio"] < cutoff) + (data_a[,"wsupport"] < cutoff)
-data_a_top = data_a[data_a_acc >= 4,]
-summary(data_a_top[,c("tscore", "mi","odds_ratio", "wsupport", "tmow", "tmo", "to", "tow")])
-
-data_h_acc = (data_h[,"tscore"] < cutoff) + (data_h[,"mi"] < cutoff) + (data_h[,"odds_ratio"] < cutoff) + (data_h[,"wsupport"] < cutoff)
-data_h_top = data_h[data_h_acc >= 4,]
-summary(data_h_top[,c("tscore", "mi","odds_ratio", "wsupport", "tmow", "tmo", "to", "tow")])
-
-window_size = 1000
-
-pdf_fn = paste(dataset, "/figures/scores_cmp_200.pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-
-plot(data_h_top[,c("tmow")], data_h_top[,c("tscore")], xlab="tmow", ylab="scores", col="blue", pch=16, xlim=c(0,window_size), ylim=c(0,window_size))
-points(data_h_top[,c("tmow")],data_h_top[,c("mi")], col="orange", pch=17)
-points(data_h_top[,c("tmow")],data_h_top[,c("odds_ratio")], col="red", pch=18)
-points(data_h_top[,c("tmow")],data_h_top[,c("wsupport")], col="black", pch=19)
-points(data_h_top[,c("tmow")],data_h_top[,c("tmow")], col="yellow", pch=20)
-#legend("topleft", c("tree score", "mutual information", "odds ratio", "weighted support", "tmow"), cex=1.6,  bty="n", fill=c("blue", "orange", "red", "black", "yellow"));
-dev.off()
diff --git a/other/visR/scores_cmp/data_scores_comp_fig2_all.R b/other/visR/scores_cmp/data_scores_comp_fig2_all.R
deleted file mode 100644
index 80b8c52..0000000
--- a/other/visR/scores_cmp/data_scores_comp_fig2_all.R
+++ /dev/null
@@ -1,48 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-cutoffs = seq(2, 1000)
-scores = c("tscore", "mi", "odds_ratio", "wsupport", "tmow", "tmo", "to")
-
-dimnames = list(cutoffs, scores)
-data_a_means = matrix(nrow=length(cutoffs), ncol=length(scores), dimnames=dimnames)
-
-pdf_fn = paste(dataset, "/figures/scores_cmp_means_all_200.pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-par(mfrow=c(2,2))
-
-for (thr in c(1,2,3,4)) {
-	for (cutoff in cutoffs) {
-		data_a_acc = (data_a[,"tscore"] < cutoff) + (data_a[,"mi"] < cutoff) + (data_a[,"odds_ratio"] < cutoff) + (data_a[,"wsupport"] < cutoff)
-		data_a_top = data_a[data_a_acc >= thr,]
-		for (score in scores) {
-			data_a_means[as.character(cutoff), score] = mean(data_a_top[, score])
-		}
-	}
-	
-	plot(cutoffs, data_a_means[,"tscore"], pch=16, xlim=c(0,200), ylim=c(0,100), col="blue", xlab="cutoff", ylab="avg. ranking", main=paste("Mutations selected by ",as.character(thr)," scores",sep=""))
-	points(cutoffs, data_a_means[,"mi"], pch=17, col="orange")
-	points(cutoffs, data_a_means[,"odds_ratio"], pch=18, col="red")
-	points(cutoffs, data_a_means[,"wsupport"], pch=19, col="black")
-	points(cutoffs, data_a_means[,"tmow"], pch=20, col="yellow")
-	points(cutoffs, data_a_means[,"tmo"], pch=20, col="green")
-
-	legend("topleft", c("tree score", "mutual information", "odds ratio", "weighted support", "tmow"), cex=1.6,  bty="n", fill=c("blue", "orange", "red", "black", "yellow"));
-}
-dev.off()
-
diff --git a/other/visR/scores_cmp/data_scores_comp_fig2_high.R b/other/visR/scores_cmp/data_scores_comp_fig2_high.R
deleted file mode 100644
index 1051a44..0000000
--- a/other/visR/scores_cmp/data_scores_comp_fig2_high.R
+++ /dev/null
@@ -1,47 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes_ranks/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-#data = data[data[,"drug_name"] %in% c("Isoniazid", "Rifampicin", "Pyrazinamide", "Ethionamide", "Streptomycin"),]
-#data = data[data[,"drug_name"] %in% c("Rifampicin", "Pyrazinamide"),]
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-cutoffs = seq(2, 1000)
-scores = c("tscore", "mi", "odds_ratio", "wsupport", "tmow")
-
-dimnames = list(cutoffs, scores)
-data_h_means = matrix(nrow=length(cutoffs), ncol=length(scores), dimnames=dimnames)
-
-pdf_fn = paste(dataset, "/figures/scores_cmp_means_200.pdf", sep="")
-pdf(pdf_fn,width=18,height=10)
-par(mfrow=c(2,2))
-
-for (thr in c(1,2,3,4)) {
-	for (cutoff in cutoffs) {
-		data_h_acc = (data_h[,"tscore"] < cutoff) + (data_h[,"mi"] < cutoff) + (data_h[,"odds_ratio"] < cutoff) + (data_h[,"wsupport"] < cutoff)
-		data_h_top = data_h[data_h_acc >= thr,]
-		for (score in scores) {
-			data_h_means[as.character(cutoff), score] = mean(data_h_top[, score])
-		}
-	}
-	
-	plot(cutoffs, data_h_means[,"tscore"], pch=16, xlim=c(0,200), ylim=c(0,100), col="blue", xlab="cutoff", ylab="avg. ranking", main=paste("Mutations selected by ",as.character(thr)," scores",sep=""))
-	points(cutoffs, data_h_means[,"mi"], pch=17, col="orange")
-	points(cutoffs, data_h_means[,"odds_ratio"], pch=18, col="red")
-	points(cutoffs, data_h_means[,"wsupport"], pch=19, col="black")
-	points(cutoffs, data_h_means[,"tmow"], pch=20, col="yellow")
-
-	legend("topleft", c("tree score", "mutual information", "odds ratio", "weighted support", "tmow"), cex=1.6,  bty="n", fill=c("blue", "orange", "red", "black", "yellow"));
-}
-dev.off()
-
diff --git a/other/visR/scores_corr/data_rank_corr.R b/other/visR/scores_corr/data_rank_corr.R
deleted file mode 100644
index dc4efa2..0000000
--- a/other/visR/scores_corr/data_rank_corr.R
+++ /dev/null
@@ -1,21 +0,0 @@
-#install.packages("corrgram")
-require(graphics); require(grDevices); require(corrgram)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "../camber-pred/datasets/broad_mtb"
-#drug_name="Rifampicin"
-#drug_name="Pyrazinamide"
-drug_name="Isoniazid"
-data_fn = paste(dataset, "/det_bin_comb_ranks/",drug_name,"/FINAL7_S.txt", sep="")
-#data_fn = paste(dataset, "/det_bin_comb/",drug_name,"/FINAL7_S.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-x11()
-#corrgram(data[,c("odds_ratio", "mi", "wsupport", "tscore")], order=TRUE, lower.panel=panel.shade, 
-		#upper.panel=NULL, text.panel=panel.txt, 
-		#main="Drug resistance core rankings correlations", cex=1.5)
-
-corrgram(data[,c("odds_ratio", "mi", "wsupport", "tscore", "ranks_sum_score")], order=TRUE, lower.panel=panel.shade, 
-		upper.panel=NULL, text.panel=panel.txt, 
-		main="Drug resistance core rankings correlations", cex=1.5)
-
diff --git a/other/visR/scores_corr/data_ranks_simple.R b/other/visR/scores_corr/data_ranks_simple.R
deleted file mode 100644
index cadb416..0000000
--- a/other/visR/scores_corr/data_ranks_simple.R
+++ /dev/null
@@ -1,24 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices);
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-dataset = "datasets/broad_mtb"
-data_fn = paste(dataset, "/ranks_bin_genes/FINAL7_P.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-data_a = data[data[,"high"] == "Y" | data[,"all"] == "Y",]
-data_h = data[data[,"high"] == "Y",]
-
-#summary(data[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_a[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-#summary(data_h[,c("tscore", "mi","odds_ratio", "wsupport", "ranks_sum_score")])
-
-cutoff = 200
-
-data_h_acc = (data_h[,"tscore"] < cutoff) + (data_h[,"mi"] < cutoff) + (data_h[,"odds_ratio"] < cutoff) + (data_h[,"wsupport"] < cutoff)+ (data_h[,"ranks_sum_score"] < cutoff)
-data_h_top = data_h[data_h_acc >= 5,]
-summary(data_h_top[,c("tscore", "mi","odds_ratio", "wsupport","ranks_sum_score")])
-
-data_a_acc = (data_a[,"tscore"] < cutoff) + (data_a[,"mi"] < cutoff) + (data_a[,"odds_ratio"] < cutoff) + (data_a[,"wsupport"] < cutoff)+ (data_h[,"ranks_sum_score"] < cutoff)
-data_a_top = data_a[data_a_acc >= 5,]
-summary(data_a_top[,c("tscore", "mi","odds_ratio", "wsupport","ranks_sum_score")])
diff --git a/other/visR/scores_corr/score_correlations.R b/other/visR/scores_corr/score_correlations.R
deleted file mode 100644
index e598791..0000000
--- a/other/visR/scores_corr/score_correlations.R
+++ /dev/null
@@ -1,35 +0,0 @@
-#install.packages()
-require(graphics); require(grDevices); require(corrgram); require(corrplot)
-
-#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
-drug_name = "Isoniazid"
-dataset = "broad_mtb"
-data_fn = paste(dataset, "/det_bin_corr/",drug_name,"_FINAL7_S.txt", sep="")
-data = read.table(data_fn, header=TRUE, sep="\t")
-
-cor(data[1:10,c(2,4,5,6,7,8)], method="kendall") 
-
-x11()
-plot(data[1:1000,c(2,4,5,6,7,8)])
-
-
-par(mar=c(12,8,1,1), oma=c(0,0,1,1), mgp=c(5,1,0))
-data_mat = t(as.matrix(data[,c(12,15)]))
-data_mat1 = t(as.matrix(data[,c(12)]))
-data_mat2 = t(as.matrix(data[,c(15)]))
-colnames(data_mat) <- data[,1]
-
-barplot(data_mat, col=c("green", "red"), beside=TRUE, xaxt="n", cex=2, ylim = c(0,1.0), cex.lab=2.5, cex.axis=1.5, cex.main=2.5, cex.sub=2.5, las=2, xlab="", ylab="F1 measure of accuracy")
-axis(1, at=3*1:20-1, labels=data[,1], las=2, cex.axis=1.5, cex.lab=2.5, cex.sub=2.5, cex=2.5)
-legend(34, 1.05, c("PATRIC annotations", "PATRIC annotations after eCAMBer"), cex=1.8,  bty="n", fill=c("green", "red"));
-#barplot(data_mat2, col=c("green"), beside=TRUE)
-#
-#data_mat2 = t(as.matrix(data[,c(6,9,8)]))
-#colnames(data_mat2) <- data[,1]
-#
-#barplot(data_mat2, col=c("red", "green", "blue"))
-
-
-
-#barplot(data_mat, col=c("red", "brown", "green", "blue", "orange"),main=paste("Method: ", m, sep = " "))
-#legend("topleft", c("TP", "TN", "FP", "FN", "NO"), cex=0.6,  bty="n", fill=c("red", "brown", "green", "blue", "orange"));
diff --git a/other/visR/test.R b/other/visR/test.R
deleted file mode 100644
index e83fae9..0000000
--- a/other/visR/test.R
+++ /dev/null
@@ -1,26 +0,0 @@
-require("errbar")
-
-set.seed(1)
-x <- 1:10
-y <- x + rnorm(10)
-delta <- runif(10)
-errbar( x, y, y + delta, y - delta )
-
-# Show bootstrap nonparametric CLs for 3 group means and for
-# pairwise differences on same graph
-group <- sample(c('a','b','d'), 200, TRUE)
-y     <- runif(200) + .25*(group=='b') + .5*(group=='d')
-cla <- smean.cl.boot(y[group=='a'],B=100,reps=TRUE)  # usually B=1000
-a   <- attr(cla,'reps')
-clb <- smean.cl.boot(y[group=='b'],B=100,reps=TRUE)
-b   <- attr(clb,'reps')
-cld <- smean.cl.boot(y[group=='d'],B=100,reps=TRUE)
-d   <- attr(cld,'reps')
-a.b <- quantile(a-b,c(.025,.975))
-a.d <- quantile(a-d,c(.025,.975))
-b.d <- quantile(b-d,c(.025,.975))
-errbar(c('a','b','d','a - b','a - d','b - d'),
-       c(cla[1],clb[1],cld[1],cla[1]-clb[1],cla[1]-cld[1],clb[1]-cld[1]),
-       c(cla[3],clb[3],cld[3],a.b[2],a.d[2],b.d[2]),
-       c(cla[2],clb[2],cld[2],a.b[1],a.d[1],b.d[1]),
-       Type=c(1,1,1,2,2,2), xlab='', ylab='')
\ No newline at end of file
diff --git a/src/drsoft/analysis/a1_save_details_scores_all.py b/src/drsoft/analysis/a1_save_details_scores_all.py
index 3caaf47..46fd929 100644
--- a/src/drsoft/analysis/a1_save_details_scores_all.py
+++ b/src/drsoft/analysis/a1_save_details_scores_all.py
@@ -1,29 +1,21 @@
 import sys
 import os
-import copy
 import multiprocessing
 from multiprocessing import Pool
 
+sys.path += [os.path.abspath(os.curdir)]
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_scoring import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-
+from src.drsoft.utils import gwamar_params_utils, gwamar_res_io_utils,\
+  gwamar_scoring, gwamar_bin_utils, gwamar_muts_utils
+from src.drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils.gwamar_res_utils import compareProfiles
+from src.drsoft.utils.gwamar_strains_io_utils import readStrains
+from src.drsoft.utils.gwamar_progress_utils import GWAMARProgress
 
 def saveScoresCombined(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
     results_dir = parameters["RESULTS_DIR"]
@@ -40,7 +32,7 @@ def saveScoresCombined(params):
     
 
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     res_profiles = {}
@@ -66,18 +58,18 @@ def saveScoresCombined(params):
             score_map[score][bin_profile_id] = score_val
         input_fh.close()
     
-    revord = revOrder(score_sort)
+    revord = gwamar_scoring.revOrder(score_sort)
 
     bin_profile_ids_sorted = sorted(bin_profile_ids, key=lambda bin_profile_id:(
                     revord*float(score_map.get(score_sort,{}).get(bin_profile_id,0.0))
                     ))
 
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '.txt')         
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True, decompress=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True, decompress=True)
     input_fh.close()
 
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '_det.txt')
-    bin_profiles_details = readBinProfileDetails(input_fh, strains.count(), parameters["MT"], out_format="tuple", ref_counts=True)
+    bin_profiles_details = gwamar_bin_utils.readBinProfileDetails(input_fh, strains.count(), parameters["MT"], out_format="tuple", ref_counts=True)
     input_fh.close()
     
     tls = [] 
@@ -86,9 +78,9 @@ def saveScoresCombined(params):
     if show_profiles in ["B","Y"]:
         tl = dr_profile + "\t"
     elif show_profiles == "K":
-        tl = ''.join(profileSubset(drp.full_profile, drp.getKnown())) + "\t"
+        tl = ''.join(gwamar_muts_utils.profileSubset(drp.full_profile, drp.getKnown())) + "\t"
     elif show_profiles == "R":
-        tl = ''.join(profileSubset(drp.full_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
+        tl = ''.join(gwamar_muts_utils.profileSubset(drp.full_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
     else: 
         tl = ""
     
@@ -102,15 +94,15 @@ def saveScoresCombined(params):
         bin_profile_id = bin_profile_ids_sorted[i]
         bin_profile = bin_profiles[bin_profile_id]
 
-        mut_details = binProfilesDetailsToStr(bin_profiles_details[bin_profile_id])
+        mut_details = gwamar_bin_utils.binProfilesDetailsToStr(bin_profiles_details[bin_profile_id])
 
         s0, s1, i0, i1, r0, r1 = compareProfiles(bin_profile, dr_profile)
         if show_profiles in ["B","Y"]:
             tl = ''.join(bin_profile) + "\t"
         elif show_profiles == "K": 
-            tl = ''.join(profileSubset(bin_profile, drp.getKnown())) + "\t"
+            tl = ''.join(gwamar_muts_utils.profileSubset(bin_profile, drp.getKnown())) + "\t"
         elif show_profiles == "R":
-            tl = ''.join(profileSubset(bin_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
+            tl = ''.join(gwamar_muts_utils.profileSubset(bin_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
         else: 
             tl = ""
 
@@ -140,8 +132,8 @@ def saveScoresCombined(params):
 if __name__ == '__main__':
     print("a1_save_details_scores_all.py. Start.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    parameters = gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -159,7 +151,7 @@ if __name__ == '__main__':
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
diff --git a/src/drsoft/analysis/a2_save_details_scores_sel.py b/src/drsoft/analysis/a2_save_details_scores_sel.py
index eb3afb8..bb7cb8b 100644
--- a/src/drsoft/analysis/a2_save_details_scores_sel.py
+++ b/src/drsoft/analysis/a2_save_details_scores_sel.py
@@ -1,28 +1,22 @@
 import sys
 import os
-import copy
 import multiprocessing
 from multiprocessing import Pool
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_scoring import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_res_io_utils,\
+  gwamar_scoring, gwamar_bin_utils, gwamar_muts_utils, gwamar_ann_utils,\
+  gwamar_muts_io_utils
+from src.drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils.gwamar_res_utils import compareProfiles
+from src.drsoft.utils.gwamar_strains_io_utils import readStrains
+from src.drsoft.utils.gwamar_progress_utils import GWAMARProgress
 
 def saveScoresCombined(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
     gold_dir = parameters["DATASET_GOLD_DIR"]
@@ -40,7 +34,7 @@ def saveScoresCombined(params):
     
 
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     res_profiles = {}
@@ -67,23 +61,23 @@ def saveScoresCombined(params):
             score_map[score][bin_profile_id] = score_val
         input_fh.close()
     
-    revord = revOrder(score_sort)
+    revord = gwamar_scoring.revOrder(score_sort)
 
     bin_profile_ids_sorted = sorted(bin_profile_ids, key=lambda bin_profile_id:(
                     revord*float(score_map.get(score_sort,{}).get(bin_profile_id,0.0))
                     ))
 
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '.txt')         
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True, decompress=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True, decompress=True)
     input_fh.close()
 
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '_det.txt')
-    bin_profile_details = readBinProfileDetails(input_fh, strains.count(), parameters["MT"], out_format="tuple", ref_counts=True)
+    bin_profile_details = gwamar_bin_utils.readBinProfileDetails(input_fh, strains.count(), parameters["MT"], out_format="tuple", ref_counts=True)
     input_fh.close()
 
     if os.path.exists(input_dir + "/cluster_gene_ref_ids.txt"):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {}
@@ -96,13 +90,13 @@ def saveScoresCombined(params):
         exit()
 
     input_fh = open(input_fn)
-    drug_res_rels = readGoldAssociations(input_fh, cluster_ids_rev, genes_level=True)#loadDrugResRels(input_fh, cluster_ids_rev, genes_level=True)
+    drug_res_rels = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev, genes_level=True)#loadDrugResRels(input_fh, cluster_ids_rev, genes_level=True)
     input_fh.close()
 
     drug_res_rels["Rifampicin"]["Rv0668"] = None
     drug_res_rels["Rifampicin"]["Rv3457c"] = None
 
-    bin_profiles_res_rel = selectResRelBinProfiles(bin_profile_details, drug_res_rels.get(drug_name, {}), cluster_ids, cluster_ids_rev)
+    bin_profiles_res_rel = gwamar_bin_utils.selectResRelBinProfiles(bin_profile_details, drug_res_rels.get(drug_name, {}), cluster_ids, cluster_ids_rev)
     
     tls = []
     
@@ -111,9 +105,9 @@ def saveScoresCombined(params):
     if show_profiles in ["B","Y"]:
         tl = dr_profile + "\t"
     elif show_profiles == "K":
-        tl = ''.join(profileSubset(drp.full_profile, drp.getKnown())) + "\t"
+        tl = ''.join(gwamar_muts_utils.profileSubset(drp.full_profile, drp.getKnown())) + "\t"
     elif show_profiles == "R":
-        tl = ''.join(profileSubset(drp.full_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
+        tl = ''.join(gwamar_muts_utils.profileSubset(drp.full_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
     else: 
         tl = ""
     
@@ -128,16 +122,16 @@ def saveScoresCombined(params):
         if not bin_profile_id in bin_profiles_res_rel:
             continue
         bin_profile = bin_profiles[bin_profile_id]
-        mut_details = binProfilesDetailsToStr(bin_profiles_res_rel[bin_profile_id])
+        mut_details = gwamar_bin_utils.binProfilesDetailsToStr(bin_profiles_res_rel[bin_profile_id])
 
         s0, s1, i0, i1, r0, r1 = compareProfiles(bin_profile, dr_profile) 
         
         if show_profiles in ["B","Y"]:
             tl = ''.join(bin_profile) + "\t"
         elif show_profiles == "K": 
-            tl = ''.join(profileSubset(bin_profile, drp.getKnown())) + "\t"
+            tl = ''.join(gwamar_muts_utils.profileSubset(bin_profile, drp.getKnown())) + "\t"
         elif show_profiles == "R":
-            tl = ''.join(profileSubset(bin_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
+            tl = ''.join(gwamar_muts_utils.profileSubset(bin_profile, drp.getResistant() | drp.getInterresistant())) + "\t"
         else: tl = ""
 
 
@@ -165,8 +159,8 @@ def saveScoresCombined(params):
     
 if __name__ == '__main__':
     print("a2_save_details_scores_sel.py: Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -184,7 +178,7 @@ if __name__ == '__main__':
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
diff --git a/src/drsoft/analysis/a3_save_associations_all.py b/src/drsoft/analysis/a3_save_associations_all.py
index 0923edd..64e02a2 100644
--- a/src/drsoft/analysis/a3_save_associations_all.py
+++ b/src/drsoft/analysis/a3_save_associations_all.py
@@ -1,26 +1,16 @@
 import sys
 import os
-import shutil
 import multiprocessing
 from multiprocessing import Pool
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_scoring import revOrder
-from drsoft.utils.gwamar_strains_io_utils import readStrains
+sys.path += [os.path.abspath(os.curdir)]
 
-THR = 10000
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring,\
+  gwamar_res_utils, gwamar_utils, gwamar_strains_io_utils, gwamar_res_io_utils,\
+  gwamar_bin_utils, gwamar_ann_utils, gwamar_muts_io_utils,\
+  gwamar_progress_utils
 
+THR = 10000
 
 def printGoldShort(gold_assocs, comment=""):
     for drug_name in gold_assocs:
@@ -104,12 +94,9 @@ def goldAssociations(bin_profile_details, drug_name):
 
 def saveAssociations(params):
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    dataset = parameters["D"]
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     analysis_dir = parameters["RESULTS_ANALYSIS_DIR"]
 
@@ -118,7 +105,7 @@ def saveAssociations(params):
     statistics = {}
     associations = {}
 
-    revord = revOrder(score)
+    revord = gwamar_scoring.revOrder(score)
                      
     for drug_res_profile in drug_res_profiles:
         dr_profile = drug_res_profile.full_profile
@@ -147,7 +134,7 @@ def saveAssociations(params):
 
             associations[(drug_name_id, mutkey_id)] = mut_scores[(mutkey, bin_profile_id)]
 
-            s0, s1, i0, i1, r0, r1 = compareProfiles(bin_profile, dr_profile)  
+            s0, s1, i0, i1, r0, r1 = gwamar_res_utils.compareProfiles(bin_profile, dr_profile)  
             statistics[(drug_name_id, mutkey_id)] = "\t".join(map(str, [s0, s1, i0, i1, r0, r1]))
 
     associations_sorted = sorted(associations, key=lambda assoc_key:revord*associations[assoc_key])[:THR]
@@ -171,8 +158,8 @@ def saveAssociations(params):
 if __name__ == '__main__':
     print("a3_save_associations.py: saves association lists.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     dataset = parameters["D"]
     input_dir = parameters["DATASET_INPUT_DIR"]
@@ -186,30 +173,30 @@ if __name__ == '__main__':
     scores_p = parameters["SCORES"].split(",")
 
 
-    ensure_dir(analysis_dir + "/assocs_best_all/")
+    gwamar_utils.ensure_dir(analysis_dir + "/assocs_best_all/")
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     m_type = parameters["MT"]
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_res_profiles = readResistanceProfiles(input_fh, load_int=True)
+    drug_res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '_det.txt')
-    bin_profile_details = readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple", ref_counts=False, mut_counts=True)
+    bin_profile_details = gwamar_bin_utils.readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple", ref_counts=False, mut_counts=True)
     input_fh.close()
 
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '.txt')
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
     input_fh.close()
     
     input_fn = input_dir + "/cluster_gene_ref_ids.txt"
     if os.path.exists(input_fn):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {} 
@@ -221,7 +208,7 @@ if __name__ == '__main__':
         drug_res_conf_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_conf_db = readGoldAssociations(input_fh, cluster_ids_rev)
+        drug_res_conf_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev)
         input_fh.close()
     
     input_fn = gold_dir + "/gold_assocs_A.txt"
@@ -230,7 +217,7 @@ if __name__ == '__main__':
         drug_res_all_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_all_db = readGoldAssociations(input_fh, cluster_ids_rev)
+        drug_res_all_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev)
         input_fh.close()
 
     score_params_union = set([])    
@@ -264,7 +251,7 @@ if __name__ == '__main__':
 
     WORKERS = min(WORKERS, len(TASKS))
 
-    progress = GWAMARProgress("Associations all")
+    progress = gwamar_progress_utils.GWAMARProgress("Associations all")
     progress.setJobsCount(len(TASKS))
     if WORKERS > 1:
         pool = Pool(processes=WORKERS)
diff --git a/src/drsoft/analysis/a4_save_associations_sel.py b/src/drsoft/analysis/a4_save_associations_sel.py
index 96909c6..8ed8103 100644
--- a/src/drsoft/analysis/a4_save_associations_sel.py
+++ b/src/drsoft/analysis/a4_save_associations_sel.py
@@ -1,24 +1,14 @@
 import sys
 import os
-import shutil
 import multiprocessing
-import re
 from multiprocessing import Pool
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_scoring import revOrder
-from drsoft.utils.gwamar_strains_io_utils import readStrains
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring,\
+  gwamar_res_utils, gwamar_muts_io_utils, gwamar_muts_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils, gwamar_bin_utils,\
+  gwamar_ann_utils, gwamar_progress_utils
 
 THR = 10000
 
@@ -47,7 +37,6 @@ def readScoreMutations(bin_profile_details, scores_bin_map):
     mut_scores = {}
 
     for bin_profile_id in scores_bin_map:
-        bin_profile_score = scores_bin_map[bin_profile_id]
         bin_profile = bin_profiles.get(bin_profile_id, None)
         if bin_profile == None: continue
 
@@ -104,14 +93,10 @@ def goldAssociations(bin_profile_details, drug_name):
 
 def saveAssociations(params):
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    dataset = parameters["D"]
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     scores_dir = parameters["RESULTS_SCORES_DIR"]
-    ranks_dir = parameters["RESULTS_RANKS_DIR"]
     analysis_dir = parameters["RESULTS_ANALYSIS_DIR"]
     output_type = parameters.get("A_OUTPUT_TYPE", "LATEX")
 
@@ -120,7 +105,7 @@ def saveAssociations(params):
     statistics = {}
     associations = {}
 
-    revord = revOrder(score)
+    revord = gwamar_scoring.revOrder(score)
                      
     for drug_res_profile in drug_res_profiles:
         dr_profile = drug_res_profile.full_profile
@@ -149,7 +134,7 @@ def saveAssociations(params):
 
             associations[(drug_name_id, mutkey_id)] = mut_scores[(mutkey, bin_profile_id)]
 
-            s0, s1, i0, i1, r0, r1 = compareProfiles(bin_profile, dr_profile)  
+            s0, s1, i0, i1, r0, r1 = gwamar_res_utils.compareProfiles(bin_profile, dr_profile)  
             statistics[(drug_name_id, mutkey_id)] = "\t".join(map(str, [s0, s1, i0, i1, r0, r1]))
 
     associations_sorted = sorted(associations, key=lambda assoc_key: revord*associations[assoc_key])
@@ -159,7 +144,6 @@ def saveAssociations(params):
     output_fh = open(output_fn, "w")
     for (drug_name_id, mutkey_id) in associations_sorted:
         score_val = associations[(drug_name_id, mutkey_id)]
-        stats_tmp = statistics[(drug_name_id, mutkey_id)]
         gold_assoc = gold_assocs[(drug_name_id, mutkey_id)]
         db_all, db_hc, db_neigh_hc, db_gene_all, db_gene_high = gold_assoc.split()
         if db_gene_high == "Y":
@@ -167,7 +151,7 @@ def saveAssociations(params):
             gene_id, cluster_id, gene_name, position, ref_states_txt, mut_states_txt = mutkey_id.split()
             #mut_info = "\t".join([gene_id, gene_name, ref_states_txt+position+mut_states_txt.replace(",","/").replace("/*","")])
             if output_type.startswith("L"):
-                mut_states_out = mutsDescToLatex(mut_states_txt)
+                mut_states_out = gwamar_muts_utils.mutsDescToLatex(mut_states_txt)
             else:
                 mut_states_out = mut_states_txt
             mut_info = "\t".join([gene_id, gene_name, ref_states_txt+position+mut_states_out])
@@ -182,8 +166,8 @@ def saveAssociations(params):
 if __name__ == '__main__':
     print("a3_save_associations.py: saves association lists.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     dataset = parameters["D"]
     input_dir = parameters["DATASET_INPUT_DIR"]
@@ -198,34 +182,31 @@ if __name__ == '__main__':
     scores_p = parameters["SCORES"].split(",")
 
 
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_dir + "/assocs_best_sel/")
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_dir + "/assocs_best_sel/")
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     m_type = parameters["MT"]
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_res_profiles = readResistanceProfiles(input_fh, load_int=True)
+    drug_res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '_det.txt')
-    bin_profile_details = readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple", ref_counts=False, mut_counts=True)
+    bin_profile_details = gwamar_bin_utils.readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple", ref_counts=False, mut_counts=True)
     input_fh.close()
 
-    for bin_profile_det_k in bin_profile_details.keys()[:2]:
-        print(bin_profile_det_k, bin_profile_details[bin_profile_det_k])
-
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '.txt')
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
     input_fh.close()
     
     input_fn = input_dir + "/cluster_gene_ref_ids.txt"
     if os.path.exists(input_fn):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {} 
@@ -237,7 +218,7 @@ if __name__ == '__main__':
         drug_res_conf_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_conf_db = readGoldAssociations(input_fh, cluster_ids_rev)
+        drug_res_conf_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev)
         input_fh.close()
     
     input_fn = gold_dir + "/gold_assocs_A.txt"
@@ -246,7 +227,7 @@ if __name__ == '__main__':
         drug_res_all_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_all_db = readGoldAssociations(input_fh, cluster_ids_rev)
+        drug_res_all_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev)
         input_fh.close()
 
     score_params_union = set([])    
@@ -280,7 +261,7 @@ if __name__ == '__main__':
 
     WORKERS = min(WORKERS, len(TASKS))
 
-    progress = GWAMARProgress("Associations selected")
+    progress = gwamar_progress_utils.GWAMARProgress("Associations selected")
     progress.setJobsCount(len(TASKS))
     if WORKERS > 1:
         pool = Pool(processes=WORKERS)
diff --git a/src/drsoft/comparison/cmp0_save_associations.py b/src/drsoft/comparison/cmp0_save_associations.py
index 60313ab..ef02a25 100644
--- a/src/drsoft/comparison/cmp0_save_associations.py
+++ b/src/drsoft/comparison/cmp0_save_associations.py
@@ -1,23 +1,14 @@
 import sys
 import os
-import shutil
 import multiprocessing
 from multiprocessing import Pool
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_scoring import revOrder
-from drsoft.utils.gwamar_strains_io_utils import readStrains
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring,\
+  gwamar_res_utils, gwamar_utils, gwamar_strains_io_utils, gwamar_res_io_utils,\
+  gwamar_bin_utils, gwamar_ann_utils, gwamar_muts_io_utils,\
+  gwamar_progress_utils
 
 def readGeneSet(input_fh):
     lines = input_fh.readlines()
@@ -64,7 +55,6 @@ def readScoreMutations(bin_profile_details, scores_bin_map):
     mut_scores = {}
 
     for bin_profile_id in scores_bin_map:
-        bin_profile_score = scores_bin_map[bin_profile_id]
         bin_profile = bin_profiles.get(bin_profile_id, None)
         if bin_profile == None: continue
 
@@ -124,15 +114,10 @@ def goldAssociations(bin_profile_details, drug_name):
 
 def saveAssociations(params):
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    dataset = parameters["D"]
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     scores_dir = parameters["RESULTS_SCORES_DIR"]
-    ranks_dir = parameters["RESULTS_RANKS_DIR"]
-    cmp_dir = parameters["RESULTS_CMP_DIR"]
     cmp_assocs_dir = parameters["RESULTS_CMP_ASSOCS_DIR"]
 
     score, gold_assocs, mutations_map, drug_names_map = params
@@ -140,7 +125,7 @@ def saveAssociations(params):
     statistics = {}
     associations = {}
 
-    revord = revOrder(score)
+    revord = gwamar_scoring.revOrder(score)
                      
     for drug_res_profile in drug_res_profiles:
         dr_profile = drug_res_profile.full_profile
@@ -169,7 +154,7 @@ def saveAssociations(params):
 
             associations[(drug_name_id, mutkey_id)] = mut_scores[(mutkey, bin_profile_id)]
 
-            s0, s1, i0, i1, r0, r1 = compareProfiles(bin_profile, dr_profile)  
+            s0, s1, i0, i1, r0, r1 = gwamar_res_utils.compareProfiles(bin_profile, dr_profile)  
             statistics[(drug_name_id, mutkey_id)] = "\t".join(map(str, [s0,s1,i0,i1,r0,r1]))
 
     associations_sorted = sorted(associations, key=lambda assoc_key: revord*associations[assoc_key])
@@ -189,8 +174,8 @@ def saveAssociations(params):
 if __name__ == '__main__':
     print("cmp0_save_associations.py: saves association lists.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     dataset = parameters["D"]
     input_dir = parameters["DATASET_INPUT_DIR"]
@@ -201,8 +186,8 @@ if __name__ == '__main__':
     cmp_dir = parameters["RESULTS_CMP_DIR"]
     cmp_assocs_dir = parameters["RESULTS_CMP_ASSOCS_DIR"]
 
-    ensure_dir(cmp_dir)
-    ensure_dir(cmp_assocs_dir)
+    gwamar_utils.ensure_dir(cmp_dir)
+    gwamar_utils.ensure_dir(cmp_assocs_dir)
 
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
@@ -210,31 +195,31 @@ if __name__ == '__main__':
     scores_p = parameters["SCORES"].split(",")
 
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     m_type = parameters["MT"]
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_res_profiles = readResistanceProfiles(input_fh, load_int=True)
+    drug_res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
 
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '_det.txt')
-    bin_profile_details = readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple")
+    bin_profile_details = gwamar_bin_utils.readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple")
     input_fh.close()
 
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '.txt')
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
     input_fh.close()
     
     input_fn = input_dir + "/cluster_gene_ref_ids.txt"
     if os.path.exists(input_fn):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {} 
@@ -246,7 +231,7 @@ if __name__ == '__main__':
         drug_res_conf_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_conf_db = readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
+        drug_res_conf_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
         input_fh.close()
     
     input_fn = gold_dir + "/gold_assocs_A.txt"
@@ -255,7 +240,7 @@ if __name__ == '__main__':
         drug_res_all_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_all_db = readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
+        drug_res_all_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
         input_fh.close()
 
     input_fn = gold_dir + "/broad_genes.txt"
@@ -320,7 +305,7 @@ if __name__ == '__main__':
 
     WORKERS = min(WORKERS, len(TASKS))
 
-    progress = GWAMARProgress("Associations")
+    progress = gwamar_progress_utils.GWAMARProgress("Associations")
     progress.setJobsCount(len(TASKS))
     if WORKERS > 1:
         pool = Pool(processes=WORKERS)
diff --git a/src/drsoft/comparison/cmp1_prec-recall_stats.py b/src/drsoft/comparison/cmp1_prec_recall_stats.py
similarity index 90%
rename from src/drsoft/comparison/cmp1_prec-recall_stats.py
rename to src/drsoft/comparison/cmp1_prec_recall_stats.py
index 539dc67..11d4fb1 100644
--- a/src/drsoft/comparison/cmp1_prec-recall_stats.py
+++ b/src/drsoft/comparison/cmp1_prec_recall_stats.py
@@ -1,18 +1,14 @@
-import sys
-import os
-import time
-import math
-import shutil
 import random
+import os
+import sys
 import multiprocessing
 from multiprocessing import Pool
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_progress_utils, gwamar_utils,\
+  gwamar_params_utils, gwamar_scoring
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_progress_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_scoring import revOrder
 
 def selectAssocs(input_fn, subset="a1"):
     positives = []
@@ -201,25 +197,23 @@ def calcStats(score, input_dir, revord=1, positives=None, negatives=None, thrs=N
 
 def computePRs(params):
     score, subset, reps_tmp = params
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
-    cmp_dir = parameters["RESULTS_CMP_DIR"]
     cmp_stats_dir = parameters["RESULTS_CMP_STATS_DIR"]
     cmp_assocs_dir = parameters["RESULTS_CMP_ASSOCS_DIR"]
     
-    dataset = parameters["D"]
     overwrite = parameters.get("OW", "N")
 
     if subset.startswith("a"): reps = [0]
     else: reps = reps_tmp
 
-    rev_order = revOrder(score)
+    rev_order = gwamar_scoring.revOrder(score)
 
     stats_subset_dir = cmp_stats_dir + "/" + subset
     stats_subset_pr_dir = stats_subset_dir + "/pr/"
     stats_score_dir = stats_subset_pr_dir + "/" + score
-    ensure_dir(stats_score_dir)
+    gwamar_utils.ensure_dir(stats_score_dir)
 
     for i in reps:
         output_fn = stats_score_dir + "/" + str(i) + ".txt"
@@ -246,16 +240,16 @@ def computePRs(params):
 
 
 if __name__ == '__main__':
-    print("cmp1_prec-recall_stats.py: Start.")
+    print("cmp1_prec_recall_stats.py: Start.")
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     cmp_dir = parameters["RESULTS_CMP_DIR"]
     cmp_stats_dir = parameters["RESULTS_CMP_STATS_DIR"]
     cmp_assocs_dir = parameters["RESULTS_CMP_ASSOCS_DIR"]
     
-    ensure_dir(cmp_stats_dir)
+    gwamar_utils.ensure_dir(cmp_stats_dir)
 
     dataset = parameters["D"]
 
@@ -270,14 +264,14 @@ if __name__ == '__main__':
         if score_fn in score_fns:
             scores_list.append(score)
 
-    subsets = parameters.get("SUBSETS", "s3_1000").split(",")
+    subsets = parameters.get("SUBSETS", "p14,p15").split(",")
     
     for subset in subsets:
         stats_subset_dir = cmp_stats_dir + "/" + subset
         stats_subset_pr_dir = stats_subset_dir + "/pr/"
 
-        ensure_dir(stats_subset_dir)
-        ensure_dir(stats_subset_pr_dir)
+        gwamar_utils.ensure_dir(stats_subset_dir)
+        gwamar_utils.ensure_dir(stats_subset_pr_dir)
 
         score = scores_list[0]
         pos_sel, neg_sel = selectAssocs(cmp_assocs_dir + score  + ".txt", subset)
@@ -305,7 +299,7 @@ if __name__ == '__main__':
                 if len(reps) > 0:
                     TASKS.append((score, subset, reps))
 
-    progress = GWAMARProgress("Prec-recall stats")
+    progress = gwamar_progress_utils.GWAMARProgress("Prec-recall stats")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
 
@@ -318,4 +312,4 @@ if __name__ == '__main__':
             r = computePRs(T)
             progress.update(str(r))
 
-    print("cmp1_prec-recall_stats.py: Finished.")
+    print("cmp1_prec_recall_stats.py: Finished.")
diff --git a/src/drsoft/comparison/cmp2_auc_stats.py b/src/drsoft/comparison/cmp2_auc_stats.py
index 099743e..41b8ac0 100644
--- a/src/drsoft/comparison/cmp2_auc_stats.py
+++ b/src/drsoft/comparison/cmp2_auc_stats.py
@@ -1,22 +1,15 @@
 import sys
 import os
-import time
-import math
-import shutil
-import random
-import multiprocessing
-from multiprocessing import Pool
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils import gwamar_params_utils
 
 if __name__ == '__main__':
     print("cmp2_auc_stats.py: Start.")
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     dataset = parameters["D"]
     reps_tmp = int(parameters.get("RAND", "1"))
@@ -35,7 +28,7 @@ if __name__ == '__main__':
         if score_fn in score_fns:
             scores_list.append(score)
 
-    subsets = parameters.get("SUBSETS", "s3_1000").split(",")
+    subsets = parameters.get("SUBSETS", "p14,p15").split(",")
     
     for subset in subsets:
         if subset.startswith("a"): reps = 1
diff --git a/src/drsoft/comparison/cmp3_draw_figures.py b/src/drsoft/comparison/cmp3_draw_figures.py
index 9ef9c29..08b98f3 100644
--- a/src/drsoft/comparison/cmp3_draw_figures.py
+++ b/src/drsoft/comparison/cmp3_draw_figures.py
@@ -1,44 +1,35 @@
 import sys
 import os
-import time
-import math
-import shutil
-import random
-import multiprocessing
-from multiprocessing import Pool
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
+sys.path += [os.path.abspath(os.curdir)]
 
+from src.drsoft.utils import gwamar_params_utils
 
 if __name__ == '__main__':
-    print("cmp3_draw_figures.py: Start.")
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    dataset = parameters["D"]
-    cmp_dir = parameters["RESULTS_CMP_DIR"]
-    cmp_assocs_dir = parameters["RESULTS_CMP_ASSOCS_DIR"]
-    Rscript_dir = parameters["GWAMAR_SRC"] + "visR/accuracy/"
-
-    scores_p = parameters["SCORES"].split(",")
-
-    scores_list = []
-    for score in scores_p:
-        score_fn = score + ".txt"
-        scores_list.append(score)
-    scores_arg = ','.join(scores_list)
-
-    subsets = parameters.get("SUBSETS", "s3_1000")
-    stats = parameters.get("STATS", "auc,auc10,auc20")
-
-    rparams1 = " ".join([dataset, parameters["MT"], subsets, parameters["GWAMAR_PATH"], scores_arg, stats])
-    print(rparams1)
-    command = "Rscript " + Rscript_dir + "/auc_barplots.R " + rparams1
-    print(command)
-    os.system(command)
-    print("cmp3_draw_figures.py: Finished.")
-   
\ No newline at end of file
+  print("cmp3_draw_figures.py: Start.")
+  
+  gwamar_params_utils.overwriteParameters(sys.argv)
+  parameters = gwamar_params_utils.readParameters()
+  
+  dataset = parameters["D"]
+  cmp_dir = parameters["RESULTS_CMP_DIR"]
+  cmp_assocs_dir = parameters["RESULTS_CMP_ASSOCS_DIR"]
+  Rscript_dir = parameters["GWAMAR_SRC"] + "visR/accuracy/"
+
+  scores_p = parameters["SCORES"].split(",")
+
+  scores_list = []
+  for score in scores_p:
+    score_fn = score + ".txt"
+    scores_list.append(score)
+  scores_arg = ','.join(scores_list)
+
+  subsets = parameters.get("SUBSETS", "p14,p15")
+  stats = parameters.get("STATS", "auc,auc10,auc20")
+
+  rparams1 = " ".join([dataset, parameters["MT"], subsets, parameters["GWAMAR_PATH"], scores_arg, stats])
+  print(rparams1)
+  command = "Rscript " + Rscript_dir + "/auc_barplots.R " + rparams1
+  print(command)
+  os.system(command)
+  print("cmp3_draw_figures.py: Finished.")
diff --git a/src/drsoft/comparison/show0_gold_associations.py b/src/drsoft/comparison/show0_gold_associations.py
index 7a1b72f..1da28ed 100644
--- a/src/drsoft/comparison/show0_gold_associations.py
+++ b/src/drsoft/comparison/show0_gold_associations.py
@@ -1,22 +1,11 @@
 import sys
 import os
-import shutil
 import multiprocessing
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
+
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils, gwamar_bin_utils, gwamar_ann_utils, gwamar_muts_io_utils
 
 def printLatexGold(drug_res_all_db, drug_res_conf_db, gene_ids_map={}):
     tls = []
@@ -68,8 +57,8 @@ def printGoldShort(gold_assocs, comment=""):
 if __name__ == '__main__':
     print("show0_save_associations.py: shows gold association lists.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     dataset = parameters["D"]
     input_dir = parameters["DATASET_INPUT_DIR"]
@@ -85,45 +74,43 @@ if __name__ == '__main__':
     scores_p = parameters["SCORES"].split(",")
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     m_type = parameters["MT"]
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_res_profiles = readResistanceProfiles(input_fh, load_int=True)
+    drug_res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
 
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '_det.txt')
-    bin_profile_details = readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple")
+    bin_profile_details = gwamar_bin_utils.readBinProfileDetails(input_fh, strains.count(), mut_type=m_type, out_format="tuple")
     input_fh.close()
 
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '.txt')
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
     input_fh.close()
     
     input_fn = input_dir + "/cluster_gene_ref_ids.txt"
     if os.path.exists(input_fn):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {} 
         cluster_ids_rev = {}
 
-   # print(cluster_ids["Rv0005"])
-   # print(cluster_ids_rev["Rv0005"])
     input_fn = gold_dir + "/gold_assocs_H.txt"
     if not os.path.exists(input_fn):
         print("File does not exist:" + input_fn)
         drug_res_conf_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_conf_db = readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
+        drug_res_conf_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
         input_fh.close()
     
     input_fn = gold_dir + "/gold_assocs_A.txt"
@@ -132,7 +119,7 @@ if __name__ == '__main__':
         drug_res_all_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_all_db = readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
+        drug_res_all_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev, drug_names=drug_names)
         input_fh.close()
 
     score_params_union = set([])    
diff --git a/other/visR/backup/__init__.py b/src/drsoft/compensatory/__init__.py
similarity index 100%
copy from other/visR/backup/__init__.py
copy to src/drsoft/compensatory/__init__.py
diff --git a/src/drsoft/compensatory/show0_save_putative_muts.py b/src/drsoft/compensatory/show0_save_putative_muts.py
index ee83d4b..6b1e8a8 100644
--- a/src/drsoft/compensatory/show0_save_putative_muts.py
+++ b/src/drsoft/compensatory/show0_save_putative_muts.py
@@ -1,45 +1,23 @@
 import sys
-import os
-import copy
-import multiprocessing
-from multiprocessing import Pool
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_utils, gwamar_res_io_utils
 
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
-
 def retrieveCompMutations(drug_name):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
-    analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    print(analysis_comb_dir + drug_name + ".txt")
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
-    gene_muts, rdr_muts, dr_profile = selectPutativeComp(input_fh, only_comp = False)
+    gene_muts, rdr_muts, dr_profile = gwamar_comp_utils.selectPutativeComp(input_fh, only_comp = False)
     input_fh.close()
 
 #    print(gene_muts.keys())
  #   print("xxx", len(rdr_muts))
-    rdr_sets = [getBinSet(rdr_mut_profile) for (rdr_mut_desc, rdr_mut_profile) in rdr_muts]
+    rdr_sets = [gwamar_comp_utils.getBinSet(rdr_mut_profile) for (rdr_mut_desc, rdr_mut_profile) in rdr_muts]
 
   #  print("xxx", len(rdr_sets))
     tls = []
@@ -58,7 +36,7 @@ def retrieveCompMutations(drug_name):
             #print(mut_out)
             tls.append(mut_out + "\n")
 
-    ensure_dir(comp_dir + "/" + drug_name)
+    gwamar_utils.ensure_dir(comp_dir + "/" + drug_name)
     output_fn = comp_dir + "/" + drug_name + "/" + parameters["D"] + ".txt"
 
 #    print(output_fn)
@@ -74,8 +52,8 @@ def retrieveCompMutations(drug_name):
 
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -86,12 +64,12 @@ if __name__ == '__main__':
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    ensure_dir(comp_dir)
+    gwamar_utils.ensure_dir(comp_dir)
     print(comp_dir)
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
 
     drug_names = ["Rifampicin"]
diff --git a/src/drsoft/compensatory/show1_latex_rpoB_figure.py b/src/drsoft/compensatory/show1_latex_rpoB_figure.py
index bf963af..3c07f46 100644
--- a/src/drsoft/compensatory/show1_latex_rpoB_figure.py
+++ b/src/drsoft/compensatory/show1_latex_rpoB_figure.py
@@ -1,14 +1,7 @@
 import os
 import sys
-import filecmp
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils
 
 def readCompMutations(input_fh):
     comp_mutations = {}
@@ -58,8 +51,8 @@ source_shifts = {"comas_whole-genome_2012": 0, "de_vos_putative_2013": 10, "casa
 x_offset = 5
 
 if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
     results_dir = parameters["RESULTS_DIR"]
@@ -67,15 +60,15 @@ if __name__ == '__main__':
     latex_dir = parameters["LATEX_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    ensure_dir(stats_dir)
-    ensure_dir(latex_dir)
+    gwamar_utils.ensure_dir(stats_dir)
+    gwamar_utils.ensure_dir(latex_dir)
 
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
 
     input_fh = open(comp_dir + "/comp_data.txt")
diff --git a/src/drsoft/compensatory/show2_latex_rpoB_table.py b/src/drsoft/compensatory/show2_latex_rpoB_table.py
index b07e1dc..bade944 100644
--- a/src/drsoft/compensatory/show2_latex_rpoB_table.py
+++ b/src/drsoft/compensatory/show2_latex_rpoB_table.py
@@ -1,15 +1,7 @@
 import os
 import sys
-import filecmp
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils, gwamar_muts_utils
 
 def readCompMutations2(input_fh):
     comp_mutations = {}
@@ -57,8 +49,8 @@ sourse_shifts = {"comas_whole-genome_2012": 0, "de_vos_putative_2013": 10, "casa
 x_offset = 10
 
 if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
     results_dir = parameters["RESULTS_DIR"]
@@ -66,15 +58,15 @@ if __name__ == '__main__':
     latex_dir = parameters["LATEX_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    ensure_dir(stats_dir)
-    ensure_dir(latex_dir)
+    gwamar_utils.ensure_dir(stats_dir)
+    gwamar_utils.ensure_dir(latex_dir)
 
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
 
     input_fh = open(comp_dir + "/comp_data.txt")
@@ -120,7 +112,7 @@ if __name__ == '__main__':
             for source in sources:
                 if source in comp_mutations[gene_name][(position, ref_state)]:
                     mut_txt = comp_mutations[gene_name][(position, ref_state)][source]
-                    tl  += " & " + "\\textcolor{"+color+"}{" + mutsDescToLatex(mut_txt) +"}"
+                    tl  += " & " + "\\textcolor{"+color+"}{" + gwamar_muts_utils.mutsDescToLatex(mut_txt) +"}"
                 else:
                     tl  += " & "
             tl += "\\\\ \n"
diff --git a/src/drsoft/compensatory/show2_latex_rpoB_table_sel.py b/src/drsoft/compensatory/show2_latex_rpoB_table_sel.py
index 418be08..5754408 100644
--- a/src/drsoft/compensatory/show2_latex_rpoB_table_sel.py
+++ b/src/drsoft/compensatory/show2_latex_rpoB_table_sel.py
@@ -1,15 +1,7 @@
 import os
 import sys
-import filecmp
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils, gwamar_muts_utils
 
 def readCompMutations2(input_fh):
     comp_mutations = {}
@@ -57,8 +49,8 @@ sourse_shifts = {"comas_whole-genome_2012": 0, "de_vos_putative_2013": 10, "casa
 x_offset = 10
 
 if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
     results_dir = parameters["RESULTS_DIR"]
@@ -66,15 +58,15 @@ if __name__ == '__main__':
     latex_dir = parameters["LATEX_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    ensure_dir(stats_dir)
-    ensure_dir(latex_dir)
+    gwamar_utils.ensure_dir(stats_dir)
+    gwamar_utils.ensure_dir(latex_dir)
 
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
 
     input_fh = open(comp_dir + "/comp_data.txt")
@@ -120,7 +112,7 @@ if __name__ == '__main__':
             for source in sources:
                 if source in comp_mutations[gene_name][(position, ref_state)]:
                     mut_txt = comp_mutations[gene_name][(position, ref_state)][source]
-                    tl  += " & " + "\\textcolor{"+color+"}{" + mutsDescToLatex(mut_txt) +"}"
+                    tl  += " & " + "\\textcolor{"+color+"}{" + gwamar_muts_utils.mutsDescToLatex(mut_txt) +"}"
                 else:
                     tl  += " & "
             tl += "\\\\ \n"
diff --git a/src/drsoft/compensatory/show3_latex_rpoB_table2.py b/src/drsoft/compensatory/show3_latex_rpoB_table2.py
index d2d5bb6..6b77a3e 100644
--- a/src/drsoft/compensatory/show3_latex_rpoB_table2.py
+++ b/src/drsoft/compensatory/show3_latex_rpoB_table2.py
@@ -1,43 +1,24 @@
 import sys
 import os
-import copy
-import multiprocessing
-from multiprocessing import Pool
-
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_muts_utils, gwamar_utils, gwamar_res_io_utils
 
 sys.path.append("../../")
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
-
 def retrieveCompMutations(drug_name):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
-    analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
     print(analysis_comb_dir + drug_name + ".txt")
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
-    gene_muts, rdr_muts, dr_profile = selectPutativeComp(input_fh, only_comp = True)
+    gene_muts, rdr_muts, dr_profile = gwamar_comp_utils.selectPutativeComp(input_fh, only_comp = True)
     input_fh.close()
 
-    rdr_sets = [getBinSet(rdr_mut_profile) for (rdr_mut_profile, rdr_mut_desc) in rdr_muts]
+    rdr_sets = [gwamar_comp_utils.getBinSet(rdr_mut_profile) for (rdr_mut_profile, rdr_mut_desc) in rdr_muts]
 
     tab_res = {}
 
@@ -45,10 +26,10 @@ def retrieveCompMutations(drug_name):
         for rdr_mut_desc in rdr_mut_descs.strip().split(";"):
 
             m1_gene_id, m2_c_id, m1_gene_name, m1_p_str, m1_ref_txt, m1_mut_txt = rdr_mut_desc.split()
-            m1_mut_latex = mutsDescToLatex(m1_mut_txt)
-            m1_set = getBinSet(rdr_mut_profile)
+            m1_mut_latex = gwamar_muts_utils.mutsDescToLatex(m1_mut_txt)
+            m1_set = gwamar_comp_utils.getBinSet(rdr_mut_profile)
 
-            if not isMutInRRDR(rdr_mut_desc):
+            if not gwamar_comp_utils.isMutInRRDR(rdr_mut_desc):
                 continue
 
             if not rdr_mut_desc in tab_res:
@@ -59,8 +40,8 @@ def retrieveCompMutations(drug_name):
                     for gene_mut_desc in gene_mut_descs.strip().split(";"):
                         print(gene_mut_desc)
                         m2_gene_id, m2_c_id, m2_gene_name, m2_p_str, m2_ref_txt, m2_mut_txt = gene_mut_desc.split()
-                        m2_mut_latex = mutsDescToLatex(m2_mut_txt)
-                        m2_set = getBinSet(gene_mut_profile)
+                        m2_mut_latex = gwamar_muts_utils.mutsDescToLatex(m2_mut_txt)
+                        m2_set = gwamar_comp_utils.getBinSet(gene_mut_profile)
                         if m2_set.issubset(m1_set):
                             tab_res[rdr_mut_desc].append(gene_mut_desc)
 
@@ -92,7 +73,7 @@ def retrieveCompMutations(drug_name):
         if len(tab_res[m1_desc]) == 0:
             continue
         m1_gene_id, m2_c_id, m1_gene_name, m1_p_str, m1_ref_txt, m1_mut_txt = m1_desc.split()
-        m1_mut_latex = mutsDescToLatex(m1_mut_txt)
+        m1_mut_latex = gwamar_muts_utils.mutsDescToLatex(m1_mut_txt)
         tls.append("\\midrule \n")
         m1_desc_out = " ".join([m1_ref_txt[0], m1_p_str, m1_mut_latex])
         tls.append(" & ".join([m1_gene_name, m1_desc_out]) + "\\\\ \n")
@@ -100,7 +81,7 @@ def retrieveCompMutations(drug_name):
 
         for m2_desc in sorted(tab_res[m1_desc], key=lambda m2: (m2.split()[2], int(m2.split()[3]))):
             m2_gene_id, m2_c_id, m2_gene_name, m2_p_str, m2_ref_txt, m2_mut_txt = m2_desc.split()
-            m2_mut_latex = mutsDescToLatex(m2_mut_txt)
+            m2_mut_latex = gwamar_muts_utils.mutsDescToLatex(m2_mut_txt)
             m2_desc_out = " ".join([m2_ref_txt[0], m2_p_str, m2_mut_latex])
             tls.append(" & ".join([m2_gene_name, m2_desc_out]) + "\\\\ \n")
 
@@ -109,7 +90,7 @@ def retrieveCompMutations(drug_name):
     tls.append("\\end{document}\n")
 
 
-    ensure_dir(comp_dir + "/" + drug_name)
+    gwamar_utils.ensure_dir(comp_dir + "/" + drug_name)
     output1_fn = comp_dir + "/" + drug_name + "/tmp_tab_" + parameters["D"] + ".tex"
     output2_fn = comp_dir + "/" + drug_name + "/tmp_tab_" + parameters["D"] + ".pdf"
     output3_fn = comp_dir + "/" + drug_name + "/tab_" + parameters["D"] + ".pdf"
@@ -126,20 +107,10 @@ def retrieveCompMutations(drug_name):
     command = "pdfcrop --margins '5 5 5 5' " + output2_fn + " " + output3_fn
     os.system(command)
 
-    # command = "acroread " + output3_fn
-    # os.system(command)
-
-
-
-#507 - 533
-#(533-507+1)*3
-#450 - 531
-#zatem: 426 - 452 
-
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -150,12 +121,12 @@ if __name__ == '__main__':
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    ensure_dir(comp_dir)
+    gwamar_utils.ensure_dir(comp_dir)
     print(comp_dir)
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
 
     drug_names = ["Rifampicin"]
diff --git a/src/drsoft/compensatory/show4_rpoB_rels.py b/src/drsoft/compensatory/show4_rpoB_rels.py
index aee559b..eaef81d 100644
--- a/src/drsoft/compensatory/show4_rpoB_rels.py
+++ b/src/drsoft/compensatory/show4_rpoB_rels.py
@@ -1,60 +1,36 @@
 import sys
-import os
-import copy
-import multiprocessing
-from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
-from drsoft.utils.gwamar_stat_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_muts_utils, gwamar_utils, gwamar_res_io_utils, gwamar_stat_utils
 
 def retrieveCompMutations(drug_name):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
-    WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
-    analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
     print(analysis_comb_dir + drug_name + ".txt")
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
-    gene_muts, rdr_muts, dr_profile = selectPutativeComp(input_fh, only_comp = True)
+    gene_muts, rdr_muts, dr_profile = gwamar_comp_utils.selectPutativeComp(input_fh, only_comp = True)
     input_fh.close()
 
-    dr_set = getResSet(dr_profile)
-    rdr_sets = [getBinSet(rdr_mut_profile) for (rdr_mut_profile, rdr_mut_desc) in rdr_muts]
-
+    dr_set = gwamar_comp_utils.getResSet(dr_profile)
+    
     tab_res = {}
 
     for rdr1_mut_descs, rdr1_mut_profile in sorted(rdr_muts, key=lambda x:x[0].split()[3]):
         tokens = rdr1_mut_descs.split()
-        print("\\item " + tokens[4][0] + tokens[3] + mutsDescToMathLatex(tokens[5]))
+        print("\\item " + tokens[4][0] + tokens[3] + gwamar_muts_utils.mutsDescToMathLatex(tokens[5]))
 
     for i in range(len(rdr_muts)-1):
         rdr1_mut_descs, rdr1_mut_profile = rdr_muts[i]
         for j in range(i+1, len(rdr_muts), 1):
             
             rdr2_mut_descs, rdr2_mut_profile = rdr_muts[j]
-            rdr1_set = getBinSet(rdr1_mut_profile)
-            rdr2_set = getBinSet(rdr2_mut_profile)
-            pval = hyperTestPvalue(len(dr_set), len(rdr2_set), len(rdr1_set), len(rdr1_set & rdr2_set), twoends=True)
+            rdr1_set = gwamar_comp_utils.getBinSet(rdr1_mut_profile)
+            rdr2_set = gwamar_comp_utils.getBinSet(rdr2_mut_profile)
+            pval = gwamar_stat_utils.hyperTestPvalue(len(dr_set), len(rdr2_set), len(rdr1_set), len(rdr1_set & rdr2_set), twoends=True)
             
             # if pval < 0.05:
             #     print(rdr1_mut_descs, rdr2_mut_descs)
@@ -65,10 +41,10 @@ def retrieveCompMutations(drug_name):
         for rdr_mut_desc in rdr_mut_descs.strip().split(";"):
 
             m1_gene_id, m2_c_id, m1_gene_name, m1_p_str, m1_ref_txt, m1_mut_txt = rdr_mut_desc.split()
-            m1_mut_latex = mutsDescToLatex(m1_mut_txt)
-            m1_set = getBinSet(rdr_mut_profile)
+            m1_mut_latex = gwamar_muts_utils.mutsDescToLatex(m1_mut_txt)
+            m1_set = gwamar_comp_utils.getBinSet(rdr_mut_profile)
 
-            if not isMutInRRDR(rdr_mut_desc):
+            if not gwamar_comp_utils.isMutInRRDR(rdr_mut_desc):
                 continue
 
             if not rdr_mut_desc in tab_res:
@@ -78,10 +54,10 @@ def retrieveCompMutations(drug_name):
                 for gene_mut_descs, gene_mut_profile in gene_muts[gene_name]:
                     for gene_mut_desc in gene_mut_descs.strip().split(";"):
                         m2_gene_id, m2_c_id, m2_gene_name, m2_p_str, m2_ref_txt, m2_mut_txt = gene_mut_desc.split()
-                        m2_mut_latex = mutsDescToLatex(m2_mut_txt)
-                        m2_set = getBinSet(gene_mut_profile)
+                        m2_mut_latex = gwamar_muts_utils.mutsDescToLatex(m2_mut_txt)
+                        m2_set = gwamar_comp_utils.getBinSet(gene_mut_profile)
 
-                        pval = hyperTestPvalue(len(dr_set), len(m2_set), len(m1_set), len(m1_set & m2_set), twoends=False)
+                        pval = gwamar_stat_utils.hyperTestPvalue(len(dr_set), len(m2_set), len(m1_set), len(m1_set & m2_set), twoends=False)
                         
                         if pval < 0.001:
                             print(rdr_mut_desc, gene_mut_desc)
@@ -97,17 +73,17 @@ def retrieveCompMutations(drug_name):
     #    if len(tab_res[m1_desc]) == 0:
     #        continue
         m1_gene_id, m2_c_id, m1_gene_name, m1_p_str, m1_ref_txt, m1_mut_txt = m1_desc.split()
-        m1_mut_latex = mutsDescToLatex(m1_mut_txt)
+        m1_mut_latex = gwamar_muts_utils.mutsDescToLatex(m1_mut_txt)
         m1_desc_out = " ".join([m1_ref_txt[0], m1_p_str, m1_mut_txt])
         tls.append(">"+" ".join([m1_gene_name, m1_desc_out]) + "\n")
 
         for m2_desc in sorted(tab_res[m1_desc], key=lambda m2: (m2.split()[2], int(m2.split()[3]))):
             m2_gene_id, m2_c_id, m2_gene_name, m2_p_str, m2_ref_txt, m2_mut_txt = m2_desc.split()
-            m2_mut_latex = mutsDescToLatex(m2_mut_txt)
+            m2_mut_latex = gwamar_muts_utils.mutsDescToLatex(m2_mut_txt)
             m2_desc_out = " ".join([m2_ref_txt[0], m2_p_str, m2_mut_txt])
             tls.append(" ".join([m2_gene_name, m2_desc_out]) + "\n")
 
-    ensure_dir(comp_dir + "/" + drug_name)
+    gwamar_utils.ensure_dir(comp_dir + "/" + drug_name)
     output1_fn = comp_dir + "/" + drug_name + "/rels_" + parameters["D"] + ".tet"
 
     output_fh = open(output1_fn, "w")
@@ -115,20 +91,10 @@ def retrieveCompMutations(drug_name):
         output_fh.write(tl)
     output_fh.close()
 
-    # command = "acroread " + output3_fn
-    # os.system(command)
-
-
-
-#507 - 533
-#(533-507+1)*3
-#450 - 531
-#zatem: 426 - 452 
-
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -139,12 +105,12 @@ if __name__ == '__main__':
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    ensure_dir(comp_dir)
+    gwamar_utils.ensure_dir(comp_dir)
     print(comp_dir)
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
 
     drug_names = ["Rifampicin"]
diff --git a/src/drsoft/compensatory/show5_rpoB_pvalues.py b/src/drsoft/compensatory/show5_rpoB_pvalues.py
index 996db62..fdbdf3b 100644
--- a/src/drsoft/compensatory/show5_rpoB_pvalues.py
+++ b/src/drsoft/compensatory/show5_rpoB_pvalues.py
@@ -1,15 +1,7 @@
 import os
 import sys
-import filecmp
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils, gwamar_muts_utils
 
 def readCompMutations2(input_fh):
     comp_mutations = {}
@@ -57,8 +49,8 @@ sourse_shifts = {"comas_whole-genome_2012": 0, "de_vos_putative_2013": 10, "casa
 x_offset = 10
 
 if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
     results_dir = parameters["RESULTS_DIR"]
@@ -66,15 +58,15 @@ if __name__ == '__main__':
     latex_dir = parameters["LATEX_DIR"]
     comp_dir = parameters["COMP_DATA"]
 
-    ensure_dir(stats_dir)
-    ensure_dir(latex_dir)
+    gwamar_utils.ensure_dir(stats_dir)
+    gwamar_utils.ensure_dir(latex_dir)
 
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
 
     input_fh = open(comp_dir + "/comp_data.txt")
@@ -105,7 +97,7 @@ if __name__ == '__main__':
             for source in sources:
                 if source in comp_mutations[gene_name][(position, ref_state)]:
                     mut_txt = comp_mutations[gene_name][(position, ref_state)][source]
-                    tl  += " & " + mutsDescToLatex(mut_txt)
+                    tl  += " & " + gwamar_muts_utils.mutsDescToLatex(mut_txt)
                 else:
                     tl  += " & "
             tl += "\\\\ \n"
diff --git a/src/drsoft/format_comp/a0_mutations_latex_sel.py b/src/drsoft/format_comp/a0_mutations_latex_sel.py
index ebccb82..b174585 100644
--- a/src/drsoft/format_comp/a0_mutations_latex_sel.py
+++ b/src/drsoft/format_comp/a0_mutations_latex_sel.py
@@ -1,19 +1,8 @@
-import math
 import os
 import sys
-import filecmp
 import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_comp_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_bin_utils, gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 
 colors_map = {"?": "gray", "0": "white", "1": "orange", "2": "blue",
@@ -23,21 +12,17 @@ colors_map = {"?": "gray", "0": "white", "1": "orange", "2": "blue",
 def saveMutsLatex(params):
     drug_name = params["DRUG_NAME"]
     dataset = params["D"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    stats_dir = parameters["STATS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_latex_sel_dir = parameters["RESULTS_A_LATEX_S_SEL_DIR"]
-    analysis_latex_dir = parameters["RESULTS_A_LATEX_S_DIR"]
 
 
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
     #gene_muts, rdr_sets = selectPutativeComp(input_fh, only_comp = True)
-    gene_muts, rdr_sets, dr_profile = selectPutativeComp(input_fh, only_comp = False)
+    gene_muts, rdr_sets, dr_profile = gwamar_comp_utils.selectPutativeComp(input_fh, only_comp = False)
     input_fh.close()
 
     mut_profiles = []
@@ -62,7 +47,7 @@ def saveMutsLatex(params):
     #     gene_id, position = mut_desc_full.split(" ")[2:4]
     #     mut_profiles.append((bin_profile, gene_id, position))
 
-    mut_profiles_sorted = sorted(mut_profiles, key=lambda profile_gene_position: (-countNonZeros(profile_gene_position[0]), profile_gene_position[1]))
+    mut_profiles_sorted = sorted(mut_profiles, key=lambda profile_gene_position: (-gwamar_bin_utils.countNonZeros(profile_gene_position[0]), profile_gene_position[1]))
 
     tls = []
     tls.append("\\documentclass[10pt]{article}\n")
@@ -128,8 +113,8 @@ def saveMutsLatex(params):
 if __name__ == '__main__':
 
  
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -141,8 +126,8 @@ if __name__ == '__main__':
     analysis_latex_sel_dir = parameters["RESULTS_A_LATEX_S_SEL_DIR"]
     analysis_latex_dir = parameters["RESULTS_A_LATEX_S_DIR"]
 
-    ensure_dir(analysis_latex_sel_dir)
-    ensure_dir(analysis_latex_dir)
+    gwamar_utils.ensure_dir(analysis_latex_sel_dir)
+    gwamar_utils.ensure_dir(analysis_latex_dir)
 
     
     TASKS = []
@@ -150,23 +135,23 @@ if __name__ == '__main__':
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     drug_names = ["Rifampicin"]
 
     for drug_name in drug_names:
-        ensure_dir(analysis_comp_dir + drug_name)
+        gwamar_utils.ensure_dir(analysis_comp_dir + drug_name)
         TASK["DRUG_NAME"] = drug_name
         TASK["D"] = parameters["D"]
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
-        pool = Pool(processes=WORKERS)
+        pool = multiprocessing.Pool(processes=WORKERS)
         for r in pool.imap(saveMutsLatex, TASKS):
             progress.update(str(r))
     else:
diff --git a/src/drsoft/format_comp/a1_mutation_types.py b/src/drsoft/format_comp/a1_mutation_types.py
index 5162583..63ca195 100644
--- a/src/drsoft/format_comp/a1_mutation_types.py
+++ b/src/drsoft/format_comp/a1_mutation_types.py
@@ -1,35 +1,16 @@
 import sys
-import os
-import copy
 import multiprocessing
 from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 def saveMutsCategorized(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-    show_profiles = parameters["SP"]
     
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
@@ -40,7 +21,7 @@ def saveMutsCategorized(params):
     mutation_desc_list = []
     
     #dr_set = set(range(len(dr_profile)))
-    dr_set = getResSet(dr_profile, inc_q=True)
+    dr_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=True)
   #  print("x", drug_name, len(getResSet(dr_profile, inc_q=False)))
    # print("x", drug_name, len(getResSet(dr_profile, inc_q=True)))
     
@@ -49,7 +30,7 @@ def saveMutsCategorized(params):
         tokens = line.split("\t")
         bin_profile = tokens[0]
         mut_desc = tokens[-1]
-        mut_set = getBinSet(bin_profile) & dr_set
+        mut_set = gwamar_comp_utils.getBinSet(bin_profile) & dr_set
         mutation_sets_list.append(mut_set)
         mutation_desc_list.append(mut_desc)
         if len(mut_set) <= 0: 
@@ -161,8 +142,8 @@ def saveMutsCategorized(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -172,25 +153,25 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
-        ensure_dir(analysis_comp_dir + drug_name)
+        gwamar_utils.ensure_dir(analysis_comp_dir + drug_name)
         TASK["DRUG_NAME"] = drug_name
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Categotized")
+    progress = gwamar_progress_utils.GWAMARProgress("Categotized")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_comp/a2_mutation_patterns.py b/src/drsoft/format_comp/a2_mutation_patterns.py
index ad22921..19cf69a 100644
--- a/src/drsoft/format_comp/a2_mutation_patterns.py
+++ b/src/drsoft/format_comp/a2_mutation_patterns.py
@@ -1,35 +1,16 @@
 import sys
-import os
-import copy
 import multiprocessing
 from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 def saveMutsPatterns(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-    show_profiles = parameters["SP"]
     
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
@@ -38,7 +19,7 @@ def saveMutsPatterns(params):
     dr_profile = line0.strip().split("\t")[0]
     
 
-    dr_set = getResSet(dr_profile)
+    dr_set = gwamar_comp_utils.getResSet(dr_profile)
     
     mutation_sets_list = [dr_set]
     mutation_desc_list = ["res"]
@@ -49,7 +30,7 @@ def saveMutsPatterns(params):
         tokens = line.split("\t")
         bin_profile = tokens[0]
         mut_desc = tokens[-1]
-        mut_set = getBinSet(bin_profile) & dr_set
+        mut_set = gwamar_comp_utils.getBinSet(bin_profile) & dr_set
         mutation_sets_list.append(mut_set)
         mutation_desc_list.append(mut_desc)
         if len(mut_set) <= 0: 
@@ -79,8 +60,8 @@ def saveMutsPatterns(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -90,16 +71,16 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
@@ -107,7 +88,7 @@ if __name__ == '__main__':
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_comp/a3_mutation_rel1.py b/src/drsoft/format_comp/a3_mutation_rel1.py
index bcc6d70..e47fcd6 100644
--- a/src/drsoft/format_comp/a3_mutation_rel1.py
+++ b/src/drsoft/format_comp/a3_mutation_rel1.py
@@ -1,35 +1,15 @@
 import sys
-import os
-import copy
-import multiprocessing
 from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 def saveMutsRelations(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-    show_profiles = parameters["SP"]
     
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
@@ -37,8 +17,7 @@ def saveMutsRelations(params):
     line0 = lines[0]
     dr_profile = line0.strip().split("\t")[0]
     
-
-    dr_set = getResSet(dr_profile, inc_q=True)
+    dr_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=True)
     
     mutation_sets_list = [dr_set]
     mutation_desc_list = ["res"]
@@ -49,7 +28,7 @@ def saveMutsRelations(params):
         tokens = line.split("\t")
         bin_profile = tokens[0]
         mut_desc = tokens[-1]
-        mut_set = getBinSet(bin_profile)# & dr_set
+        mut_set = gwamar_comp_utils.getBinSet(bin_profile)# & dr_set
         mutation_sets_list.append(mut_set)
         mutation_desc_list.append(mut_desc)
         if len(mut_set) <= 0: 
@@ -80,8 +59,8 @@ def saveMutsRelations(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -91,16 +70,16 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
@@ -108,7 +87,7 @@ if __name__ == '__main__':
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_comp/a4_mutation_rel2.py b/src/drsoft/format_comp/a4_mutation_rel2.py
index c4d9a8e..4160cdb 100644
--- a/src/drsoft/format_comp/a4_mutation_rel2.py
+++ b/src/drsoft/format_comp/a4_mutation_rel2.py
@@ -1,35 +1,15 @@
 import sys
-import os
-import copy
-import multiprocessing
 from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 def saveMutsRelationsSep(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-    show_profiles = parameters["SP"]
     
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
@@ -37,8 +17,8 @@ def saveMutsRelationsSep(params):
     line0 = lines[0]
     dr_profile = line0.strip().split("\t")[0]
 
-    dr_set = getResSet(dr_profile, inc_q=False)
-    sc_set = getSuscSet(dr_profile, inc_q=False)
+    dr_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=False)
+    sc_set = gwamar_comp_utils.getSuscSet(dr_profile, inc_q=False)
     
     mutation_sets_list = []
     mutation_desc_list = []
@@ -54,7 +34,7 @@ def saveMutsRelationsSep(params):
                 continue
             mut_states_list = mut_states.split(",")
 
-            mut_sets_map = getBinSetsMap(bin_profile)
+            mut_sets_map = gwamar_comp_utils.getBinSetsMap(bin_profile)
             for bin_id in mut_sets_map:
                 mut_set = mut_sets_map[bin_id]
                 if len(mut_set & dr_set) < len(mut_set & sc_set):
@@ -129,8 +109,8 @@ def saveMutsRelationsSep(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -140,16 +120,16 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
@@ -157,7 +137,7 @@ if __name__ == '__main__':
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("saveMutsRelationsSep")
+    progress = gwamar_progress_utils.GWAMARProgress("saveMutsRelationsSep")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_comp/a5_mutation_rel3.py b/src/drsoft/format_comp/a5_mutation_rel3.py
index 5a206fb..5805300 100644
--- a/src/drsoft/format_comp/a5_mutation_rel3.py
+++ b/src/drsoft/format_comp/a5_mutation_rel3.py
@@ -1,36 +1,15 @@
 import sys
-import os
-import copy
-import multiprocessing
 from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
-
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 def saveScoresCombined(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-    show_profiles = parameters["SP"]
     
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
@@ -39,7 +18,7 @@ def saveScoresCombined(params):
     dr_profile = line0.strip().split("\t")[0]
     
 
-    dr_set = getResSet(dr_profile, inc_q=True)
+    dr_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=True)
     
     mutation_sets_list = [dr_set]
     mutation_desc_list = ["res"]
@@ -49,7 +28,7 @@ def saveScoresCombined(params):
         tokens = line.split("\t")
         bin_profile = tokens[0]
         mut_desc = tokens[-1]
-        mut_set = getBinSet(bin_profile)# & dr_set
+        mut_set = gwamar_comp_utils.getBinSet(bin_profile)# & dr_set
         mutation_sets_list.append(mut_set)
         mutation_desc_list.append(mut_desc)
         if len(mut_set) <= 0: 
@@ -81,8 +60,8 @@ def saveScoresCombined(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -92,16 +71,16 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
@@ -109,7 +88,7 @@ if __name__ == '__main__':
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_comp/a7_graphvis.py b/src/drsoft/format_comp/a7_graphvis.py
index 0b7ae47..0e684b7 100644
--- a/src/drsoft/format_comp/a7_graphvis.py
+++ b/src/drsoft/format_comp/a7_graphvis.py
@@ -1,25 +1,10 @@
 import sys
 import os
-import copy
-import multiprocessing
 from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_comp_utils import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.structs.rel_graph import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_ann_utils,\
+  gwamar_muts_io_utils, gwamar_comp_utils, gwamar_stat_utils, gwamar_utils,\
+  gwamar_res_io_utils, gwamar_progress_utils
+from src.drsoft.structs import rel_graph
 
 def readDrugResAssoc(input_fh, drug_name = ""):
     drug_res_assoc = {}
@@ -39,20 +24,17 @@ def readDrugResAssoc(input_fh, drug_name = ""):
 
 def saveScoresCombined(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
     gold_dir = parameters["DATASET_GOLD_DIR"]
-    show_profiles = parameters["SP"]
 
     if os.path.exists(input_dir + "/cluster_gene_ref_ids.txt"):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {}
@@ -64,7 +46,7 @@ def saveScoresCombined(params):
         drug_res_assoc = {}
     else:
         input_fh = open(input_fn)
-        drug_res_assoc = readGoldAssociations(input_fh, cluster_ids_rev)
+        drug_res_assoc = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev)
         input_fh.close()
     
     print(drug_res_assoc)
@@ -76,37 +58,27 @@ def saveScoresCombined(params):
 
     input_fn = analysis_comb_dir + drug_name + ".txt"
     input_fh = open(input_fn)
-    gene_muts, rdr_sets = selectPutativeComp(input_fh)
+    gene_muts, rdr_sets = gwamar_comp_utils.selectPutativeComp(input_fh)
     input_fh.close()
 
-    # input_fn = analysis_comb_dir + drug_name + ".txt"
-    # input_fh = open(input_fn)
-    # lines = input_fh.readlines()
-    # line0 = lines[0]
-    # dr_profile = line0.strip().split("\t")[0]
-    
-    # all_set = getResSet(dr_profile, inc_q=False, inc_susc=True)
-    # dr_set = getResSet(dr_profile, inc_q=False, inc_susc=False)
-    # drq_set = getResSet(dr_profile, inc_q=False, inc_susc=False)
-    
     nodes_map = {}
     snodes = set([])
     ncount = 0
-    rel_graph = RelGraph()
+    rel_graph = rel_graph.RelGraph()
 
     for gene_name in gene_muts.keys():
         gene1_muts_list = gene_muts[gene_name]
         for gene1_mut in gene1_muts_list:
             position1, mut1_desc, mut1_profile = gene1_mut
             gene_id, cluster_id, gene_name, position_str, ref_aa, mut_aa = mut1_desc.split()
-            mut_set = getBinSet(mut1_profile)
+            mut_set = gwamar_comp_utils.getBinSet(mut1_profile)
             nlabel = " ".join([gene_name[3], position_str, ref_aa, mut_aa])
 
-            if isMutInRRDR(mut1_desc):
+            if gwamar_comp_utils.isMutInRRDR(mut1_desc):
                 ncolor = "red"
             else:
                 ncolor = "blue"
-            node = RelGraphNode(str(ncount), label=nlabel, ncolor=ncolor, mprofile=mut1_profile)
+            node = rel_graph.RelGraphNode(str(ncount), label=nlabel, ncolor=ncolor, mprofile=mut1_profile)
             if ncolor == "red": 
                 snodes.add(node)
             nodes_map[node.node_id] = node
@@ -116,30 +88,30 @@ def saveScoresCombined(params):
     for node1_id in nodes_map.keys():
         node1 = nodes_map[node1_id]
         m1_profile = node1.mprofile
-        m1_set = getBinSet(m1_profile)
+        m1_set = gwamar_comp_utils.getBinSet(m1_profile)
         for node2_id in nodes_map.keys():
             if node1_id == node2_id:
                 continue
             
             node2 = nodes_map[node2_id]
             m2_profile = node2.mprofile
-            m2_set = getBinSet(m2_profile)
+            m2_set = gwamar_comp_utils.getBinSet(m2_profile)
 
             N = len(m1_profile)
             n = len(m1_set)
             m = len(m2_set)
             k = len(m1_set & m2_set)
 
-            pvalue = hyperTestPvalue(N, m, n, k)
+            pvalue = gwamar_stat_utils.hyperTestPvalue(N, m, n, k)
             
             if m1_set.issubset(m2_set) and len(m1_set) > 1:
                 elabel = str(len(m1_set & m2_set))
-                edge = RelGraphEdge(node2, label=elabel, ecolor="blue")
-                edge_rev = RelGraphEdge(node1, label=elabel, ecolor="blue")
+                edge = rel_graph.RelGraphEdge(node2, label=elabel, ecolor="blue")
+                edge_rev = rel_graph.RelGraphEdge(node1, label=elabel, ecolor="blue")
                 node1.addEdge(edge)
                 node2.addEdgeRev(edge_rev)
 
-    ensure_dir(analysis_comp_dir + drug_name)
+    gwamar_utils.ensure_dir(analysis_comp_dir + drug_name)
     output1_fn = analysis_comp_dir + drug_name + "/graph.dot"
     output2_fn = analysis_comp_dir + drug_name + "/tmp_graph.pdf"
     output3_fn = analysis_comp_dir + drug_name + "/graph.pdf"
@@ -147,7 +119,7 @@ def saveScoresCombined(params):
 
     subnodes = rel_graph.visible_nodes(snodes)
 
-    saveRelGraph(rel_graph, output1_fn, subnodes=subnodes)
+    rel_graph.saveRelGraph(rel_graph, output1_fn, subnodes=subnodes)
     
    # output_fn = os.path.relpath()
     command = "dot -Tpdf "+output1_fn + " -o " + output2_fn
@@ -160,8 +132,8 @@ def saveScoresCombined(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -171,16 +143,16 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
 
     drug_names = ["Rifampicin"]
@@ -190,7 +162,7 @@ if __name__ == '__main__':
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_comp/a8_graphvis_pvalue.py b/src/drsoft/format_comp/a8_graphvis_pvalue.py
index 6dc8f12..e606733 100644
--- a/src/drsoft/format_comp/a8_graphvis_pvalue.py
+++ b/src/drsoft/format_comp/a8_graphvis_pvalue.py
@@ -1,24 +1,8 @@
 import sys
 import os
-import copy
-import multiprocessing
 from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_comp_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_stat_utils, gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 def readDrugResAssoc(input_fh, drug_name = ""):
     drug_res_assoc = {}
@@ -38,15 +22,12 @@ def readDrugResAssoc(input_fh, drug_name = ""):
 
 def saveScoresCombined(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-    show_profiles = parameters["SP"]
 
     input_fn = input_dir + "/drug_res_muts.txt"
     if not os.path.exists(input_fn):
@@ -62,9 +43,9 @@ def saveScoresCombined(params):
     line0 = lines[0]
     dr_profile = line0.strip().split("\t")[0]
     
-    all_set = getResSet(dr_profile, inc_q=True, inc_susc=True)
-    dr_set = getResSet(dr_profile, inc_q=False, inc_susc=False)
-    drq_set = getResSet(dr_profile, inc_q=True, inc_susc=False)
+    all_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=True, inc_susc=True)
+    dr_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=False, inc_susc=False)
+    drq_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=True, inc_susc=False)
     
     N = len(all_set)
     mutation_sets_list = [drq_set]
@@ -81,7 +62,7 @@ def saveScoresCombined(params):
         for tmp in mut_desc_tokens: mut_desc += tmp + " "
         mut_desc = mut_desc[:-1]
 
-        mut_set = getBinSet(bin_profile)
+        mut_set = gwamar_comp_utils.getBinSet(bin_profile)
         if len(mut_set) <= 0: 
             break
         mutation_sets_list.append(mut_set)
@@ -121,18 +102,13 @@ def saveScoresCombined(params):
             set2 = mutation_sets_list[j]
             inter = set1 & set2
             jk = len(inter)
-       #     if len(set2-set1) < len(set1-set2):
-        #        continue
-           # pvalue = hyperTestPvalue(N, len(set1), len(set2), len(inter))
-            pvalue = hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=False)
-            #if len(set1-set2) <= 0.3334*len(set1):
-            #if set1.issubset(set2):
+            pvalue = gwamar_stat_utils.hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=False)
             if pvalue < opt_pvalue:
                 opt_set = set2
                 opt_j = j
                 opt_pvalue = pvalue
 
-            pvalue_two = hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=True)
+            pvalue_two = gwamar_stat_utils.hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=True)
             if pvalue>pvalue_two and pvalue_two<0.01:
                 if not set1.issubset(set2) and not set2.issubset(set1):
                     if i<j:
@@ -160,8 +136,8 @@ def saveScoresCombined(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -171,23 +147,23 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
         TASK["DRUG_NAME"] = drug_name
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_comp/a9_graphviz_new.py b/src/drsoft/format_comp/a9_graphviz_new.py
index 6dc8f12..e606733 100644
--- a/src/drsoft/format_comp/a9_graphviz_new.py
+++ b/src/drsoft/format_comp/a9_graphviz_new.py
@@ -1,24 +1,8 @@
 import sys
 import os
-import copy
-import multiprocessing
 from multiprocessing import Pool
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_comp_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_comp_utils,\
+  gwamar_stat_utils, gwamar_utils, gwamar_res_io_utils, gwamar_progress_utils
 
 def readDrugResAssoc(input_fh, drug_name = ""):
     drug_res_assoc = {}
@@ -38,15 +22,12 @@ def readDrugResAssoc(input_fh, drug_name = ""):
 
 def saveScoresCombined(params):
     drug_name = params["DRUG_NAME"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-    show_profiles = parameters["SP"]
 
     input_fn = input_dir + "/drug_res_muts.txt"
     if not os.path.exists(input_fn):
@@ -62,9 +43,9 @@ def saveScoresCombined(params):
     line0 = lines[0]
     dr_profile = line0.strip().split("\t")[0]
     
-    all_set = getResSet(dr_profile, inc_q=True, inc_susc=True)
-    dr_set = getResSet(dr_profile, inc_q=False, inc_susc=False)
-    drq_set = getResSet(dr_profile, inc_q=True, inc_susc=False)
+    all_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=True, inc_susc=True)
+    dr_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=False, inc_susc=False)
+    drq_set = gwamar_comp_utils.getResSet(dr_profile, inc_q=True, inc_susc=False)
     
     N = len(all_set)
     mutation_sets_list = [drq_set]
@@ -81,7 +62,7 @@ def saveScoresCombined(params):
         for tmp in mut_desc_tokens: mut_desc += tmp + " "
         mut_desc = mut_desc[:-1]
 
-        mut_set = getBinSet(bin_profile)
+        mut_set = gwamar_comp_utils.getBinSet(bin_profile)
         if len(mut_set) <= 0: 
             break
         mutation_sets_list.append(mut_set)
@@ -121,18 +102,13 @@ def saveScoresCombined(params):
             set2 = mutation_sets_list[j]
             inter = set1 & set2
             jk = len(inter)
-       #     if len(set2-set1) < len(set1-set2):
-        #        continue
-           # pvalue = hyperTestPvalue(N, len(set1), len(set2), len(inter))
-            pvalue = hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=False)
-            #if len(set1-set2) <= 0.3334*len(set1):
-            #if set1.issubset(set2):
+            pvalue = gwamar_stat_utils.hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=False)
             if pvalue < opt_pvalue:
                 opt_set = set2
                 opt_j = j
                 opt_pvalue = pvalue
 
-            pvalue_two = hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=True)
+            pvalue_two = gwamar_stat_utils.hyperTestPvalue(N, len(set1), len(set2), len(inter), twoends=True)
             if pvalue>pvalue_two and pvalue_two<0.01:
                 if not set1.issubset(set2) and not set2.issubset(set1):
                     if i<j:
@@ -160,8 +136,8 @@ def saveScoresCombined(params):
     
 if __name__ == '__main__':
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = 1#min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -171,23 +147,23 @@ if __name__ == '__main__':
     analysis_comb_dir = parameters["RESULTS_A_COMB_S_DIR"]
     analysis_comp_dir = parameters["RESULTS_A_COMP_S_DIR"]
     
-    ensure_dir(analysis_dir)
-    ensure_dir(analysis_comb_dir)
-    ensure_dir(analysis_comp_dir)
+    gwamar_utils.ensure_dir(analysis_dir)
+    gwamar_utils.ensure_dir(analysis_comb_dir)
+    gwamar_utils.ensure_dir(analysis_comp_dir)
 
     TASKS = []
     TASK = {}
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
         TASK["DRUG_NAME"] = drug_name
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
diff --git a/src/drsoft/format_input/generate_geo_trees.py b/src/drsoft/format_input/generate_geo_trees.py
index 7c661c5..30d7004 100644
--- a/src/drsoft/format_input/generate_geo_trees.py
+++ b/src/drsoft/format_input/generate_geo_trees.py
@@ -1,16 +1,6 @@
 import sys
 import os
-import copy
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.utils.gwamar_res_io_utils import saveResistanceProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-
+from src.drsoft.utils import gwamar_params_utils, gwamar_tree_io_utils
 
 def loadGeoData(input_fh):
     geo_data_map = {}
@@ -62,9 +52,6 @@ bgcolor_map = {
 def generateGeoTrees(output_fh, tree, geo_data):
     tls = []
 
-    color_map = {}
-
-
     tls.append("digraph "+ "G" + " {\n")
 
     tree.calcInnerNodesBU()
@@ -101,8 +88,8 @@ if __name__ == '__main__':
     dataset = "mtu"
     tree_ids= ["t1", "t2","tPHYLIP","tPHYML","tRAXML"]
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     gwamar_dir = parameters["GWAMAR_PATH"]
     input_dir = parameters["GEO_DATA"] + dataset + "/"
@@ -119,7 +106,7 @@ if __name__ == '__main__':
         if not os.path.exists(input_fn):
             continue
         input_fh = open(input_fn)
-        trees = readPhyloTrees(input_fh)
+        trees = gwamar_tree_io_utils.readPhyloTrees(input_fh)
         input_fh.close()
 
         tree = trees[0]
diff --git a/src/drsoft/format_input/generate_latex_data.py b/src/drsoft/format_input/generate_latex_data.py
index f20fd0f..8000ea5 100644
--- a/src/drsoft/format_input/generate_latex_data.py
+++ b/src/drsoft/format_input/generate_latex_data.py
@@ -1,15 +1,5 @@
 import sys
-import os
-import copy
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import saveResistanceProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-
+from src.drsoft.utils import gwamar_params_utils
 
 def loadResData(input_fh):
     res_data_map = {}
@@ -21,7 +11,6 @@ def loadResData(input_fh):
         if line.startswith("#") or len(line) < 2:
             continue
         tokens = line.split("\t")
-   #     print(tokens)
         if len(tokens) < 1: continue
         elif len(tokens) <= 2:
             if len(line) < 40:
@@ -95,7 +84,7 @@ def determineResistance(res_data_infos):
     susc_count = 0
     int_count = 0
     unk_count = 0
-    for (res_info, cite_info) in res_data_infos:
+    for (res_info, _) in res_data_infos:
         tokens = res_info.split(":")
         if tokens[0] == "R":
             res_count += 1 
@@ -126,7 +115,7 @@ def determineCellColor(res_data_infos):
     susc_count = 0
     int_count = 0
     unk_count = 0
-    for (res_info, cite_info) in res_data_infos:
+    for (res_info, _) in res_data_infos:
         tokens = res_info.split(":")
         if tokens[0] == "R":
             res_count += 1 
@@ -171,7 +160,7 @@ def drugsList(res_data):
 
 def strainsList(res_data):
     strains_set = set([])
-    for (strain_id, drug_name) in res_data:
+    for (strain_id, _) in res_data:
         strains_set.add(strain_id)
     strains_list = sorted(strains_set)
     return strains_list
@@ -182,11 +171,7 @@ def generateDataTable(res_data):
     drugs_list = drugsList(res_data)
     strains_list = strainsList(res_data)
 
-    #Ciprofloxacin\tprint(drugs_list)
-    #print(strains_list)
-
     k = len(drugs_list)
-    n = len(strains_list)
 
     tls.append("\\begin{table}[!ht]")
     tls.append("\\caption{\\bf{Complete collected data on drug resistance.}}")
@@ -235,8 +220,8 @@ def generateLatexFile(output_fh, res_data):
 
 if __name__ == '__main__':
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     gwamar_dir = parameters["GWAMAR_PATH"]
     for dataset in ["spn", "mtu", "sau"]:
diff --git a/src/drsoft/format_input/generate_res_data.py b/src/drsoft/format_input/generate_res_data.py
index 9c15610..6015223 100644
--- a/src/drsoft/format_input/generate_res_data.py
+++ b/src/drsoft/format_input/generate_res_data.py
@@ -1,15 +1,6 @@
 import sys
-import os
-import copy
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import saveResistanceProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-
+from src.drsoft.utils import gwamar_params_utils
+from src.drsoft.format_input import generate_geo_trees
 
 def loadGeoData(input_fh):
     geo_data_map = {}
@@ -32,84 +23,22 @@ def loadGeoData(input_fh):
             continuent = tokens[2]
             geo_data_map[strain_id]= (country, continent)
     return geo_data_map
-        
-# def drugsList(res_data):
-#     drugs_map = {}
-#     for (strain_id, drug_name) in res_data:
-#         if not drug_name in drugs_map:
-#             drugs_map[drug_name] = 0
-#         drugs_map[drug_name] += 1
-#     drugs_list = sorted(drugs_map, key=lambda drug_name:-drugs_map[drug_name])
-#     return drugs_list
-
-# def strainsList(res_data):
-#     strains_set = set([])
-#     for (strain_id, drug_name) in res_data:
-#         strains_set.add(strain_id)
-#     strains_list = sorted(strains_set)
-#     return strains_list
-
-
-# def generateResData(output_fh, res_data):
-#     tls = []
-
-#     drugs_list = drugsList(res_data)
-#     strains_list = strainsList(res_data)
-
-#     k = len(drugs_list)
-#     n = len(strains_list)
-
-#     for drug_name in drugs_list:
-#         tl = drug_name + "\t"
-
-#         strains_res = []
-#         strains_int = []
-#         strains_susc = []
-
-#         for strain_id in strains_list:
-#             res_data_infos = res_data.get((strain_id, drug_name), [])
-#             res_status = determineResistance(res_data_infos)
-#             if res_status == "R": strains_res.append(strain_id)
-#             elif res_status == "I": strains_int.append(strain_id)
-#             elif res_status == "S": strains_susc.append(strain_id)
-
-#         for strain_id in sorted(strains_res): tl += strain_id + ";"
-#         if len(strains_res) > 0: tl = tl[:-1] + "\t"
-#         else: tl = tl + "\t"
-
-#         for strain_id in sorted(strains_susc): tl += strain_id + ";"
-#         if len(strains_susc) > 0: tl = tl[:-1] + "\t"
-#         else: tl = tl + "\t"
-
-#         for strain_id in sorted(strains_int): tl += strain_id + ";"
-#         if len(strains_int) > 0: tl = tl[:-1]
-#         else: tl = tl
-
-#         if len(strains_res) > 5 and len(strains_susc) > 5:
-#             tls.append(tl)
-
-#     for tl in tls:
-#         output_fh.write(tl + "\n")
-#     return None
-
+    
 if __name__ == '__main__':
     dataset = "mtu"
     tree_ids= ["t1"]
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     gwamar_dir = parameters["GWAMAR_PATH"]
     input_dir = parameters["RES_DATA"] + dataset + "/"
 
-    print("xxx")
     input_fh = open(input_dir + "/res-data.txt")
     geo_data = loadGeoData(input_fh)
     input_fh.close()
-    print("yyy")
 
     for tree_id in tree_ids:
         output_fh = open(input_dir + "/geo-tree-"+tree_id+".dot", "w")
-        generateGeoTrees(output_fh, res_data)
+        generate_geo_trees.generateGeoTrees(output_fh)
         output_fh.close()
-        print("zzz")
diff --git a/src/drsoft/format_input/generate_res_trees.py b/src/drsoft/format_input/generate_res_trees.py
index 117786d..ccc0479 100644
--- a/src/drsoft/format_input/generate_res_trees.py
+++ b/src/drsoft/format_input/generate_res_trees.py
@@ -1,14 +1,5 @@
 import sys
-import os
-import copy
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import saveResistanceProfiles
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_params_utils
 
 
 def loadResData(input_fh):
@@ -130,8 +121,8 @@ def generateResData(output_fh, res_data):
 if __name__ == '__main__':
     dataset = "spn"
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     gwamar_dir = parameters["GWAMAR_PATH"]
     input_dir = parameters["RES_DATA"] + dataset + "/"
diff --git a/src/drsoft/format_input/show1_save_mutatinos.py b/src/drsoft/format_input/show1_save_mutatinos.py
deleted file mode 100644
index 8b1cb2d..0000000
--- a/src/drsoft/format_input/show1_save_mutatinos.py
+++ /dev/null
@@ -1,146 +0,0 @@
-import sys
-import os
-import copy
-import random
-from multiprocessing import Pool
-from ete2 import Tree
-from ete2 import PhyloTree
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from ete2 import faces, layouts
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.modelling.model_logic import *
-
-def showTreeMutations(params):
-    
-    drug_name = params["DRUG_NAME"]
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    analysis_sel_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
-    
-    input_fh = open(input_dir + "strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    input_fh = open(input_dir + "res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    ensure_dir(input_dir + "/res_muts/")
-    
-    input_fh = open(results_dir + 'phylo_tree.txt')
-    trees = readPhyloTrees(input_fh, strains)
-    input_fh.close()
-    
-    tree = trees[0]
-
-    res_profile = None
-    for res_profile_tmp in res_profiles_list:
-        if res_profile_tmp.drug_name == drug_name:
-            res_profile = res_profile_tmp
-    
-    full_profile = res_profile.full_profile
-    tree.setObservedResProfile(full_profile)
-    tree.calcInnerNodesBU()
-    calcSubleavesResCount(tree)
-    calcSubnodesCount(tree)
-    
-    newtree = removeUnResLeaves(tree)
-    newtree.calcInnerNodesBU()
-    calcSubleavesResCount(newtree)
-    calcSubnodesCount(newtree)
-    calcDetParsResModel(newtree)
-    
-    tls = []
-    
-    tl = ""
-    for node in newtree.inner_nodes_bu + newtree.leaves:
-        if node.complete_res_state == "R" and node.parent.complete_res_state == "S":
-            for leaf_node in node.getLeaves():
-                tl += str(leaf_node.node_id) + ";"
-            tl = tl[:-1] + "\t"
-    tl = tl.strip()
-    tls.append(tl)
-    #tree_txt = newtree.root.toString(lengths = False, is_root=True, strains=strains)
-
-    phylotree = Tree(newtree.toString(strains=strains) + ";")
-    
-    muts = {}
-    mut_id = 1
-    input_fn = analysis_sel_dir + "/" + drug_name + ".txt"
-    input_fh = open(input_fn)
-    for line in input_fh.readlines()[1:]:
-        tokens = line.strip().split()
-        if len(tokens) < 2:
-            continue
-        mut_profile = tokens[0]
-        newtree.setObservedMutProfile(mut_profile)
-        calcSubleavesMutCount(newtree)
-        calcDetParsMutModel(newtree)
-
-        tl = ""
-        for node in newtree.inner_nodes_bu + newtree.leaves:
-            if not node.complete_mut_state in ["0", "?"] and node.parent!=None and node.parent.complete_mut_state == "0":
-                for leaf_node in node.getLeaves():
-                    tl += str(leaf_node.node_id) + ";"
-                tl = tl[:-1] + "\t"
-        tl = tl.strip()
-        tls.append(tl)
-        mut_id += 1
-        if mut_id >= 10: break
-    input_fh.close()
-
-    output_fn = results_dir + "/trees_data/" + drug_name + ".txt"
-    output_fh = open(output_fn, "w")
-    
-    for tl in tls:
-        output_fh.write(tl + "\n")
-    output_fh.close()
-    
-    return None
-
-    
-if __name__ == '__main__':
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-        
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    ensure_dir(results_dir + "/trees_data/")
-        
-    input_fh = open(input_dir + "res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
-    input_fh.close()
-    
-    WORKERS = 1#int(parameters["W"])
-
-    TASKS = []
-    
-    TASK = {}
-    count = 0
-
-    for drug_name in drug_names:
-        TASK["DRUG_NAME"] = drug_name
-        TASKS.append(TASK.copy())
-                                                  #  scoreDrug(TASK)
-    for TASK in TASKS:
-        print(TASK)
-    if WORKERS > 1:                               
-        pool = Pool(processes=WORKERS)   
-        for r in pool.imap(showTreeMutations, TASKS):
-            print(r)
-    else:
-        for T in TASKS:
-            showTreeMutations(T)
-
diff --git a/src/drsoft/format_input/show2_mutations_tree.py b/src/drsoft/format_input/show2_mutations_tree.py
deleted file mode 100644
index b0a8687..0000000
--- a/src/drsoft/format_input/show2_mutations_tree.py
+++ /dev/null
@@ -1,211 +0,0 @@
-import sys
-import os
-import copy
-import random
-from multiprocessing import Pool
-from ete2 import Tree
-from ete2 import PhyloTree, TreeNode, TreeFace
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from ete2 import faces, layouts
-from drsoft.utils.gwamar_progress_utils import GWADRIBProgress
-from idlelib.ColorDelegator import prog
-
-print(os.path.abspath(os.curdir))
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.modelling.model_logic import *
-
-mut_faces_map = {}
-img_path = "./"
-
-for i in range(1, 11, 1):
-    mut_fn = os.path.abspath("../../resources/muts/m"+str(i)+".png")
-    
-    if not os.path.exists(mut_fn):
-        print("not exists: ", mut_fn)
-    mut_faces_map[i] = faces.ImgFace(mut_fn)
-    
-print(mut_faces_map)
-
-resstyle = NodeStyle()
-resstyle["fgcolor"] = "#ffbeb1"
-resstyle["bgcolor"] = "#ffbeb1"
-
-suscstyle = NodeStyle()
-suscstyle["fgcolor"] = "lightgreen"
-suscstyle["bgcolor"] = "lightgreen"
-
-interstyle = NodeStyle()
-interstyle["fgcolor"] = "yellow"
-interstyle["bgcolor"] = "yellow"
-
-nodes_face_map = {}
-
-def mylayout(node):
-    global nodes_face_map, mut_faces_map
-    if node.is_leaf():
-        descFace = faces.TextFace(node.name, fsize=10)
-        descFace.margin_top = 10
-        descFace.margin_bottom = 10
-        descFace.border.margin = 1
-        faces.add_face_to_node(descFace, node, column=1, aligned=True)
-    
-    node_hash = str(node)
-    if not node_hash in nodes_face_map:
-        pass
-    else:
-        for mut_id in sorted(nodes_face_map[node_hash]):
-            faces.add_face_to_node(mut_faces_map[mut_id], node, 0)
-
-    
-def showTreeMutations(params):
-    global nodes_face_map
-    drug_name = params["DRUG_NAME"]
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    
-    input_fh = open(input_dir + "strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    input_fh = open(input_dir + "res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    ensure_dir(input_dir + "/res_muts/")
-    
-    input_fh = open(results_dir + 'phylo_tree.txt')
-    trees = readPhyloTrees(input_fh, strains)
-    input_fh.close()
-    
-    tree = trees[0]
-    
-    res_profile = None
-    for res_profile_tmp in res_profiles_list:
-        if res_profile_tmp.drug_name == drug_name:
-            res_profile = res_profile_tmp
-    
-    full_profile = res_profile.full_profile
-    tree.setObservedResProfile(full_profile)
-    tree.calcInnerNodesBU()
-    calcSubleavesResCount(tree)
-    calcSubnodesCount(tree)
-    
-    newtree = removeUnResLeaves(tree)
-    newtree.calcInnerNodesBU()
-    calcSubleavesResCount(newtree)
-    calcSubnodesCount(newtree)
-    calcDetParsResModel(newtree)
-   
-    phylotree = Tree(newtree.toString(strains=strains) + ";")
-    
-    mut_id = 0
-    input_fn = results_dir + "/trees_data/" + drug_name + ".txt"
-    input_fh = open(input_fn)
-    lines = input_fh.readlines()
-    input_fh.close()
-
-    line0 = lines[0]
-    tokens = line0.strip().split()
-    
-    if len(tokens) < 1: exit()
-    for mut_token in tokens:
-        strain_id_tokens = mut_token.split(";")
-        strain_ids = []
-        for strain_index_str in strain_id_tokens:
-            strain_ids.append(strains.getStrain(int(strain_index_str)))
-        nodes_list = []
-        for strain_id in strain_ids:
-            nodes_list.append(phylotree.get_leaves_by_name(strain_id)[0])
-        node0 = nodes_list[0]
-        node = node0.get_common_ancestor(node0)
-        for node1 in nodes_list[1:]:
-            node = node.get_common_ancestor(node1)
-        if phylotree.get_tree_root() == node:
-            nodes_list = phylotree.get_leaves_by_name(strain_ids[0])
-            for node in nodes_list:
-                node.set_style(resstyle)
-        else:
-            node.set_style(resstyle)  
-            #node.add_face(mut_faces_map[mut_id], 0)
-    
-    nodes_face_map = {}
-    
-    for line in lines[1:]:
-        mut_id += 1
-        if mut_id > 10:
-            break
-        tokens = line.strip().split()
-        if len(tokens) < 1: continue
-        for mut_token in tokens:
-            strain_id_tokens = mut_token.split(";")
-            strain_ids = []
-            for strain_index_str in strain_id_tokens:
-                strain_ids.append(strains.getStrain(int(strain_index_str)))
-            nodes_list = []
-            for strain_id in strain_ids:
-                nodes_list.append(phylotree.get_leaves_by_name(strain_id)[0])
-            node0 = nodes_list[0]
-            node = node0.get_common_ancestor(node0)
-            for node1 in nodes_list[1:]:
-                node = node.get_common_ancestor(node1)
-            hash_node = str(node)
-            if not hash_node in nodes_face_map:
-                nodes_face_map[hash_node] = set([])
-            nodes_face_map[hash_node].add(mut_id)
-        
-    ts = TreeStyle()
-    ts.show_leaf_name = False
-    ts.layout_fn = mylayout
-    ts.mode = "c"
-    phylotree.render(results_dir +"/trees_muts_pdf/"+drug_name + ".pdf", tree_style=ts)
-    #phylotree.show(tree_style=ts)
-    
-    return None
-
-    
-if __name__ == '__main__':
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-        
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-        
-    ensure_dir(results_dir +"/trees_muts_pdf/")
-    
-    input_fh = open(input_dir + "res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
-    input_fh.close()
-    
-    WORKERS = 1#int(parameters["W"])
-
-    TASKS = []
-    
-    TASK = {}
-    count = 0
-
-    for drug_name in drug_names:
-        TASK["DRUG_NAME"] = drug_name
-        TASKS.append(TASK.copy())
-                                                  #  scoreDrug(TASK)
-    progress = GWADRIBProgress("PDF")
-    progress.setJobsCount(len(TASKS))
-    if WORKERS > 1:                               
-        pool = Pool(processes=WORKERS)   
-        for r in pool.imap(showTreeMutations, TASKS):
-            progress.update(str(r))
-    else:
-        for T in TASKS:
-            r = showTreeMutations(T)
-            progress.update(str(r))
-
diff --git a/src/drsoft/format_input/show3_resistance_tree.py b/src/drsoft/format_input/show3_resistance_tree.py
deleted file mode 100644
index 9715f0a..0000000
--- a/src/drsoft/format_input/show3_resistance_tree.py
+++ /dev/null
@@ -1,102 +0,0 @@
-import sys
-import os
-import copy
-from ete2 import Tree
-from ete2 import PhyloTree
-from ete2.treeview.main import TreeStyle, NodeStyle, TreeStyle
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.modelling.model_logic import *
-
-nstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-nstyle["size"] = 10
-nstyle["fgcolor"] = "black"
-
-resstyle = NodeStyle()
-#resstyle["shape"] = "sphere"
-resstyle["size"] = 20
-resstyle["fgcolor"] = "red"
-
-suscstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-suscstyle["size"] = 20
-suscstyle["fgcolor"] = "green"
-
-interstyle = NodeStyle()
-#nstyle["shape"] = "sphere"
-interstyle["size"] = 20
-interstyle["fgcolor"] = "yellow"
-
-
-if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-
-    input_fh = open(input_dir + "strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
-    input_fh = open(input_dir + "res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    ensure_dir(input_dir + "/res_trees/")
-    
-    input_fh = open(results_dir + 'phylo_tree.txt')
-    trees = readPhyloTrees(input_fh, strains)
-    input_fh.close()
-   
-    tree = trees[0]
-   
-    for res_profile in res_profiles_list:
-        drug_name = res_profile.drug_name
-
-        full_profile = res_profile.full_profile
-        print(full_profile)
-        tree.setObservedResProfile(full_profile)
-        tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-        
-        newtree = removeUnResLeaves(tree)
-        newtree.calcInnerNodesBU()
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
-        
-        tree_txt = newtree.root.toString(lengths = False, is_root=True, strains=strains)
-            
-        genetree = Tree(tree_txt + ";")
-    
-        for node in genetree.traverse():
-            node.set_style(nstyle)
-    
-        for i in range(len(full_profile)):
-            strain_id = strains.getStrain(i)
-            state = full_profile[i]
-            if state == "R":
-                for n in genetree.get_leaves_by_name(strain_id):
-                    n.set_style(resstyle)
-            elif state =="S":
-                for n in genetree.get_leaves_by_name(strain_id):
-                    n.set_style(suscstyle)
-            elif state == "I":
-                for n in genetree.get_leaves_by_name(strain_id):
-                    n.set_style(interstyle)
-                    
-
-        genetree.render(input_dir + "/res_trees/"+drug_name+".png", w=600)
-
-    
-    
-    
\ No newline at end of file
diff --git a/src/drsoft/format_input/show4_latex_mutations.py b/src/drsoft/format_input/show4_latex_mutations.py
deleted file mode 100644
index e24d143..0000000
--- a/src/drsoft/format_input/show4_latex_mutations.py
+++ /dev/null
@@ -1,364 +0,0 @@
-import sys
-import os
-import copy
-from multiprocessing import Pool
-
-
-
-sys.path.append("../../../../camber2/src/")
-sys.path.append("../../")
-
-from ressoft.utils.file_utils import ensure_dir
-from soft.utils.camber_utils import *
-from ressoft.utils.stats_utils import *
-from ressoft.utils.generator import choose
-from ressoft.utils.pred_utils import *
-from ressoft.utils.input_utils import *
-from ressoft.utils.names_utils import *
-from ressoft.utils.output import *
-from ressoft.modelling.model_logic import *
-
-
-def printLatexTreeScoreNode(gene_profile, drug_res_profile, phylo_tree, node, strains, output_format_fh, strain_names=False):
-    res_state = node.complete_res_state
-    mut_state = node.complete_mut_state
-    if res_state == 'R':
-        res_color = "red"
-    elif res_state == 'S':
-        res_color = "green"
-    else:
-        res_color = "black"
-    if mut_state == '1':
-        mut_color = "orange"
-    elif mut_state == '0':
-        mut_color = "blue"
-    else:
-        mut_color = "black"
-    
-    if node != phylo_tree.root:
-        parent_res_state = node.parent.complete_res_state
-        parent_mut_state = node.parent.complete_mut_state
-        tscore = stable(parent_res_state, res_state, parent_mut_state, mut_state, theta=0.5)
-        if tscore > 0.0:
-            output_format_fh.write("\edge[green] node{"+str(node.e_len)+"};\n")
-        elif tscore < 0.0:
-            output_format_fh.write("\edge[red] node{"+str(node.e_len)+"};\n")
-        else:
-            output_format_fh.write("\edge[black] node{"+str(node.e_len)+"};\n")
-            
-    output_format_fh.write("[."+str(node.tscore)+",")
-    output_format_fh.write("\\textcolor{"+res_color+"}{"+str(res_state)+"},");
-    output_format_fh.write("\\textcolor{"+mut_color+"}{"+str(mut_state)+"}");
-    if len(node.children) == 0:
-        if strain_names:
-            output_format_fh.write("\\\\"+strains.getStrain(node.node_id).replace("_","-"));
-        else:
-            output_format_fh.write("\\\\"+str(node.node_id));
-    else:
-        pass
-    output_format_fh.write("\n")
-    
-    for child_node in node.children:
-        printLatexTreeScoreNode(gene_profile, drug_res_profile, phylo_tree, child_node, strains, output_format_fh, strain_names=True)
-    
-    output_format_fh.write("]\n");
-        
-    return None
-
-def printLatexTreeScore(gene_profile, drug_res_profile, phylo_tree, strains, output_format_fh):
-    output_format_fh.write(gene_profile.gene_id_text + "\n");
-    output_format_fh.write("\\setlength{\\unitlength}{1mm}\n");
-    output_format_fh.write("\\begin{tikzpicture}[level 1/.style={level distance=1.5cm}]\n");
-    output_format_fh.write("\\tikzset{every tree node/.style={align=center,anchor=north}}\n");
-    output_format_fh.write("\\tikzset{edge from parent/.append style={very thick}}\n");
-    output_format_fh.write("\\Tree[\n");
-    printLatexTreeScoreNode(gene_profile, drug_res_profile, phylo_tree, phylo_tree.root, strains, output_format_fh);
-    output_format_fh.write("]\n");
-    output_format_fh.write("\\end{tikzpicture}\n");
-    return None
-
-def drawTrees(drug_res_profile, drug_name, drug_targets, drug_res_genes, tree, all_mutations, gene_presence, strains, output_det_fh=None, output_format_fh=None, parameters=None):
-    species = parameters["SPECIES"]
-    details = parameters["DETAILS"]
-    subset = parameters["SUBSET"]
-    hide = int(parameters["HIDE"])
-    beta = int(parameters["BETA"])
-    pred = parameters["PRED"]
-    dist = int(parameters["DIST"])
-    exp_prefix = parameters["EXP_PREFIX"]
-    grouping_type = parameters["GROUPING"] 
-    m_type = parameters["TYPE"]
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_format/")+"/"
-
-    calcRefSatesMutations(all_mutations, drug_res_profile)
-    calcBinSatesMutations(all_mutations, drug_res_profile)
-    con_mutations, neu_mutations, ess_mutations = categorizeMultiMutations(all_mutations, drug_res_profile)
-    imp_mutations = con_mutations + neu_mutations + ess_mutations
-    gene_profiles = geneMutations(imp_mutations)
-    con_gene_profiles = geneMutations(con_mutations)
-    
-    tree.setObservedResProfile(drug_res_profile.full_profile)
-
-    calcSubleavesResCount(tree)
-    calcSubnodesCount(tree)
-    calcDetParsResModel(tree)
-    
-    diffTime("Classification: "+drug_name)
-    calcMutCoverSupports(imp_mutations, drug_res_profile);
-    diffTime("Coverage support: "+drug_name)
-    gene_profiles = groupGeneMutations(gene_profiles, dist, con_gene_profiles, grouping_type)
-    diffTime("Grouping: "+drug_name)
-    computeGeneProfiles(gene_profiles)
-    diffTime("Gene profiles: "+drug_name)
-    computeGeneProfilesEss(gene_profiles)
-    
-    diffTime("Coverage support: "+drug_name)
-    if beta == -1:
-        beta_str = str("%.2f" % float(len(drug_res_profile.getResistant())/float(len(drug_res_profile.getSusceptible()))))
-        beta = float(beta_str)
-        print(drug_name, "NEW BETA: ", beta)
-    
-    diffTime("Gene profiles essentiality: "+drug_name)
-    calcGenesCoverSupports(gene_profiles, drug_res_profile, beta)    
-    tree.calcContributions(drug_res_profile, beta)  
-    calcGenesWeightedSupports(gene_profiles, drug_res_profile, tree, beta)
-    diffTime("Weighted support: "+drug_name)
-    calcOddsRatio(gene_profiles, drug_res_profile)
-    diffTime("Odds ratio: "+drug_name)
-    
-    newtree = removeUnResLeaves(tree)
-    newtree.setObservedResProfile(drug_res_profile.full_profile)
-    
-    
-    print("TREE", newtree.leaves_count, newtree.nodes_count)
-    for i in newtree.leaf_ids:
-        children_ids = ""
-        for child in newtree.nodes[i].children:
-            children_ids += str(child.node_id) + ","
-        if newtree.nodes[i].parent == None:
-            prant_id = "null"
-        else:
-            prant_id = str(newtree.nodes[i].parent.node_id) 
-        print("TREE", i, "-->", children_ids, " | ", prant_id)
-
-    calcSubleavesResCount(newtree)
-    calcSubnodesCount(newtree)
-    calcDetParsResModel(newtree)
-    
-    gene_profiles_sorted = sorted(gene_profiles, key=lambda gp:-gp.wsupport)
-    thr = list(gene_profiles_sorted)[4].wsupport
-
-    count = 0
-    tscore_res_map = {}
-    wsupport_res_map = {}
-
-    for gene_profile in gene_profiles_sorted:
-        count += 1
-        if gene_profile.wsupport < thr:
-            continue
-        key = gene_profile.getFullBinKey()
-        if not key in tscore_res_map:
-            newtree.setObservedMutProfile(gene_profile.bin_profile)
-      
-            calcSubleavesMutCount(newtree)
-            calcDetParsMutModel(newtree)
-            gene_profile.tscore = calcTransitionScore(newtree, 0.5)
-      
-            tscore_res_map[key] = gene_profile.tscore
-            wsupport_res_map[key] = 0.0  
-        else:
-            gene_profile.tscore = tscore_res_map[key]
-            gene_profile.exp_wsupport = wsupport_res_map[key]
-
-        output_format_fn = output_dir +"/latex/"+str(exp_prefix)+"-"+str(hide)+"-"+str(dist)+"-"+grouping_type+"-"+details+"-"+subset+"-"+m_type+"-"+pred+"-"+str(beta)+"-"+drug_name+"_"+str(count)+".tex"
-        output_format_fh = open(output_format_fn, "w")
-        printLatexTreeScore(gene_profile, drug_res_profile, newtree, strains, output_format_fh)
-        output_format_fh.close();
-    return None
-
-
-#     output_format_fh.close()
-
-def scoreDrug(parameters):
- #   print(drug_name)
- #   parameters = readParameters(sys.argv)
-    species = parameters["SPECIES"] 
-    subset = parameters["SUBSET"]
-    m_type = (parameters["TYPE"])
-    pred = (parameters["PRED"])
-    drug_name = parameters["DRUG_NAME"]
-
-    phase = 0
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-    format_dir = os.path.abspath("../../../data_output/"+species+"_format/")+"/"
-    
-    ensure_dir(format_dir)
-    ensure_dir(format_dir +"/latex/")
-    ensure_dir(output_dir)
-    
-    input_fh = open(input_dir + "strains-all.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    if pred == "B":
-        input_fn = input_dir + "res_profiles_ret.txt"
-    else:
-        input_fn = input_dir + "pred_res_profiles.txt"
-    input_fh = open(input_fn)
-    res_profiles_list = readResistanceProfiles(input_fh, strains)
-    input_fh.close()
-    
-    res_profiles = {}
-    for res_profile in res_profiles_list:
-        res_profiles[res_profile.drug_name] = res_profile
-    
-    cluster_fh = open(input_dir + "conn_comp-det-"+str(phase)+".txt")
-    clusters, id_cluster_map = readClusters(cluster_fh, strains)
-    cluster_fh.close()
-    
-    anns_fn = input_dir+"names_anns.txt"
-    if os.path.exists(anns_fn):
-        anns_fh = open(anns_fn)
-        names_mapping = readNamesMapping(anns_fh)
-        anns_fh.close()
-    else:
-        names_mapping = None
-    
-    strains_ord_fh = open(input_dir + "names-strains-ord.txt")
-    strains_ord = readStrainNamesOrd(strains_ord_fh)
-    strains_ord_fh.close()
-    
-    input_fh = open(input_dir + "drug_targets.txt")
-    drug_targets = loadDrugTargets(input_fh, clusters, id_cluster_map, strains_ord)
-    input_fh.close()
-    
-    input_fh = open(input_dir + "drug_res_genes.txt")
-    drug_res_genes = loadDrugResGenes(input_fh, clusters, id_cluster_map, strains_ord)
-    input_fh.close()
-
-    input_fh = open(results_dir + 'phylo_tree.txt')
-    tree = readPhyloTree(input_fh, strains)
-    input_fh.close()
-    
-    print("TREE", tree.leaves_count, tree.nodes_count)
-    for i in range(tree.nodes_count):
-        children_ids = ""
-        for child in tree.nodes[i].children:
-            children_ids += str(child.node_id) + ","
-        if tree.nodes[i].parent == None:
-            prant_id = "null"
-        else:
-            prant_id = str(tree.nodes[i].parent.node_id) 
-        print("TREE", i, "-->", children_ids, " | ", prant_id)
-    
-    if subset == "Y":
-        input_fh = open(input_dir + 'subset_imp_genes_neigh.txt')
-        gene_subset = readGeneSubset(input_fh, clusters, id_cluster_map, strains_ord)
-        input_fh.close()
-    else:
-        gene_subset = None
-        
-    input_fh = open(input_dir + 'man-all-mutations-'+str(phase)+'.txt')
-    all_mutations, gene_presence = readMultiMutations(input_fh, strains, clusters=clusters, id_cluster_map=id_cluster_map, strains_ord=strains_ord, names_mapping=names_mapping, gene_subset=gene_subset, m_type=m_type)
-    input_fh.close()
-    
-    print("READ")
-    sys.stdout.flush()
-    
-    imp_mutations = filterMutations(all_mutations, strains)
-    
-    
-    diffTime("FILTERED")
-    drug_res_profile = copy.deepcopy(res_profiles[drug_name])
-    drawTrees(drug_res_profile, drug_name, drug_targets, drug_res_genes, tree, imp_mutations, gene_presence, strains, parameters=parameters)
-    diffTime("EVALUATED")
-    
-    return drug_name
-    
-if __name__ == '__main__':
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    
-    if "W" in parameters:
-        WORKERS = int(parameters["W"])
-    else:
-        WORKERS = 4
-    #species = "sta_plas_184"
-    #species = "mtb68"
-    if "SPECIES" in parameters and parameters["SPECIES"] != "mtb":
-        species = parameters["SPECIES"]
-    else:
-        species = "sta_plas_184"
-    
-    
-    input_dir = os.path.abspath("../../../data_input/"+species+"_res/")+"/"
-    output_dir = os.path.abspath("../../../data_output/"+species+"_out/")+"/"
-    format_dir = os.path.abspath("../../../data_output/"+species+"_format/")+"/"
-    
-    ensure_dir(output_dir)
-    ensure_dir(format_dir)
-    #scripts_dir = "/research/wongls-group/wozniak/scripts_pred/"
-    #scripts_dir = "../../"+species+"-scripts_pred/"
-    #ensure_dir(scripts_dir)
-    
-    cur_dir = os.path.abspath(os.curdir) +"/"
-    
-    hide_params = set(["0"])
-    dist_params = set(["0"])
-    pred_params = set(["A"])
-    beta_params = set(["-1"])
-    grouping_params = set(["B"])
-    details_params = set(["S"])
-    subset_params = set(["N"])
-    type_params = set(["S"])
-    exp_prefix = "FINAL3"
-    
-    input_fh = open(input_dir + "res_profiles_ret.txt")
-    drug_names = readDrugNames(input_fh)
-    input_fh.close()
-    print(drug_names)
-        
-    TASKS = []
-    
-    TASK = {}
-    count = 0
-    for beta_param in beta_params:
-        for pred_param in pred_params:
-            for type_param in type_params:
-                for hide_param in hide_params:
-                    for dist_param in dist_params:
-                        for grouping_param in grouping_params:
-                            for details_param in details_params:
-                                for subset_param in subset_params:
-                                    for drug_name in drug_names:
-                                        if drug_name != "Tetracycline":
-                                            continue
-                                        TASK["SPECIES"] = species
-                                        TASK["PHASE"] = str(0)
-                                        TASK["DETAILS"] = str(details_param)
-                                        TASK["HIDE"] = str(hide_param)
-                                        TASK["SUBSET"] = str(subset_param)
-                                        TASK["DIST"] = str(dist_param)
-                                        TASK["GROUPING"] = str(grouping_param)
-                                        TASK["EXP_PREFIX"] = exp_prefix 
-                                        TASK["TYPE"] = type_param
-                                        TASK["PRED"] = pred_param
-                                        TASK["BETA"] = beta_param 
-                                        TASK["DRUG_NAME"] = drug_name
-                                   #     TASK["TOP"] = parameters["TOP"]
-                                        TASKS.append(TASK.copy())
-  #                                      scoreDrug(TASK)
-
-    for TASK in TASKS:
-        print(TASK)
-                                        
-    pool = Pool(processes=WORKERS)   
-    for r in pool.imap(scoreDrug, TASKS):
-        print(r)
-        
-        
-
diff --git a/src/drsoft/format_input/show5_res_tree_graphviz.py b/src/drsoft/format_input/show5_res_tree_graphviz.py
deleted file mode 100644
index d7cef48..0000000
--- a/src/drsoft/format_input/show5_res_tree_graphviz.py
+++ /dev/null
@@ -1,99 +0,0 @@
-import sys
-import os
-import copy
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.modelling.model_logic import *
-
-
-if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-
-    input_fh = open(input_dir + "strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
-    strains_list = strains.allStrains()
-
-    input_fh = open(input_dir + "res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    ensure_dir(input_dir + "/res_trees_dots/")
-    ensure_dir(input_dir + "/res_trees_pdfs/")
-
-    input_fh = open(results_dir + 'tree.txt')
-    trees = readPhyloTrees(input_fh, strains_list)
-    input_fh.close()
-   
-    tree = trees[0]
-   
-    for res_profile in res_profiles_list:
-        drug_name = res_profile.drug_name
-
-        tls = []
-        tls.append("digraph "+ "G" + " {\n")
-        full_profile = res_profile.full_profile
-        print(full_profile)
-        tree.setObservedResProfile(full_profile)
-        tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-        
-        newtree = removeUnResLeaves(tree)
-        newtree.calcInnerNodesBU()
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
-
-        for node in newtree.nodes.values():
-            if not node.is_leaf():
-                if node.complete_res_state == "R": color = "red"
-                elif node.complete_res_state == "I": color = "yellow"
-                elif node.complete_res_state == "S": color = "green"
-                else: color = "white"
-                bgcolor = "white"                
-            else:
-                if node.complete_res_state == "R": bgcolor = "red"
-                elif node.complete_res_state == "I": bgcolor = "yellow"
-                elif node.complete_res_state == "S": bgcolor = "green"
-                else: bgcolor = "white"
-                color = "black"
-
-            pdf_label_tmp = str(node.label).replace("_", "").replace("-","")
-            if pdf_label_tmp[0] in ["0","1","2","3","4","5","6","7","8","9"]:
-                pdf_label = "n"+pdf_label_tmp
-            else: pdf_label = pdf_label_tmp            
-            tls.append(str(node.node_id) + " [label="+pdf_label+",style=filled,color="+color+",fillcolor=" + bgcolor + "];\n")
-           # pdf_label_tmp = str(strains_list[node.label]).replace("_", "").replace("-","")
-           # if pdf_label_tmp[0] in ["0","1","2","3","4","5","6","7","8","9"]:
-           #     pdf_label = "n"+pdf_label_tmp
-           # else: pdf_label = pdf_label_tmp
-        #    tls.append(str(node.node_id) + " [label="+pdf_label+",color=" + color + "];\n")
-
-        for node in newtree.inner_nodes_bu: 
-            for node_c in node.children:
-                tls.append(str(node.node_id) + "->" + str(node_c.node_id) + ";\n")
-
-        tls.append("}\n")
-                    
-        output_dot_fn = input_dir + "/res_trees_dots/"+drug_name+".dot"
-        output_pdf_fn = os.path.relpath(input_dir + "/res_trees_pdfs/"+drug_name + ".pdf")
-
-        output_fh = open(output_dot_fn, "w")
-        for tl in tls:
-            output_fh.write(tl)
-        output_fh.close()
-
-        os.system("dot -Tpdf " + output_dot_fn + " -o " + output_pdf_fn)
diff --git a/src/drsoft/format_input/show6_res_mut_tree_graphviz.py b/src/drsoft/format_input/show6_res_mut_tree_graphviz.py
deleted file mode 100644
index b46498e..0000000
--- a/src/drsoft/format_input/show6_res_mut_tree_graphviz.py
+++ /dev/null
@@ -1,198 +0,0 @@
-import sys
-import os
-import copy
-import shutil
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.modelling.model_logic import *
-
-
-color_map = {
-"1": "blue",
-"2": "green",
-"3": "orange",
-"4": "pink",
-"5": "brown"}
-
-def addLegend(): 
-    tls = []
-    tls.append("subgraph Legend {\n")
-    tls.append("k1c [label=\"Susceptible strain\",shape=plaintext,fontsize=20];\n")
-    tls.append("k2c [label=\"Intermediate strain\",shape=plaintext,fontsize=20];\n")
-    tls.append("k3c [label=\"Resistant strain\",shape=plaintext,fontsize=20];\n")
-    tls.append("m1c [label=\"No mutation edge\",shape=plaintext,fontsize=20];\n")
-    tls.append("m2c [label=\"Mutation edge\",shape=plaintext,fontsize=20];\n")
-    tls.append("k1 [label=\"strain1\",fontsize=16,style=filled,color=black,fillcolor=green];\n")
-    tls.append("k2 [label=\"strain2\",fontsize=16,style=filled,color=black,fillcolor=yellow];\n")
-    tls.append("k3 [label=\"strain3\",fontsize=16,style=filled,color=black,fillcolor=red];\n")
-    tls.append("m1x [label=\"strain4\",fontsize=16,style=filled,color=green,fillcolor=white];\n")
-    tls.append("m1y [label=\"strain5\",fontsize=16,style=filled,color=green,fillcolor=white];\n")
-    tls.append("m2x [label=\"strain6\",fontsize=16,style=filled,color=red,fillcolor=white];\n")
-    tls.append("m2y [label=\"strain7\",fontsize=16,style=filled,color=red,fillcolor=white];\n")
-        
-    tls.append("m1x->m1y[penwidth=1,color=black];\n")
-    tls.append("m2x->m2y[penwidth=4,color=blue];\n")
-    tls.append("k1c->k2c->k3c->m1c->m2c[style=invis];\n")
-    tls.append("k1->k2->k3->m1x->m2x[style=invis];\n")
-    tls.append("{ rank=same;m1x m1y}\n")
-    tls.append("{ rank=same;m2x m2y}\n")
-    tls.append("{ rank=same;k1c k1}\n")
-    tls.append("}\n");
-
-
-    return tls
-
-
-if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-
-    score = "mi"
-
-    input_fh = open(input_dir + "strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
-    strains_list = strains.allStrains()
-
-    input_fh = open(input_dir + "res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    ensure_dir(results_dir + "/res_mut_trees_dots/")
-    ensure_dir(results_dir + "/res_mut_trees_pdfs/")
-
-    input_fh = open(results_dir + 'tree.txt')
-    trees = readPhyloTrees(input_fh, strains_list)
-    input_fh.close()
-   
-    tree = trees[0]
-
-
-    input_fn = input_dir + '/bin_profiles_' + parameters["MT"] + '.txt'
-    if not os.path.exists(input_fn):
-        sys.exit(-1)
-
-    input_fh = open(input_fn)
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
-    input_fh.close()
-
-    input_fh = open(input_dir + '/bin_profiles_' + parameters["MT"] + '_det.txt')
-    mut_details_map = readBinProfileDetails(input_fh, strains.count(), parameters["MT"])
-    input_fh.close()
-
-    for res_profile in res_profiles_list:
-        drug_name = res_profile.drug_name
-        try:
-            util.rmtree(results_dir + "/res_mut_trees_dots/" + drug_name + "/")
-            util.rmtree(results_dir + "/res_mut_trees_pdfs/" + drug_name + "/")
-        except:
-            pass
-
-        ensure_dir(results_dir + "/res_mut_trees_dots/" + drug_name + "/")
-        ensure_dir(results_dir + "/res_mut_trees_pdfs/" + drug_name + "/")
-
-        
-        input_fn = scores_dir + drug_name + "/" + score + ".txt"
-        if not os.path.exists(input_fn) or os.path.getsize(input_fn) < 10:
-            print("NOT EXIST: ", input_fn)
-            continue
-        
-        input_fh = open(input_fn)
-        bin_profiles_sorted = readBinProfilesSorted(input_fh, False)
-        input_fh.close()
-        
-        n = len(bin_profiles_sorted)
-
-        bin_profiles_set = set([])
-        ranks_map = {}
-        for i in range(min(n,10)):
-            (bin_profile_id, score_tmp) = bin_profiles_sorted[i]
-            bin_profiles_set.add(bin_profile_id)
-            ranks_map[bin_profile_id] = i + 1
-
-        full_profile = res_profile.full_profile
-
-        tree.setObservedResProfile(full_profile)
-        tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-        
-        newtree = removeUnResLeaves(tree)
-        newtree.calcInnerNodesBU()
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
-
-        for bin_profile_id in bin_profiles_set:
-            bin_profile = bin_profiles[bin_profile_id]
-            details = mut_details_map[bin_profile_id]
-
-            print(drug_name, ''.join(bin_profile), bin_profile_id)
-
-            newtree.setObservedMutProfile(bin_profile)
-            calcSubleavesMutCount(newtree)
-            calcDetParsMutModel(newtree)
-
-            tls = []
-            tls.append("digraph "+ "G" + " {\n")
-            tls.append("fontsize=30\n");
-            tls.append("label=\"" + details.replace(";", "  ").replace("_", "-")[:30] + "\"\n");
-
-            for node in newtree.nodes.values():
-                if not node.is_leaf():
-                    if node.complete_res_state == "R": color = "red"
-                    elif node.complete_res_state == "I": color = "yellow"
-                    elif node.complete_res_state == "S": color = "green"
-                    else: color = "white"
-                    bgcolor = "white"                
-                else:
-                    if node.complete_res_state == "R": bgcolor = "red"
-                    elif node.complete_res_state == "I": bgcolor = "yellow"
-                    elif node.complete_res_state == "S": bgcolor = "green"
-                    else: bgcolor = "white"
-                    color = "black"
-
-                pdf_label_tmp = str(node.label).replace("_", "").replace("-","")
-                if pdf_label_tmp[0] in ["0","1","2","3","4","5","6","7","8","9"]:
-                    pdf_label = "n"+pdf_label_tmp
-                else: pdf_label = pdf_label_tmp            
-                tls.append(str(node.node_id) + " [label="+pdf_label+",style=filled,color="+color+",fillcolor=" + bgcolor + "];\n")
-
-            for node in newtree.inner_nodes_bu: 
-                for node_c in node.children:
-                    if node_c.complete_mut_state == "?":
-                        ecolor = "grey"
-                        pencolor = "1"
-                    elif node_c.complete_mut_state == "0":
-                        ecolor = "black"
-                        pencolor = "1"
-                    else:
-                        ecolor = color_map.get(node_c.complete_mut_state, "purple")
-                        pencolor = "4"
-                    tls.append(str(node.node_id) + "->" + str(node_c.node_id) + " [penwidth="+pencolor+",color="+ecolor+"];\n")
-
-            tls += addLegend()
-            tls.append("}\n")
-                        
-            output_dot_fn = results_dir + "/res_mut_trees_dots/" + drug_name + "/"+str(ranks_map[bin_profile_id])+".dot"
-            output_pdf_fn = os.path.relpath(results_dir + "/res_mut_trees_pdfs/"+drug_name + "/"+str(ranks_map[bin_profile_id]) +".pdf")
-
-            output_fh = open(output_dot_fn, "w")
-            for tl in tls:
-                output_fh.write(tl)
-            output_fh.close()
-
-            os.system("dot -Tpdf " + output_dot_fn + " -o " + output_pdf_fn)
diff --git a/src/drsoft/format_input/show7_latex_rpoB.py b/src/drsoft/format_input/show7_latex_rpoB.py
deleted file mode 100644
index b46498e..0000000
--- a/src/drsoft/format_input/show7_latex_rpoB.py
+++ /dev/null
@@ -1,198 +0,0 @@
-import sys
-import os
-import copy
-import shutil
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.modelling.model_logic import *
-
-
-color_map = {
-"1": "blue",
-"2": "green",
-"3": "orange",
-"4": "pink",
-"5": "brown"}
-
-def addLegend(): 
-    tls = []
-    tls.append("subgraph Legend {\n")
-    tls.append("k1c [label=\"Susceptible strain\",shape=plaintext,fontsize=20];\n")
-    tls.append("k2c [label=\"Intermediate strain\",shape=plaintext,fontsize=20];\n")
-    tls.append("k3c [label=\"Resistant strain\",shape=plaintext,fontsize=20];\n")
-    tls.append("m1c [label=\"No mutation edge\",shape=plaintext,fontsize=20];\n")
-    tls.append("m2c [label=\"Mutation edge\",shape=plaintext,fontsize=20];\n")
-    tls.append("k1 [label=\"strain1\",fontsize=16,style=filled,color=black,fillcolor=green];\n")
-    tls.append("k2 [label=\"strain2\",fontsize=16,style=filled,color=black,fillcolor=yellow];\n")
-    tls.append("k3 [label=\"strain3\",fontsize=16,style=filled,color=black,fillcolor=red];\n")
-    tls.append("m1x [label=\"strain4\",fontsize=16,style=filled,color=green,fillcolor=white];\n")
-    tls.append("m1y [label=\"strain5\",fontsize=16,style=filled,color=green,fillcolor=white];\n")
-    tls.append("m2x [label=\"strain6\",fontsize=16,style=filled,color=red,fillcolor=white];\n")
-    tls.append("m2y [label=\"strain7\",fontsize=16,style=filled,color=red,fillcolor=white];\n")
-        
-    tls.append("m1x->m1y[penwidth=1,color=black];\n")
-    tls.append("m2x->m2y[penwidth=4,color=blue];\n")
-    tls.append("k1c->k2c->k3c->m1c->m2c[style=invis];\n")
-    tls.append("k1->k2->k3->m1x->m2x[style=invis];\n")
-    tls.append("{ rank=same;m1x m1y}\n")
-    tls.append("{ rank=same;m2x m2y}\n")
-    tls.append("{ rank=same;k1c k1}\n")
-    tls.append("}\n");
-
-
-    return tls
-
-
-if __name__ == '__main__':
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    scores_dir = parameters["RESULTS_SCORES_DIR"]
-
-    score = "mi"
-
-    input_fh = open(input_dir + "strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
-    strains_list = strains.allStrains()
-
-    input_fh = open(input_dir + "res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    ensure_dir(results_dir + "/res_mut_trees_dots/")
-    ensure_dir(results_dir + "/res_mut_trees_pdfs/")
-
-    input_fh = open(results_dir + 'tree.txt')
-    trees = readPhyloTrees(input_fh, strains_list)
-    input_fh.close()
-   
-    tree = trees[0]
-
-
-    input_fn = input_dir + '/bin_profiles_' + parameters["MT"] + '.txt'
-    if not os.path.exists(input_fn):
-        sys.exit(-1)
-
-    input_fh = open(input_fn)
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
-    input_fh.close()
-
-    input_fh = open(input_dir + '/bin_profiles_' + parameters["MT"] + '_det.txt')
-    mut_details_map = readBinProfileDetails(input_fh, strains.count(), parameters["MT"])
-    input_fh.close()
-
-    for res_profile in res_profiles_list:
-        drug_name = res_profile.drug_name
-        try:
-            util.rmtree(results_dir + "/res_mut_trees_dots/" + drug_name + "/")
-            util.rmtree(results_dir + "/res_mut_trees_pdfs/" + drug_name + "/")
-        except:
-            pass
-
-        ensure_dir(results_dir + "/res_mut_trees_dots/" + drug_name + "/")
-        ensure_dir(results_dir + "/res_mut_trees_pdfs/" + drug_name + "/")
-
-        
-        input_fn = scores_dir + drug_name + "/" + score + ".txt"
-        if not os.path.exists(input_fn) or os.path.getsize(input_fn) < 10:
-            print("NOT EXIST: ", input_fn)
-            continue
-        
-        input_fh = open(input_fn)
-        bin_profiles_sorted = readBinProfilesSorted(input_fh, False)
-        input_fh.close()
-        
-        n = len(bin_profiles_sorted)
-
-        bin_profiles_set = set([])
-        ranks_map = {}
-        for i in range(min(n,10)):
-            (bin_profile_id, score_tmp) = bin_profiles_sorted[i]
-            bin_profiles_set.add(bin_profile_id)
-            ranks_map[bin_profile_id] = i + 1
-
-        full_profile = res_profile.full_profile
-
-        tree.setObservedResProfile(full_profile)
-        tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-        
-        newtree = removeUnResLeaves(tree)
-        newtree.calcInnerNodesBU()
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
-
-        for bin_profile_id in bin_profiles_set:
-            bin_profile = bin_profiles[bin_profile_id]
-            details = mut_details_map[bin_profile_id]
-
-            print(drug_name, ''.join(bin_profile), bin_profile_id)
-
-            newtree.setObservedMutProfile(bin_profile)
-            calcSubleavesMutCount(newtree)
-            calcDetParsMutModel(newtree)
-
-            tls = []
-            tls.append("digraph "+ "G" + " {\n")
-            tls.append("fontsize=30\n");
-            tls.append("label=\"" + details.replace(";", "  ").replace("_", "-")[:30] + "\"\n");
-
-            for node in newtree.nodes.values():
-                if not node.is_leaf():
-                    if node.complete_res_state == "R": color = "red"
-                    elif node.complete_res_state == "I": color = "yellow"
-                    elif node.complete_res_state == "S": color = "green"
-                    else: color = "white"
-                    bgcolor = "white"                
-                else:
-                    if node.complete_res_state == "R": bgcolor = "red"
-                    elif node.complete_res_state == "I": bgcolor = "yellow"
-                    elif node.complete_res_state == "S": bgcolor = "green"
-                    else: bgcolor = "white"
-                    color = "black"
-
-                pdf_label_tmp = str(node.label).replace("_", "").replace("-","")
-                if pdf_label_tmp[0] in ["0","1","2","3","4","5","6","7","8","9"]:
-                    pdf_label = "n"+pdf_label_tmp
-                else: pdf_label = pdf_label_tmp            
-                tls.append(str(node.node_id) + " [label="+pdf_label+",style=filled,color="+color+",fillcolor=" + bgcolor + "];\n")
-
-            for node in newtree.inner_nodes_bu: 
-                for node_c in node.children:
-                    if node_c.complete_mut_state == "?":
-                        ecolor = "grey"
-                        pencolor = "1"
-                    elif node_c.complete_mut_state == "0":
-                        ecolor = "black"
-                        pencolor = "1"
-                    else:
-                        ecolor = color_map.get(node_c.complete_mut_state, "purple")
-                        pencolor = "4"
-                    tls.append(str(node.node_id) + "->" + str(node_c.node_id) + " [penwidth="+pencolor+",color="+ecolor+"];\n")
-
-            tls += addLegend()
-            tls.append("}\n")
-                        
-            output_dot_fn = results_dir + "/res_mut_trees_dots/" + drug_name + "/"+str(ranks_map[bin_profile_id])+".dot"
-            output_pdf_fn = os.path.relpath(results_dir + "/res_mut_trees_pdfs/"+drug_name + "/"+str(ranks_map[bin_profile_id]) +".pdf")
-
-            output_fh = open(output_dot_fn, "w")
-            for tl in tls:
-                output_fh.write(tl)
-            output_fh.close()
-
-            os.system("dot -Tpdf " + output_dot_fn + " -o " + output_pdf_fn)
diff --git a/other/visR/backup/__init__.py b/src/drsoft/format_results/__init__.py
similarity index 100%
copy from other/visR/backup/__init__.py
copy to src/drsoft/format_results/__init__.py
diff --git a/src/drsoft/format_results/a1_mutations_latex_sel.py b/src/drsoft/format_results/a1_mutations_latex_sel.py
index 95b51ce..178857a 100644
--- a/src/drsoft/format_results/a1_mutations_latex_sel.py
+++ b/src/drsoft/format_results/a1_mutations_latex_sel.py
@@ -1,19 +1,8 @@
-import math
 import os
 import sys
-import filecmp
 import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.utils.gwamar_utils import ensure_dir
-
+from src.drsoft.utils import gwamar_params_utils, gwamar_bin_utils, gwamar_utils,\
+  gwamar_res_io_utils, gwamar_progress_utils
 
 colors_map = {"?": "gray", "0": "white", "1": "orange", "2": "blue",
                "3": "red", "4":"violet", "5": "green", "6": "brown",
@@ -22,16 +11,11 @@ colors_map = {"?": "gray", "0": "white", "1": "orange", "2": "blue",
 def saveMutsLatex(params):
     drug_name = params["DRUG_NAME"]
     dataset = params["D"]
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-    stats_dir = parameters["STATS_DIR"]
     analysis_comb_sel_dir = parameters["RESULTS_A_COMB_S_SEL_DIR"]
-    analysis_comb_dir = parameters["RESULTS_A_COMP_S_DIR"]
     analysis_latex_sel_dir = parameters["RESULTS_A_LATEX_S_SEL_DIR"]
-    analysis_latex_dir = parameters["RESULTS_A_LATEX_S_DIR"]
 
     input_fn = analysis_comb_sel_dir + drug_name + ".txt"
     input_fh = open(input_fn)
@@ -49,7 +33,7 @@ def saveMutsLatex(params):
         gene_id, position = mut_desc_full.split(" ")[2:4]
         mut_profiles.append((bin_profile, gene_id, position))
 
-    mut_profiles_sorted = sorted(mut_profiles, key=lambda (bin_profile, gene_id, position): (-countNonZeros(bin_profile), abs(int(position)-440), gene_id))
+    mut_profiles_sorted = sorted(mut_profiles, key=lambda (bin_profile, gene_id, position): (-gwamar_bin_utils.countNonZeros(bin_profile), abs(int(position)-440), gene_id))
 
     tls = []
     tls.append("\\documentclass[10pt]{article}\n")
@@ -111,8 +95,8 @@ def saveMutsLatex(params):
 if __name__ == '__main__':
 
  
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -124,8 +108,8 @@ if __name__ == '__main__':
     analysis_latex_sel_dir = parameters["RESULTS_A_LATEX_S_SEL_DIR"]
     analysis_latex_dir = parameters["RESULTS_A_LATEX_S_DIR"]
 
-    ensure_dir(analysis_latex_sel_dir)
-    ensure_dir(analysis_latex_dir)
+    gwamar_utils.ensure_dir(analysis_latex_sel_dir)
+    gwamar_utils.ensure_dir(analysis_latex_dir)
 
     
     TASKS = []
@@ -133,21 +117,21 @@ if __name__ == '__main__':
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
-        ensure_dir(analysis_comp_dir + drug_name)
+        gwamar_utils.ensure_dir(analysis_comp_dir + drug_name)
         TASK["DRUG_NAME"] = drug_name
         TASK["D"] = parameters["D"]
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined")
     progress.setJobsCount(len(TASKS))
         
     if WORKERS > 1:
-        pool = Pool(processes=WORKERS)
+        pool = multiprocessing.Pool(processes=WORKERS)
         for r in pool.imap(saveMutsLatex, TASKS):
             progress.update(str(r))
     else:
diff --git a/src/drsoft/modelling/cct.py b/src/drsoft/modelling/cct.py
index 9ac4bd2..f16886f 100644
--- a/src/drsoft/modelling/cct.py
+++ b/src/drsoft/modelling/cct.py
@@ -1,12 +1,8 @@
-import sys
-from collections import deque
 
 from decimal import Decimal
-
-from drsoft.modelling.model_logic import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
+from src.drsoft.utils import gwamar_stat_utils, gwamar_generator_utils,\
+  gwamar_bin_utils
+from src.drsoft.modelling import model_logic
 
 def colorEdges(tree, alg=0, overwrite=False):
     if alg == 0: # color all edges coming to resistant nodes
@@ -50,7 +46,6 @@ def calcFastWnMAT(tree, maxrparam=None, opt=False, w2=True):
 
     for node in tree.inner_nodes_bu:
         node.count_map = {}
-        children_list = node.children
         k = len(node.children)
 
         node.maxn = 0
@@ -67,20 +62,20 @@ def calcFastWnMAT(tree, maxrparam=None, opt=False, w2=True):
             
             if opt and (k+1 == node.subnodes_count):
                 if w2 and k == nt: wnm = 0
-                else: wnm = binom(k, nt)
+                else: wnm = gwamar_stat_utils.binom(k, nt)
             else:
                 wnm = 0
             
                 for r in range(maxr+1):
                     if w2 == False and r==k: wnm += 1
-                    for gain_profile in generateSumProfiles(k, r, 1):
+                    for gain_profile in gwamar_generator_utils.generateSumProfiles(k, r, 1):
                         kz = 0;
                         gain_bound = []
                         for j in range(k): 
                             if gain_profile[j] == 0: 
                                 kz += 1
                                 gain_bound.append(node.maxn)
-                        for gain_subprofile in generateSumProfiles(kz, nt-r, nt-r, gain_bound[::-1]):
+                        for gain_subprofile in gwamar_generator_utils.generateSumProfiles(kz, nt-r, nt-r, gain_bound[::-1]):
                             jz = 0
                             wnm_tmp = 1
                             for j in range(k):
@@ -129,7 +124,7 @@ def calcFastBpnMAT(tree, p, maxrparam, opt=False, w2=True):
 
                 if opt and (k+1 == node.subnodes_count):
                     if w2 and k == nt: wnm = 0
-                    else: wnm = binom(node.maxp, pt) * binom(k-node.maxp, nt-pt)
+                    else: wnm = gwamar_stat_utils.binom(node.maxp, pt) * gwamar_stat_utils.binom(k-node.maxp, nt-pt)
                 else:
                     wnm = 0
                     if w2: maxr = min(k-1, node.maxn, nt)
@@ -138,7 +133,7 @@ def calcFastBpnMAT(tree, p, maxrparam, opt=False, w2=True):
                     for r in range(maxr + 1):
                         if r==k and pt==node.bc and w2 == False:  wnm += 1
 
-                        for gain_r_profile in generateSumProfiles(k, r, 1):
+                        for gain_r_profile in gwamar_generator_utils.generateSumProfiles(k, r, 1):
                             ur = 0 # liczba trafionych
                             kz = 0 # liczba 0
                             gain_r_bound = []
@@ -152,11 +147,11 @@ def calcFastBpnMAT(tree, p, maxrparam, opt=False, w2=True):
                                     gain_r_bound.append(node_j.maxn)
                                     gain_u_bound.append(node_j.maxp)
 
-                            for gain_r_subprofile in generateSumProfiles(kz, nt-r, nt-r, gain_r_bound[::-1]):
+                            for gain_r_subprofile in gwamar_generator_utils.generateSumProfiles(kz, nt-r, nt-r, gain_r_bound[::-1]):
                                 gain_p_bound = []
                                 for jz in range(kz):
                                     gain_p_bound.append(min(gain_u_bound[jz], gain_r_subprofile[jz]))
-                                for gain_u_subprofile in generateSumProfiles(kz, pt-ur, pt-ur, gain_p_bound[::-1]):
+                                for gain_u_subprofile in gwamar_generator_utils.generateSumProfiles(kz, pt-ur, pt-ur, gain_p_bound[::-1]):
                                     wnm_tmp = 1
                                     jz = 0
                                     for j in range(k):
@@ -189,29 +184,29 @@ def calcBinProfilesFastCCT(bin_profiles, drp, trees_list, opt=False, w2=True):
     for tree in trees_list:
         tree.setObservedResProfile(drp.full_profile)
         tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
+        model_logic.calcSubleavesResCount(tree)
+        model_logic.calcSubnodesCount(tree)
         print(tree)
         
         if len(drp.getResistant()) == 0:
             continue
         
-        newtree = removeUnResLeaves(tree)
+        newtree = model_logic.removeUnResLeaves(tree)
         newtree.calcInnerNodesBU()
         newtree.setObservedResProfile(drp.full_profile)
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
+        model_logic.calcSubleavesResCount(newtree)
+        model_logic.calcSubnodesCount(newtree)
+        model_logic.calcDetParsResModel(newtree)
         colorEdges(newtree, alg=1, overwrite=False)
         print(newtree)
 
         maxr = 0
         
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            for bin_profile in specBinProfiles(gen_bin_profile):
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
                 newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
+                model_logic.calcSubleavesMutCount(newtree)
+                model_logic.calcDetParsMutModel(newtree)
                 r,p = calcFastRP(newtree)
                 maxr = max(maxr,r)
         
@@ -225,10 +220,10 @@ def calcBinProfilesFastCCT(bin_profiles, drp, trees_list, opt=False, w2=True):
 
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
             score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
                 newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
+                model_logic.calcSubleavesMutCount(newtree)
+                model_logic.calcDetParsMutModel(newtree)
                 
                 r,p = calcFastRP(newtree)
 
@@ -248,7 +243,7 @@ def calcBinProfilesFastCCT(bin_profiles, drp, trees_list, opt=False, w2=True):
     scores_mean = {}
     
     for bin_profile_id in scores:
-        scores_mean[bin_profile_id] = mean(scores[bin_profile_id])
+        scores_mean[bin_profile_id] = gwamar_stat_utils.mean(scores[bin_profile_id])
     
     return scores_mean
 
diff --git a/src/drsoft/modelling/fcct.py b/src/drsoft/modelling/fcct.py
deleted file mode 100644
index 6028ad3..0000000
--- a/src/drsoft/modelling/fcct.py
+++ /dev/null
@@ -1,355 +0,0 @@
-import os
-import sys
-from decimal import Decimal
-
-from collections import deque
-
-from drsoft.modelling.model_logic import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
-
-def colorEdges(tree, alg=0, overwrite=False):
-    if alg == 0: # color all edges coming to resistant nodes
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R":
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    elif alg == 1: # color all edges with S->R
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R" and (node.parent == None or node.parent.complete_res_state == "S"):
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    return None
-
-def calcFastBC(tree):
-    for node in tree.leaves: node.bc = 0
-    for node in tree.inner_nodes_bu:
-        node.bc = 0
-        for node_j in node.children:
-            if node_j.ecolor == "b":
-                node.bc += 1
-    return tree.root.bc
-
-def calcFastN(tree, w2=False):
-    for node in tree.leaves: node.maxn = 1
-
-    if w2:
-        for node in tree.inner_nodes_bu:
-            sum_tmp = 0
-            all_leaves = True
-            for ch_node in node.children:
-                sum_tmp += max(1, ch_node.maxn)
-                if not ch_node.is_leaf():
-                    all_leaves = False 
-            if all_leaves:
-                node.maxn = len(node.children)-1
-            else:
-                node.maxn = sum_tmp
-    else:
-        for node in tree.inner_nodes_bu:
-            node.maxn = 0
-            for ch_node in node.children:
-                node.maxn += max(ch_node.maxn, 1)
-    
-    # for node in tree.nodes.values():
-    # 	print(node.topos, node.maxn, tree.root.maxn)
-    
-    return tree.root.maxn
-
-def calcFastP(tree, w2=False):
-    for node in tree.leaves: 
-        node.maxp0 = 0
-        if node.ecolor == "b": node.maxp = 1
-        else: node.maxp = 0
-
-    if w2:
-       # print("here, maxp")
-        for node in tree.inner_nodes_bu:
-            sum_tmp = 0
-            all_black = True
-            for ch_node in node.children:
-                sum_tmp += ch_node.maxp
-                if ch_node.ecolor != "b": all_black = False
-                
-            if all_black:
-                sum_tmp_max = 0
-                for ch_node in node.children:
-                    sum_tmp_max = max(sum_tmp_max, sum_tmp - ch_node.maxp + ch_node.maxp0)
-                node.maxp0 = sum_tmp_max
-                if node.ecolor == "b": node.maxp = max(1, sum_tmp_max)
-                else: node.maxp = sum_tmp_max
-            else:
-                node.maxp0 = sum_tmp
-                if node.ecolor == "b": node.maxp = max(1, sum_tmp)
-                else: node.maxp = sum_tmp
-    else:
-        # print("there, maxp")
-        for node in tree.inner_nodes_bu:
-            sum_tmp = 0
-            for ch_node in node.children:
-                sum_tmp += ch_node.maxp
-            if node.ecolor == "b": node.maxp = max(1, sum_tmp)
-            else: node.maxp = sum_tmp
-    # for node in tree.nodes.values():
-    #     print("maxp", node.node_id, node.maxp)
-
-    return tree.root.maxp
-
-def calcFastWnMAT(tree, maxn_t=None, opt=False, w2=True):
-    for node in tree.leaves:
-        node.count_map = {}                             
-        node.count_map[0] = 1
-
-    for node in tree.inner_nodes_bu:
-        node.count_map = {}
-        children_list = node.children
-        k = len(node.children)
-
-        maxn = min(maxn_t, node.maxn)
-
-        for nt in range(maxn+1):
-            if w2: maxr = min(nt, k-1, node.maxn)
-            else: maxr = min(nt, k, node.maxn)
-            
-            if opt and (k+1 == node.subnodes_count):
-                if w2 and k == nt: wnm = 0
-                else: wnm = binom(k, nt)
-            else:
-                wnm = 0
-            
-                for r in range( maxr+1):
-                 #   if w2 == False and r==k: wnm += 1
-                    for gain_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
-                        gain_bound = []
-                        for j in range(k): 
-                            if gain_profile[j] == 1: 
-                                gain_bound.append(0)
-                            else:
-                                gain_bound.append(node.maxn)
-                        for gain_subprofile in generateSumProfiles2(k, nt-r, ub=gain_bound):
-                            wnm_tmp = 1
-                            for j in range(k):
-                                if gain_profile[j] == 0:
-                                    node_j = node.children[j]
-                                    wnm_tmp *= node_j.count_map.get(gain_subprofile[j], 0)
-                                    if wnm_tmp == 0:
-                                        break    
-                            wnm += wnm_tmp
-            node.count_map[nt] = wnm
-    return tree.root.count_map
-
-def calcFastRP(tree):
-    # r - total number of 0->1 changes 
-    # p - total number of 0->1 changes on black edges
-    r,p = 0,0
-    for node in tree.inner_nodes_bu:
-        for node_j in node.children:
-            if node.complete_mut_state == '0' and node_j.complete_mut_state == "1":
-                r += 1
-                if node_j.ecolor == "b":
-                    p += 1
-    return r,p
-
-def calcFastBpnMAT(tree, maxp_t, maxn_t, opt=False, w2=True, mem={}):
-    mem = {}
-
-    for node in tree.leaves:
-        mem[node.topos] = {}
-        mem[node.topos][(0,0)] = 1
-        
-    for node in tree.inner_nodes_bu:
-        maxn = min(maxn_t, node.maxn)
-        maxp = min(node.maxp, maxp_t)
-
-        if node.topos in mem and (maxp, maxn) in mem[node.topos]:
-            continue
-        if not node.topos in mem:
-            mem[node.topos] = {}
-        
-        children_list = list(node.children)
-        k = len(children_list)
-
-        for nt in range(maxn + 1): # liczba wybranych
-            maxp = min(node.maxp, nt, maxp_t)
-            if (maxp, nt) in mem[node.topos]:
-                continue
-            for pt in range(maxp + 1):     # liczba pokrytych
-                if (pt, nt) in mem[node.topos]:
-                    continue
-                if opt and (k+1 == node.subnodes_count):
-                    if w2 and k == nt: wnm = 0
-                    else: wnm = binom(node.bc, pt) * binom(k-node.bc, nt-pt)
-                else:
-                    wnm = 0
-                    if w2: maxr = min(k-1, nt)
-                    else: maxr = min(k, nt)
-                    for r in range(maxr + 1):
-                        for gain_r_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
-                            if w2 and sum(gain_r_profile) == k:
-                                continue
-
-                            ur = 0 # liczba trafionych
-                            gain_r_bound = []
-                            for j in range(k):
-                                node_j = children_list[j]
-                                if gain_r_profile[j] == 1:
-                                    gain_r_bound.append(0)
-                                    if  node_j.ecolor == "b":
-                                        ur += 1
-                                elif gain_r_profile[j] == 0:
-                                    gain_r_bound.append(min(node_j.maxn, nt-r))
-
-                            for gain_r_subprofile in generateSumProfiles2(k, nt-r, ub=gain_r_bound):
-                                gain_p_bound = []
-                                for j in range(k):
-                                    node_j = children_list[j]
-                                    gain_p_bound.append(min(node_j.maxp, gain_r_subprofile[j]))
-
-                                for gain_u_subprofile in generateSumProfiles2(k, pt-ur, ub=gain_p_bound):
-                                    wnm_tmp = 1
-
-                                    for j in range(k):
-                                        if gain_r_profile[j] == 0:
-                                            node_j = children_list[j]
-                                            ptmp, ntmp = gain_u_subprofile[j], gain_r_subprofile[j]
-                                            wnm_tmp *= mem[node_j.topos].get((ptmp, ntmp), 0)
-                                            if wnm_tmp == 0:
-                                                break
-                                    wnm += wnm_tmp
-
-                mem[node.topos][(pt,nt)] = wnm
-    return mem
-
-
-    
-def calcBinProfilesFCCT(bin_profiles, drp, trees_list, norm=False, opt=True, w2=True, mem={}):
-    scores = {}
-    
-    for bin_profile_id, bin_profile in bin_profiles.items():
-        scores[bin_profile_id] = []
-    
-    for tree in trees_list:
-        tree.setObservedResProfile(drp.full_profile)
-        tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-
-        if len(drp.getResistant()) == 0:
-            continue
-        
-        newtree = removeUnResLeaves(tree)
-        newtree.calcInnerNodesBU()
-        newtree.setObservedResProfile(drp.full_profile)
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
-        colorEdges(newtree, alg=0, overwrite=False)
-        computeTopos(newtree, r=True)
-
-        maxn = 0
-        maxp = 0
-
-        n_dist = {}
-        
-        for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
-                r,p = calcFastRP(newtree)
-                maxn = max(maxn,r)
-                maxp = max(maxp,p)
-                if not r in n_dist:
-                    n_dist[r] = 0.0
-                n_dist[r] += 1.0
-        
-        calcFastBC(newtree)
-        nx = calcFastN(newtree, w2=w2)
-        px = calcFastP(newtree, w2=w2)
-
-        t0 = time.time()
-        wn_mat = calcFastWnMAT(newtree, maxn, opt=opt, w2=w2)
-        t1 = time.time()
-
-
-        mem = calcFastBpnMAT(newtree, maxp, maxn, opt=opt, w2=w2, mem=mem)
-        bpn_mat = mem[newtree.root.topos]
-
-        t2 = time.time()
-
-        for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
-                
-                r,p = calcFastRP(newtree)
-
-                bs = wn_mat[r]
-                for pt in range(p):
-                    bs -= bpn_mat[(pt, r)]
-
-                cct_score = Decimal(bs) / Decimal(wn_mat[r])
-                try:
-                    if norm:
-                        score += -math.log(float(cct_score)*n_dist[r])
-                    else:
-                        score += -math.log(float(cct_score))
-                except:
-                    pass
-                 
-            scores[bin_profile_id].append(score)
-
-    scores_mean = {}
-    
-    for bin_profile_id in scores:
-        scores_mean[bin_profile_id] = mean(scores[bin_profile_id])
-
-    return scores_mean, mem
-
-
-def readFCCTMem(mem_fn):
-	if not os.path.exists(mem_fn):
-		return {}
-	mem = {}
-
-	input_fh = open(mem_fn)
-	lines = input_fh.readlines()
-	input_fh.close()
-	topo = ""
-
-	for line in lines:
-		tokens = line.split()
-		if len(tokens) < 1: 
-			continue
-		elif len(tokens) == 1:
-			topo = tokens[0]
-			if not topo in mem:
-				mem[topo] = {}
-		else:		
-			k = int(tokens[0])
-			n = int(tokens[1])
-			b = int(tokens[2])
-			mem[topo][(k,n)] = b
-
-	return mem
-
-def saveFCCTMem(mem, mem_fn):
-	output_fh = open(mem_fn, "w")
-	topo_sorted = sorted(mem.keys(), key=lambda topo:(len(topo), topo))
-	for topo in topo_sorted:
-		output_fh.write(topo + "\n")
-		for (k, n) in sorted(mem[topo], key=lambda (k,n):(n,k)):
-			b = mem[topo][(k,n)]
-			output_fh.write(str(k) + "\t" + str(n) + "\t" + str(b) + "\n")
-	output_fh.close()
-
diff --git a/src/drsoft/modelling/habib.py b/src/drsoft/modelling/habib.py
index 807417a..ca62911 100644
--- a/src/drsoft/modelling/habib.py
+++ b/src/drsoft/modelling/habib.py
@@ -1,9 +1,8 @@
-import sys
 from collections import deque
 
 from drsoft.modelling.model_logic import *
 from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
+from src.drsoft.utils import gwamar_generator_utils, gwamar_stat_utils
 
 def calcGeneResTreeSupports(gene_profile, res_profile, tree):
     if gene_profile.mutationsCount() == 1 and gene_profile.getMutation().res_tree_support > 0:
@@ -53,8 +52,8 @@ def calcWnmMAT(tree, n, m):
                 wnm = 0
                 
                 for r in range(nt + 1):
-                    for gain_profile in generateSumProfiles(len(children_list), r, 1):
-                        for gain_subprofile in generateSumProfiles(len(children_list), nt-r, nt):
+                    for gain_profile in gwamar_generator_utils.generateSumProfiles(len(children_list), r, 1):
+                        for gain_subprofile in gwamar_generator_utils.generateSumProfiles(len(children_list), nt-r, nt):
                             wnm_tmp = 1
                             for j in range(len(children_list)):
                                 node_id_j = children_list[j].node_id
@@ -118,15 +117,15 @@ def calcBpqnmMAT(tree, p, q, n, m):
                         wnm = 0
                         
                         for r in range(nt + 1):
-                            for gain_r_profile in generateSumProfiles(len(children_list), r, 1):
+                            for gain_r_profile in gwamar_generator_utils.generateSumProfiles(len(children_list), r, 1):
                                 ur = 0
                                 for j in range(len(children_list)):
                                     node_j = children_list[j]
                                     if gain_r_profile[j] == 1 and node.complete_res_state == "S" and node_j.complete_res_state == "R":
                                         ur += 1
                                         
-                                for gain_r_subprofile in generateSumProfiles(len(children_list), nt-r, nt):
-                                    for gain_u_subprofile in generateSumProfiles(len(children_list), pt-ur, pt):
+                                for gain_r_subprofile in gwamar_generator_utils.generateSumProfiles(len(children_list), nt-r, nt):
+                                    for gain_u_subprofile in gwamar_generator_utils.generateSumProfiles(len(children_list), pt-ur, pt):
                                         wnm_tmp = 1
                                         for j in range(len(children_list)):
                                             node_id_j = children_list[j].node_id
@@ -264,18 +263,18 @@ def calcFastWnMAT(tree, maxrparam=None, opt=False):
             
             if opt and (k+1 == node.subnodes_count):
                 if k == nt: wnm = 0
-                else: wnm = binom(k, nt)
+                else: wnm = gwamar_stat_utils.binom(k, nt)
             else:
                 wnm = 0
                 for r in range(maxr+1):
-                    for gain_profile in generateSumProfiles(k, r, 1):
+                    for gain_profile in gwamar_generator_utils.generateSumProfiles(k, r, 1):
                         kz = 0;
                         gain_bound = []
                         for j in range(k): 
                             if gain_profile[j] == 0: 
                                 kz += 1
                                 gain_bound.append(node.maxn)
-                        for gain_subprofile in generateSumProfiles(kz, nt-r, nt-r, gain_bound[::-1]):
+                        for gain_subprofile in gwamar_generator_utils.generateSumProfiles(kz, nt-r, nt-r, gain_bound[::-1]):
                             jz = 0
                             wnm_tmp = 1
                             for j in range(k):
@@ -321,13 +320,13 @@ def calcFastBpnMAT(tree, p, maxrparam, opt=False):
 
                 if opt and (k+1 == node.subnodes_count):
                     if k == nt: wnm = 0
-                    else: wnm = binom(node.maxp, pt) * binom(k-node.maxp, nt-pt)
+                    else: wnm = gwamar_stat_utils.binom(node.maxp, pt) * gwamar_stat_utils.binom(k-node.maxp, nt-pt)
                 else:
                     wnm = 0
                     maxr = min(k-1, node.maxn, nt)
 
                     for r in range(maxr + 1):
-                        for gain_r_profile in generateSumProfiles(k, r, 1):
+                        for gain_r_profile in gwamar_generator_utils.generateSumProfiles(k, r, 1):
                             ur = 0 # liczba trafionych
                             kz = 0 # liczba 0
                             gain_r_bound = []
@@ -341,11 +340,11 @@ def calcFastBpnMAT(tree, p, maxrparam, opt=False):
                                     gain_r_bound.append(node_j.maxn)
                                     gain_u_bound.append(node_j.maxp)
 
-                            for gain_r_subprofile in generateSumProfiles(kz, nt-r, nt-r, gain_r_bound[::-1]):
+                            for gain_r_subprofile in gwamar_generator_utils.generateSumProfiles(kz, nt-r, nt-r, gain_r_bound[::-1]):
                                 gain_p_bound = []
                                 for jz in range(kz):
                                     gain_p_bound.append(min(gain_u_bound[jz], gain_r_subprofile[jz]))
-                                for gain_u_subprofile in generateSumProfiles(kz, pt-ur, pt-ur, gain_p_bound[::-1]):
+                                for gain_u_subprofile in gwamar_generator_utils.generateSumProfiles(kz, pt-ur, pt-ur, gain_p_bound[::-1]):
                                     wnm_tmp = 1
                                     jz = 0
                                     for j in range(k):
diff --git a/src/drsoft/modelling/model_logic.py b/src/drsoft/modelling/model_logic.py
index fa0416e..3b32e2c 100644
--- a/src/drsoft/modelling/model_logic.py
+++ b/src/drsoft/modelling/model_logic.py
@@ -1,10 +1,8 @@
 from collections import deque
 from math import exp
 from math import log
-
-from drsoft.utils.gwamar_generator_utils import *
-from drsoft.structs.res_tree import ResTreeNode, ResTree
-
+from src.drsoft.utils import gwamar_generator_utils
+from src.drsoft.structs import res_tree
 
 def changeProb(r, t):
     if t < 0:
@@ -72,7 +70,7 @@ def calcResCondProbabilities(phylo_tree, eps, alpha, beta):
         children_list = list(node.children)
         
         if len(children_list) > 0:
-            for res_subprofile in generateResistanceProfiles(len(children_list)):
+            for res_subprofile in gwamar_generator_utils.generateResistanceProfiles(len(children_list)):
                 prob_res = 1.0
                 prob_susc = 1.0
                 for j in range(len(children_list)):
@@ -147,7 +145,7 @@ def calcMutCondProbabilities(phylo_tree, eps, psi, phi):
         children_list = list(node.children)
 
         if len(children_list) > 0:
-            for res_subprofile in generateBinMutationProfiles(len(children_list)):
+            for res_subprofile in gwamar_generator_utils.generateBinMutationProfiles(len(children_list)):
                 prob_pres = 1.0
                 prob_abs = 1.0
                 for j in range(len(children_list)):
@@ -222,7 +220,7 @@ def calcTransitionScoreExprectedValue(phylo_tree, theta=0.5, zeta=0.0, beta=-1.0
             test_res_pres = 0.0
             test_susc_abs = 0.0
             test_res_abs = 0.0
-            for res_subprofile in generateResBinMutationProfiles(len(children_list)):
+            for res_subprofile in gwamar_generator_utils.generateResBinMutationProfiles(len(children_list)):
                 score_res_abs = 0.0
                 score_res_pres = 0.0
                 score_susc_abs = 0.0
@@ -302,7 +300,7 @@ def calcProbAllLeafResistant(phylo_tree):
         
         if len(children_list) > 0:
       
-            for res_subprofile in generateResistanceProfiles(len(children_list)):
+            for res_subprofile in gwamar_generator_utils.generateResistanceProfiles(len(children_list)):
                 prob_res = 1.0
                 prob_susc = 1.0
                 for j in range(len(children_list)):
@@ -489,7 +487,7 @@ def calcWeightedSuppotExprectedValue(phylo_tree, un=False):
             children_list = list(node_i.children)
             prob_level = 0.0
             
-            for res_subprofile in generateResistanceProfiles(len(children_list)):
+            for res_subprofile in gwamar_generator_utils.generateResistanceProfiles(len(children_list)):
                 prob_res = 1.0
                 prob_susc = 1.0
                 prob_all_res_other = 1.0
@@ -664,7 +662,6 @@ def calcTransitionScoreMulti(phylo_tree, theta=0.5, zeta = 0.0, tscore_type = "P
                     elif node_res_di == "R" and node_j_res_di == "R":
                         other_score += 0.5
                         
-                 #   print(di, node_res_di, node_j_res_di, other_score)
             node.tscore_tmp  += stable(node_res, node_j_res, node_mut, node_j_mut, theta, zeta) / (other_score + 1.0) + node_j.tscore_tmp
         
     return phylo_tree.root.tscore_tmp
@@ -673,7 +670,7 @@ def removeUnResNodeLeavesRes(node):
     if node.subleaves_count == node.un_subleaves_count:
         return None
     elif len(node.children) == 0:
-        newnode = ResTreeNode(node.node_id)
+        newnode = res_tree.ResTreeNode(node.node_id)
         newnode.e_len = node.e_len
         newnode.label = node.label
         newnode.ecolor = node.ecolor
@@ -691,7 +688,7 @@ def removeUnResNodeLeavesRes(node):
         elif len(child_new_nodes) == 1:
             return child_new_nodes[0]
         else:
-            newnode = ResTreeNode(node.node_id)
+            newnode = res_tree.ResTreeNode(node.node_id)
             newnode.e_len = node.e_len
             newnode.ecolor = node.ecolor
             newnode.children = child_new_nodes
@@ -702,7 +699,7 @@ def removeUnResNodeLeavesRes(node):
     return newnode
     
 def removeUnResLeaves(phylo_tree):
-    newtree = ResTree(phylo_tree.root.subleaves_count - phylo_tree.root.un_subleaves_count)
+    newtree = res_tree.ResTree(phylo_tree.root.subleaves_count - phylo_tree.root.un_subleaves_count)
     newtree.root = removeUnResNodeLeavesRes(phylo_tree.root)
     newtree.root_id = phylo_tree.root_id
     
diff --git a/src/drsoft/modelling/oldhabib.py b/src/drsoft/modelling/oldhabib.py
deleted file mode 100644
index 1930288..0000000
--- a/src/drsoft/modelling/oldhabib.py
+++ /dev/null
@@ -1,233 +0,0 @@
-import sys
-from collections import deque
-
-from decimal import Decimal
-
-from drsoft.modelling.model_logic import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
-
-
-def calcGeneResTreeSupports(gene_profile, res_profile, tree):
-    if gene_profile.mutationsCount() == 1 and gene_profile.getMutation().res_tree_support > 0:
-        return gene_profile.getMutation().res_tree_support
-    elif (len(gene_profile.getMutated() & res_profile.getSusceptible()) >0):
-        return 0;
-    else:
-        tree.setResMutation(gene_profile.bin_profile, res_profile)
-        return tree.calcChanges()      
-    
-def calcWnmMAT(tree, n, m):
-    queue = deque([])
-    count_map = {}
-    
-    for node in tree.nodes.values():
-        node.visited = 0
-        count_map[node.node_id] = {}
-        for r in range(n+1):
-            for s in range(m + 1):
-                if (r == 0 and s == 0):
-                    count_map[node.node_id][(r,s,1)] = 1
-                    count_map[node.node_id][(r,s,0)] = 1
-                else:
-                    count_map[node.node_id][(r,s,1)] = 0
-                    count_map[node.node_id][(r,s,0)] = 0                
-
-    for i in tree.leaf_ids:
-        node = tree.nodes[i]
-        queue.append(node.parent)
-        
-    while queue:
-        node = queue.popleft()
-        if node == None:
-            continue
-        node.visited += 1
-        if node.visited < len(node.children):
-            continue
-        i= node.node_id
-        
-        children_list = list(node.children)
-        
-        nx = min(n, node.subnodes_count)
-        mx = min(m, node.subnodes_count)
-        
-        for nt in range(nx+1):
-            for mt in range(mx+1):
-                wnm = 0
-                
-                for r in range(nt + 1):
-                    for gain_profile in generateSumProfiles(len(children_list), r, 1):
-                        for gain_subprofile in generateSumProfiles(len(children_list), nt-r, nt):
-                            wnm_tmp = 1
-                            for j in range(len(children_list)):
-                                node_id_j = children_list[j].node_id
-                                
-                                wnm_tmp *= count_map[node_id_j].get((gain_subprofile[j], 0, gain_profile[j]), 0)
-                                if wnm_tmp == 0:
-                                    break
-                            wnm += wnm_tmp
-                count_map[node.node_id][(nt,mt,0)] = wnm
-        queue.append(node.parent)
-    return count_map[tree.root.node_id]
-
-    
-def calcBpqnmMAT(tree, p, q, n, m):
-    queue = deque([])
-    count_map = {}
-    
-    p = min(p,n)
-    q = min(q,m)
-    
-    for node in tree.nodes.values():
-        node.visited = 0
-        count_map[node.node_id] = {}
-        for r in range(n+1):
-            for s in range(m+1):
-                for t in range(0, min(p,r)+1, 1):
-                    for u in range(0, min(q,s)+1, 1):
-                        if (t == 0 and u == 0 and r == 0 and s == 0):
-                            count_map[node.node_id][(t,u,r,s,1)] = 1
-                            count_map[node.node_id][(t,u,r,s,0)] = 1
-                        else:
-                            count_map[node.node_id][(t,u,r,s,1)] = 0
-                            count_map[node.node_id][(t,u,r,s,0)] = 0                
-
-    for i in tree.leaf_ids:
-        node = tree.nodes[i]
-        queue.append(node.parent)
-        
-    while queue:
-        node = queue.popleft()
-        if node == None:
-            continue
-        node.visited += 1
-        if node.visited < len(node.children):
-            continue
-        i = node.node_id
-        
-        children_list = list(node.children)
-        
-        nx = min(n, node.subnodes_count)
-        mx = min(m, node.subnodes_count)
-        px = min(nx,p)
-        qx = min(mx,q)
-        
-   #     print("XXX", px, qx, nx, mx)
-
-        for nt in range(nx+1):
-            for mt in range(mx+1):        
-                for pt in range(0, min(px,nt)+1, 1):
-                    for qt in range(0, min(qx,mt)+1, 1):
-                        wnm = 0
-                        
-                        for r in range(nt + 1):
-                            for gain_r_profile in generateSumProfiles(len(children_list), r, 1):
-                                ur = 0
-                                for j in range(len(children_list)):
-                                    node_j = children_list[j]
-                                    if gain_r_profile[j] == 1 and node.complete_res_state == "S" and node_j.complete_res_state == "R":
-                                        ur += 1
-                                        
-                                for gain_r_subprofile in generateSumProfiles(len(children_list), nt-r, nt):
-                                    for gain_u_subprofile in generateSumProfiles(len(children_list), pt-ur, pt):
-                                        wnm_tmp = 1
-                                        for j in range(len(children_list)):
-                                            node_id_j = children_list[j].node_id
-                                            
-                                            if gain_u_subprofile[j] > gain_r_subprofile[j]:
-                                                wnm_tmp = 0
-                                                break
-                                            wnm_tmp *= count_map[node_id_j].get((gain_u_subprofile[j], 0, gain_r_subprofile[j], 0, gain_r_profile[j]),0)
-                                            if wnm_tmp == 0:
-                                                break
-                                        wnm += wnm_tmp
-                    #    print(pt,qt,nt, mt, 0, wnm)
-                        count_map[node.node_id][(pt,qt,nt, mt, 0)] = wnm
-        queue.append(node.parent)
-        
-    return count_map[tree.root.node_id]
-        
-def calcRSPQ(tree):
-    p=0
-    q=0
-    r=0
-    s=0
-    queue = deque([])
-    
-    for node in tree.nodes.values():
-        node.visited = 0
-
-    for i in tree.leaf_ids:
-        node = tree.nodes[i]      
-        queue.append(node.parent)
-        
-    while queue:
-        node = queue.popleft()
-        if node == None:
-            continue
-        node.visited += 1
-        if node.visited < len(node.children):
-            continue
-        i = node.node_id
-        
-        children_list = list(node.children)
-        
-        for j in range(len(children_list)):
-            node_j = children_list[j]
-            if node.complete_res_state == "S" and node_j.complete_res_state == "R":
-                if node.complete_mut_state == '0' and node_j.complete_mut_state == "1":
-                    p += 1       
-            elif node.complete_res_state == "R" and node_j.complete_res_state == "S":
-                if node.complete_mut_state == '1' and node_j.complete_mut_state == "0":
-                    q += 1
-            if node.complete_mut_state == "0" and node_j.complete_mut_state == "1":
-                r += 1
-            elif node.complete_mut_state == "1" and node_j.complete_mut_state == "0":
-                s += 1
-                print("SSS", node.node_id, node_j.node_id, node.complete_mut_state, node_j.complete_mut_state)
-                for i in sorted(tree.nodes.keys()):
-                    node_t = tree.nodes[i]
-                    print("E", node_t.node_id, node_t.complete_mut_state, node_t.q_subleaves_count, node_t.abs_subleaves_count, node_t.pres_subleaves_count, node_t.subleaves_count)
-                print(tree)
-            
-        #print(i,node.visited, len(children_list), r, s, p, q, n, m)
-                    #    print(pt,qt,nt, mt, 0, wnm)
-        queue.append(node.parent)
-
-    return r,s,p,q
-
-
-    
-def calcNM(tree):
-    n=0
-    m=0
-    queue = deque([])
-    
-    for node in tree.nodes.values():
-        node.visited = 0
-
-    for i in tree.leaf_ids:
-        node = tree.nodes[i]      
-        queue.append(node.parent)
-        
-    while queue:
-        node = queue.popleft()
-        if node == None:
-            continue
-        node.visited += 1
-        if node.visited < len(node.children):
-            continue
-        i = node.node_id
-        
-        children_list = list(node.children)
-        
-        for j in range(len(children_list)):
-            node_j = children_list[j]
-            if node.complete_res_state == "S" and node_j.complete_res_state == "R":
-                n += 1   
-            elif node.complete_res_state == "R" and node_j.complete_res_state == "S":
-                m += 1  
-        queue.append(node.parent)
-
-    return n,m
\ No newline at end of file
diff --git a/src/drsoft/modelling/snew.py b/src/drsoft/modelling/snew.py
deleted file mode 100644
index 8e22f16..0000000
--- a/src/drsoft/modelling/snew.py
+++ /dev/null
@@ -1,157 +0,0 @@
-import sys
-from collections import deque
-
-from drsoft.modelling.model_logic import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
-
-
-def colorEdges(tree, alg=0, overwrite=False):
-    if alg == 0: # color all edges coming to resistant nodes
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R":
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    elif alg == 1: # color only edges with S->R
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R" and (node.parent == None or node.parent.complete_res_state == "S"):
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    return None
-
-def calcN(tree):
-    for node in tree.nodes.values():
-        node.n = node.subleaves_count
-    return tree.root.n
-
-def calcMaxN(tree):
-    for node in tree.leaves:
-        node.maxn = 1
-
-    for node in tree.inner_nodes_bu:
-        sum_tmp = 0
-        any_more_1 = False
-        all_leaves = True
-        for ch_node in node.children:
-            sum_tmp += ch_node.maxn
-            if ch_node.maxn > 1:
-                any_more_1 = True
-            if not ch_node.is_leaf():
-                all_leaves = False 
-        if any_more_1:
-            node.maxn = sum_tmp
-        elif not all_leaves:
-            node.maxn = sum_tmp
-        else:
-            node.maxn = len(node.children)-1
-
-    return tree.root.maxn
-
-def calcWnMAT(tree, n1):
-    for node in tree.leaves:
-        node.vn = {0:1, 1:0}
-
-    for node in tree.inner_nodes_bu:
-        node.vn = {0: 1}
-
-        children_list = node.children
-        k = len(children_list)
-
-        for n in range(1, node.maxn+1, 1):
-            node.vn[n] = 0
-
-            for p in range(min(n+1, k)):
-                for gl in generateSumProfiles2(k, p, ub=[1]*k):
-                    ubl = []
-                    for i in range(k):
-                        node_i = children_list[i]
-                        
-                        if gl[i] == 1: ubl.append(0)
-                        else: ubl.append(node_i.maxn)
-
-                    for nv in generateSumProfiles2(k, n-p, ub=ubl):
-                        print("x", node.node_id, node.maxn, n, gl, nv)
-                        c = 1
-                        for i in range(k):
-                            if gl[i] == 0:
-                                c *= children_list[i].vn[nv[i]]
-                        node.vn[n] += c
-    for node in tree.inner_nodes_bu:
-        print(node.node_id, len(node.children), node.vn)
-    return tree.root.vn
-
-def calcPnmkMAT(tree, n1, n2):
-    mem = {}
-
-    for node in tree.leaves:
-        node.bnmk = {}
-        mem[node.topos] = {}
-        node.bnmk[(0,0,0)] = 1
-        mem[node.topos][(0,0,0)] = 1
-
-        for m in range(node.n+1):
-            node.bnmk[(node.n, m, m)] = node.vn[m]
-            mem[node.topos][(node.n, m, m)] = node.vn[m]
-            for k in range(m):
-                node.bnmk[(node.n, m, k)] = 0
-                mem[node.topos][(node.n, m, k)] = 0
-
-    for node in tree.inner_nodes_bu:
-        if node.topos in mem:
-            continue
-        node.bnmk = {}
-        mem[node.topos] = {}
-        node.bnmk[(0,0,0)] = 1
-        mem[node.topos][(0,0,0)] = 1
-
-        for m in range(node.n+1):
-            node.bnmk[(node.n, m, m)] = node.vn[m]
-            mem[node.topos][(node.n, m, m)] = node.vn[m]
-            for k in range(m):
-                node.bnmk[(node.n, m, k)] = 0
-                mem[node.topos][(node.n, m, k)] = 0
-
-        children_list = node.children
-        r = len(node.children)
-
-        for n in range(0, min(n1+1, node.n), 1):
-            print(node.node_id, r, node.n, n)
-            for m in range(0, min(n2, n)+1, 1):
-                for k in range(max(0, n+m-node.n), min(m, node.n)+1, 1):
-
-                    if r == node.n:
-                        bnmk_tmp = binom(node.n, m)*binom(m, k)*binom(node.n-m, n-k)            
-                    else:
-                        ubn = []
-                        for i in range(r):
-                            ubn.append(children_list[i].n)
-                        bnmk_tmp = 0
-
-                        for nv in generateSumProfiles2(r, n, ub=ubn):
-                            for mv in generateSumProfiles2(r, m, ub=ubn):
-                                ubk = []
-                                lbk = []
-                                for i in range(r):
-                                    lbk.append(max(0, nv[i]+mv[i]-children_list[i].n))
-                                    ubk.append(min(mv[i], nv[i]))
-
-                                for kv in generateSumProfiles2(r, k, lb=lbk, ub=ubk):
-                                    c = 1
-                                    for i in range(r):
-                                        if nv[i] >= mv[i]:
-                                            c *= mem[children_list[i].topos][(nv[i], mv[i], kv[i])]
-                                        else:
-                                            c *= mem[children_list[i].topos][(mv[i], nv[i], kv[i])]
-                                    bnmk_tmp += c
-                    node.bnmk[(n,m,k)] = bnmk_tmp
-                    mem[node.topos][(n,m,k)] = bnmk_tmp
-    tree.root.bnmk = mem[tree.root.topos]
-    return tree.root.bnmk
-
-
diff --git a/src/drsoft/modelling/stgh.py b/src/drsoft/modelling/stgh.py
index 69f91a0..cdfff91 100644
--- a/src/drsoft/modelling/stgh.py
+++ b/src/drsoft/modelling/stgh.py
@@ -1,10 +1,4 @@
-import sys
-from collections import deque
-
-from drsoft.modelling.model_logic import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
-
+from src.drsoft.utils import gwamar_generator_utils, gwamar_stat_utils
 
 def colorEdges(tree, alg=0, overwrite=False):
     if alg == 0: # color all edges coming to resistant nodes
@@ -46,7 +40,7 @@ def calcVnMAT(tree, n1):
             ubn = []
             for j in range(r):
                 ubn.append(children_list[j].n)
-            for nv in generateSumProfiles2(r, n, ub=ubn):
+            for nv in gwamar_generator_utils.generateSumProfiles2(r, n, ub=ubn):
                 c = 1
                 for j in range(r):
                     c *= children_list[j].vn[nv[j]]
@@ -93,22 +87,22 @@ def calcBnmkMAT(tree, n1, n2):
                 for k in range(max(0, n+m-node.n), min(m, node.n)+1, 1):
 
                     if r == node.n:
-                        bnmk_tmp = binom(node.n, m)*binom(m, k)*binom(node.n-m, n-k)            
+                        bnmk_tmp = gwamar_stat_utils.binom(node.n, m)*gwamar_stat_utils.binom(m, k)*gwamar_stat_utils.binom(node.n-m, n-k)            
                     else:
                         ubn = []
                         for i in range(r):
                             ubn.append(children_list[i].n)
                         bnmk_tmp = 0
 
-                        for nv in generateSumProfiles2(r, n, ub=ubn):
-                            for mv in generateSumProfiles2(r, m, ub=ubn):
+                        for nv in gwamar_generator_utils.generateSumProfiles2(r, n, ub=ubn):
+                            for mv in gwamar_generator_utils.generateSumProfiles2(r, m, ub=ubn):
                                 ubk = []
                                 lbk = []
                                 for i in range(r):
                                     lbk.append(max(0, nv[i]+mv[i]-children_list[i].n))
                                     ubk.append(min(mv[i], nv[i]))
 
-                                for kv in generateSumProfiles2(r, k, lb=lbk, ub=ubk):
+                                for kv in gwamar_generator_utils.generateSumProfiles2(r, k, lb=lbk, ub=ubk):
                                     c = 1
                                     for i in range(r):
                                         if nv[i] >= mv[i]:
diff --git a/src/drsoft/modelling/tgh.py b/src/drsoft/modelling/tgh.py
index a8eef7b..09d4a59 100644
--- a/src/drsoft/modelling/tgh.py
+++ b/src/drsoft/modelling/tgh.py
@@ -1,13 +1,9 @@
-import os
-import sys
-from decimal import Decimal
-
-from collections import deque
+import os, math
 
-from drsoft.modelling.treeutils import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
+from decimal import Decimal
+from src.drsoft.utils import gwamar_stat_utils, gwamar_generator_utils,\
+  gwamar_bin_utils
+from src.drsoft.modelling import model_logic
 
 def colorEdges(tree, alg=0, overwrite=False):
     if alg == 0: # color all edges coming to resistant nodes
@@ -70,7 +66,6 @@ def calcFastP(tree, w2=False):
         else: node.maxp = 0
 
     if w2:
-       # print("here, maxp")
         for node in tree.inner_nodes_bu:
             sum_tmp = 0
             all_black = True
@@ -109,7 +104,6 @@ def calcFastWnMAT(tree, maxn_t=None, opt=False, w2=True):
 
     for node in tree.inner_nodes_bu:
         node.count_map = {}
-        children_list = node.children
         k = len(node.children)
 
         maxn = min(maxn_t, node.maxn)
@@ -120,20 +114,19 @@ def calcFastWnMAT(tree, maxn_t=None, opt=False, w2=True):
             
             if opt and (k+1 == node.subnodes_count):
                 if w2 and k == nt: wnm = 0
-                else: wnm = binom(k, nt)
+                else: wnm = gwamar_stat_utils.binom(k, nt)
             else:
                 wnm = 0
             
                 for r in range( maxr+1):
-                 #   if w2 == False and r==k: wnm += 1
-                    for gain_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
+                    for gain_profile in gwamar_generator_utils.generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
                         gain_bound = []
                         for j in range(k): 
                             if gain_profile[j] == 1: 
                                 gain_bound.append(0)
                             else:
                                 gain_bound.append(node.maxn)
-                        for gain_subprofile in generateSumProfiles2(k, nt-r, ub=gain_bound):
+                        for gain_subprofile in gwamar_generator_utils.generateSumProfiles2(k, nt-r, ub=gain_bound):
                             wnm_tmp = 1
                             for j in range(k):
                                 if gain_profile[j] == 0:
@@ -158,7 +151,7 @@ def calcFastRP(tree):
     return r,p
 
 def calcFastBpnMAT(tree, maxp_t, maxn_t, opt=False, w2=True, mem={}):
-#    mem = {}
+    mem = {}
 
     for node in tree.leaves:
         mem[node.topos] = {}
@@ -185,13 +178,13 @@ def calcFastBpnMAT(tree, maxp_t, maxn_t, opt=False, w2=True, mem={}):
 
                 if opt and (k+1 == node.subnodes_count):
                     if w2 and k == nt: wnm = 0
-                    else: wnm = binom(node.bc, pt) * binom(k-node.bc, nt-pt)
+                    else: wnm = gwamar_stat_utils.binom(node.bc, pt) * gwamar_stat_utils.binom(k-node.bc, nt-pt)
                 else:
                     wnm = 0
                     if w2: maxr = min(k-1, nt)
                     else: maxr = min(k, nt)
                     for r in range(maxr + 1):
-                        for gain_r_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
+                        for gain_r_profile in gwamar_generator_utils.generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
                             ur = 0 # liczba trafionych
                             gain_r_bound = []
                             for j in range(k):
@@ -203,13 +196,13 @@ def calcFastBpnMAT(tree, maxp_t, maxn_t, opt=False, w2=True, mem={}):
                                 elif gain_r_profile[j] == 0:
                                     gain_r_bound.append(min(node_j.maxn, nt-r))
 
-                            for gain_r_subprofile in generateSumProfiles2(k, nt-r, ub=gain_r_bound):
+                            for gain_r_subprofile in gwamar_generator_utils.generateSumProfiles2(k, nt-r, ub=gain_r_bound):
                                 gain_p_bound = []
                                 for j in range(k):
                                     node_j = children_list[j]
                                     gain_p_bound.append(min(node_j.maxp, gain_r_subprofile[j]))
 
-                                for gain_u_subprofile in generateSumProfiles2(k, pt-ur, ub=gain_p_bound):
+                                for gain_u_subprofile in gwamar_generator_utils.generateSumProfiles2(k, pt-ur, ub=gain_p_bound):
                                     wnm_tmp = 1
 
                                     for j in range(k):
@@ -235,20 +228,20 @@ def calcBinProfilesTGH(bin_profiles, drp, trees_list, norm=False, opt=True, w2=T
     for tree in trees_list:
         tree.setObservedResProfile(drp.full_profile)
         tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
+        model_logic.calcSubleavesResCount(tree)
+        model_logic.calcSubnodesCount(tree)
 
         if len(drp.getResistant()) == 0:
             continue
         
-        newtree = removeUnResLeaves(tree)
+        newtree = model_logic.removeUnResLeaves(tree)
         newtree.calcInnerNodesBU()
         newtree.setObservedResProfile(drp.full_profile)
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
+        model_logic.calcSubleavesResCount(newtree)
+        model_logic.calcSubnodesCount(newtree)
+        model_logic.calcDetParsResModel(newtree)
         colorEdges(newtree, alg=0, overwrite=False)
-        computeTopos(newtree, r=True)
+        model_logic.computeTopos(newtree, r=True)
 
         maxn = 0
         maxp = 0
@@ -256,10 +249,10 @@ def calcBinProfilesTGH(bin_profiles, drp, trees_list, norm=False, opt=True, w2=T
         n_dist = {}
         
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            for bin_profile in specBinProfiles(gen_bin_profile):
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
                 newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
+                model_logic.calcSubleavesMutCount(newtree)
+                model_logic.calcDetParsMutModel(newtree)
                 r,p = calcFastRP(newtree)
                 maxn = max(maxn,r)
                 maxp = max(maxp,p)
@@ -268,25 +261,20 @@ def calcBinProfilesTGH(bin_profiles, drp, trees_list, norm=False, opt=True, w2=T
                 n_dist[r] += 1.0
         
         calcFastBC(newtree)
-        nx = calcFastN(newtree, w2=w2)
-        px = calcFastP(newtree, w2=w2)
+        calcFastN(newtree, w2=w2)
+        calcFastP(newtree, w2=w2)
 
-        t0 = time.time()
         wn_mat = calcFastWnMAT(newtree, maxn, opt=opt, w2=w2)
-        t1 = time.time()
-
 
         mem = calcFastBpnMAT(newtree, maxp, maxn, opt=opt, w2=w2, mem=mem)
         bpn_mat = mem[newtree.root.topos]
 
-        t2 = time.time()
-
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
             score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
                 newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
+                model_logic.calcSubleavesMutCount(newtree)
+                model_logic.calcDetParsMutModel(newtree)
                 
                 r,p = calcFastRP(newtree)
 
@@ -308,7 +296,7 @@ def calcBinProfilesTGH(bin_profiles, drp, trees_list, norm=False, opt=True, w2=T
     scores_mean = {}
     
     for bin_profile_id in scores:
-        scores_mean[bin_profile_id] = mean(scores[bin_profile_id])
+        scores_mean[bin_profile_id] = gwamar_stat_utils.mean(scores[bin_profile_id])
 
     return scores_mean, mem
 
diff --git a/src/drsoft/modelling/tgh2.py b/src/drsoft/modelling/tgh2.py
deleted file mode 100644
index a5f21f8..0000000
--- a/src/drsoft/modelling/tgh2.py
+++ /dev/null
@@ -1,353 +0,0 @@
-import os
-import sys
-from decimal import Decimal
-
-from collections import deque
-
-from drsoft.modelling.treeutils import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
-
-def colorEdges(tree, alg=0, overwrite=False):
-    if alg == 0: # color all edges coming to resistant nodes
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R":
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    elif alg == 1: # color all edges with S->R
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R" and (node.parent == None or node.parent.complete_res_state == "S"):
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    return None
-
-def calcFastBC(tree):
-    for node in tree.leaves: node.bc = 0
-    for node in tree.inner_nodes_bu:
-        node.bc = 0
-        for node_j in node.children:
-            if node_j.ecolor == "b":
-                node.bc += 1
-    return tree.root.bc
-
-def calcFastN(tree, w2=False):
-    for node in tree.leaves: node.maxn = 1
-
-    if w2:
-        for node in tree.inner_nodes_bu:
-            sum_tmp = 0
-            all_leaves = True
-            for ch_node in node.children:
-                sum_tmp += max(1, ch_node.maxn)
-                if not ch_node.is_leaf():
-                    all_leaves = False 
-            if all_leaves:
-                node.maxn = len(node.children)-1
-            else:
-                node.maxn = sum_tmp
-    else:
-        for node in tree.inner_nodes_bu:
-            node.maxn = 0
-            for ch_node in node.children:
-                node.maxn += max(ch_node.maxn, 1)
-    
-    # for node in tree.nodes.values():
-    #   print(node.topos, node.maxn, tree.root.maxn)
-    
-    return tree.root.maxn
-
-def calcFastP(tree, w2=False):
-    for node in tree.leaves: 
-        node.maxp0 = 0
-        if node.ecolor == "b": node.maxp = 1
-        else: node.maxp = 0
-
-    if w2:
-       # print("here, maxp")
-        for node in tree.inner_nodes_bu:
-            sum_tmp = 0
-            all_black = True
-            for ch_node in node.children:
-                sum_tmp += ch_node.maxp
-                if ch_node.ecolor != "b": all_black = False
-                
-            if all_black:
-                sum_tmp_max = 0
-                for ch_node in node.children:
-                    sum_tmp_max = max(sum_tmp_max, sum_tmp - ch_node.maxp + ch_node.maxp0)
-                node.maxp0 = sum_tmp_max
-                if node.ecolor == "b": node.maxp = max(1, sum_tmp_max)
-                else: node.maxp = sum_tmp_max
-            else:
-                node.maxp0 = sum_tmp
-                if node.ecolor == "b": node.maxp = max(1, sum_tmp)
-                else: node.maxp = sum_tmp
-    else:
-        # print("there, maxp")
-        for node in tree.inner_nodes_bu:
-            sum_tmp = 0
-            for ch_node in node.children:
-                sum_tmp += ch_node.maxp
-            if node.ecolor == "b": node.maxp = max(1, sum_tmp)
-            else: node.maxp = sum_tmp
-    # for node in tree.nodes.values():
-    #     print("maxp", node.node_id, node.maxp)
-
-    return tree.root.maxp
-
-def calcFastWnMAT(tree, maxn_t=None, opt=False, w2=True):
-    for node in tree.leaves:
-        node.count_map = {}                             
-        node.count_map[0] = 1
-
-    for node in tree.inner_nodes_bu:
-        node.count_map = {}
-        children_list = node.children
-        k = len(node.children)
-
-        maxn = min(maxn_t, node.maxn)
-
-        for nt in range(maxn+1):
-            if w2: maxr = min(nt, k-1, node.maxn)
-            else: maxr = min(nt, k, node.maxn)
-            
-            if opt and (k+1 == node.subnodes_count):
-                if w2 and k == nt: wnm = 0
-                else: wnm = binom(k, nt)
-            else:
-                wnm = 0
-            
-                for r in range( maxr+1):
-                 #   if w2 == False and r==k: wnm += 1
-                    for gain_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
-                        gain_bound = []
-                        for j in range(k): 
-                            if gain_profile[j] == 1: 
-                                gain_bound.append(0)
-                            else:
-                                gain_bound.append(node.maxn)
-                        for gain_subprofile in generateSumProfiles2(k, nt-r, ub=gain_bound):
-                            wnm_tmp = 1
-                            for j in range(k):
-                                if gain_profile[j] == 0:
-                                    node_j = node.children[j]
-                                    wnm_tmp *= node_j.count_map.get(gain_subprofile[j], 0)
-                                    if wnm_tmp == 0:
-                                        break    
-                            wnm += wnm_tmp
-            node.count_map[nt] = wnm
-    return tree.root.count_map
-
-def calcFastRP(tree):
-    # r - total number of 0->1 changes 
-    # p - total number of 0->1 changes on black edges
-    r,p = 0,0
-    for node in tree.inner_nodes_bu:
-        for node_j in node.children:
-            if node.complete_mut_state == '0' and node_j.complete_mut_state == "1":
-                r += 1
-                if node_j.ecolor == "b":
-                    p += 1
-    return r,p
-
-def calcFastBpnMAT(tree, maxp_t, maxn_t, opt=False, w2=True, mem={}):
-    mem = {}
-
-    for node in tree.leaves:
-        mem[node.topos] = {}
-        mem[node.topos][(0,0)] = 1
-        
-    for node in tree.inner_nodes_bu:
-        maxn = min(maxn_t, node.maxn)
-        maxp = min(node.maxp, maxp_t)
-
-        if node.topos in mem and (maxp, maxn) in mem[node.topos]:
-            continue
-        if not node.topos in mem:
-            mem[node.topos] = {}
-        
-        children_list = list(node.children)
-        k = len(children_list)
-
-        for nt in range(maxn + 1): # liczba wybranych
-            maxp = min(node.maxp, nt, maxp_t)
-            if (maxp, nt) in mem[node.topos]:
-                continue
-            for pt in range(maxp + 1):     # liczba pokrytych
-                if (pt, nt) in mem[node.topos]:
-                    continue
-                if opt and (k+1 == node.subnodes_count):
-                    if w2 and k == nt: wnm = 0
-                    else: wnm = binom(node.bc, pt) * binom(k-node.bc, nt-pt)
-                else:
-                    wnm = 0
-                    if w2: maxr = min(k-1, nt)
-                    else: maxr = min(k, nt)
-                    for r in range(maxr + 1):
-                        for gain_r_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
-                            ur = 0 # liczba trafionych
-                            gain_r_bound = []
-                            for j in range(k):
-                                node_j = children_list[j]
-                                if gain_r_profile[j] == 1:
-                                    gain_r_bound.append(0)
-                                    if  node_j.ecolor == "b":
-                                        ur += 1
-                                elif gain_r_profile[j] == 0:
-                                    gain_r_bound.append(min(node_j.maxn, nt-r))
-
-                            for gain_r_subprofile in generateSumProfiles2(k, nt-r, ub=gain_r_bound):
-                                gain_p_bound = []
-                                for j in range(k):
-                                    node_j = children_list[j]
-                                    gain_p_bound.append(min(node_j.maxp, gain_r_subprofile[j]))
-
-                                for gain_u_subprofile in generateSumProfiles2(k, pt-ur, ub=gain_p_bound):
-                                    wnm_tmp = 1
-
-                                    for j in range(k):
-                                        if gain_r_profile[j] == 0:
-                                            node_j = children_list[j]
-                                            ptmp, ntmp = gain_u_subprofile[j], gain_r_subprofile[j]
-                                            # if not (ptmp, ntmp) in mem[node_j.topos]:
-                                            #     print("no", node_j.topos, ptmp, ntmp)
-                                            #wnm_tmp *= mem[node_j.topos][(ptmp, ntmp)]
-                                            wnm_tmp *= mem[node_j.topos].get((ptmp, ntmp), 0)
-                                            if wnm_tmp == 0:
-                                                break
-                                    wnm += wnm_tmp
-
-                mem[node.topos][(pt,nt)] = wnm
-    return mem
-
-
-    
-def calcBinProfilesTGH2(bin_profiles, drp, trees_list, norm=False, opt=True, w2=True, mem={}):
-    scores = {}
-    
-    for bin_profile_id, bin_profile in bin_profiles.items():
-        scores[bin_profile_id] = []
-    
-    for tree in trees_list:
-        tree.setObservedResProfile(drp.full_profile)
-        tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-
-        if len(drp.getResistant()) == 0:
-            continue
-        
-        newtree = removeUnResLeaves(tree)
-        newtree.calcInnerNodesBU()
-        newtree.setObservedResProfile(drp.full_profile)
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
-        colorEdges(newtree, alg=0, overwrite=False)
-        computeTopos(newtree, r=True)
-
-        maxn = 0
-        maxp = 0
-
-        n_dist = {}
-        
-        for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
-                r,p = calcFastRP(newtree)
-                maxn = max(maxn,r)
-                maxp = max(maxp,p)
-                if not r in n_dist:
-                    n_dist[r] = 0.0
-                n_dist[r] += 1.0
-        
-        calcFastBC(newtree)
-        nx = calcFastN(newtree, w2=w2)
-        px = calcFastP(newtree, w2=w2)
-
-        t0 = time.time()
-        wn_mat = calcFastWnMAT(newtree, maxn, opt=opt, w2=w2)
-        t1 = time.time()
-
-
-        mem = calcFastBpnMAT(newtree, maxp, maxn, opt=opt, w2=w2, mem=mem)
-        bpn_mat = mem[newtree.root.topos]
-
-        t2 = time.time()
-
-        for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
-                
-                r,p = calcFastRP(newtree)
-
-                bs = wn_mat[r]
-                for pt in range(p):
-                    bs -= bpn_mat[(pt, r)]
-
-                cct_score = Decimal(bs) / Decimal(wn_mat[r])
-                try:
-                    if norm:
-                        score += -math.log(float(cct_score)*n_dist[r])
-                    else:
-                        score += -math.log(float(cct_score))
-                except:
-                    pass
-                 
-            scores[bin_profile_id].append(score)
-
-    scores_mean = {}
-    
-    for bin_profile_id in scores:
-        scores_mean[bin_profile_id] = mean(scores[bin_profile_id])
-
-    return scores_mean, mem
-
-
-def readTGHMem(mem_fn):
-    if not os.path.exists(mem_fn):
-        return {}
-    mem = {}
-
-    input_fh = open(mem_fn)
-    lines = input_fh.readlines()
-    input_fh.close()
-    
-    topo = ""
-    for line in lines:
-        tokens = line.split()
-        if len(tokens) < 1: 
-            continue
-        elif len(tokens) == 1:
-            topo = tokens[0]
-            if not topo in mem:
-                mem[topo] = {}
-        else:
-            k,n,b = map(int, tokens)
-            mem[topo][(k,n)] = b
-
-    return mem
-
-def saveTGHMem(mem, mem_fn):
-    output_fh = open(mem_fn, "w")
-    topo_sorted = sorted(mem.keys(), key=lambda topo:(len(topo), topo))
-    for topo in topo_sorted:
-        output_fh.write(topo + "\n")
-        for (k, n) in sorted(mem[topo], key=lambda kn:(kn[1],kn[0])):
-            b = mem[topo][(k,n)]
-            output_fh.write("\t".join(map(str,[k, n, b])) + "\n")
-            #output_fh.write(str(k) + "\t" + str(n) + "\t" + str(b) + "\n")
-    output_fh.close()
-
diff --git a/src/drsoft/modelling/treeutils.py b/src/drsoft/modelling/treeutils.py
deleted file mode 100644
index fa0416e..0000000
--- a/src/drsoft/modelling/treeutils.py
+++ /dev/null
@@ -1,731 +0,0 @@
-from collections import deque
-from math import exp
-from math import log
-
-from drsoft.utils.gwamar_generator_utils import *
-from drsoft.structs.res_tree import ResTreeNode, ResTree
-
-
-def changeProb(r, t):
-    if t < 0:
-        return r
-    else:
-        return 1.0 - exp(-r*t) 
-
-def getstable(t=0.5, z=0.0, b=-1.0):
-    score_tab = {
-        "SS00": 0.0,"SS01": b  ,"SS10": 0.0,"SS11": b,
-        "SR00": 0.0,"SR01": 1.0,"SR10": 0.0,"SR11": t,
-        "RS00": 0.0,"RS01":-b  ,"RS10": 1.0,"RS11":-b,
-        "RR00": 0.0,"RR01": t  ,"RR10": 0.0,"RR11": 0+z,
-        "SI00": 0.0,"SI01": 0.5,"SI10": 0.0,"SI11": t/2,
-        "RI00": 0.0,"RI01":-b  ,"RI10": 0.5,"RI11":-b/2,
-        "II00": 0.0,"II01": t/2,"II10": 0.0,"II11": z/2,
-        "IR00": 0.0,"IR01": 0.5,"IR10": 0.0,"IR11":-b }
-    return score_tab
-
-def stable(res_from='R', res_to='S', mut_from='0', mut_to='1', t=0.5, z=0.0, b=-1.0):
-    comb_txt = res_from + res_to + mut_from + mut_to
-    score_tab = getstable(t,z,b)
-    return score_tab.get(comb_txt, 0.0)
-
-def computeTopos(tree, r=False):
-    for node in tree.leaves:
-        if r== True and node.complete_res_state == "R":
-            node.topos = "y"
-        elif r== True:
-            node.topos = "x"
-        else:
-            node.topos = "x"
-        # print(node.node_id, node.topos)
-    for node in tree.inner_nodes_bu:
-        topo = "("
-        for child in sorted(node.children, key=lambda ch:ch.topos):
-            topo += child.topos
-        topo += ")"
-        node.topos = topo
-        #print(node.node_id, node.topos)
-    return tree.root.topos
-
-def calcResCondProbabilities(phylo_tree, eps, alpha, beta):
-    for node in phylo_tree.leaves:
-        if hasattr(node, 'observed_res_prob_state'):
-            node.cond_exp_res = node.observed_res_prob_state
-            node.cond_exp_susc = 1.0 - node.cond_exp_res
-        elif node.observed_res_state == 'R':
-            node.cond_exp_res = 1.0-eps
-            node.cond_exp_susc = eps
-        elif node.observed_res_state == 'S':
-            node.cond_exp_res = eps
-            node.cond_exp_susc = 1.0-eps
-        elif node.observed_res_state == 'I':
-            node.cond_exp_res = 0.5
-            node.cond_exp_susc = 0.5
-        else:
-            node.cond_exp_susc = 1.0
-            node.cond_exp_res = 1.0
-        
-    for node in phylo_tree.inner_nodes_bu:    
-        
-        node.cond_exp_res = 0.0
-        node.cond_exp_susc = 0.0
-        children_list = list(node.children)
-        
-        if len(children_list) > 0:
-            for res_subprofile in generateResistanceProfiles(len(children_list)):
-                prob_res = 1.0
-                prob_susc = 1.0
-                for j in range(len(children_list)):
-                    if res_subprofile[j] == 'R':
-                        prob_res *= children_list[j].cond_exp_res*(1 - changeProb(beta, children_list[j].e_len))
-                        prob_susc *= children_list[j].cond_exp_res*changeProb(alpha, children_list[j].e_len)
-                    elif res_subprofile[j] == 'S':
-                        prob_res *= children_list[j].cond_exp_susc*changeProb(beta, children_list[j].e_len)
-                        prob_susc *= children_list[j].cond_exp_susc*(1 - changeProb(alpha, children_list[j].e_len))
-                    else:
-                        print("error")
-    
-                node.cond_exp_res += prob_res
-                node.cond_exp_susc += prob_susc
-        
-    return None
-
-def calcResCondParentProbabilities(phylo_tree, alpha, beta):
-    #queue = deque([])
-    
-    root = phylo_tree.root
-    root.res_prob = 0.0
-    
-    for node in phylo_tree.inner_nodes_bu[::-1] + list(phylo_tree.leaves):
-        p_node = node.parent
-        if p_node == None: continue
-        cp_alpha = changeProb(alpha, node.e_len)
-        cp_beta = changeProb(beta, node.e_len)
-        try:
-            prob_res_res = node.cond_exp_res * (1-cp_beta) / (node.cond_exp_res * (1-cp_beta) + node.cond_exp_susc * (cp_beta))
-            prob_susc_res = node.cond_exp_res * (cp_alpha) / (node.cond_exp_res * (cp_alpha) + node.cond_exp_susc * (1 - cp_alpha))
-        except:
-            prob_res_res = 1.0
-            prob_susc_res = 0.0
-    
-        node.prob_res_res = prob_res_res
-        node.prob_susc_res = prob_susc_res
-        node.prob_res_susc = 1.0-prob_res_res
-        node.prob_susc_susc = 1.0-prob_susc_res
-        
-        node.res_prob = prob_res_res * p_node.res_prob + prob_susc_res*(1-p_node.res_prob)
-
-    return None
-
-def calulateCompleteResProfile(phylo_tree, eps=0.02, alpha=0.05, beta=0.01):
-    calcResCondProbabilities(phylo_tree, eps, alpha, beta)
-    calcResCondParentProbabilities(phylo_tree, alpha, beta)
-    
-    return None
-
-
-######################################################################
-
-
-def calcMutCondProbabilities(phylo_tree, eps, psi, phi):
-    for node in phylo_tree.leaves:
-        if node.observed_mut_state == '1':
-            node.cond_exp_pres = 1.0-eps
-            node.cond_exp_abs = eps
-        elif node.observed_mut_state == '0':
-            node.cond_exp_pres = eps
-            node.cond_exp_abs = 1.0-eps
-        else:
-            node.cond_exp_pres = 1.0
-            node.cond_exp_abs = 1.0
-
-
-    for node in phylo_tree.inner_nodes_bu:
-        
-        node.cond_exp_pres = 0.0
-        node.cond_exp_abs = 0.0
-        children_list = list(node.children)
-
-        if len(children_list) > 0:
-            for res_subprofile in generateBinMutationProfiles(len(children_list)):
-                prob_pres = 1.0
-                prob_abs = 1.0
-                for j in range(len(children_list)):
-                    if str(res_subprofile[j]) == '1':
-                        prob_pres *= children_list[j].cond_exp_pres*(1 - changeProb(phi, children_list[j].e_len))
-                        prob_abs *= children_list[j].cond_exp_pres*changeProb(psi, children_list[j].e_len)
-                    elif str(res_subprofile[j]) == '0':
-                        prob_pres *= children_list[j].cond_exp_abs*changeProb(phi, children_list[j].e_len)
-                        prob_abs *= children_list[j].cond_exp_abs*(1 - changeProb(psi, children_list[j].e_len))
-                    else:
-                        print("error")
-                node.cond_exp_pres += prob_pres
-                node.cond_exp_abs += prob_abs
-        
-    return None
-
-def calcMutCondParentProbabilities(phylo_tree, psi, phi):
-    root = phylo_tree.root
-    root.mut_prob = 0.0
-    
-    for node in phylo_tree.inner_nodes_bu[::-1] + list(phylo_tree.leaves):
-        p_node = node.parent
-        if p_node == None: continue
-        
-        cp_psi = changeProb(psi, node.e_len)
-        cp_phi = changeProb(phi, node.e_len)
-        
-        try:
-            prob_pres_pres = node.cond_exp_pres * (1-cp_phi) / (node.cond_exp_pres * (1-cp_phi) + node.cond_exp_abs * (cp_phi))
-            prob_abs_pres = node.cond_exp_pres * (cp_psi) / (node.cond_exp_pres * (cp_psi) + node.cond_exp_abs * (1 - cp_psi))
-        except:
-            prob_abs_pres = 0.0
-            prob_pres_pres = 1.0
-
-        node.prob_pres_pres = prob_pres_pres
-        node.prob_abs_pres = prob_abs_pres
-        node.prob_abs_abs = 1.0 - prob_abs_pres
-        node.prob_pres_abs = 1.0 - prob_pres_pres
-    
-        node.mut_prob = prob_pres_pres * p_node.mut_prob + prob_abs_pres*(1-p_node.mut_prob)
-        
-    return None
-
-
-
-def calulateCompleteMutProfile(phylo_tree, eps=0.001, psi=0.1, phi=0.01):
-    calcMutCondProbabilities(phylo_tree, eps, psi, phi)
-    calcMutCondParentProbabilities(phylo_tree, psi, phi)
-    
-    return None
-
-
-def calcTransitionScoreExprectedValue(phylo_tree, theta=0.5, zeta=0.0, beta=-1.0, un = False):
-    for node in phylo_tree.leaves:
-        node.exp_score_res_abs = 0.0
-        node.exp_score_res_pres = 0.0
-        node.exp_score_susc_abs = 0.0
-        node.exp_score_susc_pres = 0.0
-    
-    tstable = getstable(theta, zeta, beta)
-        
-    for node in phylo_tree.inner_nodes_bu:
-        
-        node.exp_score_res_abs = 0.0
-        node.exp_score_res_pres = 0.0
-        node.exp_score_susc_abs = 0.0
-        node.exp_score_susc_pres = 0.0        
-        
-        children_list = list(node.children)
-        if len(children_list) > 0:
-            test_susc_pres = 0.0
-            test_res_pres = 0.0
-            test_susc_abs = 0.0
-            test_res_abs = 0.0
-            for res_subprofile in generateResBinMutationProfiles(len(children_list)):
-                score_res_abs = 0.0
-                score_res_pres = 0.0
-                score_susc_abs = 0.0
-                score_susc_pres = 0.0
-                prob_res_abs = 1.0
-                prob_res_pres = 1.0
-                prob_susc_abs = 1.0
-                prob_susc_pres = 1.0
-                for j in range(len(children_list)):    
-                    node_j = children_list[j]  
-                    
-                    if res_subprofile[j] == "1R":
-                        if un == True or node_j.un_subleaves_count < node_j.subleaves_count:
-                            score_res_abs  += (tstable.get('RR01',0.0) + node_j.exp_score_res_pres)
-                            score_res_pres += (tstable.get('RR11',0.0) + node_j.exp_score_res_pres)
-                            score_susc_abs += (tstable.get('SR01',0.0) + node_j.exp_score_res_pres)
-                            score_susc_pres+= (tstable.get('SR11',0.0) + node_j.exp_score_res_pres)
-                        prob_res_abs   *= node_j.prob_abs_pres*node_j.prob_res_res
-                        prob_res_pres  *= node_j.prob_pres_pres*node_j.prob_res_res
-                        prob_susc_abs  *= node_j.prob_abs_pres*node_j.prob_susc_res
-                        prob_susc_pres *= node_j.prob_pres_pres*node_j.prob_susc_res
-                    elif res_subprofile[j] == "1S":
-    
-                        if un == True or node_j.un_subleaves_count < node_j.subleaves_count:
-                            score_res_abs  += (tstable.get('RS01',0.0) + node_j.exp_score_susc_pres)
-                            score_res_pres += (tstable.get('RS11',0.0) + node_j.exp_score_susc_pres)
-                            score_susc_abs += (tstable.get('SS01',0.0) + node_j.exp_score_susc_pres)
-                            score_susc_pres+= (tstable.get('SS11',0.0) + node_j.exp_score_susc_pres)
-    
-                        prob_res_abs   *= node_j.prob_abs_pres*node_j.prob_res_susc
-                        prob_res_pres  *= node_j.prob_pres_pres*node_j.prob_res_susc
-                        prob_susc_abs  *= node_j.prob_abs_pres*node_j.prob_susc_susc
-                        prob_susc_pres *= node_j.prob_pres_pres*node_j.prob_susc_susc
-                    elif res_subprofile[j] == "0R":
-                        if un == True or node_j.un_subleaves_count < node_j.subleaves_count:
-                            score_res_abs  += (tstable.get('RR00',0.0) + node_j.exp_score_res_abs)
-                            score_res_pres += (tstable.get('RR10',0.0) + node_j.exp_score_res_abs)
-                            score_susc_abs += (tstable.get('SR00',0.0) + node_j.exp_score_res_abs)
-                            score_susc_pres+= (tstable.get('SR10',0.0) + node_j.exp_score_res_abs)
-                        prob_res_abs   *= node_j.prob_abs_abs*node_j.prob_res_res
-                        prob_res_pres  *= node_j.prob_pres_abs*node_j.prob_res_res
-                        prob_susc_abs  *= node_j.prob_abs_abs*node_j.prob_susc_res
-                        prob_susc_pres *= node_j.prob_pres_abs*node_j.prob_susc_res
-                    elif res_subprofile[j] == "0S":
-                        if un == True or node_j.un_subleaves_count < node_j.subleaves_count:
-                            score_res_abs  += (tstable.get('RS00',0.0) + node_j.exp_score_susc_abs)
-                            score_res_pres += (tstable.get('RS10',0.0) + node_j.exp_score_susc_abs)
-                            score_susc_abs += (tstable.get('SS00',0.0) + node_j.exp_score_susc_abs)
-                            score_susc_pres+= (tstable.get('SS10',0.0) + node_j.exp_score_susc_abs)
-                        prob_res_abs   *= node_j.prob_abs_abs*node_j.prob_res_susc
-                        prob_res_pres  *= node_j.prob_pres_abs*node_j.prob_res_susc
-                        prob_susc_abs  *= node_j.prob_abs_abs*node_j.prob_susc_susc
-                        prob_susc_pres *= node_j.prob_pres_abs*node_j.prob_susc_susc
-    
-                node.exp_score_res_abs  += score_res_abs*prob_res_abs
-                node.exp_score_res_pres += score_res_pres*prob_res_pres
-                node.exp_score_susc_abs += score_susc_abs*prob_susc_abs
-                node.exp_score_susc_pres+= score_susc_pres*prob_susc_pres
-                
-                test_res_abs += prob_res_abs
-                test_res_pres += prob_res_pres
-                test_susc_abs += prob_susc_abs
-                test_susc_pres += prob_susc_pres
-
-    return phylo_tree.root.exp_score_susc_abs
-
-def calcProbAllLeafResistant(phylo_tree):
-    for node in phylo_tree.leaves:
-        node.all_res_res = 1.0
-        node.all_res_susc = 0.0
-        
-    for node in phylo_tree.inner_nodes_bu:
-        
-        node.all_res_res = 0.0
-        node.all_res_susc = 0.0
-        children_list = list(node.children)
-        
-        if len(children_list) > 0:
-      
-            for res_subprofile in generateResistanceProfiles(len(children_list)):
-                prob_res = 1.0
-                prob_susc = 1.0
-                for j in range(len(children_list)):
-                    if res_subprofile[j] == 'R':
-                        prob_res *= children_list[j].prob_res_res * children_list[j].all_res_res
-                        prob_susc *= children_list[j].prob_susc_res * children_list[j].all_res_res
-                    elif res_subprofile[j] == 'S':
-                        prob_res *= children_list[j].prob_res_susc * children_list[j].all_res_susc
-                        prob_susc *= children_list[j].prob_susc_susc * children_list[j].all_res_susc
-                    else:
-                        print("error")
-                node.all_res_res += prob_res
-                node.all_res_susc += prob_susc
-    return None
-
-def calcSubleavesResCount(phylo_tree):
-    for node in phylo_tree.leaves:
-        node.subleaves_count = 1
-
-        if node.observed_res_state== 'R':
-            node.res_subleaves_count = 1
-            node.inter_subleaves_count = 0
-            node.susc_subleaves_count = 0
-            node.un_subleaves_count = 0
-        elif node.observed_res_state == 'S':
-            node.res_subleaves_count = 0
-            node.inter_subleaves_count = 0
-            node.susc_subleaves_count = 1
-            node.un_subleaves_count = 0
-        elif node.observed_res_state == 'I':
-            node.res_subleaves_count = 0
-            node.inter_subleaves_count = 1
-            node.susc_subleaves_count = 0
-            node.un_subleaves_count = 0
-        else:
-            node.res_subleaves_count = 0
-            node.inter_subleaves_count = 0
-            node.susc_subleaves_count = 0            
-            node.un_subleaves_count = 1
-
-    for node in phylo_tree.inner_nodes_bu:
-              
-        children_list = list(node.children)
-        
-        if len(children_list) > 0:
-            node.res_subleaves_count = 0
-            node.inter_subleaves_count = 0
-            node.susc_subleaves_count = 0
-            node.un_subleaves_count = 0
-            node.subleaves_count = 0
-            for j in range(len(children_list)):
-                node.res_subleaves_count += children_list[j].res_subleaves_count
-                node.inter_subleaves_count += children_list[j].inter_subleaves_count
-                node.susc_subleaves_count += children_list[j].susc_subleaves_count
-                node.un_subleaves_count += children_list[j].un_subleaves_count
-                node.subleaves_count += children_list[j].subleaves_count
-    
-    return None 
-
-def calcSubleavesResCountOther(phylo_tree):
-    k = len(phylo_tree.root.observed_res_state_map)
-    
-    for node in phylo_tree.nodes.values():
-        node.res_subleaves_count_map = [0]*k
-        node.inter_subleaves_count_map = [0]*k
-        node.susc_subleaves_count_map = [0]*k
-        node.un_subleaves_count_map = [0]*k
-
-    for node in phylo_tree.leaves:
-        node.subleaves_count = 1
-
-        for di in range(k):
-            if node.observed_res_state_map[di] == 'R':
-                node.res_subleaves_count_map[di] = 1
-                node.inter_subleaves_count_map[di] = 0
-                node.susc_subleaves_count_map[di] = 0
-                node.un_subleaves_count_map[di] = 0
-            elif node.observed_res_state_map[di] == 'S':
-                node.res_subleaves_count_map[di] = 0
-                node.inter_subleaves_count_map[di] = 0
-                node.susc_subleaves_count_map[di] = 1
-                node.un_subleaves_count_map[di] = 0
-            elif node.observed_res_state_map[di] == 'I':
-                node.res_subleaves_count_map[di] = 0
-                node.inter_subleaves_count_map[di] = 1
-                node.susc_subleaves_count_map[di] = 0
-                node.un_subleaves_count_map[di] = 0
-            else:
-                node.res_subleaves_count_map[di] = 0
-                node.inter_subleaves_count_map[di] = 0
-                node.susc_subleaves_count_map[di] = 0            
-                node.un_subleaves_count_map[di] = 1
-
-    for node in phylo_tree.inner_nodes_bu:
-             
-        children_list = list(node.children)
-      
-        if len(children_list) > 0:
-            node.subleaves_count = 0
-            for j in range(len(children_list)):
-                node.subleaves_count += children_list[j].subleaves_count
-                
-            for di in range(k):
-                node.res_subleaves_count_map[di] = 0
-                node.inter_subleaves_count_map[di] = 0
-                node.susc_subleaves_count_map[di] = 0
-                node.un_subleaves_count_map[di] = 0
-                
-                for j in range(len(children_list)):
-                    node.res_subleaves_count_map[di] += children_list[j].res_subleaves_count_map[di]
-                    node.inter_subleaves_count_map[di] += children_list[j].inter_subleaves_count_map[di]
-                    node.susc_subleaves_count_map[di] += children_list[j].susc_subleaves_count_map[di]
-                    node.un_subleaves_count_map[di] += children_list[j].un_subleaves_count_map[di]
-    
-    return None 
-
-def calcSubleavesMutCount(phylo_tree):
-    for node in phylo_tree.leaves:
-
-        if node.observed_mut_state == '?':
-            node.pres_subleaves_count = 0
-            node.abs_subleaves_count = 0
-            node.q_subleaves_count = 1
-        elif node.observed_mut_state == '0':
-            node.pres_subleaves_count = 0
-            node.abs_subleaves_count = 1
-            node.q_subleaves_count = 0
-        else:
-            node.pres_subleaves_count = 1
-            node.abs_subleaves_count = 0
-            node.q_subleaves_count = 0
-            
-    for node in phylo_tree.inner_nodes_bu:
-                
-        children_list = list(node.children)
-      
-        if len(children_list) > 0:
-            node.pres_subleaves_count = 0
-            node.abs_subleaves_count = 0
-            node.q_subleaves_count = 0
-    
-            for j in range(len(children_list)):
-                node.pres_subleaves_count += children_list[j].pres_subleaves_count
-                node.abs_subleaves_count += children_list[j].abs_subleaves_count
-                node.q_subleaves_count += children_list[j].q_subleaves_count
-
-    return None    
-
-
-def calcSubnodesCount(phylo_tree):
-    for node in phylo_tree.leaves:
-        node.subnodes_count = 1
-        
-    for node in phylo_tree.inner_nodes_bu:
-        
-        children_list = list(node.children)
-        if len(children_list) > 0:
-            node.subnodes_count = 1
-            for j in range(len(children_list)):
-                node.subnodes_count += children_list[j].subnodes_count
-    return None    
- 
-
-def calcWeightedSuppotExprectedValue(phylo_tree, un=False):
-    exp_ws = 0.0
-    root = phylo_tree.root
-    for node in phylo_tree.nodes.values():
-        node.visited = 0
-    
-    for node in phylo_tree.leaves:
-        if un == False and node.observed_res_state == '?':
-            continue
-        
-        exp_w = 0.0
-        
-        queue = deque([])
-        queue.append((node, node.parent))
-        
-        while queue:
-            (node_j, node_i) = queue.popleft()
-            if node_i == None:
-                continue    
-            
-            children_list = list(node_i.children)
-            prob_level = 0.0
-            
-            for res_subprofile in generateResistanceProfiles(len(children_list)):
-                prob_res = 1.0
-                prob_susc = 1.0
-                prob_all_res_other = 1.0
-                
-                for k in range(len(children_list)):            
-                    if res_subprofile[k] == 'R':
-                        prob_res *= children_list[k].prob_res_res                   
-                        prob_susc *= children_list[k].prob_susc_res
-                        if children_list[k].node_id == node_j.node_id:
-                            prob_all_res_j = children_list[k].all_res_res
-                        else:
-                            prob_all_res_other *= children_list[k].all_res_res
-                                                
-                    elif res_subprofile[k] == 'S':
-                        prob_res *= children_list[k].prob_res_susc                   
-                        prob_susc *= children_list[k].prob_susc_susc                    
-                        if children_list[k].node_id == node_j.node_id:
-                            prob_all_res_j = children_list[k].all_res_susc
-                        else:
-                            prob_all_res_other *= children_list[k].all_res_susc
-                    else:
-                        print("error")
-
-                prob_level += (prob_res * node_i.res_prob + prob_susc * (1 - node_i.res_prob))*prob_all_res_j*(1 - prob_all_res_other)
-            exp_w += 1.0 / float(node_j.subleaves_count) * prob_level 
-            queue.append((node_i, node_i.parent))
-        
-        exp_ws += (1-node.res_prob) * (-root.res_subleaves_count/root.susc_subleaves_count) * node.mut_prob
-        exp_ws += exp_w * node.mut_prob
-
-    return exp_ws
-
-def calcDetParsResModel(phylo_tree):
-    phylo_tree.setComepleteResProfile(['?']*phylo_tree.nodes_count)
-        
-    for node in phylo_tree.leaves:
-        node.complete_res_state = node.observed_res_state
-        
-    for node_i in phylo_tree.inner_nodes_bu:
-        if len(node_i.children) > 0:
-            if node_i.un_subleaves_count == node_i.subleaves_count:
-                node_i.complete_res_state = '?'
-            elif node_i.susc_subleaves_count > 0:
-                node_i.complete_res_state = 'S'
-            elif node_i.inter_subleaves_count > 0:
-                node_i.complete_res_state = 'I'
-            else:
-                node_i.complete_res_state = 'R'
-
-    return None
-
-def calcDetParsResModelOther(phylo_tree):
-    k = len(phylo_tree.root.observed_res_state_map)
-    
-    for node in phylo_tree.nodes:
-        node.complete_res_state_map = ["?"]*k
-    
-        
-    for node in phylo_tree.leaves:
-        for di in range(k):
-            node.complete_res_state_map[di] = node.observed_res_state_map[di]
-        
-    for node_i in phylo_tree.inner_nodes_bu:
-
-        if len(node_i.children) > 0:
-            for di in range(k):
-                if node_i.un_subleaves_count_map[di] == node_i.subleaves_count:
-                    node_i.complete_res_state_map[di] = '?'
-                elif node_i.susc_subleaves_count_map[di] > 0:
-                    node_i.complete_res_state_map[di] = 'S'
-                elif node_i.inter_subleaves_count_map[di] > 0:
-                    node_i.complete_res_state_map[di] = 'I'
-                else:
-                    node_i.complete_res_state_map[di] = 'R'     
-    return None
-
-def calcDetParsMutModel(phylo_tree):
-    phylo_tree.setComepleteMutProfile(['?']*phylo_tree.nodes_count)
-        
-    for node in phylo_tree.leaves:
-        node.complete_mut_state = node.observed_mut_state
-        
-    for node_i in phylo_tree.inner_nodes_bu:
-        
-        if node_i.q_subleaves_count == node_i.subleaves_count:
-            node_i.complete_mut_state = '?'
-        elif node_i.abs_subleaves_count > 0:
-            node_i.complete_mut_state = '0'
-        else:
-            node_i.complete_mut_state = '1'
-        
-    return None
-
-def calcTransitionScore(phylo_tree, theta=0.5, zeta = 0.0, beta=-1.0, tscore_type = "P"):
-    for node in phylo_tree.nodes.values():
-        node.tscore_tmp = 0.0
-        
-    tstable = getstable(t=theta, z=zeta, b=beta)
-
-    for node in phylo_tree.inner_nodes_bu:
-        node.tscore_tmp = 0.0    
-        
-        node_res = node.complete_res_state
-        node_mut = node.complete_mut_state
-
-        for node_j in node.children:                
-            node_j_res = node_j.complete_res_state
-            node_j_mut = node_j.complete_mut_state
-            
-            if tscore_type == "P":
-                score_tmp = tstable.get(node_res + node_j_res + node_mut + node_j_mut, 0.0)
-                node.tscore_tmp += score_tmp + node_j.tscore_tmp
-                #if int(node_j.node_id) in [1621,1623,1625,1622,1624,1620]:
-                #    print(node.node_id, node_j.node_id, score_tmp, node_res + node_j_res + node_mut + node_j_mut)
-            elif tscore_type == "A":
-                if node_res == "S" and node_j_res == "R":
-                    node.tscore_tmp += node_j.tscore_tmp + float(node_j.pres_subleaves_count) / float(node_j.subnodes_count)
-                elif node_j_res == "S" and node_j_mut == "1":
-                    #print("here2", node_res, node_j_res, node_mut, node_j_mut)
-                    node.tscore_tmp += node_j.tscore_tmp - 1.0
-                else:
-                    node.tscore_tmp += node_j.tscore_tmp
-#                if node_mut == "0" and node_j_mut == "1":
-#                    node.tscore_tmp  += ((float(node_j.susc_subleaves_count)* (-2.0) + float(node_j.res_subleaves_count)) / float(node_j.un_subleaves_count + node_j.susc_subleaves_count + node_j.res_subleaves_count) + node_j.tscore_tmp)
-#                else:
-#                    node.tscore_tmp  += node_j.tscore_tmp
-            elif tscore_type == "C":
-                node.tscore_tmp  += (tstable.get(node_res+node_j_res+node_mut+node_j_mut,0.0) * (1.0+log(node_j.subnodes_count)) + node_j.tscore_tmp)
-            elif tscore_type == "L":
-                sc_tmp = tstable.get(node_res+node_j_res+node_mut+node_j_mut,0.0)
-                if sc_tmp >= 0:
-                    node.tscore_tmp  += (log(1+sc_tmp) + node_j.tscore_tmp)
-                else:
-                    node.tscore_tmp  += (log(0.5) + node_j.tscore_tmp)
-            elif tscore_type == "E":
-                node.tscore_tmp  += (tstable.get(node_res+node_j_res+node_mut+node_j_mut,0.0)*exp(-100*node_j.e_len) + node_j.tscore_tmp)
-            elif tscore_type == "R":
-                node.tscore_tmp  += (tstable.get(node_res+node_j_res+node_mut+node_j_mut,0.0) - node_j.e_len + node_j.tscore_tmp)                
-            else:
-                node.tscore_tmp  += (tstable.get(node_res+node_j_res+node_mut+node_j_mut,0.0) + node_j.tscore_tmp)
-        
-    return phylo_tree.root.tscore_tmp
-
-def calcTransitionScoreMulti(phylo_tree, theta=0.5, zeta = 0.0, tscore_type = "P"):
-    k = len(phylo_tree.root.complete_res_state_map) 
-        
-    for node in phylo_tree.nodes.values():
-        node.tscore_tmp = 0.0
-                
-    for node in phylo_tree.inner_nodes_bu:
-
-        node.tscore_tmp = 0.0    
-        
-        children_list = list(node.children)
-        node_res = node.complete_res_state
-        node_mut = node.complete_mut_state
-
-        for j in range(len(children_list)):    
-            node_j = children_list[j]  
-                        
-            node_j_res = node_j.complete_res_state
-            node_j_mut = node_j.complete_mut_state
-            
-            other_score = 0.0
-            
-            if node_mut == "0" and node_j_mut == "1":                
-                for di in range(k):
-                    node_res_di = node.complete_res_state_map[di]
-                    node_j_res_di = node_j.complete_res_state_map[di]
-                    if node_res_di == "S" and node_j_res_di == "R":
-                        other_score += 1.0
-                    elif node_res_di == "R" and node_j_res_di == "R":
-                        other_score += 0.5
-                        
-                 #   print(di, node_res_di, node_j_res_di, other_score)
-            node.tscore_tmp  += stable(node_res, node_j_res, node_mut, node_j_mut, theta, zeta) / (other_score + 1.0) + node_j.tscore_tmp
-        
-    return phylo_tree.root.tscore_tmp
-
-def removeUnResNodeLeavesRes(node):     
-    if node.subleaves_count == node.un_subleaves_count:
-        return None
-    elif len(node.children) == 0:
-        newnode = ResTreeNode(node.node_id)
-        newnode.e_len = node.e_len
-        newnode.label = node.label
-        newnode.ecolor = node.ecolor
-        newnode.observed_res_state = node.observed_res_state
-    #    newnode.observed_mut_state = node.observed_mut_state
-        return newnode
-    else:
-        child_new_nodes = []
-        for child_node in node.children:
-            child_newnode = removeUnResNodeLeavesRes(child_node)
-            if child_newnode != None:
-                child_new_nodes.append(child_newnode)
-        if len(child_new_nodes) == 0:
-            return None
-        elif len(child_new_nodes) == 1:
-            return child_new_nodes[0]
-        else:
-            newnode = ResTreeNode(node.node_id)
-            newnode.e_len = node.e_len
-            newnode.ecolor = node.ecolor
-            newnode.children = child_new_nodes
-            for child_newnode in child_new_nodes:
-                child_newnode.parent = newnode
-        return newnode
-        
-    return newnode
-    
-def removeUnResLeaves(phylo_tree):
-    newtree = ResTree(phylo_tree.root.subleaves_count - phylo_tree.root.un_subleaves_count)
-    newtree.root = removeUnResNodeLeavesRes(phylo_tree.root)
-    newtree.root_id = phylo_tree.root_id
-    
-    queue = deque([])
-    queue.append(newtree.root)
-    
-    newtree.leaves_count = 0
-    newtree.leaf_ids = []
-    newtree.leaves = []
-    
-    while queue:
-        node = queue.popleft()
-        if node == None:
-            continue
-        
-        newtree.nodes[node.node_id] = node
-        if len(node.children) == 0:
-            newtree.leaf_ids.append(node.node_id)
-            newtree.leaves.append(node)
-        for child_node in node.children:
-            queue.append(child_node)
-    
-    newtree.leaves_count = len(newtree.leaf_ids)    
-    newtree.nodes_count = len(newtree.nodes)
-    return newtree
-    
diff --git a/src/drsoft/modelling/xcct.py b/src/drsoft/modelling/xcct.py
deleted file mode 100644
index cce0e6a..0000000
--- a/src/drsoft/modelling/xcct.py
+++ /dev/null
@@ -1,339 +0,0 @@
-import os
-import sys
-from decimal import Decimal
-
-from collections import deque
-
-from drsoft.modelling.model_logic import *
-from drsoft.utils.gwamar_stat_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-
-from drsoft.utils.gwamar_generator_utils import generateSumProfiles
-
-def colorEdges(tree, alg=0, overwrite=False):
-    if alg == 0: # color all edges coming to resistant nodes
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R":
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    elif alg == 1: # color all edges with S->R
-        for node in list(tree.leaves) + tree.inner_nodes_bu:
-            if node.complete_res_state == "R" and (node.parent == None or node.parent.complete_res_state == "S"):
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "b"
-            else:
-                if overwrite == True or node.ecolor == None:
-                    node.ecolor = "w"
-    return None
-
-def calcFastBC(tree):
-    for node in tree.leaves: node.bc = 0
-    for node in tree.inner_nodes_bu:
-        node.bc = 0
-        for node_j in node.children:
-            if node_j.ecolor == "b":
-                node.bc += 1
-    return tree.root.bc
-
-def calcFastN(tree, w2=False):
-    for node in tree.leaves: node.maxn = 1
-
-    if w2:
-        for node in tree.inner_nodes_bu:
-            sum_tmp = 0
-            all_leaves = True
-            for ch_node in node.children:
-                sum_tmp += max(1, ch_node.maxn)
-                if not ch_node.is_leaf():
-                    all_leaves = False 
-            if all_leaves:
-                node.maxn = len(node.children)-1
-            else:
-                node.maxn = sum_tmp
-    else:
-        for node in tree.inner_nodes_bu:
-            node.maxn = 0
-            for ch_node in node.children:
-                node.maxn += max(ch_node.maxn, 1)
-
-    return tree.root.maxn
-
-def calcFastP(tree, w2=False):
-    for node in tree.leaves: 
-        node.maxp0 = 0
-        if node.ecolor == "b": node.maxp = 1
-        else: node.maxp = 0
-
-    if w2:
-        for node in tree.inner_nodes_bu:
-            if node.res_subleaves_count == node.subleaves_count:
-                node.maxp = node.res_subleaves_count-1
-            else:
-                node.maxp = node.res_subleaves_count
-    else:
-        for node in tree.inner_nodes_bu:
-            node.maxp = node.res_subleaves_count
-
-    return tree.root.maxp
-
-def calcFastWnMAT(tree, maxn_t=None, opt=False, w2=True):
-    for node in tree.leaves:
-        node.count_map = {}                             
-        node.count_map[0] = 1
-
-    for node in tree.inner_nodes_bu:
-        node.count_map = {}
-        children_list = node.children
-        k = len(node.children)
-
-        maxn = min(maxn_t, node.maxn)
-
-        for nt in range(maxn+1):
-            if w2: maxr = min(nt, k-1, node.maxn)
-            else: maxr = min(nt, k, node.maxn)
-            
-            if opt and (k+1 == node.subnodes_count):
-                if w2 and k == nt: wnm = 0
-                else: wnm = binom(k, nt)
-            else:
-                wnm = 0
-            
-                for r in range( maxr+1):
-                 #   if w2 == False and r==k: wnm += 1
-                    for gain_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
-                        gain_bound = []
-                        for j in range(k): 
-                            if gain_profile[j] == 1: 
-                                gain_bound.append(0)
-                            else:
-                                gain_bound.append(node.maxn)
-                        for gain_subprofile in generateSumProfiles2(k, nt-r, ub=gain_bound):
-                            wnm_tmp = 1
-                            for j in range(k):
-                                if gain_profile[j] == 0:
-                                    node_j = node.children[j]
-                                    wnm_tmp *= node_j.count_map.get(gain_subprofile[j], 0)
-                                    if wnm_tmp == 0:
-                                        break    
-                            wnm += wnm_tmp
-            node.count_map[nt] = wnm
-    return tree.root.count_map
-
-def calcFastRP(tree):
-    # r - total number of 0->1 changes 
-    # p - total number of 0->1 changes on black edges
-    r,p = 0,0
-    for node in tree.inner_nodes_bu:
-        for node_j in node.children:
-            if node.complete_mut_state == '0' and node_j.complete_mut_state == "1":
-                r += 1
-                if node_j.ecolor == "b":
-                    p += node_j.res_subleaves_count
-    return r,p
-
-def calcFastBpnMAT(tree, maxp_t, maxn_t, opt=False, w2=True, mem={}):
-    mem = {}
-
-    for node in tree.leaves:
-        mem[node.topos] = {}
-        mem[node.topos][(0,0)] = 1
-        
-    for node in tree.inner_nodes_bu:
-        maxn = min(maxn_t, node.maxn)
-        maxp = min(node.maxp, maxp_t)
-
-        if node.topos in mem and (maxp, maxn) in mem[node.topos]:
-            continue
-        if not node.topos in mem:
-            mem[node.topos] = {}
-        
-        children_list = list(node.children)
-        k = len(children_list)
-
-        mem[node.topos][(0,0)] = 1
-
-        for nt in range(1, maxn + 1, 1): # liczba wybranych
-            maxp = min(node.maxp, maxp_t)
-            if (maxp, nt) in mem[node.topos]:
-                continue
-            for pt in range(maxp + 1):     # liczba pokrytych
-                if (pt, nt) in mem[node.topos]:
-                    continue
-                if opt and (k+1 == node.subnodes_count):
-                    if w2 and k == nt: wnm = 0
-                    else: wnm = binom(node.bc, pt) * binom(k-node.bc, nt-pt)
-                else:
-                    wnm = 0
-                    if w2: maxr = min(k-1, nt)
-                    else: maxr = min(k, nt)
-                    for r in range(maxr + 1):
-                        for gain_r_profile in generateSumProfiles2(k, r, ub=[1]*k,lb=[0]*k):
-                            if w2 and sum(gain_r_profile) == k:
-                                continue
-
-                            ur = 0 # liczba trafionych
-                            gain_r_bound = []
-                            for j in range(k):
-                                node_j = children_list[j]
-                                if gain_r_profile[j] == 1:
-                                    gain_r_bound.append(0)
-                                    if node_j.ecolor == "b":
-                                        ur += node_j.res_subleaves_count
-                                elif gain_r_profile[j] == 0:
-                                    gain_r_bound.append(min(node_j.maxn, nt-r))
-
-                            for gain_r_subprofile in generateSumProfiles2(k, nt-r, ub=gain_r_bound):
-                                gain_p_bound = []
-                                for j in range(k):
-                                    node_j = children_list[j]
-                                    if gain_r_profile[j] == 1:
-                                        gain_p_bound.append(0)
-                                    else:
-                                        gain_p_bound.append(min(node_j.maxp, pt-ur))
-
-                                for gain_u_subprofile in generateSumProfiles2(k, pt-ur, ub=gain_p_bound):
-                                    wnm_tmp = 1
-                                    for j in range(k):
-                                        if gain_r_profile[j] == 0:
-                                            node_j = children_list[j]
-                                            ptmp, ntmp = gain_u_subprofile[j], gain_r_subprofile[j]
-                                            wnm_tmp *= mem[node_j.topos].get((ptmp, ntmp), 0)
-                                            if wnm_tmp == 0:
-                                                break
-                                    wnm += wnm_tmp
-
-                mem[node.topos][(pt,nt)] = wnm
-    return mem
-    
-def calcBinProfilesXCCT(bin_profiles, drp, trees_list, norm=False, opt=True, w2=True, mem={}):
-    scores = {}
-    
-    for bin_profile_id, bin_profile in bin_profiles.items():
-        scores[bin_profile_id] = []
-    
-    for tree in trees_list:
-        tree.setObservedResProfile(drp.full_profile)
-        tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
-
-        if len(drp.getResistant()) == 0:
-            continue
-        
-        newtree = removeUnResLeaves(tree)
-        newtree.calcInnerNodesBU()
-        newtree.setObservedResProfile(drp.full_profile)
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
-        colorEdges(newtree, alg=0, overwrite=False)
-        computeTopos(newtree, r=True)
-
-        maxn = 0
-        maxp = 0
-
-        n_dist = {}
-        
-        for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
-                r,p = calcFastRP(newtree)
-                maxn = max(maxn,r)
-                maxp = max(maxp,p)
-                if not r in n_dist:
-                    n_dist[r] = 0.0
-                n_dist[r] += 1.0
-        
-        calcFastBC(newtree)
-        nx = calcFastN(newtree, w2=w2)
-        px = calcFastP(newtree, w2=w2)
-
-        t0 = time.time()
-        wn_mat = calcFastWnMAT(newtree, maxn, opt=opt, w2=w2)
-        t1 = time.time()
-        
-        mem = calcFastBpnMAT(newtree, maxp, maxn, opt=opt, w2=w2, mem=mem)
-        bpn_mat = mem[newtree.root.topos]
-
-        test = {}
-        for (pt,nt) in bpn_mat:
-            if not nt in test: 
-                test[nt] = 0
-            test[nt] += bpn_mat[(pt,nt)]
-
-        t2 = time.time()
-
-        for bin_profile_id, gen_bin_profile in bin_profiles.items():
-            score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
-                
-                r,p = calcFastRP(newtree)
-
-                bs = wn_mat[r]
-                for pt in range(p):
-                    bs -= bpn_mat[(pt, r)]
-
-                cct_score = Decimal(bs) / Decimal(wn_mat[r])
-                try:
-                    if norm:
-                        score += -math.log(float(cct_score)*n_dist[r])
-                    else:
-                        score += -math.log(float(cct_score))
-
-                except:
-                    pass
-                 
-            scores[bin_profile_id].append(score)
-
-    scores_mean = {}
-    
-    for bin_profile_id in scores:
-        scores_mean[bin_profile_id] = mean(scores[bin_profile_id])
-
-    return scores_mean, mem
-
-
-def readXCCTMem(mem_fn):
-	if not os.path.exists(mem_fn):
-		return {}
-	mem = {}
-
-	input_fh = open(mem_fn)
-	lines = input_fh.readlines()
-	input_fh.close()
-	topo = ""
-
-	for line in lines:
-		tokens = line.split()
-		if len(tokens) < 1: 
-			continue
-		elif len(tokens) == 1:
-			topo = tokens[0]
-			if not topo in mem:
-				mem[topo] = {}
-		else:		
-			k = int(tokens[0])
-			n = int(tokens[1])
-			b = int(tokens[2])
-			mem[topo][(k,n)] = b
-
-	return mem
-
-def saveXCCTMem(mem, mem_fn):
-	output_fh = open(mem_fn, "w")
-	topo_sorted = sorted(mem.keys(), key=lambda topo:(len(topo), topo))
-	for topo in topo_sorted:
-		output_fh.write(topo + "\n")
-		for (k, n) in sorted(mem[topo], key=lambda (k,n):(n,k)):
-			b = mem[topo][(k,n)]
-			output_fh.write(str(k) + "\t" + str(n) + "\t" + str(b) + "\n")
-	output_fh.close()
-
diff --git a/other/visR/backup/__init__.py b/src/drsoft/other/__init__.py
similarity index 100%
copy from other/visR/backup/__init__.py
copy to src/drsoft/other/__init__.py
diff --git a/src/drsoft/other/show0_gold_associations.py b/src/drsoft/other/show0_gold_associations.py
index 780ec22..2f2f56f 100644
--- a/src/drsoft/other/show0_gold_associations.py
+++ b/src/drsoft/other/show0_gold_associations.py
@@ -1,22 +1,9 @@
 import sys
 import os
-import shutil
 import multiprocessing
-from multiprocessing import Pool
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils, gwamar_bin_utils,\
+  gwamar_ann_utils, gwamar_muts_io_utils
 
 def printGoldShort(gold_assocs, comment=""):
     total = 0
@@ -34,8 +21,8 @@ def printGoldShort(gold_assocs, comment=""):
 if __name__ == '__main__':
     print("a3_save_associations.py: saves association lists.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     dataset = parameters["D"]
     input_dir = parameters["DATASET_INPUT_DIR"]
@@ -50,31 +37,31 @@ if __name__ == '__main__':
     scores_p = parameters["SCORES"].split(",")
 
 
-    ensure_dir(cmp_dir)
-    ensure_dir(cmp_dir + "/assocs/")
+    gwamar_utils.ensure_dir(cmp_dir)
+    gwamar_utils.ensure_dir(cmp_dir + "/assocs/")
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     m_type = parameters["MT"]
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_res_profiles = readResistanceProfiles(input_fh, load_int=True)
+    drug_res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '_det.txt')
-    bin_profile_details = readBinProfileDetails(input_fh, mut_type=m_type, out_format="tuple")
+    bin_profile_details = gwamar_bin_utils.readBinProfileDetails(input_fh, mut_type=m_type, out_format="tuple")
     input_fh.close()
 
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '.txt')
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
     input_fh.close()
     
     input_fn = input_dir + "/cluster_gene_ref_ids.txt"
     if os.path.exists(input_fn):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {} 
@@ -86,7 +73,7 @@ if __name__ == '__main__':
         drug_res_conf_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_conf_db = readGoldAssociations(input_fh, cluster_ids_rev)
+        drug_res_conf_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev)
         input_fh.close()
     
     input_fn = gold_dir + "/gold_assocs_A.txt"
@@ -95,7 +82,7 @@ if __name__ == '__main__':
         drug_res_all_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_all_db = readGoldAssociations(input_fh, cluster_ids_rev)
+        drug_res_all_db = gwamar_muts_io_utils.readGoldAssociations(input_fh, cluster_ids_rev)
         input_fh.close()
 
     score_params_union = set([])    
diff --git a/src/drsoft/permtest/perm1_generate_res_profiles.py b/src/drsoft/permtest/perm1_generate_res_profiles.py
index 93fd574..c45d0ac 100644
--- a/src/drsoft/permtest/perm1_generate_res_profiles.py
+++ b/src/drsoft/permtest/perm1_generate_res_profiles.py
@@ -1,40 +1,31 @@
 import sys
 import os
-import copy
 import random
 from multiprocessing import Pool
 import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils, gwamar_utils, gwamar_progress_utils
+from src.drsoft.structs import resistance_profile
 
 def generateResProfiles(params):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     drug_name = params["DRUG_NAME"]
     perm_rep = int(parameters["REPS"])
 
     input_dir = parameters["DATASET_INPUT_DIR"]
-    perm_dir = parameters["RESULTS_PERM_DIR"]
     results_dir = parameters["RESULTS_DIR"]
     perm_profiles_dir = parameters["RESULTS_PERM_PROFILES_DIR"]
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
     
     strains_list = strains.allStrains()
 
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     res_profiles = {}
@@ -43,9 +34,6 @@ def generateResProfiles(params):
     drp = res_profiles[drug_name]
     
     n = strains.count()
-    cr = len(drp.res_strains_ids)
-    cs = len(drp.sc_strains_ids)
-    ci = len(drp.inter_strains_ids)
 
     used_p = set([])
     
@@ -68,7 +56,7 @@ def generateResProfiles(params):
         perm = list(drp.full_profile)
         random.shuffle(perm)
         drug_name_id = drug_name + "_" + str(p)
-        perm_res_profile = ResistanceProfile(drug_name_id, n)
+        perm_res_profile = resistance_profile.ResistanceProfile(drug_name_id, n)
         perm_res_profile.full_profile = perm
         perm_res_profiles.append(perm_res_profile)
         
@@ -76,15 +64,15 @@ def generateResProfiles(params):
     else: header = False
     
     output_fh = open(input_fn, "a") 
-    saveResistanceProfiles(output_fh, perm_res_profiles, strains_list=strains_list, compress=True, header=header)
+    gwamar_res_io_utils.saveResistanceProfiles(output_fh, perm_res_profiles, strains_list=strains_list, compress=True, header=header)
     output_fh.close()
     
     return drug_name
     
 if __name__ == '__main__':
     print("perm1_generate_res_profiles.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -93,14 +81,14 @@ if __name__ == '__main__':
     results_dir = parameters["RESULTS_DIR"]
     perm_profiles_dir = parameters["RESULTS_PERM_PROFILES_DIR"]
     
-    ensure_dir(perm_dir)
-    ensure_dir(perm_profiles_dir)
+    gwamar_utils.ensure_dir(perm_dir)
+    gwamar_utils.ensure_dir(perm_profiles_dir)
     
     TASKS = []
     TASK = {}
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
@@ -108,7 +96,7 @@ if __name__ == '__main__':
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Profiles generated")
+    progress = gwamar_progress_utils.GWAMARProgress("Profiles generated")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
     
diff --git a/src/drsoft/permtest/perm2_compute_perm_rep_scores.py b/src/drsoft/permtest/perm2_compute_perm_rep_scores.py
index 60fb102..9f3b249 100644
--- a/src/drsoft/permtest/perm2_compute_perm_rep_scores.py
+++ b/src/drsoft/permtest/perm2_compute_perm_rep_scores.py
@@ -1,28 +1,15 @@
 import sys
 import os
-import copy
 from multiprocessing import Pool
 import multiprocessing
-
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_utils import drugNamePermID
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_scoring_flat_utils import *
-from drsoft.utils.gwamar_scoring_tree_utils import *
-from drsoft.utils.gwamar_scoring import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring, gwamar_utils,\
+  gwamar_res_io_utils, gwamar_strains_io_utils, gwamar_res_utils,\
+  gwamar_progress_utils
 
 def scoreDrug(params):
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     drug_name = params["DRUG_NAME"]
     score_full = params["SCORE"]
@@ -30,7 +17,7 @@ def scoreDrug(params):
 
     drug_name_id = drug_res_profile.drug_name
     
-    bin_profile_scores, rev_sorting = computeScores(score_full, drug_name, parameters)
+    bin_profile_scores, rev_sorting = gwamar_scoring.computeScores(score_full, drug_name, parameters)
 
     if bin_profile_scores == None:
         return drug_name, score_full
@@ -56,8 +43,8 @@ def scoreDrug(params):
     
 if __name__ == '__main__':
     print("perm2_compute_perm_rep_scores.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     print("W", WORKERS)
@@ -74,31 +61,31 @@ if __name__ == '__main__':
     TASKS = []
     TASK = {}
     
-    ensure_dir(perm_scores_dir)
+    gwamar_utils.ensure_dir(perm_scores_dir)
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
     
     
     for drug_name in drug_names:
-        ensure_dir(perm_scores_dir + drug_name)
+        gwamar_utils.ensure_dir(perm_scores_dir + drug_name)
 
         input_fh = open(perm_profiles_dir + "/" + drug_name + ".txt")
-        res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+        res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
         input_fh.close()
 
         for score_param in score_params:
-            ensure_dir(perm_scores_dir + drug_name + "/" + score_param)
+            gwamar_utils.ensure_dir(perm_scores_dir + drug_name + "/" + score_param)
     
             for drp in res_profiles_list:
     
                 drug_name_id = drp.drug_name
-                current_id = drugNamePermID(drug_name_id)
+                current_id = gwamar_res_utils.drugNamePermID(drug_name_id)
                 if current_id >= perm_rep: continue
                     
                 output_fn = perm_scores_dir + drug_name + "/" + score_param + "/" + drug_name_id +  ".txt"
@@ -110,7 +97,7 @@ if __name__ == '__main__':
                 TASKS.append(TASK.copy())
     print(len(TASKS))
     
-    progress = GWAMARProgress("Permutation scores")
+    progress = gwamar_progress_utils.GWAMARProgress("Permutation scores")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
 
diff --git a/src/drsoft/permtest/perm3_save_perm_rep_rankings.py b/src/drsoft/permtest/perm3_save_perm_rep_rankings.py
index 3482405..0590a62 100644
--- a/src/drsoft/permtest/perm3_save_perm_rep_rankings.py
+++ b/src/drsoft/permtest/perm3_save_perm_rep_rankings.py
@@ -1,30 +1,17 @@
 import sys
 import os
-import copy
-import random
 from multiprocessing import Pool
 import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_utils import drugNamePermID
-from drsoft.utils.gwamar_res_io_utils import readDrugNames
-from drsoft.utils.gwamar_scoring import revOrder
+from src.drsoft.utils import gwamar_params_utils, gwamar_res_io_utils,\
+  gwamar_bin_utils, gwamar_res_utils, gwamar_utils, gwamar_progress_utils
 
 def scoreParamsSet(params):
     score = params["SCORE"]
     drug_name = params["DRUG_NAME"]
-    
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+  
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    perm_dir = parameters["RESULTS_PERM_DIR"]
     perm_scores_dir = parameters["RESULTS_PERM_SCORES_DIR"]
     perm_profiles_dir = parameters["RESULTS_PERM_PROFILES_DIR"]
     perm_ranks_dir = parameters["RESULTS_PERM_RANKS_DIR"]
@@ -35,16 +22,16 @@ def scoreParamsSet(params):
         rev_order = True
 
     input_fh = open(perm_profiles_dir + "/" + drug_name +".txt")
-    drug_names_ids = readDrugNames(input_fh)
+    drug_names_ids = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '_count.txt')
-    bin_profile_count = readBinProfileCounts(input_fh)
+    bin_profile_count = gwamar_bin_utils.readBinProfileCounts(input_fh)
     input_fh.close()
     
     for drug_name_id in drug_names_ids:
         
-        current_id = drugNamePermID(drug_name_id)
+        current_id = gwamar_res_utils.drugNamePermID(drug_name_id)
         if current_id >= perm_rep: continue
         
         text_lines = []
@@ -55,14 +42,14 @@ def scoreParamsSet(params):
             continue
         
         input_fh = open(input_fn)
-        bin_profiles_sorted = readBinProfilesSorted(input_fh, rev_order)
+        bin_profiles_sorted = gwamar_bin_utils.readBinProfilesSorted(input_fh, rev_order)
         input_fh.close()
         
         n = len(bin_profiles_sorted)
-        bin_profiles_ranks = computeRankings(bin_profiles_sorted, bin_profile_count)
+        bin_profiles_ranks = gwamar_bin_utils.computeRankings(bin_profiles_sorted, bin_profile_count)
 
         for i in range(n):
-            bin_profile_id, bin_profile_score = bin_profiles_sorted[i]
+            bin_profile_id, _ = bin_profiles_sorted[i]
             min_ranks_pos, max_ranks_pos = bin_profiles_ranks[bin_profile_id][:2]
             text_line = str(bin_profile_id) + "\t"
             text_line += str(min_ranks_pos) + "\t"
@@ -81,8 +68,8 @@ def scoreParamsSet(params):
 if __name__ == '__main__':
     print("perm3_save_perm_rep_rankings.py. Start.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -92,7 +79,7 @@ if __name__ == '__main__':
     perm_scores_dir = parameters["RESULTS_PERM_SCORES_DIR"]
     perm_ranks_dir = parameters["RESULTS_PERM_RANKS_DIR"]
 
-    ensure_dir(perm_ranks_dir)
+    gwamar_utils.ensure_dir(perm_ranks_dir)
     
     score_params = parameters["SCORES"].split(",")
     
@@ -100,13 +87,13 @@ if __name__ == '__main__':
     TASK = {}
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
-        ensure_dir(perm_ranks_dir + drug_name)
+        gwamar_utils.ensure_dir(perm_ranks_dir + drug_name)
         for score_param in score_params:
-            ensure_dir(perm_ranks_dir + drug_name + "/" + score_param)
+            gwamar_utils.ensure_dir(perm_ranks_dir + drug_name + "/" + score_param)
 
             TASK["DRUG_NAME"] = drug_name
             TASK["SCORE"] = score_param
@@ -114,7 +101,7 @@ if __name__ == '__main__':
             TASKS.append(TASK.copy())
 
         
-    progress = GWAMARProgress("Rankings computed")
+    progress = gwamar_progress_utils.GWAMARProgress("Rankings computed")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
     
diff --git a/src/drsoft/permtest/perm4_compute_perm_comb_scores.py b/src/drsoft/permtest/perm4_compute_perm_comb_scores.py
index bd64882..6415176 100644
--- a/src/drsoft/permtest/perm4_compute_perm_comb_scores.py
+++ b/src/drsoft/permtest/perm4_compute_perm_comb_scores.py
@@ -1,29 +1,17 @@
 import sys
 import os
-import copy
 from multiprocessing import Pool
 import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_utils import drugNamePermID
-from drsoft.utils.gwamar_res_io_utils import readDrugNames
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_scoring_flat_utils import *
-from drsoft.utils.gwamar_scoring_tree_utils import *
-
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils, gwamar_bin_utils, gwamar_res_utils,\
+  gwamar_scoring_flat_utils, gwamar_utils, gwamar_progress_utils
 
 def scoreDrug(params):
     score = params["SCORE"]
     drug_name = params["DRUG_NAME"]
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     input_dir = parameters["DATASET_INPUT_DIR"]
     perm_scores_dir = parameters["RESULTS_PERM_SCORES_DIR"]
@@ -32,26 +20,26 @@ def scoreDrug(params):
     perm_rep = int(parameters["REPS"])
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     input_fh = open(perm_profiles_dir + drug_name + ".txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
 
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '.txt')
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
     input_fh.close()
     
     for drug_name_id in drug_names:
-        current_id = drugNamePermID(drug_name_id)
+        current_id = gwamar_res_utils.drugNamePermID(drug_name_id)
         if current_id >= perm_rep: continue
         
         rev_sorting = True
     
         subscores = score.split(",")
 
-        bin_profile_scores = calcBinProfilesPermRanksSumScore(bin_profiles, drug_name, drug_name_id, perm_ranks_dir, subscores=subscores)
+        bin_profile_scores = gwamar_scoring_flat_utils.calcBinProfilesPermRanksSumScore(bin_profiles, drug_name, drug_name_id, perm_ranks_dir, subscores=subscores)
                 
         text_lines = []
         if rev_sorting:
@@ -78,8 +66,8 @@ def scoreDrug(params):
 if __name__ == '__main__':
     print("perm4_compute_perm_comb_scores.py. Start.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -95,19 +83,19 @@ if __name__ == '__main__':
     TASK = {}
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
         for score_param in score_params:
-            ensure_dir(perm_scores_dir + drug_name + "/" + score_param)
+            gwamar_utils.ensure_dir(perm_scores_dir + drug_name + "/" + score_param)
 
             TASK["DRUG_NAME"] = drug_name
             TASK["SCORE"] = score_param
             
             TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Combined scores")
+    progress = gwamar_progress_utils.GWAMARProgress("Combined scores")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
         
diff --git a/src/drsoft/permtest/perm5_combine_perm_rep_scores.py b/src/drsoft/permtest/perm5_combine_perm_rep_scores.py
index f24e063..6e7af22 100644
--- a/src/drsoft/permtest/perm5_combine_perm_rep_scores.py
+++ b/src/drsoft/permtest/perm5_combine_perm_rep_scores.py
@@ -1,18 +1,9 @@
 import sys
 import os
-import copy
 from multiprocessing import Pool
 import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_utils import drugNamePermID
-from drsoft.utils.gwamar_res_io_utils import readDrugNames
+from src.drsoft.utils import gwamar_params_utils, gwamar_res_io_utils,\
+  gwamar_res_utils, gwamar_utils, gwamar_progress_utils
 
 const = 100000.0
 
@@ -20,8 +11,8 @@ def scoreDrug(params):
     score = params["SCORE"]
     drug_name = params["DRUG_NAME"]
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     perm_scores_dir = parameters["RESULTS_PERM_SCORES_DIR"]
     perm_profiles_dir = parameters["RESULTS_PERM_PROFILES_DIR"]
@@ -29,13 +20,13 @@ def scoreDrug(params):
     perm_rep = int(parameters["REPS"])
 
     input_fh = open(perm_profiles_dir + "/" + drug_name + ".txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     bin_profile_scores = {}
     
     for drug_name_id in drug_names:
-        current_id = drugNamePermID(drug_name_id)
+        current_id = gwamar_res_utils.drugNamePermID(drug_name_id)
         if current_id >= perm_rep: continue
         
         input_fn = perm_scores_dir + drug_name + "/" + score + "/" + drug_name_id +  ".txt"
@@ -65,8 +56,8 @@ def scoreDrug(params):
     
 if __name__ == '__main__':
     print("perm5_combine_perm_rep_scores.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -74,7 +65,7 @@ if __name__ == '__main__':
     results_dir = parameters["RESULTS_DIR"]
     perm_combs_dir = parameters["RESULTS_PERM_COMBS_DIR"]
 
-    ensure_dir(perm_combs_dir)
+    gwamar_utils.ensure_dir(perm_combs_dir)
     
     score_params = parameters["SCORES"].split(",")
     #score_params += ["tmow", "tmo", "tmw", "tow", "mow"]
@@ -85,11 +76,11 @@ if __name__ == '__main__':
     TASK = {}
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
-        ensure_dir(perm_combs_dir + drug_name)
+        gwamar_utils.ensure_dir(perm_combs_dir + drug_name)
         for score_param in score_params:
 
             TASK["DRUG_NAME"] = drug_name
@@ -98,7 +89,7 @@ if __name__ == '__main__':
             TASKS.append(TASK.copy())
         
 
-    progress = GWAMARProgress("Combine scores")
+    progress = gwamar_progress_utils.GWAMARProgress("Combine scores")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
         
diff --git a/src/drsoft/permtest/perm6_calc_pvalues.py b/src/drsoft/permtest/perm6_calc_pvalues.py
index 409151a..caf1241 100644
--- a/src/drsoft/permtest/perm6_calc_pvalues.py
+++ b/src/drsoft/permtest/perm6_calc_pvalues.py
@@ -1,18 +1,9 @@
 import sys
 import os
-import copy
 from multiprocessing import Pool
 import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_io_utils import readDrugNames
-from drsoft.utils.gwamar_scoring import revOrder
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring, gwamar_utils,\
+  gwamar_res_io_utils, gwamar_progress_utils
 
 def findScore(score_tmp, scores_sorted, rev_order):    
     lo, hi = 0, len(scores_sorted) - 1
@@ -34,17 +25,14 @@ def scoreDrug(params):
     score = params["SCORE"]
     drug_name = params["DRUG_NAME"]
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     scores_dir = parameters["RESULTS_SCORES_DIR"]
-    perm_profiles_dir = parameters["RESULTS_PERM_PROFILES_DIR"]
     perm_combs_dir = parameters["RESULTS_PERM_COMBS_DIR"]
     perm_pvalues_dir = parameters["RESULTS_PERM_PVALUES_DIR"]
-    perm_rep = int(parameters["REPS"])
-    
-    #True = 1
-    rev_order = revOrder(score)
+
+    rev_order = gwamar_scoring.revOrder(score)
 
     score_counts = {}
     
@@ -109,8 +97,8 @@ def scoreDrug(params):
     
 if __name__ == '__main__':
     print("perm6_calc_pvalues.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -119,7 +107,7 @@ if __name__ == '__main__':
     perm_combs_dir = parameters["RESULTS_PERM_COMBS_DIR"]
     perm_pvalues_dir = parameters["RESULTS_PERM_PVALUES_DIR"]
 
-    ensure_dir(perm_pvalues_dir)
+    gwamar_utils.ensure_dir(perm_pvalues_dir)
     
     score_params = parameters["SCORES"].split(",")
     #score_params += ["mtmow", "tmow", "tmo", "tmw", "tow", "mow"]
@@ -130,11 +118,11 @@ if __name__ == '__main__':
     TASK = {}
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
-        ensure_dir(perm_pvalues_dir + drug_name)
+        gwamar_utils.ensure_dir(perm_pvalues_dir + drug_name)
         for score_param in score_params:
 
             TASK["DRUG_NAME"] = drug_name
@@ -142,7 +130,7 @@ if __name__ == '__main__':
             
             TASKS.append(TASK.copy())
         
-    progress = GWAMARProgress("Computed pvalues")
+    progress = gwamar_progress_utils.GWAMARProgress("Computed pvalues")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
         
diff --git a/src/drsoft/prepare/p0_convert_gold_associations.py b/src/drsoft/prepare/p0_convert_gold_associations.py
index a3f0d09..285cf4c 100644
--- a/src/drsoft/prepare/p0_convert_gold_associations.py
+++ b/src/drsoft/prepare/p0_convert_gold_associations.py
@@ -1,29 +1,17 @@
 import sys
 import os
-import shutil
 import multiprocessing
-from multiprocessing import Pool
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import compareProfiles
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
+sys.path += [os.path.abspath(os.curdir)]
 
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils, gwamar_bin_utils, gwamar_ann_utils, gwamar_muts_io_utils
 
 if __name__ == '__main__':
     print("p0_convert_gold_associations.py. Start.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     dataset = parameters["D"]
     input_dir = parameters["DATASET_INPUT_DIR"]
@@ -36,27 +24,27 @@ if __name__ == '__main__':
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     m_type = parameters["MT"]
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_res_profiles = readResistanceProfiles(input_fh, load_int=True)
+    drug_res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '_det.txt')
-    bin_profile_details = readBinProfileDetails(input_fh, mut_type=m_type, out_format="tuple")
+    bin_profile_details = gwamar_bin_utils.readBinProfileDetails(input_fh, mut_type=m_type, out_format="tuple")
     input_fh.close()
 
     input_fh = open(results_dir + 'bin_profiles_' + m_type + '.txt')
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=True)
     input_fh.close()
     
     input_fn = input_dir + "/cluster_gene_ref_ids.txt"
     if os.path.exists(input_fn):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh, gene_ref_ids=True)
         cluster_fh.close()
     else:
         cluster_ids = {} 
@@ -68,11 +56,9 @@ if __name__ == '__main__':
         drug_res_conf_db = {}
     else:
         input_fh = open(input_fn)
-        drug_res_db = loadDrugResRels(input_fh, cluster_ids_rev)
+        drug_res_db = gwamar_muts_io_utils.loadDrugResRels(input_fh, cluster_ids_rev)
         input_fh.close()
     
-   #print("here")
-#    print(drug_res_db)
     tls = []
 
     for drug_name in drug_res_db:
diff --git a/src/drsoft/prepare/p0_save_strains_ordered.py b/src/drsoft/prepare/p0_save_strains_ordered.py
index a84d4bf..5a763c1 100644
--- a/src/drsoft/prepare/p0_save_strains_ordered.py
+++ b/src/drsoft/prepare/p0_save_strains_ordered.py
@@ -1,62 +1,44 @@
 import os
 import sys
-import time
-from multiprocessing import Pool
-import multiprocessing
-
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-
-def getTreeStrainList(tree_line):
-    tree_line = tree_line.strip().strip(";")
-    tree_line = tree_line.replace("(", ";")
-    tree_line = tree_line.replace(")", ";")
-    tree_line = tree_line.replace(",", ";")
-    strains_list_tmp = tree_line.split(";")
-    strains_list = []
-    for strain_id_tmp in strains_list_tmp:
-        if strain_id_tmp.count(":") > 0: strain_id = strain_id_tmp.split(":")[0]
-        else: strain_id = strain_id_tmp
-        if len(strain_id) == 0: continue
-        strains_list.append(strain_id)
-    return strains_list
 
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_tree_io_utils
 
 if __name__ == '__main__':
-    print("p0_save_strains_ordered.py: saves strains in the order consistent with the phylogenetic tree. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-
-    input1_fn = input_dir + "/tree.txt"
-    input2_fn = input_dir + "/strains_ordered.txt"
-    input3_fn = input_dir + "/strains.txt"
-
-    if os.path.exists(input1_fn) and not os.path.exists(input2_fn) and os.path.exists(input3_fn):
-        input_fh = open(input1_fn)
-        tree_line = input_fh.readline()
-        input_fh.close()
-        strains_list = getTreeStrainList(tree_line)
-
-        output_fh = open(input2_fn, "w")
-        for strain_id in strains_list:
-            output_fh.write(strain_id + "\n")
-        output_fh.close()
-    elif not os.path.exists(input1_fn) and os.path.exists(input3_fn): 
-        input_fh = open(input3_fn)
-        strains = readStrains(input_fh)
-        input_fh.close()
-        strains_list = strains.allStrains()
-
-        output_fh = open(input2_fn, "w")
-        for strain_id in strains_list:
-            output_fh.write(strain_id + "\n")
-        output_fh.close()
-    else:
-        print("File " + input2_fn + " already exists. First remove it.")
-    
-    print("p0_save_strains_ordered.py. Finished.")
+  print("p0_save_strains_ordered.py: saves strains in the order consistent with the phylogenetic tree. Start.")
+  gwamar_params_utils.overwriteParameters(sys.argv)
+  parameters = gwamar_params_utils.readParameters()
+  
+  input_dir = parameters["DATASET_INPUT_DIR"]
+
+  input1_fn = input_dir + "/tree.txt"
+  input2_fn = input_dir + "/strains_ordered.txt"
+  input3_fn = input_dir + "/strains.txt"
+
+  if os.path.exists(input1_fn) and not os.path.exists(input2_fn) and os.path.exists(input3_fn):
+    input_fh = open(input1_fn)
+    tree_line = input_fh.readline()
+    input_fh.close()
+    strains_list = gwamar_tree_io_utils.getTreeStrainList(tree_line)
+
+    output_fh = open(input2_fn, "w")
+    for strain_id in strains_list:
+      output_fh.write(strain_id + "\n")
+    output_fh.close()
+  elif not os.path.exists(input1_fn) and os.path.exists(input3_fn): 
+    input_fh = open(input3_fn)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
+    input_fh.close()
+    strains_list = strains.allStrains()
+
+    output_fh = open(input2_fn, "w")
+    for strain_id in strains_list:
+      output_fh.write(strain_id + "\n")
+    output_fh.close()
+  else:
+    print("File " + input2_fn + " already exists. First remove it.")
+  
+  print("p0_save_strains_ordered.py. Finished.")
+
diff --git a/src/drsoft/prepare/p1_prepare_experiments.py b/src/drsoft/prepare/p1_prepare_experiments.py
index 73c3476..867b0e0 100644
--- a/src/drsoft/prepare/p1_prepare_experiments.py
+++ b/src/drsoft/prepare/p1_prepare_experiments.py
@@ -1,80 +1,58 @@
 import sys
 import os
-import shutil
-import copy
-from multiprocessing import Pool
 import multiprocessing
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-
-
-if __name__ == '__main__':
-    print("p1_prepare_experiments.py: prepares folders to store results. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    tree_ids=["PHYML", "RAXML", "", "PHYLIP"]
-    tree_ids.append(parameters.get("TREE_ID", ""))
-
-    WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils, gwamar_utils, gwamar_tree_io_utils
+
+if __name__ == '__main__':
+  print("p1_prepare_experiments.py: prepares folders to store results. Start. h")
+  gwamar_params_utils.overwriteParameters(sys.argv)
+  parameters = gwamar_params_utils.readParameters()
+  
+  tree_ids=["PHYML", "RAXML", "", "PHYLIP"]
+  tree_ids.append(parameters.get("TREE_ID", ""))
+
+  WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
+  
+  input_dir = parameters["DATASET_INPUT_DIR"]
+
+  input_fh = open(input_dir + "/strains_ordered.txt")
+  strains = gwamar_strains_io_utils.readStrains(input_fh)
+  input_fh.close()
+  
+  strains_list = strains.allStrains()
+  
+  input_fh = open(input_dir + "/res_profiles.txt")
+  res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True, strains_list=strains_list)
+  input_fh.close()
+  
+  output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"P/"
+  gwamar_utils.ensure_dir(output_dir)
+
+  output_fh = open(output_dir + "res_profiles.txt", "w")
+  gwamar_res_io_utils.saveResistanceProfiles(output_fh, res_profiles, strains_list, compress=True)
+  output_fh.close()
+
+  for tree_id in tree_ids:
+    output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"P/"
     
-    input_dir = parameters["DATASET_INPUT_DIR"]
+    input_fn = input_dir + "tree"+tree_id+".txt"
+    if not os.path.exists(input_fn):
+        continue
 
-    input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    strains_list = strains.allStrains()
-    
-    input_fh = open(input_dir + "/res_profiles.txt")
-    res_profiles = readResistanceProfiles(input_fh, load_int=True, strains_list=strains_list)
+    input_fh = open(input_fn)
+    tree = gwamar_tree_io_utils.readPhyloTrees(input_fh, strains_list)
     input_fh.close()
-    
-    output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"P/"
-    ensure_dir(output_dir)
 
-    output_fh = open(output_dir + "res_profiles.txt", "w")
-    saveResistanceProfiles(output_fh, res_profiles, strains_list, compress=True)
+    output_tree_txt = tree[0].toString(lengths=False, strains=strains)
+    output_fh = open(output_dir + "/tree"+tree_id+".txt", "w")
+    output_fh.write(output_tree_txt+ ";\n")
     output_fh.close()
-
-    for tree_id in tree_ids:
-        output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"P/"
-        
-        input_fn = input_dir + "tree"+tree_id+".txt"
-        if not os.path.exists(input_fn):
-            continue
-
-        input_fh = open(input_fn)
-        tree = readPhyloTrees(input_fh, strains_list)
-        input_fh.close()
-
-        output_tree_txt = tree[0].toString(lengths=False, strains=strains)
-        output_fh = open(output_dir + "/tree"+tree_id+".txt", "w")
-        output_fh.write(output_tree_txt+ ";\n")
-        output_fh.close()
-        
-        output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"G/"
-        ensure_dir(output_dir)
-        
-        output_fh = open(output_dir + "res_profiles.txt", "w")
-        saveResistanceProfiles(output_fh, res_profiles, strains_list, compress=True)
-        output_fh.close()
-
-        output_tree_txt = tree[0].toString(lengths=False, strains=strains)
-        output_fh = open(output_dir + "/tree"+tree_id+".txt", "w")
-        output_fh.write(output_tree_txt+ ";\n")
-        output_fh.close()
-
-    print("p1_prepare_experiments.py: Finished.")
-    
\ No newline at end of file
+    
+    output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"G/"
+    gwamar_utils.ensure_dir(output_dir)    
+    
+  print("p1_prepare_experiments.py: Finished.")
diff --git a/src/drsoft/prepare/p2_convert_profiles_genes.py b/src/drsoft/prepare/p2_convert_profiles_genes.py
index 2a6f413..057ee7f 100644
--- a/src/drsoft/prepare/p2_convert_profiles_genes.py
+++ b/src/drsoft/prepare/p2_convert_profiles_genes.py
@@ -1,127 +1,119 @@
 import sys
 import os
-import copy
-from multiprocessing import Pool
 import multiprocessing
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_utils import findScStrains
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils, gwamar_res_utils,\
+  gwamar_ann_utils, gwamar_muts_io_utils, gwamar_progress_utils,\
+  gwamar_muts_utils
 
+if __name__ == '__main__':
+  print("p2_convert_profiles_genes.py: converts gene gain/loss profiles. Start.")
+  gwamar_params_utils.overwriteParameters(sys.argv)
+  parameters = gwamar_params_utils.readParameters()
+  
+  WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
+  
+  input_dir = parameters["DATASET_INPUT_DIR"]
+  inter_dir = output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"G/"
+  gwamar_utils.ensure_dir(inter_dir)
 
-if __name__ == '__main__':
-    print("p2_convert_profiles_genes.py: converts gene gain/loss profiles. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    inter_dir = output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"G/"
-    ensure_dir(inter_dir)
+  input_fh = open(input_dir + "/strains_ordered.txt")
+  strains = gwamar_strains_io_utils.readStrains(input_fh)
+  input_fh.close()
+  
+  input_fh = open(input_dir + "/res_profiles.txt")
+  res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
+  input_fh.close()
+  
+  sc_strains = gwamar_res_utils.findScStrains(res_profiles_list)
+  
+  res_profiles = {}
+  for res_profile in res_profiles_list:
+    res_profiles[res_profile.drug_name] = res_profile
+  
+  if os.path.exists(input_dir + "/cluster_gene_ref_ids.txt"):
+    cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
+    cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh)
+    cluster_fh.close()
+  else:
+    cluster_ids = {} 
+    cluster_ids_rev = {}
 
-    input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
+  input_fn = input_dir + '/gene_profiles.txt'
+  if not os.path.exists(input_fn):
+    exit()
+  input_fh = open(input_fn)
+  gene_profiles = gwamar_muts_io_utils.readGeneGainLossProfiles(input_fh, cluster_ids=cluster_ids, cluster_ids_rev=cluster_ids_rev, gene_subset=None, m_type="a")
+  input_fh.close()
+  
+  bin_profiles = {}
+  bin_profiles_det = {}
+  bin_profiles_count = {}
+  bin_profile_id = 0
+  
+  bin_mutations = set([])
+  
+  progress = gwamar_progress_utils.GWAMARProgress("Gene profiles processed")
+  progress.setJobsCount(len(gene_profiles))
+  
+  for gene_profile in gene_profiles.values():
+    progress.update()
     
-    input_fh = open(input_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
+    ref_state = gwamar_muts_utils.calcRefStateMutation(gene_profile.full_profile, sc_strains)
+    if ref_state == None: continue
     
-    sc_strains = findScStrains(res_profiles_list)
+    bin_profile = gwamar_muts_utils.calcBinProfileMutation(gene_profile.full_profile, ref_state, gen_bin_profile=True)
+    bin_profile_cmp = gwamar_muts_utils.compressProfile(bin_profile)
+    full_profile_cmp = gwamar_muts_utils.compressProfile(gene_profile.full_profile)
     
-    res_profiles = {}
-    for res_profile in res_profiles_list:
-        res_profiles[res_profile.drug_name] = res_profile
+    gene_profile.cmp_profile = bin_profile_cmp
+    gene_profile.full_profile_cmp = full_profile_cmp
+    gene_profile.ref_state = ref_state
     
-    if os.path.exists(input_dir + "/cluster_gene_ref_ids.txt"):
-        cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh)
-        cluster_fh.close()
+    
+    if not bin_profile_cmp in bin_profiles:
+      bin_profiles[bin_profile_cmp] = bin_profile_id
+      bin_profiles_count[bin_profile_id] = 1
+      gene_profile.bin_profile_id = bin_profile_id
+      
+      bin_profile_id += 1
     else:
-        cluster_ids = {} 
-        cluster_ids_rev = {}
+      bin_profile_id_ex = bin_profiles.get(bin_profile_cmp)
+      gene_profile.bin_profile_id = bin_profile_id_ex
+      bin_profiles_count[bin_profile_id_ex] += 1
 
-    input_fn = input_dir + '/gene_profiles.txt'
-    if not os.path.exists(input_fn):
-        exit()
-    input_fh = open(input_fn)
-    gene_profiles = readGeneGainLossProfiles(input_fh, cluster_ids=cluster_ids, cluster_ids_rev=cluster_ids_rev, gene_subset=None, m_type="a")
-    input_fh.close()
-    
-    bin_profiles = {}
-    bin_profiles_det = {}
-    bin_profiles_count = {}
-    bin_profile_id = 0
-    
-    bin_mutations = set([])
-    
-    progress = GWAMARProgress("Gene profiles processed")
-    progress.setJobsCount(len(gene_profiles))
-    
-    for gene_profile in gene_profiles.values():
-        progress.update()
-        
-        ref_state = calcRefStateMutation(gene_profile.full_profile, sc_strains)
-        if ref_state == None: continue
-        
-        bin_profile = calcBinProfileMutation(gene_profile.full_profile, ref_state, gen_bin_profile=True)
-        bin_profile_cmp = compressProfile(bin_profile)
-        full_profile_cmp = compressProfile(gene_profile.full_profile)
-        
-        gene_profile.cmp_profile = bin_profile_cmp
-        gene_profile.full_profile_cmp = full_profile_cmp
-        gene_profile.ref_state = ref_state
-        
-        
-        if not bin_profile_cmp in bin_profiles:
-            bin_profiles[bin_profile_cmp] = bin_profile_id
-            bin_profiles_count[bin_profile_id] = 1
-            gene_profile.bin_profile_id = bin_profile_id
-            
-            bin_profile_id += 1
-        else:
-            bin_profile_id_ex = bin_profiles.get(bin_profile_cmp)
-            gene_profile.bin_profile_id = bin_profile_id_ex
-            bin_profiles_count[bin_profile_id_ex] += 1
+  output_fh = open(inter_dir + '/bin_profiles_G_det.txt', "w")
+  gwamar_muts_io_utils.writeMutationsHeader(output_fh, strains.allStrains(), only_strains=True, sep=" ")
+  for gene_profile in sorted(gene_profiles.values(), key=lambda gp:(gp.gene_id, gp.cluster_id)):
+    if gene_profile.ref_start == -1:
+      text_line = ">" + gene_profile.gene_id + "\t" + gene_profile.cluster_id + "\t" + gene_profile.gene_name + "\n"
+    else:
+      text_line = ">" + gene_profile.gene_id + "\t"
+      text_line += gene_profile.cluster_id + "\t"
+      text_line += gene_profile.gene_name + "\t"
+      text_line += str(gene_profile.ref_start) + "\t"
+      text_line += str(gene_profile.ref_end) + "\t"
+      text_line += str(gene_profile.ref_strand) + "\n"
+    output_fh.write(text_line)
     
-    output_fh = open(inter_dir + '/bin_profiles_G_det.txt', "w")
-    writeMutationsHeader(output_fh, strains.allStrains(), only_strains=True, sep=" ")
-    for gene_profile in sorted(gene_profiles.values(), key=lambda gp:(gp.gene_id, gp.cluster_id)):
-        if gene_profile.ref_start == -1:
-            text_line = ">" + gene_profile.gene_id + "\t" + gene_profile.cluster_id + "\t" + gene_profile.gene_name + "\n"
-        else:
-            text_line = ">" + gene_profile.gene_id + "\t"
-            text_line += gene_profile.cluster_id + "\t"
-            text_line += gene_profile.gene_name + "\t"
-            text_line += str(gene_profile.ref_start) + "\t"
-            text_line += str(gene_profile.ref_end) + "\t"
-            text_line += str(gene_profile.ref_strand) + "\n"
-        output_fh.write(text_line)
-        
-        text_line = "g" +"\t" + str(gene_profile.bin_profile_id) + "\t" + gene_profile.ref_state + "\t" + gene_profile.full_profile_cmp + "\n"
-        output_fh.write(text_line)
-    output_fh.close()
+    text_line = "g" +"\t" + str(gene_profile.bin_profile_id) + "\t" + gene_profile.ref_state + "\t" + gene_profile.full_profile_cmp + "\n"
+    output_fh.write(text_line)
+  output_fh.close()
 
-    output_fh = open(inter_dir + '/bin_profiles_G.txt', "w")
-    for bin_profile_cmp in sorted(bin_profiles):
-        bin_profile_id = bin_profiles[bin_profile_cmp]
-        text_line = str(bin_profile_id) +"\t" + bin_profile_cmp
-        output_fh.write(text_line + "\n")
-    output_fh.close()
+  output_fh = open(inter_dir + '/bin_profiles_G.txt', "w")
+  for bin_profile_cmp in sorted(bin_profiles):
+    bin_profile_id = bin_profiles[bin_profile_cmp]
+    text_line = str(bin_profile_id) +"\t" + bin_profile_cmp
+    output_fh.write(text_line + "\n")
+  output_fh.close()
 
-    output_fh = open(inter_dir + '/bin_profiles_G_count.txt', "w")
-    for bin_profile_id, bin_profile_count in bin_profiles_count.items():
-        output_fh.write(str(bin_profile_id) + "\t" + str(bin_profile_count)+ "\n")
-    output_fh.close()
+  output_fh = open(inter_dir + '/bin_profiles_G_count.txt', "w")
+  for bin_profile_id, bin_profile_count in bin_profiles_count.items():
+    output_fh.write(str(bin_profile_id) + "\t" + str(bin_profile_count)+ "\n")
+  output_fh.close()
 
-    print("p2_convert_profiles_genes.py: Finished.")
-    
\ No newline at end of file
+  print("p2_convert_profiles_genes.py: Finished.")
+  
\ No newline at end of file
diff --git a/src/drsoft/prepare/p3_convert_profiles_muts.py b/src/drsoft/prepare/p3_convert_profiles_muts.py
index a77ce32..e1aab05 100644
--- a/src/drsoft/prepare/p3_convert_profiles_muts.py
+++ b/src/drsoft/prepare/p3_convert_profiles_muts.py
@@ -1,150 +1,141 @@
 import sys
 import os
-import copy
-from multiprocessing import Pool
 import multiprocessing
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_ann_utils import readClusterGeneIDs
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_utils import findScStrains
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-
-if __name__ == '__main__':
-    print("p3_convert_profiles_muts.py: converts mutation profiles. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
-    
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    inter_dir = output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"P/"
-    ensure_dir(inter_dir)
-
-    input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
-    strains_list = strains.allStrains()
-        
-    input_fh = open(inter_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    sc_strains = findScStrains(res_profiles_list)
-
-    print("Strains selected as reference:")
-    for strain_index in sc_strains:
-        print(str(strain_index) + ": " +strains_list[strain_index])
-
-    res_profiles = {}
-    for res_profile in res_profiles_list:
-        res_profiles[res_profile.drug_name] = res_profile
-    
-    if os.path.exists(input_dir + "/cluster_gene_ref_ids.txt"):
-        cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh)
-        cluster_fh.close()
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils,\
+  gwamar_strains_io_utils, gwamar_res_io_utils, gwamar_res_utils,\
+  gwamar_ann_utils, gwamar_muts_io_utils, gwamar_progress_utils,\
+  gwamar_muts_utils
+
+if __name__ == '__main__':
+  print("p3_convert_profiles_muts.py: converts mutation profiles. Start.")
+  gwamar_params_utils.overwriteParameters(sys.argv)
+  parameters = gwamar_params_utils.readParameters()
+  
+  WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
+  
+  input_dir = parameters["DATASET_INPUT_DIR"]
+  inter_dir = output_dir = parameters["DATASET_DIR"] + "/"+parameters["EP"]+"P/"
+  gwamar_utils.ensure_dir(inter_dir)
+
+  input_fh = open(input_dir + "/strains_ordered.txt")
+  strains = gwamar_strains_io_utils.readStrains(input_fh)
+  input_fh.close()
+
+  strains_list = strains.allStrains()
+      
+  input_fh = open(inter_dir + "/res_profiles.txt")
+  res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
+  input_fh.close()
+  
+  sc_strains = gwamar_res_utils.findScStrains(res_profiles_list)
+
+  print("Strains selected as reference:")
+  for strain_index in sc_strains:
+    print(str(strain_index) + ": " +strains_list[strain_index])
+
+  res_profiles = {}
+  for res_profile in res_profiles_list:
+    res_profiles[res_profile.drug_name] = res_profile
+  
+  if os.path.exists(input_dir + "/cluster_gene_ref_ids.txt"):
+    cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
+    cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh)
+    cluster_fh.close()
+  else:
+    cluster_ids = {} 
+    cluster_ids_rev = {}
+
+  input_fh = open(input_dir + '/point_mutations.txt')
+  gene_profiles = gwamar_muts_io_utils.readPointMutations(input_fh, cluster_ids=cluster_ids, cluster_ids_rev=cluster_ids_rev, gene_subset=None, strains_list=strains_list, m_type="a")
+  input_fh.close()
+  
+  bin_profiles = {}
+  bin_profiles_count = {}
+  bin_profile_id = 0
+  
+  bin_mutations = set([])
+  
+  progress = gwamar_progress_utils.GWAMARProgress("Point mutations processed")
+  progress.setJobsCount(len(gene_profiles))
+
+  total_count = 0
+          
+  for gene_profile in gene_profiles.values():
+    progress.update()
+ 
+    for mutation in gene_profile.mutations.values():
+
+      ref_state = gwamar_muts_utils.calcRefStateMutation(mutation.full_profile, sc_strains)
+      if ref_state == None: continue
+      
+      total_count +=1
+
+      bin_profile = gwamar_muts_utils.calcBinProfileMutation(mutation.full_profile, ref_state, gen_bin_profile=True)
+      bin_profile_cmp = gwamar_muts_utils.compressProfile(bin_profile)
+      mutation.ref_state = ref_state
+      
+      if not bin_profile_cmp in bin_profiles:
+        bin_profiles[bin_profile_cmp] = bin_profile_id   
+        bin_profiles_count[bin_profile_id] = 1   
+        mutation.bin_profile_id = str(bin_profile_id)    
+        bin_profile_id += 1
+      else:
+        bin_profile_id_ex = bin_profiles[bin_profile_cmp]
+        mutation.bin_profile_id = str(bin_profile_id_ex)
+        bin_profiles_count[bin_profile_id_ex] += 1
+
+
+  print("mutation profiles count: ", total_count)
+  print("bin profiles count: ", len(bin_profiles))
+
+  output_fh = open(inter_dir + '/bin_profiles_P.txt', "w")
+  for bin_profile_cmp in sorted(bin_profiles):
+    bin_profile_id = bin_profiles[bin_profile_cmp]  
+    tl = str(bin_profile_id) +"\t" + bin_profile_cmp
+    if bin_profile_cmp.endswith(" "): continue
+    output_fh.write(tl + "\n")
+  output_fh.close()
+
+  output_fh = open(inter_dir + '/bin_profiles_P_count.txt', "w")
+  for bin_profile_id, bin_profile_count in bin_profiles_count.items():
+    output_fh.write(str(bin_profile_id) + "\t" + str(bin_profile_count)+ "\n")
+  output_fh.close()
+
+  output_fh = open(inter_dir + '/bin_profiles_P_det.txt', "w")
+  gwamar_muts_io_utils.writeMutationsHeader(output_fh, strains.allStrains(), only_strains=True, sep=" ")
+  for gene_profile in sorted(gene_profiles.values(), key=lambda gp:(gp.gene_id, gp.cluster_id)):
+    if gene_profile.ref_start == -1:
+      tl = ">" + gene_profile.gene_id + "\t" + gene_profile.cluster_id + "\t" + gene_profile.gene_name + "\n"
     else:
-        cluster_ids = {} 
-        cluster_ids_rev = {}
-
-    input_fh = open(input_dir + '/point_mutations.txt')
-    gene_profiles = readPointMutations(input_fh, cluster_ids=cluster_ids, cluster_ids_rev=cluster_ids_rev, gene_subset=None, strains_list=strains_list, m_type="a")
-    input_fh.close()
-    
-    bin_profiles = {}
-    bin_profiles_count = {}
-    bin_profile_id = 0
+      tl = ">" + gene_profile.gene_id + "\t"
+      tl += gene_profile.cluster_id + "\t"
+      tl += gene_profile.gene_name + "\t"
+      tl += str(gene_profile.ref_start) + "\t"
+      tl += str(gene_profile.ref_end) + "\t"
+      tl += str(gene_profile.ref_strand) + "\n"
+    output_fh.write(tl)
     
-    bin_mutations = set([])
-    
-    progress = GWAMARProgress("Point mutations processed")
-    progress.setJobsCount(len(gene_profiles))
-
-    total_count = 0
-            
-    for gene_profile in gene_profiles.values():
-        progress.update()
-
-   #     if gene_profile.gene_id.startswith("SARr"):
-   #         print(gene_profile.gene_id, len(gene_profile.mutations))
-        
-        for mutation in gene_profile.mutations.values():
+    if len(gene_profile.mutations) > 0:
+      for position in sorted(gene_profile.mutations):
+        mutation = gene_profile.mutations[position]
+        ref_state = mutation.ref_state
 
-            ref_state = calcRefStateMutation(mutation.full_profile, sc_strains)
-            if ref_state == None: continue
+        full_profile = mutation.full_profile
             
-            total_count +=1
-
-            bin_profile = calcBinProfileMutation(mutation.full_profile, ref_state, gen_bin_profile=True)
-            bin_profile_cmp = compressProfile(bin_profile)
-            mutation.ref_state = ref_state
-            
-            if not bin_profile_cmp in bin_profiles:
-                bin_profiles[bin_profile_cmp] = bin_profile_id   
-                bin_profiles_count[bin_profile_id] = 1   
-                mutation.bin_profile_id = str(bin_profile_id)    
-                bin_profile_id += 1
-            else:
-                bin_profile_id_ex = bin_profiles[bin_profile_cmp]
-                mutation.bin_profile_id = str(bin_profile_id_ex)
-                bin_profiles_count[bin_profile_id_ex] += 1
-
-
-    print("mutation profiles count: ", total_count)
-    print("bin profiles count: ", len(bin_profiles))
-
-    output_fh = open(inter_dir + '/bin_profiles_P.txt', "w")
-    for bin_profile_cmp in sorted(bin_profiles):
-        bin_profile_id = bin_profiles[bin_profile_cmp]
-        tl = str(bin_profile_id) +"\t" + bin_profile_cmp
-        if bin_profile_cmp.endswith(" "): continue
-        output_fh.write(tl + "\n")
-    output_fh.close()
-
-    output_fh = open(inter_dir + '/bin_profiles_P_count.txt', "w")
-    for bin_profile_id, bin_profile_count in bin_profiles_count.items():
-        output_fh.write(str(bin_profile_id) + "\t" + str(bin_profile_count)+ "\n")
-    output_fh.close()
-
-    output_fh = open(inter_dir + '/bin_profiles_P_det.txt', "w")
-    writeMutationsHeader(output_fh, strains.allStrains(), only_strains=True, sep=" ")
-    for gene_profile in sorted(gene_profiles.values(), key=lambda gp:(gp.gene_id, gp.cluster_id)):
-        if gene_profile.ref_start == -1:
-            tl = ">" + gene_profile.gene_id + "\t" + gene_profile.cluster_id + "\t" + gene_profile.gene_name + "\n"
-        else:
-            tl = ">" + gene_profile.gene_id + "\t"
-            tl += gene_profile.cluster_id + "\t"
-            tl += gene_profile.gene_name + "\t"
-            tl += str(gene_profile.ref_start) + "\t"
-            tl += str(gene_profile.ref_end) + "\t"
-            tl += str(gene_profile.ref_strand) + "\n"
+        desc_tl = gwamar_muts_utils.compressProfile(full_profile)
+        if desc_tl.endswith(" "): continue
+
+        tl = str(position) + "\t"
+        tl += str(mutation.m_type) + "\t"
+        tl += str(mutation.bin_profile_id) + "\t"
+        tl += str(mutation.ref_state) + "\t"
+        tl += desc_tl.strip() + "\n"
         output_fh.write(tl)
-        
-        if len(gene_profile.mutations) > 0:
-            for position in sorted(gene_profile.mutations):
-                mutation = gene_profile.mutations[position]
-                ref_state = mutation.ref_state
-
-                full_profile = mutation.full_profile
-                    
-                desc_tl = compressProfile(full_profile)
-                if desc_tl.endswith(" "): continue
-
-                tl = str(position) + "\t"
-                tl += str(mutation.m_type) + "\t"
-                tl += str(mutation.bin_profile_id) + "\t"
-                tl += str(mutation.ref_state) + "\t"
-                tl += desc_tl.strip() + "\n"
-                output_fh.write(tl)
-    output_fh.close()
-
-    print("p3_convert_profiles_muts.py: Finished.")
+
+  output_fh.close()
+
+  print("p3_convert_profiles_muts.py: Finished.")
     
\ No newline at end of file
diff --git a/src/drsoft/prepare/p4_gen_binary_trees.py b/src/drsoft/prepare/p4_gen_binary_trees.py
index 3963c61..cca89c7 100644
--- a/src/drsoft/prepare/p4_gen_binary_trees.py
+++ b/src/drsoft/prepare/p4_gen_binary_trees.py
@@ -1,96 +1,82 @@
 import os
 import sys
-import time
 import random
 import copy
 import shutil
 from collections import deque
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.structs.res_tree import ResTreeNode
-
-def generateBinaryTree(n):
-    bin_tree = ResTreeNode(1, None)
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.structs import res_tree
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_tree_io_utils
+
+def generateBinaryTree(n):
+  bin_tree = res_tree.ResTreeNode(1, None)
+  
+  queue = deque()
+  queue.append(bin_tree)
+  i = 1
+  index = 0
+  
+  while i < n:
+    node = queue.popleft()
     
-    queue = deque()
-    queue.append(bin_tree)
-    i = 1
-    index = 0
+    left = res_tree.ResTreeNode(index, node)
+    right = res_tree.ResTreeNode(index+1, node)
     
-    while i < n:
-        node = queue.popleft()
-        
-        left = ResTreeNode(index, node)
-        right = ResTreeNode(index+1, node)
-        
-        node.children = [left, right]
-        queue.append(left)
-        queue.append(right)
-        i += 1
-        index += 2
-    return bin_tree
+    node.children = [left, right]
+    queue.append(left)
+    queue.append(right)
+    i += 1
+    index += 2
+  return bin_tree
 
 def binarizeTreeRandom(tree):
-    queue = deque()
-    queue.append(tree.root)
+  queue = deque()
+  queue.append(tree.root)
+  
+  while queue:
+    node = queue.popleft()
+    if len(node.children) == 0:
+      pass
+    elif len(node.children) == 2:
+      for child_node in node.children:
+          queue.append(child_node)
+    elif len(node.children) == 1:
+      print("something wrong,1 ")
+    else:
+      n = len(node.children)
+      tree_tmp = generateBinaryTree(n)
     
-    while queue:
-        node = queue.popleft()
-        if len(node.children) == 0:
-            pass
-        elif len(node.children) == 2:
-            for child_node in node.children:
-                queue.append(child_node)
-        elif len(node.children) == 1:
-            print("something wrong,1 ")
-        else:
-            n = len(node.children)
-            tree_tmp = generateBinaryTree(n)
-
-            perm = list(range(n))
-            random.shuffle(perm)
- 
-            node_children = copy.deepcopy(node.children)
-            node.children = tree_tmp.children
-            
-            leaf_nodes = tree_tmp.getLeaves()
-
-            for new_child in node.children:
-                new_child.parent = node
-            
-            for i in range(n):
-                index = perm[i]
-                
-                child_node = node_children[i]
-                leaf_node = leaf_nodes[index]
-                        
-                leaf_node.children = child_node.children
-                leaf_node.node_id = child_node.node_id
-                
-                #print(i, index, child_node.node_id, leaf_node.node)
+      perm = list(range(n))
+      random.shuffle(perm)
+    
+      node_children = copy.deepcopy(node.children)
+      node.children = tree_tmp.children
+      
+      leaf_nodes = tree_tmp.getLeaves()
+    
+      for new_child in node.children:
+        new_child.parent = node
+      
+      for i in range(n):
+        index = perm[i]
+        
+        child_node = node_children[i]
+        leaf_node = leaf_nodes[index]
                 
-                for ch_node in leaf_node.children:
-                    ch_node.parent = leaf_node
-                    
-                queue.append(leaf_node)
-            
-                            
-            #print("before", len(node.children))
-            
-            #print("after", len(node.children))
-            
-
-            
-    return tree
+        leaf_node.children = child_node.children
+        leaf_node.node_id = child_node.node_id
+                     
+        for ch_node in leaf_node.children:
+          ch_node.parent = leaf_node
+        queue.append(leaf_node)
+        
+  return tree
 
 def randomBinaryTrees(tree, strains, k):
     random_trees_txt = ""
-#    trees = readPhyloTrees(input_fh, strains_list)
- #   tree = list(trees)[0]
     flat_tree = tree.flatten(0.00001)
     
     for i in range(k):
@@ -106,8 +92,8 @@ def randomBinaryTrees(tree, strains, k):
 if __name__ == '__main__':
     print("p4_gen_binary_trees: binarizes the given tree (randomly). Start.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     tree_ids=["PHYML", "RAXML", "", "PHYLIP"]
     tree_ids.append(parameters.get("TREE_ID", ""))
@@ -119,7 +105,7 @@ if __name__ == '__main__':
     scores_dir = parameters["RESULTS_SCORES_DIR"]
         
     input_fh = open(input_dir + "strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     strains_list = strains.allStrains()
@@ -130,7 +116,7 @@ if __name__ == '__main__':
         if not os.path.exists(input_fn):
             continue
         input_fh = open(input_fn)
-        tree = readPhyloTrees(input_fh, strains_list)[0]
+        tree = gwamar_tree_io_utils.readPhyloTrees(input_fh, strains_list)[0]
         input_fh.close()
       
         random_trees_txt = randomBinaryTrees(tree, strains, 3)
diff --git a/src/drsoft/prepare/p5_cmp_resistance_profiles.py b/src/drsoft/prepare/p5_cmp_resistance_profiles.py
index f71a6c3..ca1575c 100644
--- a/src/drsoft/prepare/p5_cmp_resistance_profiles.py
+++ b/src/drsoft/prepare/p5_cmp_resistance_profiles.py
@@ -1,22 +1,11 @@
 import sys
 import os
-import copy
-from multiprocessing import Pool
-import multiprocessing
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_ann_utils import *
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_progress_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
+sys.path += [os.path.abspath(os.curdir)]
 
+from src.drsoft.structs import resistance_profile
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils
 
 profile_clusters = {
 "Fluoroquinolones":["Gatifloxacin","Ofloxacin","Moxifloxacin","Levofloxacin","Ciprofloxacin"],
@@ -31,10 +20,8 @@ def combineResistanceProfiles(res_profiles):
     res_profiles_map = {}
     for drp in res_profiles: res_profiles_map[drp.drug_name] = drp
 
- #   print(res_profiles_map.keys())
-    
     for cluster_id in profile_clusters:
-        cluster_drp = ResistanceProfile(cluster_id, count = k)
+        cluster_drp = resistance_profile.ResistanceProfile(cluster_id, count = k)
 
         for drug_name in profile_clusters[cluster_id]:
             drp = res_profiles_map.get(drug_name, None)
@@ -65,64 +52,56 @@ def combineResistanceProfiles(res_profiles):
                 cluster_drp.changeState(i, "I")
             else:
                 cluster_drp.changeState(i, "?")
-#        print(''.join(cluster_drp.full_profile), cluster_drp.drug_name)
         res_profiles_comb.append(cluster_drp)
 
-#    print(combined)
-
-    # for drp in res_profiles_comb:
-    #     drp.computeResSets()
-    #     print(drp.drug_name, len(drp.getKnown()))
-
     for drp in res_profiles:
-   #     if not drp.drug_name in combined:
         res_profiles_comb.append(drp)
     return res_profiles_comb
 
-if __name__ == '__main__':
-    print("p5_cmp_resistance_profiles.py: preparation of resistnce profiles for comparison of different association scores. Start.")
-
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
-    m_type = parameters["MT"]
-    input_dir = parameters["DATASET_INPUT_DIR"]
-    results_dir = parameters["RESULTS_DIR"]
-
-    sel_profiles = parameters["CMP_PROFILES"].split(",")
-
-    input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
-    strains_list = strains.allStrains()
-    k = len(strains_list)
-
-    input_fn = input_dir + "/res_profiles_ret.txt"
-    if not os.path.exists(input_fn):
-        input_fn =  input_dir + "/res_profiles.txt"
-        if not os.path.exists(input_fn):
-            print("File " + input_fn + " does not exist.")
-            sys.exit()
-    output_fn = input_dir + "/res_profiles_cmp.txt"
-    if os.path.exists(output_fn):
-        print("Output file: " + output_fn + " already exist.")
-        print("In order to use them replace manually this file with: ")
-        print(results_dir + "/res_profiles_cmp.txt")
-    else:
-        input_fh = open(input_fn)
-        res_profiles = readResistanceProfiles(input_fh, strains_list=strains.allStrains(), load_int=True)
-        input_fh.close()
-
-        res_profiles_comb = combineResistanceProfiles(res_profiles)
-        
-        output_fh = open(output_fn, "w")
-        saveResistanceProfiles(output_fh, res_profiles_comb, strains_list, compress=True, sel_profiles=sel_profiles)
-        output_fh.close()
-
-        print("Profiles used for comparison of the association scores are generated in the file: ")
-        print(output_fn)
-        print("In order to use them replace manually this file with: ")
-        print(results_dir + "/res_profiles_cmp.txt")
-    
-    print("p5_cmp_resistance_profiles.py. Finished")
+if __name__ == '__main__':
+  print("p5_cmp_resistance_profiles.py: preparation of resistnce profiles for comparison of different association scores. Start.")
+
+  gwamar_params_utils.overwriteParameters(sys.argv)
+  parameters = gwamar_params_utils.readParameters()
+  
+  m_type = parameters["MT"]
+  input_dir = parameters["DATASET_INPUT_DIR"]
+  results_dir = parameters["RESULTS_DIR"]
+
+  sel_profiles = parameters["CMP_PROFILES"].split(",")
+
+  input_fh = open(input_dir + "/strains_ordered.txt")
+  strains = gwamar_strains_io_utils.readStrains(input_fh)
+  input_fh.close()
+  
+  strains_list = strains.allStrains()
+  k = len(strains_list)
+
+  input_fn = input_dir + "/res_profiles_ret.txt"
+  if not os.path.exists(input_fn):
+      input_fn =  input_dir + "/res_profiles.txt"
+      if not os.path.exists(input_fn):
+          print("File " + input_fn + " does not exist.")
+          sys.exit()
+  output_fn = input_dir + "/res_profiles_cmp.txt"
+  if os.path.exists(output_fn):
+      print("Output file: " + output_fn + " already exist.")
+      print("In order to use them replace manually this file with: ")
+      print(results_dir + "/res_profiles_cmp.txt")
+  else:
+      input_fh = open(input_fn)
+      res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, strains_list=strains.allStrains(), load_int=True)
+      input_fh.close()
+
+      res_profiles_comb = combineResistanceProfiles(res_profiles)
+      
+      output_fh = open(output_fn, "w")
+      gwamar_res_io_utils.saveResistanceProfiles(output_fh, res_profiles_comb, strains_list, compress=True, sel_profiles=sel_profiles)
+      output_fh.close()
+
+      print("Profiles used for comparison of the association scores are generated in the file: ")
+      print(output_fn)
+      print("In order to use them replace manually this file with: ")
+      print(results_dir + "/res_profiles_cmp.txt")
+  
+  print("p5_cmp_resistance_profiles.py. Finished")
diff --git a/src/drsoft/scoring/sc1_compute_std_scores.py b/src/drsoft/scoring/sc1_compute_std_scores.py
index d26440e..c6ba210 100644
--- a/src/drsoft/scoring/sc1_compute_std_scores.py
+++ b/src/drsoft/scoring/sc1_compute_std_scores.py
@@ -1,34 +1,21 @@
 import sys
 import os
-import copy
 import multiprocessing
 from multiprocessing import Pool
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_ann_utils import *
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.utils.gwamar_progress_utils import *
-from drsoft.utils.gwamar_scoring_flat_utils import *
-from drsoft.utils.gwamar_scoring_tree_utils import *
-from drsoft.utils.gwamar_scoring import *
-from drsoft.utils.gwamar_utils import ensure_dir
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring, gwamar_utils,\
+  gwamar_res_io_utils, gwamar_progress_utils
 
 def scoreDrug(params):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     drug_name = params["DRUG_NAME"]
     score_full = params["SCORE"]
 
-    bin_profile_scores, rev_sorting = computeScores(score_full, drug_name, parameters)
+    bin_profile_scores, rev_sorting = gwamar_scoring.computeScores(score_full, drug_name, parameters)
 
     if bin_profile_scores == None:
         print("Something has gone wrong: "+ drug_name + " " + score_full)
@@ -42,7 +29,7 @@ def scoreDrug(params):
         tl = "\t".join([str(bin_profile_id), str(bin_profile_score)])
         tls.append(tl)
 
-    ensure_dir(parameters["RESULTS_SCORES_DIR"] + drug_name + "/")
+    gwamar_utils.ensure_dir(parameters["RESULTS_SCORES_DIR"] + drug_name + "/")
 
     output_fh = open(parameters["RESULTS_SCORES_DIR"] + drug_name + "/" + score_full + ".txt", "w") 
     output_fh.write("\n".join(tls))
@@ -53,8 +40,8 @@ def scoreDrug(params):
 if __name__ == '__main__':
     print("sc1_compute_std_scores.py. Computation of scores...")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    parameters = gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -62,9 +49,9 @@ if __name__ == '__main__':
     results_dir = parameters["RESULTS_DIR"]
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     
-    ensure_dir(results_dir)
-    ensure_dir(scores_dir)
-    ensure_dir(parameters["TGH_DIR"])
+    gwamar_utils.ensure_dir(results_dir)
+    gwamar_utils.ensure_dir(scores_dir)
+    gwamar_utils.ensure_dir(parameters["TGH_DIR"])
     
     score_params = parameters["SCORES"].split(",")
     print("Scores to compute: " + " ".join(score_params))
@@ -74,13 +61,13 @@ if __name__ == '__main__':
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
 
     print("Drug resistance profiles: " + ' '.join(drug_names))
     
     for drug_name in drug_names:
-        ensure_dir(scores_dir + drug_name)
+        gwamar_utils.ensure_dir(scores_dir + drug_name)
         for score_param in score_params:
             if parameters["OW"] == "N" and os.path.exists(parameters["RESULTS_SCORES_DIR"] + drug_name + "/" + score_param + ".txt"):
                 continue
@@ -90,7 +77,7 @@ if __name__ == '__main__':
 
     print("Total number of jobs: " + str(len(TASKS)))
 
-    progress = GWAMARProgress("Scores computed")
+    progress = gwamar_progress_utils.GWAMARProgress("Scores computed")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
 
diff --git a/src/drsoft/scoring/sc2_save_std_rankings.py b/src/drsoft/scoring/sc2_save_std_rankings.py
index 0883866..261f71f 100644
--- a/src/drsoft/scoring/sc2_save_std_rankings.py
+++ b/src/drsoft/scoring/sc2_save_std_rankings.py
@@ -1,50 +1,40 @@
 import sys
 import os
-import copy
-import random
 import multiprocessing
 from multiprocessing import Pool
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
+
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring,\
+  gwamar_res_io_utils, gwamar_bin_utils, gwamar_utils,\
+  gwamar_progress_utils
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_scoring import revOrder
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
+sys.path.append("../../")
 
 
 def scoreParamsSet(params):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     score = params["SCORE"]
 
-    rev_order = revOrder(score)
+    rev_order = gwamar_scoring.revOrder(score)
     
-    input_dir = parameters["DATASET_INPUT_DIR"]
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     ranks_dir = parameters["RESULTS_RANKS_DIR"]
     results_dir = parameters["RESULTS_DIR"]
 
-    input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-    
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '_count.txt')
-    bin_profile_count = readBinProfileCounts(input_fh)
+    bin_profile_count = gwamar_bin_utils.readBinProfileCounts(input_fh)
     input_fh.close()
 
     for drug_res_profile in res_profiles_list:
         drug_name = drug_res_profile.drug_name
-        ensure_dir(ranks_dir + drug_name)
+        gwamar_utils.ensure_dir(ranks_dir + drug_name)
         
         input_fn = scores_dir + drug_name + "/" + score + ".txt"
         if not os.path.exists(input_fn) or os.path.getsize(input_fn) < 10:
@@ -52,16 +42,14 @@ def scoreParamsSet(params):
             continue
         
         input_fh = open(input_fn)
-        bin_profiles_sorted = readBinProfilesSorted(input_fh, rev_order)
+        bin_profiles_sorted = gwamar_bin_utils.readBinProfilesSorted(input_fh, rev_order)
         input_fh.close()
         
-        bin_profiles_ranks = computeRankings(bin_profiles_sorted, bin_profile_count)
+        bin_profiles_ranks = gwamar_bin_utils.computeRankings(bin_profiles_sorted, bin_profile_count)
 
         tls = []
-        for bin_profile_id, bin_profile_score in bin_profiles_sorted:
+        for bin_profile_id, _ in bin_profiles_sorted:
             ranks_list = list(bin_profiles_ranks[bin_profile_id])
-            # if drug_name.startswith("Rif") or drug_name.startswith("Eth"):
-            #     print(drug_name, score, bin_profile_id, bin_profile_score, bin_profile_count[bin_profile_id], ranks_list)
 
             tl = "\t".join(map(str, [bin_profile_id] + ranks_list)) + "\n"
             tls.append(tl)
@@ -76,13 +64,13 @@ def scoreParamsSet(params):
 
 if __name__ == '__main__':
     print("sc2_save_std_rankings.py: computation of rankings.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
     ranks_dir = parameters["RESULTS_RANKS_DIR"]
-    ensure_dir(ranks_dir)
+    gwamar_utils.ensure_dir(ranks_dir)
     
     score_params = parameters["SCORES"].split(",")
     
@@ -94,7 +82,7 @@ if __name__ == '__main__':
 
         TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Rankings computed")
+    progress = gwamar_progress_utils.GWAMARProgress("Rankings computed")
     progress.setJobsCount(len(TASKS))
     WORKERS = min(WORKERS, len(TASKS))
 
diff --git a/src/drsoft/scoring/sc3_compute_perm_scores.py b/src/drsoft/scoring/sc3_compute_perm_scores.py
index 4924900..1178aeb 100644
--- a/src/drsoft/scoring/sc3_compute_perm_scores.py
+++ b/src/drsoft/scoring/sc3_compute_perm_scores.py
@@ -1,25 +1,19 @@
 import sys
 import os
-import copy
 from multiprocessing import Pool
 import multiprocessing
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_io_utils import readDrugNames
+sys.path += [os.path.abspath(os.curdir)]
 
+from src.drsoft.utils import gwamar_params_utils, gwamar_res_io_utils,\
+  gwamar_progress_utils
 
 def scoreDrug(params):
     score_full = params["SCORE"]
     drug_name = params["DRUG_NAME"]
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     perm_pvalues_dir = parameters["RESULTS_PERM_PVALUES_DIR"]
@@ -50,8 +44,8 @@ def scoreDrug(params):
 if __name__ == '__main__': 
     print("sc3_compute_perm_scores.py. Permutation scores.")
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -66,7 +60,7 @@ if __name__ == '__main__':
 
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
@@ -77,7 +71,7 @@ if __name__ == '__main__':
 
             TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Scores computed")
+    progress = gwamar_progress_utils.GWAMARProgress("Scores computed")
     progress.setJobsCount(len(TASKS))
 
     WORKERS = min(WORKERS, len(TASKS))
diff --git a/src/drsoft/scoring/sc4_save_perm_rankings.py b/src/drsoft/scoring/sc4_save_perm_rankings.py
index 2685f8e..3bb568c 100644
--- a/src/drsoft/scoring/sc4_save_perm_rankings.py
+++ b/src/drsoft/scoring/sc4_save_perm_rankings.py
@@ -1,67 +1,53 @@
 import sys
 import os
-import copy
-import random
 from multiprocessing import Pool
 import multiprocessing
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_res_io_utils import readResistanceProfiles
-from drsoft.utils.gwamar_scoring import revOrder
+sys.path += [os.path.abspath(os.curdir)]
 
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring,\
+  gwamar_res_io_utils, gwamar_bin_utils, gwamar_utils,\
+  gwamar_progress_utils
 
 def scoreParamsSet(params):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     score = params["SCORE"]
 
-    rev_order = revOrder(score)
+    rev_order = gwamar_scoring.revOrder(score)
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     ranks_dir = parameters["RESULTS_RANKS_DIR"]
     results_dir = parameters["RESULTS_DIR"]
 
-    input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
-
     input_fh = open(results_dir + "/res_profiles.txt")
-    drug_res_profiles = readResistanceProfiles(input_fh, load_int=True)
+    drug_res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '_count.txt')
-    bin_profile_count = readBinProfileCounts(input_fh)
+    bin_profile_count = gwamar_bin_utils.readBinProfileCounts(input_fh)
     input_fh.close()
     
     for drug_res_profile in drug_res_profiles:
         drug_name = drug_res_profile.drug_name
         tls = []
-       # print(bin_profiles_res_rel)
         input_fn = scores_dir + drug_name + "/" + score + ".txt"
         if not os.path.exists(input_fn) or os.path.getsize(input_fn) < 10:
             print("NOT EXIST: ", input_fn)
             continue
         
-        ensure_dir(ranks_dir + drug_name)
+        gwamar_utils.ensure_dir(ranks_dir + drug_name)
                 
         input_fh = open(input_fn)
-        bin_profiles_sorted = readBinProfilesSorted(input_fh, rev_order)
+        bin_profiles_sorted = gwamar_bin_utils.readBinProfilesSorted(input_fh, rev_order)
         input_fh.close()
         
         n = len(bin_profiles_sorted)
-        bin_profiles_ranks = computeRankings(bin_profiles_sorted, bin_profile_count)
+        bin_profiles_ranks = gwamar_bin_utils.computeRankings(bin_profiles_sorted, bin_profile_count)
 
         for i in range(n):
-            bin_profile_id, bin_profile_score = bin_profiles_sorted[i]
+            bin_profile_id, _ = bin_profiles_sorted[i]
             ranks_list = list(bin_profiles_ranks[bin_profile_id])
 
             tl = "\t".join(map(str, [bin_profile_id] + ranks_list)) + "\n"
@@ -77,8 +63,8 @@ def scoreParamsSet(params):
 
 if __name__ == '__main__':
     print("sc4_save_perm_rankings.py. Rankings for the permutation pvalue scores.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -94,7 +80,7 @@ if __name__ == '__main__':
         TASKS.append(TASK.copy())
 
         
-    progress = GWAMARProgress("Rankings computed")
+    progress = gwamar_progress_utils.GWAMARProgress("Rankings computed")
     progress.setJobsCount(len(TASKS))
       
     WORKERS = min(WORKERS, len(TASKS))
diff --git a/src/drsoft/scoring/sc5_compute_norm_scores.py b/src/drsoft/scoring/sc5_compute_norm_scores.py
index f1f0cd1..3be1e4b 100644
--- a/src/drsoft/scoring/sc5_compute_norm_scores.py
+++ b/src/drsoft/scoring/sc5_compute_norm_scores.py
@@ -1,20 +1,12 @@
 import sys
 import os
-import copy
 from multiprocessing import Pool
 import multiprocessing
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_tree_io_utils import readPhyloTrees
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import readStrains
-from drsoft.utils.gwamar_scoring import revOrder
+sys.path += [os.path.abspath(os.curdir)]
 
+from src.drsoft.utils import gwamar_params_utils, gwamar_scoring,\
+  gwamar_res_io_utils, gwamar_bin_utils, gwamar_utils, gwamar_progress_utils
 
 def normalizeBinScores(bin_profiles_sorted):
     n = len(bin_profiles_sorted)
@@ -29,45 +21,35 @@ def normalizeBinScores(bin_profiles_sorted):
     return norm_bin_profiles_sorted
 
 def scoreDrug(params):
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
 
     drug_name = params["DRUG_NAME"]
     score = params["SCORE"]
 
-    input_dir = parameters["DATASET_INPUT_DIR"]
     scores_dir = parameters["RESULTS_SCORES_DIR"]
     ranks_dir = parameters["RESULTS_RANKS_DIR"]
     results_dir = parameters["RESULTS_DIR"]
 
-    rev_order = revOrder(score)
-
-    input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
-    input_fh.close()
+    rev_order = gwamar_scoring.revOrder(score)
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_list = readResistanceProfiles(input_fh, load_int=True)
-    input_fh.close()
-    
-    input_fh = open(results_dir + '/bin_profiles_' + parameters["MT"] + '_count.txt')
-    bin_profile_count = readBinProfileCounts(input_fh)
+    res_profiles_list = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True)
     input_fh.close()
     
     res_profiles = {}
     
     for res_profile in res_profiles_list:
         res_profiles[res_profile.drug_name] = res_profile
-    drug_res_profile = res_profiles[drug_name]
     input_fn = scores_dir + drug_name + "/" + score + ".txt"
     if not os.path.exists(input_fn) or os.path.getsize(input_fn) < 10:
         print("NOT EXIST: ", input_fn)
         return drug_name, score
 
-    ensure_dir(ranks_dir + drug_name)
+    gwamar_utils.ensure_dir(ranks_dir + drug_name)
             
     input_fh = open(input_fn)
-    bin_profiles_sorted = readBinProfilesSorted(input_fh, rev_order)
+    bin_profiles_sorted = gwamar_bin_utils.readBinProfilesSorted(input_fh, rev_order)
     input_fh.close()
     
     norm_bin_profiles_sorted = normalizeBinScores(bin_profiles_sorted)        
@@ -81,8 +63,8 @@ def scoreDrug(params):
     
 if __name__ == '__main__':
     print("sc5_compute_norm_scores.py. Normalization of scores.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     WORKERS = min(int(parameters["W"]), multiprocessing.cpu_count())
     
@@ -96,7 +78,7 @@ if __name__ == '__main__':
     
     input_fn = results_dir + "/res_profiles.txt"
     input_fh = open(input_fn)
-    drug_names = readDrugNames(input_fh)
+    drug_names = gwamar_res_io_utils.readDrugNames(input_fh)
     input_fh.close()
     
     for drug_name in drug_names:
@@ -104,15 +86,13 @@ if __name__ == '__main__':
             score = score_fn[:-4]
             if score.startswith("pv-") or score.startswith("n-"):
                 continue
-         #   output_fn = scores_dir + drug_name + "/n-" + score_fn
-         #   if os.path.exists(output_fn): continue
-            
+           
             TASK["DRUG_NAME"] = drug_name
             TASK["SCORE"] = score
 
             TASKS.append(TASK.copy())
 
-    progress = GWAMARProgress("Scores normalized")
+    progress = gwamar_progress_utils.GWAMARProgress("Scores normalized")
     progress.setJobsCount(len(TASKS))
     
     WORKERS = min(WORKERS, len(TASKS))
diff --git a/src/drsoft/structs/rel_graph.py b/src/drsoft/structs/rel_graph.py
index 86fd078..d52da73 100644
--- a/src/drsoft/structs/rel_graph.py
+++ b/src/drsoft/structs/rel_graph.py
@@ -1,5 +1,3 @@
-from collections import deque
-
 class RelGraphNode:
     def __init__(self, node_id, label=None, ncolor=None, mprofile=None):
         self.node_id = node_id
diff --git a/src/drsoft/structs/res_tree.py b/src/drsoft/structs/res_tree.py
index 0eebfcd..e7883fc 100644
--- a/src/drsoft/structs/res_tree.py
+++ b/src/drsoft/structs/res_tree.py
@@ -346,7 +346,6 @@ class ResTree:
                 n_zero_res += min(n_zeros[i], n_ones[i])
                 n_one_res += min(n_zeros[i], n_ones[i])
             
-            #print node.node_id, n_zero_res, n_one_res
             node.n_zero = n_zero_res
             node.n_one = n_one_res
             return n_zero_res, n_one_res
diff --git a/src/drsoft/utils/gwamar_ann_utils.py b/src/drsoft/utils/gwamar_ann_utils.py
index 76b1d2f..25aab2d 100644
--- a/src/drsoft/utils/gwamar_ann_utils.py
+++ b/src/drsoft/utils/gwamar_ann_utils.py
@@ -6,7 +6,6 @@ def readRefAnns(input_fh):
         if line.startswith("#"):
             continue
         tokens = line.split("\t")
-        cluster_id = tokens[0]
         mg_tokens = tokens[1].split()
         gene_id = tokens[2]
         
@@ -16,8 +15,7 @@ def readRefAnns(input_fh):
         len_tokens = tokens[3].split()
         end = int(mg_tokens[0])
         strand = mg_tokens[1]
-        strain_id = mg_tokens[2]
-        
+       
         length = 0
         
         for len_token in len_tokens:
diff --git a/src/drsoft/utils/gwamar_bin_utils.py b/src/drsoft/utils/gwamar_bin_utils.py
index d13586b..7af53be 100644
--- a/src/drsoft/utils/gwamar_bin_utils.py
+++ b/src/drsoft/utils/gwamar_bin_utils.py
@@ -1,8 +1,7 @@
-import sys
-from drsoft.structs.gene_profile import GeneProfile
-from drsoft.structs.mutation_profile import MutationProfile
-from drsoft.utils.gwamar_muts_io_utils import decompressProfile, simpleGeneName
-from drsoft.utils.gwamar_muts_utils import calcMutStatesMutation
+from src.drsoft.structs.gene_profile import GeneProfile
+from src.drsoft.structs.mutation_profile import MutationProfile
+from src.drsoft.utils.gwamar_muts_io_utils import decompressProfile, simpleGeneName
+from src.drsoft.utils.gwamar_muts_utils import calcMutStatesMutation
 
 def getMutated(bin_profile):
     ret = set([])
@@ -75,7 +74,6 @@ def readBinProfileDetailsPoints(lines, n, out_format="txt", ref_counts=False, mu
         tokens = line.split("\t")
         if len(tokens) < 2: continue
         position = int(tokens[0])
-        m_type = tokens[1]
         bin_profile_id = tokens[2]
         ref_state = tokens[3]
 
@@ -104,8 +102,6 @@ def readBinProfileDetailsPoints(lines, n, out_format="txt", ref_counts=False, mu
 
 def readBinProfileDetailsGenes(lines, n, out_format="txt", ref_counts=False, mut_counts=True):
     bin_profile_details = {}
-    line0 = lines[0]
-    strains_list = line0.split()
     
     gene_id = ""
     cluster_id = ""
diff --git a/src/drsoft/utils/gwamar_comp_utils.py b/src/drsoft/utils/gwamar_comp_utils.py
index e1c8bef..e2b65c0 100644
--- a/src/drsoft/utils/gwamar_comp_utils.py
+++ b/src/drsoft/utils/gwamar_comp_utils.py
@@ -45,7 +45,6 @@ def getRRDRmuts(lines):
         tokens = line.split("\t")
         bin_profile = tokens[0]
         mut_descs = tokens[-1]
-        mut_set = getBinSet(bin_profile)
         for mut_desc in mut_descs.split(";"):
             if isMutInRRDR(mut_desc):
                 rdr_muts.append((mut_desc, bin_profile))
@@ -76,7 +75,6 @@ def selectPutativeComp(input_fh, drug_name="Rifampicin", inc_prom=False, only_co
     dr_profile = line0.strip().split("\t")[0]
 
     dr_set = getResSet(dr_profile, inc_q=False)
-    dr_set_q = getResSet(dr_profile, inc_q=True)
 
     if drug_name == "Rifampicin":
         rdr_muts = getRRDRmuts(lines)
@@ -92,13 +90,9 @@ def selectPutativeComp(input_fh, drug_name="Rifampicin", inc_prom=False, only_co
         tokens = line.split("\t")
         bin_profile = tokens[0]
         mut_descs = tokens[-1]
-     #   print("aaa", mut_descs)
         mut_set = getBinSet(bin_profile)
         if len(mut_set & dr_set) == 0:
             continue
-        # if mut_descs.count("rpoA")>0:
-        #     print(mut_set, rdr_sets)
-        #     print("aaa", mut_descs, len(mut_set), len(rdr_sets))
         if not isSubset(mut_set, rdr_sets):
             continue
 
diff --git a/src/drsoft/utils/gwamar_generator_utils.py b/src/drsoft/utils/gwamar_generator_utils.py
index ee4c7c5..948e79e 100644
--- a/src/drsoft/utils/gwamar_generator_utils.py
+++ b/src/drsoft/utils/gwamar_generator_utils.py
@@ -1,7 +1,5 @@
 #include <stdio.h>
-import copy
 import itertools as it
-import timeit
 import traceback
 
 def generateResistanceProfiles(k):
@@ -81,20 +79,3 @@ def generateSumProfiles2(k, s, lb=None, ub=None):
         traceback.print_exc()
         print("generateSumProfiles2 error: ", k, s, lb, ub, ub[::-1])
         return []
-
-# import __builtin__
-# __builtin__.__dict__.update(locals())
-
-# print(generateResBinMutationProfiles(3))
-# print(generateResBinMutationProfiles2(3))
-
-#t = timeit.timeit('"-".join(map(str, range(100)))', number=100)
-#print(t)
-# k=2
-# t1 = timeit.timeit('generateResBinMutationProfiles(6)', number=k)#
-# print(t1)
-# t2 = timeit.timeit('generateResBinMutationProfiles2(6)', number=k)#
-# print(t2)
-
-# res  = generateSumProfiles2(4,10,[0,0,0,0], [3,3,2,3])
-# print(res)
diff --git a/src/drsoft/utils/gwamar_muts_io_utils.py b/src/drsoft/utils/gwamar_muts_io_utils.py
index 60a08ec..7f24674 100644
--- a/src/drsoft/utils/gwamar_muts_io_utils.py
+++ b/src/drsoft/utils/gwamar_muts_io_utils.py
@@ -1,7 +1,7 @@
-from drsoft.utils.gwamar_muts_utils import compressProfile, decompressProfile,convertFullProfile
-from drsoft.structs.gene_profile import GeneProfile
-from drsoft.structs.mutation_profile import MutationProfile
-from drsoft.utils.gwamar_strains_io_utils import strainAureusNames,\
+from src.drsoft.utils.gwamar_muts_utils import compressProfile, decompressProfile,convertFullProfile
+from src.drsoft.structs.gene_profile import GeneProfile
+from src.drsoft.structs.mutation_profile import MutationProfile
+from src.drsoft.utils.gwamar_strains_io_utils import strainAureusNames,\
     strainsMapRev
 
 def writeMutationsHeader(output_fh, strains_subset = None, only_strains = False, sep="\t"):
diff --git a/src/drsoft/utils/gwamar_muts_utils.py b/src/drsoft/utils/gwamar_muts_utils.py
index 263b990..6c239bf 100644
--- a/src/drsoft/utils/gwamar_muts_utils.py
+++ b/src/drsoft/utils/gwamar_muts_utils.py
@@ -1,4 +1,3 @@
-import timeit
 import re
 
 def profileSubset(full_profile, subset):
@@ -101,7 +100,6 @@ def subsets(my_set):
 def calcMutStatesMutation(m_profile, ref_state, n, non_mut_states="?-", ref_counts=False, mut_counts=True):
     state_pos = {}
     state_counts = {}
-    mut_states = []
     if m_profile[1] == " ":
         tokens = m_profile.split()
 
diff --git a/src/drsoft/utils/gwamar_params_utils.py b/src/drsoft/utils/gwamar_params_utils.py
index 1daf302..fcd0de3 100644
--- a/src/drsoft/utils/gwamar_params_utils.py
+++ b/src/drsoft/utils/gwamar_params_utils.py
@@ -1,6 +1,5 @@
 import sys
 import os
-import platform
 
 #sys.path.append("../../")
 
@@ -54,7 +53,6 @@ def getGWAMARPath(run_path, cmd_path):
     full_path = os.path.abspath(os.path.join(run_path, cmd_path))
     gwamar_path = os.path.dirname(full_path)
 
-    last_dir = os.path.split(gwamar_path)
     while len(gwamar_path) > 1:
         path_tokens = os.path.split(gwamar_path)
         if path_tokens[1] == "gwamar":
@@ -101,10 +99,14 @@ def overwriteParameters(sys_argv):
     return parameters_map
 
 
-def readParameters():
+def readParameters(inc_tools = False):
     global parameters_map;
     config_dir = parameters_map["GWAMAR_PATH"] + "/config/";
 
-    parameters_map = readParametersFromFile(config_dir+"config_params.txt", parameters_map)
+    parameters_map = readParametersFromFile(config_dir + "config_params.txt", 
+                                            parameters_map)
+    if inc_tools:
+      parameters_map = readParametersFromFile(config_dir + "config_tools.txt", 
+                                              parameters_map)
+    
     return parameters_map
-
diff --git a/src/drsoft/utils/gwamar_pws.py b/src/drsoft/utils/gwamar_pws.py
index 5f6ef52..1e82c97 100644
--- a/src/drsoft/utils/gwamar_pws.py
+++ b/src/drsoft/utils/gwamar_pws.py
@@ -1,11 +1,6 @@
-import math
-import sys
 import time
 
-from drsoft.utils.gwamar_generator_utils import *
-from drsoft.utils.gwamar_stat_utils import *
-
-start_time = time.time()
+from src.drsoft.utils import gwamar_stat_utils
 
 def g(n, s, lb=None, ub=None):
     if n == 0:
@@ -72,7 +67,7 @@ def wsupportTestMap(w_map, debug=False):
             count = 1
             for i in range(k):
                 ws += comb[i]*weights[i]
-                count *= binom(counts[i], comb[i])
+                count *= gwamar_stat_utils.binom(counts[i], comb[i])
             if not ws in ret[n]:
                 ret[n][ws] = 0
             ret[n][ws] += count
diff --git a/src/drsoft/utils/gwamar_res_io_utils.py b/src/drsoft/utils/gwamar_res_io_utils.py
index 4a2a424..abb3755 100644
--- a/src/drsoft/utils/gwamar_res_io_utils.py
+++ b/src/drsoft/utils/gwamar_res_io_utils.py
@@ -1,7 +1,7 @@
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.utils.gwamar_muts_utils import compressProfile, decompressProfile,convertFullProfile
-from drsoft.utils.gwamar_muts_io_utils import writeMutationsHeader
-from drsoft.utils.gwamar_strains_io_utils import strainAureusNames,\
+from src.drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils.gwamar_muts_utils import compressProfile, decompressProfile,convertFullProfile
+from src.drsoft.utils.gwamar_muts_io_utils import writeMutationsHeader
+from src.drsoft.utils.gwamar_strains_io_utils import strainAureusNames,\
     strainsMapRev
 
 def saveResistanceProfiles(output_fh, res_profiles_list, strains_list, compress=False, header=True, sel_profiles=None):
@@ -78,74 +78,11 @@ def readResistanceProfiles(input_fh, strains_list = None, load_int = False, as_m
 
         full_profile_tmp = decompressProfile(cmp_profile, n)
         full_profile = convertFullProfile(full_profile_tmp, strain_ids, strains_map_rev)
-       # print(len(full_profile_tmp), len(full_profile))
         res_profile = ResistanceProfile(drug_name, len(full_profile))
         res_profile.full_profile = full_profile
         res_profile.computeResSets()
         res_profiles_list.append(res_profile)
-    # else:
-    #     n = len(strains_list)
-    #     strains_map_rev = strainsMapRev(strains_list)
-    #     for line in lines:
-    #         line = line.strip()
-    #         if line.startswith("#"): continue
-    #         if len(line) < 2: continue
-    
-    #         tokens = line.split("\t")
-    #         if len(tokens) < 3: continue
-            
-
-    #         drug_name = tokens[0]
-    #         res_strains_tmp = tokens[1].split(";")
-    #         sc_strains_tmp = tokens[2].split(";")
-            
-    #         if len(tokens) == 4 and load_int: int_strain_tmp = tokens[3].split(";")
-    #         else: int_strain_tmp = []
-            
-    #         res_strains = set([])
-    #         sc_strains = set([])
-    #         int_strains = set([])
-    #         pred_strains = set([])
-            
-    #         for strain_id in res_strains_tmp:
-    #             if len(strain_id) < 1: continue
-    #             if strain_id.startswith("*"): strain_id = strain_id[1:]
-    #             strain_id = strainAureusNames(strain_id)
 
-    #             res_strains.add(strain_id)
-    #         for strain_id in sc_strains_tmp:
-    #             if len(strain_id) < 1: continue
-    #             if strain_id.startswith("*"): strain_id = strain_id[1:]
-    #             strain_id = strainAureusNames(strain_id)
-                
-    #             sc_strains.add(strain_id)
-    #         for strain_id in int_strain_tmp:
-    #             if len(strain_id) < 1: continue
-    #             if strain_id.startswith("*"): strain_id = strain_id[1:]
-    #             strain_id = strainAureusNames(strain_id)
-                
-    #             int_strains.add(strain_id)
-                
-    #         res_profile = ResistanceProfile(drug_name, n)
-            
-    
-    #         for strain_id in strains_list:
-    #             strain_index = strains_map_rev[strain_id]
-    #             if strain_id in sc_strains:
-    #                 res_profile.changeState(strain_index, "S")
-    #             elif strain_id in res_strains:
-    #                 res_profile.changeState(strain_index, "R")
-    #             elif strain_id in int_strains:
-    #                 res_profile.changeState(strain_index, "I")
-    #             else:
-    #                 res_profile.changeState(strain_index, "?")
-            
-    #         print(''.join(res_profile.full_profile))
-    #         res_profile.computeResSets()
-            
-    #         res_profile.drug_name = drug_name
-    #         res_profile.pred_strains = pred_strains
-    #         res_profiles_list.append(res_profile)
     if as_map == True:
         res_profiles_map = {}
         
diff --git a/src/drsoft/utils/gwamar_res_utils.py b/src/drsoft/utils/gwamar_res_utils.py
index 88ec079..79dbf89 100644
--- a/src/drsoft/utils/gwamar_res_utils.py
+++ b/src/drsoft/utils/gwamar_res_utils.py
@@ -1,23 +1,19 @@
 def findScStrains(res_profiles_list):
     ret = None
     for drp in res_profiles_list:
-#        print(drp.drug_name, drp.sc_strains_ids, ret)    
         if ret == None: ret = drp.sc_strains_ids
         else: ret &= (drp.sc_strains_ids)
     
     if len(ret) == 0:
         ret1 = None
-        for drp in res_profiles_list:
- #           print(drp.drug_name, drp.sc_strains_ids, ret1)    
+        for drp in res_profiles_list:   
             if ret1 == None: ret1 = drp.sc_strains_ids
             else: ret1 |= (drp.sc_strains_ids)
-  #      print("allowing unknown")
         ret2 = None
         for res_profile in res_profiles_list:
             if ret2 == None:
                 ret2 = res_profile.sc_strains_ids | res_profile.unknown_strains_ids
             else: 
-   #             print(res_profile.drug_name, len(ret2), len(ret2 & ret1), ret2 & ret1)
                 ret2 &= (res_profile.sc_strains_ids | res_profile.unknown_strains_ids)
         return ret2 & ret1
     return ret
diff --git a/src/drsoft/utils/gwamar_scoring.py b/src/drsoft/utils/gwamar_scoring.py
index 5c31798..6cc7bc9 100644
--- a/src/drsoft/utils/gwamar_scoring.py
+++ b/src/drsoft/utils/gwamar_scoring.py
@@ -1,24 +1,10 @@
 import sys
 import os
-import copy
-import multiprocessing
-from multiprocessing import Pool
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_ann_utils import *
-from drsoft.utils.gwamar_muts_utils import *
-from drsoft.utils.gwamar_res_utils import *
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.utils.gwamar_progress_utils import *
-from drsoft.utils.gwamar_scoring_flat_utils import *
-from drsoft.utils.gwamar_scoring_tree_utils import *
-from drsoft.utils.gwamar_utils import ensure_dir
-from drsoft.modelling.tgh import *
-from drsoft.modelling.tgh2 import *
+from src.drsoft.utils import gwamar_tree_io_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils, gwamar_bin_utils, gwamar_scoring_flat_utils,\
+  gwamar_scoring_tree_utils
+from src.drsoft.modelling import tgh
 
 def revOrder(score):
     rev_sorting = -1
@@ -33,7 +19,7 @@ def loadTreesList(strains_list, tree_id, score_full, results_dir):
         input_fn = results_dir + '/tree' + tree_id + '.txt'
 
     input_fh = open(input_fn)
-    trees_list = readPhyloTrees(input_fh, strains_list)
+    trees_list = gwamar_tree_io_utils.readPhyloTrees(input_fh, strains_list)
     input_fh.close()
 
     return trees_list
@@ -44,13 +30,13 @@ def computeScores(score_full, drug_name, parameters):
     ranks_dir = parameters["RESULTS_RANKS_DIR"]
 
     input_fh = open(input_dir + "/strains_ordered.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     strains_list = strains.allStrains()
     
     input_fh = open(results_dir + "/res_profiles.txt")
-    res_profiles_map = readResistanceProfiles(input_fh, load_int=True, as_map = True)
+    res_profiles_map = gwamar_res_io_utils.readResistanceProfiles(input_fh, load_int=True, as_map = True)
     input_fh.close()
     drug_res_profile = res_profiles_map[drug_name]
 
@@ -62,13 +48,13 @@ def computeScores(score_full, drug_name, parameters):
     #print("here", strains.count())
     gen_bin_profile = False
     input_fh = open(input_fn)
-    bin_profiles = readBinProfiles(input_fh, strains.count(), gen_bin_profiles=gen_bin_profile)
+    bin_profiles = gwamar_bin_utils.readBinProfiles(input_fh, strains.count(), gen_bin_profiles=gen_bin_profile)
     input_fh.close()        
         
     rev_sorting = revOrder(score_full)
     if score_full.count("+") > 0:
         subscores = score_full.split("+")
-        bin_profile_scores = calcBinProfilesRanksSumScore(bin_profiles, drug_res_profile.drug_name, ranks_dir, subscores=subscores)
+        bin_profile_scores = gwamar_scoring_flat_utils.calcBinProfilesRanksSumScore(bin_profiles, drug_res_profile.drug_name, ranks_dir, subscores=subscores)
         return bin_profile_scores, rev_sorting
 
     score_tokens = score_full.split("_")
@@ -85,30 +71,22 @@ def computeScores(score_full, drug_name, parameters):
             tree_id = str(score_param[1:])
 
     if score == "mi":
-        bin_profile_scores = calcBinProfilesMI(bin_profiles, drug_res_profile)
+        bin_profile_scores = gwamar_scoring_flat_utils.calcBinProfilesMI(bin_profiles, drug_res_profile)
     elif score == "lh":
-        bin_profile_scores = calcBinProfilesHyperTest(bin_profiles, drug_res_profile)
+        bin_profile_scores = gwamar_scoring_flat_utils.calcBinProfilesHyperTest(bin_profiles, drug_res_profile)
     elif score == "sp":
-        bin_profile_scores = calcBinProfilesSupports(bin_profiles, drug_res_profile, alpha=salpha)
+        bin_profile_scores = gwamar_scoring_flat_utils.calcBinProfilesSupports(bin_profiles, drug_res_profile, alpha=salpha)
     elif score == "or":
-        bin_profile_scores = calcBinProfilesOddsRatio(bin_profiles, drug_res_profile)
+        bin_profile_scores = gwamar_scoring_flat_utils.calcBinProfilesOddsRatio(bin_profiles, drug_res_profile)
     elif score in ["tgh", "r-tgh","r-ntgh","ntgh"]:
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
 
         if score in ["r-ntgh","ntgh"]: norm = True
         else: norm=False
         mem_fn = parameters["TGH_DIR"] + "/"+drug_name+".txt"
-        mem = readTGHMem(mem_fn)
-        bin_profile_scores, mem = calcBinProfilesTGH(bin_profiles, drug_res_profile, trees_list, norm=norm, opt=True, w2=True, mem=mem)
-        saveTGHMem(mem, mem_fn)
-    elif score in ["tgh2", "r-tgh2"]:
-        trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
-        mem_fn = parameters["TGH2_DIR"] + "/"+drug_name+".txt"
-        ensure_dir(parameters["TGH2_DIR"])
-
-        mem = readTGHMem(mem_fn)
-        bin_profile_scores, mem = calcBinProfilesTGH2(bin_profiles, drug_res_profile, trees_list, opt=True, w2=True, mem=mem)
-        saveTGHMem(mem, mem_fn)
+        mem = tgh.readTGHMem(mem_fn)
+        bin_profile_scores, mem = tgh.calcBinProfilesTGH(bin_profiles, drug_res_profile, trees_list, norm=norm, opt=True, w2=True, mem=mem)
+        tgh.saveTGHMem(mem, mem_fn)
 
     elif score in ["mts", "r-mts"]:
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
@@ -121,7 +99,7 @@ def computeScores(score_full, drug_name, parameters):
                 zeta = float(score_param[2:])
             elif score_param.startswith("be"):
                 beta = float(score_param[2:])
-        bin_profile_scores = calcBinProfilesMinTreeScore(bin_profiles, drug_res_profile, trees_list, theta = theta, zeta=zeta, beta=beta, alpha=salpha)
+        bin_profile_scores = gwamar_scoring_tree_utils.calcBinProfilesMinTreeScore(bin_profiles, drug_res_profile, trees_list, theta = theta, zeta=zeta, beta=beta, alpha=salpha)
     elif score in ["ts", "r-ts"]:
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
 
@@ -133,25 +111,22 @@ def computeScores(score_full, drug_name, parameters):
                 zeta = float(score_param[2:])
             elif score_param.startswith("be"):
                 beta = float(score_param[2:])
-        bin_profile_scores = calcBinProfilesTreeScore(bin_profiles, drug_res_profile, trees_list, theta = theta, zeta=zeta, beta=beta, alpha=salpha)
-    elif score == "ts_adj":
-        trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
-        bin_profile_scores = calcBinProfilesTreeScoreAdj(bin_profiles, drug_res_profile, drps_other, trees_list, alpha=salpha)
+        bin_profile_scores = gwamar_scoring_tree_utils.calcBinProfilesTreeScore(bin_profiles, drug_res_profile, trees_list, theta = theta, zeta=zeta, beta=beta, alpha=salpha)
     elif score == "tsp":
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
         r = len(drug_res_profile.getResistant())
         s = len(drug_res_profile.getSusceptible())
         beta = - float(r)/float(s)
-        bin_profile_scores = calcBinProfilesTreeScore(bin_profiles, drug_res_profile, trees_list, beta=beta, alpha=salpha)
+        bin_profile_scores = gwamar_scoring_tree_utils.calcBinProfilesTreeScore(bin_profiles, drug_res_profile, trees_list, beta=beta, alpha=salpha)
     elif score in ["ws", "r-ws"]:
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
-        bin_profile_scores = calcBinProfilesWeightedSupport(bin_profiles, drug_res_profile, trees_list, alpha=salpha, norm=False)
+        bin_profile_scores = gwamar_scoring_tree_utils.calcBinProfilesWeightedSupport(bin_profiles, drug_res_profile, trees_list, alpha=salpha, norm=False)
     elif score in ["pws", "r-pws"]:
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
-        bin_profile_scores = calcBinProfilesWeightedSupportPvalue(bin_profiles, drug_res_profile, trees_list, alpha=salpha, norm=False)
+        bin_profile_scores = gwamar_scoring_tree_utils.calcBinProfilesWeightedSupportPvalue(bin_profiles, drug_res_profile, trees_list, alpha=salpha, norm=False)
     elif score in ["nws", "r-nws"]:
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
-        bin_profile_scores = calcBinProfilesWeightedSupport(bin_profiles, drug_res_profile, trees_list, alpha=salpha, norm=True)
+        bin_profile_scores = gwamar_scoring_tree_utils.calcBinProfilesWeightedSupport(bin_profiles, drug_res_profile, trees_list, alpha=salpha, norm=True)
     elif score in ["sts", "r-sts"]:
         trees_list = loadTreesList(strains_list, tree_id, score_full, results_dir)
         theta, zeta, beta = 0.5, 0.0, -1.0
@@ -177,7 +152,7 @@ def computeScores(score_full, drug_name, parameters):
             elif score_param.startswith("qm"):
                 phi_m = float(score_param[2:])
                 
-        bin_profile_scores = calcBinProfilesTreeScoreStoch(bin_profiles, drug_res_profile, trees_list, 
+        bin_profile_scores = gwamar_scoring_tree_utils.calcBinProfilesTreeScoreStoch(bin_profiles, drug_res_profile, trees_list, 
                                                             eps_m=eps_m, psi_m=psi_m, phi_m=phi_m,  
                                                             eps_r=eps_r, alpha_r=alpha_r, beta_r=beta_r, 
                                                             theta = theta, zeta=zeta, beta=beta, alpha=salpha)
diff --git a/src/drsoft/utils/gwamar_scoring_flat_utils.py b/src/drsoft/utils/gwamar_scoring_flat_utils.py
index 93be055..236d66c 100644
--- a/src/drsoft/utils/gwamar_scoring_flat_utils.py
+++ b/src/drsoft/utils/gwamar_scoring_flat_utils.py
@@ -1,10 +1,8 @@
 import os
 import math
-import time
 
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_stat_utils import hyperTestPvalue
+from src.drsoft.utils.gwamar_stat_utils import hyperTestPvalue
+from src.drsoft.utils import gwamar_bin_utils
 
 def calcBinProfilesHyperTest(bin_profiles, drp):
     scores = {}
@@ -18,8 +16,8 @@ def calcBinProfilesHyperTest(bin_profiles, drp):
         
     for bin_profile_id, gen_bin_profile in bin_profiles.items():
         score = 0.0
-        for bin_profile in specBinProfiles(gen_bin_profile):
-            mutated = getMutated(bin_profile) & info_strains
+        for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
+            mutated = gwamar_bin_utils.getMutated(bin_profile) & info_strains
             n = len(mutated)
             k = len(mutated & resistant)
             
@@ -45,9 +43,9 @@ def calcBinProfilesMI(bin_profiles, drp):
     
     for bin_profile_id, gen_bin_profile in bin_profiles.items():
         score = 0.0
-        for bin_profile in specBinProfiles(gen_bin_profile):
-            mutated = getMutated(bin_profile) & info_strains
-            not_mutated = getNotMutated(bin_profile) & info_strains
+        for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
+            mutated = gwamar_bin_utils.getMutated(bin_profile) & info_strains
+            not_mutated = gwamar_bin_utils.getNotMutated(bin_profile) & info_strains
     
             pr0 = float(len(not_mutated & resistant)) / n
             pr1 = float(len(mutated & resistant)) / n
@@ -85,9 +83,9 @@ def calcBinProfilesSupports(bin_profiles, drp, alpha=0.0):
     
     for bin_profile_id, gen_bin_profile in bin_profiles.items():
         score = 0.0
-        for bin_profile in specBinProfiles(gen_bin_profile):
-            mutated = getMutated(bin_profile)
-            not_mutated = getNotMutated(bin_profile)
+        for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
+            mutated = gwamar_bin_utils.getMutated(bin_profile)
+            not_mutated = gwamar_bin_utils.getNotMutated(bin_profile)
             
             mut_res = float(len(mutated & resistant))
             mut_susc = float(len(not_mutated & susceptible))
@@ -147,9 +145,9 @@ def calcBinProfilesOddsRatio(bin_profiles, drp, alpha=0.0):
     
     for bin_profile_id, gen_bin_profile in bin_profiles.items():
         score = 0.0
-        for bin_profile in specBinProfiles(gen_bin_profile):
-            mutated = getMutated(bin_profile)
-            not_mutated = getNotMutated(bin_profile)
+        for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
+            mutated = gwamar_bin_utils.getMutated(bin_profile)
+            not_mutated = gwamar_bin_utils.getNotMutated(bin_profile)
             
             rm = float(len(resistant & mutated))
             sm = float(len(susceptible & mutated))
diff --git a/src/drsoft/utils/gwamar_scoring_tree_utils.py b/src/drsoft/utils/gwamar_scoring_tree_utils.py
index 5d81b2b..6b4006a 100644
--- a/src/drsoft/utils/gwamar_scoring_tree_utils.py
+++ b/src/drsoft/utils/gwamar_scoring_tree_utils.py
@@ -1,17 +1,12 @@
 import math
-import time
-import sys
-from decimal import Decimal
 
-from drsoft.modelling.treeutils import *
-from drsoft.utils.gwamar_pws import *
-from drsoft.utils.gwamar_progress_utils import GWAMARProgress
-from drsoft.utils.gwamar_bin_utils import *
-from drsoft.utils.gwamar_stat_utils import mean, hyperTestPvalue
+from src.drsoft.utils.gwamar_stat_utils import mean
+from src.drsoft.utils import gwamar_bin_utils, gwamar_pws, gwamar_progress_utils
+from src.drsoft.modelling import model_logic
 
 def calcBinProfilesMinTreeScore(bin_profiles, drp, trees_list, verbose=False, alpha=0.0):
     scores = {}
-    tstable = getstable(0.5, 0.0, -1.0)
+    tstable = model_logic.getstable(0.5, 0.0, -1.0)
 
     if len(drp.getResistant()) == 0:
         return {}    
@@ -20,27 +15,27 @@ def calcBinProfilesMinTreeScore(bin_profiles, drp, trees_list, verbose=False, al
         scores[bin_profile_id] = []
     
     if verbose:
-        progress = gwamarProgress("tscore: " + drp.drug_name)
+        progress = gwamar_progress_utils.GWAMARProgress("tscore: " + drp.drug_name)
         progress.setJobsCount(len(trees_list)*len(bin_profiles))
 
     for tree in trees_list:    
         tree.setObservedResProfile(drp.full_profile)
         tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
+        model_logic.calcSubleavesResCount(tree)
+        model_logic.calcSubnodesCount(tree)
         
-        newtree = removeUnResLeaves(tree)
+        newtree = model_logic.removeUnResLeaves(tree)
         newtree.calcInnerNodesBU()
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
+        model_logic.calcSubleavesResCount(newtree)
+        model_logic.calcSubnodesCount(newtree)
+        model_logic.calcDetParsResModel(newtree)
 
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
             score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
                 newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
+                model_logic.calcSubleavesMutCount(newtree)
+                model_logic.calcDetParsMutModel(newtree)
                 
                 for node in newtree.leaves:
                     node.tscore_tmp = 0.0
@@ -105,30 +100,30 @@ def calcBinProfilesTreeScore(bin_profiles, drp, trees_list, theta = 0.5, zeta=0.
         scores[bin_profile_id] = []
     
     if verbose:
-        progress = gwamarProgress("tscore: " + drp.drug_name)
+        progress = gwamar_progress_utils.GWAMARProgress("tscore: " + drp.drug_name)
         progress.setJobsCount(len(trees_list)*len(bin_profiles))
     for tree in trees_list:
         
         tree.setObservedResProfile(drp.full_profile)
         tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
+        model_logic.calcSubleavesResCount(tree)
+        model_logic.calcSubnodesCount(tree)
         
-        newtree = removeUnResLeaves(tree)
+        newtree = model_logic.removeUnResLeaves(tree)
         newtree.calcInnerNodesBU()
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
-        calcDetParsResModel(newtree)
+        model_logic.calcSubleavesResCount(newtree)
+        model_logic.calcSubnodesCount(newtree)
+        model_logic.calcDetParsResModel(newtree)
         
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
             score = 0.0
 
-            for bin_profile in specBinProfiles(gen_bin_profile):
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
                 newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
-                calcDetParsMutModel(newtree)
+                model_logic.calcSubleavesMutCount(newtree)
+                model_logic.calcDetParsMutModel(newtree)
 
-                score_tmp = calcTransitionScore(newtree, theta, zeta, beta, tscore_type)
+                score_tmp = model_logic.calcTransitionScore(newtree, theta, zeta, beta, tscore_type)
                 score += max(score_tmp, 0.0) + alpha*min(score_tmp, 0.0)
             
             scores[bin_profile_id].append(max(0.0, score))
@@ -155,14 +150,14 @@ def calcBinProfilesWeightedSupport(bin_profiles, drp, trees_list, alpha=0.0, nor
     for tree in trees_list:
         tree.setObservedResProfile(drp.full_profile)
         tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
+        model_logic.calcSubleavesResCount(tree)
+        model_logic.calcSubnodesCount(tree)
         
         resistant = drp.getResistant()
         susceptible = drp.getSusceptible()
         beta = float(len(resistant)/float(len(susceptible)))
         
-        newtree = removeUnResLeaves(tree)
+        newtree = model_logic.removeUnResLeaves(tree)
         newtree.calcInnerNodesBU()
         newtree.calcContributions(drp, beta)
         
@@ -171,8 +166,8 @@ def calcBinProfilesWeightedSupport(bin_profiles, drp, trees_list, alpha=0.0, nor
         
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
             score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                wsupport = newtree.calcWeightedSupport(getMutated(bin_profile))
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
+                wsupport = newtree.calcWeightedSupport(gwamar_bin_utils.getMutated(bin_profile))
                 if norm: wsupport = wsupport / max_ws
                 score += max(wsupport, 0.0) + alpha*min(wsupport, 0.0)
             scores[bin_profile_id].append(max(0.0, score))
@@ -195,8 +190,8 @@ def calcBinProfilesWeightedSupportPvalue(bin_profiles, drp, trees_list, alpha=0.
     for tree in trees_list:
         tree.setObservedResProfile(drp.full_profile)
         tree.calcInnerNodesBU()
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
+        model_logic.calcSubleavesResCount(tree)
+        model_logic.calcSubnodesCount(tree)
         
         resistant = drp.getResistant()
         susceptible = drp.getSusceptible()
@@ -204,7 +199,7 @@ def calcBinProfilesWeightedSupportPvalue(bin_profiles, drp, trees_list, alpha=0.
 
         beta = float(len(resistant)/float(len(susceptible)))
         
-        newtree = removeUnResLeaves(tree)
+        newtree = model_logic.removeUnResLeaves(tree)
         newtree.calcInnerNodesBU()
         newtree.calcContributions(drp, beta)
         
@@ -215,12 +210,12 @@ def calcBinProfilesWeightedSupportPvalue(bin_profiles, drp, trees_list, alpha=0.
                 wmap[leaf.contribution] = 0
             wmap[leaf.contribution] += 1
 
-        res_map = wsupportTestMap(wmap)
+        res_map = gwamar_pws.wsupportTestMap(wmap)
 
         for bin_profile_id, gen_bin_profile in bin_profiles.items():
             score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
-                mutated = getMutated(bin_profile) & known
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
+                mutated = gwamar_bin_utils.getMutated(bin_profile) & known
                 ws = newtree.calcWeightedSupport(mutated)
                 n = len(mutated)
                 tc = 0.0
@@ -250,7 +245,7 @@ def calcBinProfilesTreeScoreStoch(bin_profiles, drp, tree_list,
         scores[bin_profile_id] = []
 
     if verbose:
-        progress = gwamarProgress("TreeScoreStoch " + drp.drug_name)
+        progress = gwamar_progress_utils.GWAMARProgress("TreeScoreStoch " + drp.drug_name)
         progress.setJobsCount(len(bin_profiles)*len(tree_list))
             
     for tree in tree_list:
@@ -258,26 +253,26 @@ def calcBinProfilesTreeScoreStoch(bin_profiles, drp, tree_list,
         tree.calcInnerNodesBU()
         if prob_profile: 
             tree.setObservedResProbProfile(drp.res_profile_prob_map)
-        calcSubleavesResCount(tree)
-        calcSubnodesCount(tree)
+        model_logic.calcSubleavesResCount(tree)
+        model_logic.calcSubnodesCount(tree)
     
-        newtree = removeUnResLeaves(tree)
+        newtree = model_logic.removeUnResLeaves(tree)
         newtree.calcInnerNodesBU()
-        calulateCompleteResProfile(newtree, eps=eps_r, alpha=alpha_r, beta=beta_r)
+        model_logic.calulateCompleteResProfile(newtree, eps=eps_r, alpha=alpha_r, beta=beta_r)
         
-        calcProbAllLeafResistant(newtree)
-        calcSubleavesResCount(newtree)
-        calcSubnodesCount(newtree)
+        model_logic.calcProbAllLeafResistant(newtree)
+        model_logic.calcSubleavesResCount(newtree)
+        model_logic.calcSubnodesCount(newtree)
         
         for bin_profile_id, gen_bin_profile in bin_profiles.items():        
             score = 0.0
-            for bin_profile in specBinProfiles(gen_bin_profile):
+            for bin_profile in gwamar_bin_utils.specBinProfiles(gen_bin_profile):
                 newtree.setObservedMutProfile(bin_profile)
-                calcSubleavesMutCount(newtree)
+                model_logic.calcSubleavesMutCount(newtree)
 
-                calulateCompleteMutProfile(newtree, eps=eps_m, psi=psi_m, phi=phi_m)
+                model_logic.calulateCompleteMutProfile(newtree, eps=eps_m, psi=psi_m, phi=phi_m)
                 
-                tscore_stoch = calcTransitionScoreExprectedValue(newtree, theta, zeta, beta, tscore_type)
+                tscore_stoch = model_logic.calcTransitionScoreExprectedValue(newtree, theta, zeta, beta, tscore_type)
                 score += max(tscore_stoch, 0.0) + alpha*min(tscore_stoch, 0.0)
 
             scores[bin_profile_id].append(max(0.0, score))
diff --git a/src/drsoft/utils/gwamar_stat_utils.py b/src/drsoft/utils/gwamar_stat_utils.py
index d19fb28..d9dbde1 100644
--- a/src/drsoft/utils/gwamar_stat_utils.py
+++ b/src/drsoft/utils/gwamar_stat_utils.py
@@ -1,4 +1,3 @@
-import time
 import math
 
 def bincoeff1(n, r):
@@ -60,31 +59,12 @@ def hyperTestPvalue2(N,n,m,k,twoends=False):
         res2 = 0.0
         for kt in range(0,min(n+1,m+1,k+1),1):
             c1 = math.log(bincoeff1(m, kt))
-          #  print("1",c1, m, kt)
             c2 = math.log(bincoeff1(N-m, n-kt))
-         #   print("2",c2, N-m, n-kt)
             c3 = math.log(bincoeff1(N ,n))
-        #    print("3",c3, N, n)
             res2 += math.exp(c1 + c2 - c3)
-            #print("t", res1,res2)
-         #   print("t", N,n,m,kt,res1,res2)
-        #print("x", N,n,m,k,res1,res2)
         return min(res1,res2)
     return res1
 
 def hyperTestPvalue(N,n,m,k, twoends=False):
     if N <= 100: hyperTestPvalue1(N,n,m,k,twoends=twoends)
     return hyperTestPvalue2(N,n,m,k,twoends=twoends)
-#
-#t0 = time.time()
-#print(binom(2000,1000))
-#t1 = time.time()
-#print(t1-t0)
-#print(hyperTestPvalue2(1332, 904, 1, 1))
-##print(1, hyperTestPvalue1(1000,100,100,4))
-##print(2, hyperTestPvalue2(1332, 904, 1, 1))
-#t2 = time.time()
-#
-#print(t2-t1)
-#print(binom(1000,500))
-#print(bincoeff1(1000,500))
diff --git a/src/drsoft/utils/gwamar_strains_io_utils.py b/src/drsoft/utils/gwamar_strains_io_utils.py
index 4d19d5b..61c04a0 100644
--- a/src/drsoft/utils/gwamar_strains_io_utils.py
+++ b/src/drsoft/utils/gwamar_strains_io_utils.py
@@ -1,8 +1,4 @@
-from drsoft.structs.strains import Strains
-from drsoft.structs.resistance_profile import ResistanceProfile
-from drsoft.structs.gene_profile import GeneProfile
-from drsoft.structs.mutation_profile import MutationProfile
-from drsoft.utils.gwamar_muts_utils import decompressProfile
+from src.drsoft.structs.strains import Strains
 
 def strainAureusNames(strain_id):
     if strain_id.startswith("aureus_") and strain_id != "aureus_M1015":
diff --git a/src/drsoft/utils/gwamar_tree_io_utils.py b/src/drsoft/utils/gwamar_tree_io_utils.py
index 968ae7c..37fcdea 100644
--- a/src/drsoft/utils/gwamar_tree_io_utils.py
+++ b/src/drsoft/utils/gwamar_tree_io_utils.py
@@ -1,5 +1,5 @@
-from drsoft.structs.res_tree import ResTree, ResTreeNode
-from drsoft.utils.gwamar_strains_io_utils import strainAureusNames
+from src.drsoft.structs import res_tree
+from src.drsoft.utils import gwamar_strains_io_utils
 
 def getTreeStrainList(tree_line):
     tree_line = tree_line.strip().strip(";")
@@ -40,7 +40,7 @@ def readResTreeRec(tree, tree_str, strains_list, strains_map={}, e_len=None, sup
     if last_index == -1:
         tokens = tree_str.split(":")
         strain_name = tokens[0]
-        strain_name = strainAureusNames(strain_name)
+        strain_name = gwamar_strains_io_utils.strainAureusNames(strain_name)
 
         try:
             strain_index = strains_list.index(strain_name)
@@ -49,7 +49,7 @@ def readResTreeRec(tree, tree_str, strains_list, strains_map={}, e_len=None, sup
             print("error", strain_name, tree_str)
             exit()
         strain_label = strains_map.get(strain_name, strain_name)
-        strain_node = ResTreeNode(strain_index)
+        strain_node = res_tree.ResTreeNode(strain_index)
         strain_node.setLabel(strain_label)
 
         if len(tokens) == 2:
@@ -75,7 +75,7 @@ def readResTreeRec(tree, tree_str, strains_list, strains_map={}, e_len=None, sup
         return strain_node
     else:
         node_id = tree.createNodeID("")
-        node = ResTreeNode(node_id)
+        node = res_tree.ResTreeNode(node_id)
         if last_index + 2 < len(tree_str):
             attr_index = tree_str.rfind(":")
             if attr_index > 0:
@@ -90,7 +90,6 @@ def readResTreeRec(tree, tree_str, strains_list, strains_map={}, e_len=None, sup
                     elif e_len == None:
                         try:
                             node.e_len = float(e_attr)
-             #               print(node.e_len)
                         except:
                             pass
                     else:
@@ -116,7 +115,7 @@ def readResTree(tree_text, strains_list=None, strains_map={}, e_len=None, suppor
     if strains_list == None:
         strains_list = getTreeStrainList(tree_text)
      
-    tree = ResTree(len(strains_list)) 
+    tree = res_tree.ResTree(len(strains_list)) 
     root = readResTreeRec(tree, tree_text, strains_list, strains_map, e_len, support=support)
     tree.setRoot(root)
 
diff --git a/src/drsoft/utils/gwamar_utils.py b/src/drsoft/utils/gwamar_utils.py
index 88c1b7b..05bb237 100644
--- a/src/drsoft/utils/gwamar_utils.py
+++ b/src/drsoft/utils/gwamar_utils.py
@@ -1,5 +1,5 @@
 import os
-from drsoft.utils.gwamar_params_utils import parameters_map
+from src.drsoft.utils.gwamar_params_utils import parameters_map
 
 def shift(textid, exp_len):
     ret = textid
diff --git a/other/visR/backup/__init__.py b/src/prebroad/__init__.py
similarity index 100%
copy from other/visR/backup/__init__.py
copy to src/prebroad/__init__.py
diff --git a/other/visR/backup/__init__.py b/src/prebroad/prepare/__init__.py
similarity index 100%
rename from other/visR/backup/__init__.py
rename to src/prebroad/prepare/__init__.py
diff --git a/src/prebroad/prepare/p1_download_files.py b/src/prebroad/prepare/p1_download_files.py
index fbb5830..af02876 100644
--- a/src/prebroad/prepare/p1_download_files.py
+++ b/src/prebroad/prepare/p1_download_files.py
@@ -1,33 +1,26 @@
-import os
 import sys
 import zipfile
 import os.path
-import time
-from StringIO import StringIO
-from multiprocessing import Pool
-import multiprocessing
-try:
-    from urllib.request import urlopen
-except ImportError:
-    from urllib2 import urlopen
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils
 
+try:
+  from urllib.request import urlopen
+except ImportError:
+  from urllib2 import urlopen
 
 if __name__ == '__main__':
 	print("p1_download_files.py. Start.")
 	print("Downloading files...")
-	parameters = overwriteParameters(sys.argv)
-	parameters = readParameters()
-    
+	gwamar_params_utils.overwriteParameters(sys.argv)
+	parameters = gwamar_params_utils.readParameters()
+  
 	input_dir = parameters["PREBROAD_DIR"]
 	input_download_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
-	ensure_dir(input_dir)
-	ensure_dir(input_download_dir)
+	gwamar_utils.ensure_dir(input_dir)
+	gwamar_utils.ensure_dir(input_download_dir)
 
 	www = "http://www.broadinstitute.org/annotation/genome/mtb_drug_resistance.1/assets/GTBDR_120516.snps.zip"
 	output_fn = input_download_dir + "GTBDR_120516.snps.zip"
@@ -43,7 +36,7 @@ if __name__ == '__main__':
 	for name in zfile.namelist():
 		(dirname, filename) = os.path.split(name)
 		fulldir = input_download_dir#+"/"+dirname
-		print "Decompressing " + filename + " on " + fulldir
+		print("Decompressing " + filename + " on " + fulldir)
 		if not os.path.exists(fulldir):
 			os.makedirs(fulldir)
 		zfile.extract(name, fulldir)
diff --git a/src/prebroad/prepare/p2_save_strains.py b/src/prebroad/prepare/p2_save_strains.py
index bc3c118..a5bdd61 100644
--- a/src/prebroad/prepare/p2_save_strains.py
+++ b/src/prebroad/prepare/p2_save_strains.py
@@ -1,25 +1,20 @@
-import os
-import sys
-import filecmp
+import sys,os
 
-sys.path.append("../../")
-
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
+sys.path += [os.path.abspath(os.curdir)]
 
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils
 
 if __name__ == '__main__':
     print("p2_save_strains.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
   
     input_dir = parameters["PREBROAD_DIR"]
     input_download_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
     output_dir = parameters["PREBROAD_OUTPUT_DIR"]
-    ensure_dir(input_dir)
-    ensure_dir(input_download_dir)
-    ensure_dir(output_dir)
+    gwamar_utils.ensure_dir(input_dir)
+    gwamar_utils.ensure_dir(input_download_dir)
+    gwamar_utils.ensure_dir(output_dir)
 
     strain_list = []
     
diff --git a/src/prebroad/prepare/p3_save_resdata.py b/src/prebroad/prepare/p3_save_resdata.py
index c7f3186..06056c4 100644
--- a/src/prebroad/prepare/p3_save_resdata.py
+++ b/src/prebroad/prepare/p3_save_resdata.py
@@ -1,18 +1,12 @@
-import os
-import sys
-import filecmp
+import sys,os
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_res_io_utils, gwamar_params_utils,\
+  gwamar_strains_io_utils
+from src.drsoft.structs import resistance_profile
 
 def readResProfilesFromTable(input_fh):
-    res_profiles_list = []
-
     lines = input_fh.readlines()
     line0 = lines[0]
     tokens = line0.split()
@@ -21,7 +15,7 @@ def readResProfilesFromTable(input_fh):
     res_profiles_map = {}
     for drug_name_tmp in drug_names:
         drug_name = drug_names_map.get(drug_name_tmp, drug_name_tmp)
-        res_profile = ResistanceProfile(drug_name, strains.count())
+        res_profile = resistance_profile.ResistanceProfile(drug_name, strains.count())
         res_profiles_map[drug_name] = res_profile
         
     for line in lines[1:]:
@@ -49,15 +43,15 @@ def readResProfilesFromTable(input_fh):
 
 if __name__ == '__main__':
     print("p3_save_resdata.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     input_dir = parameters["PREBROAD_DIR"]
     input_download_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
     output_dir = parameters["PREBROAD_OUTPUT_DIR"]
 
     input_fh = open(output_dir + "/strains.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     strains_list = strains.allStrains()
@@ -77,7 +71,7 @@ if __name__ == '__main__':
     res_profiles_list = list(res_profiles_map.values())
     
     output_fh = open(output_dir + "/res_profiles_ret.txt", "w")
-    saveResistanceProfiles(output_fh, res_profiles_list, strains_list, compress=True, header=True)
+    gwamar_res_io_utils.saveResistanceProfiles(output_fh, res_profiles_list, strains_list, compress=True, header=True)
     output_fh.close()
 
     print("p3_save_resdata.py. Finished.")
diff --git a/src/prebroad/prepare/p4_combine_resistance_profiles.py b/src/prebroad/prepare/p4_combine_resistance_profiles.py
index dafd6de..55c854c 100644
--- a/src/prebroad/prepare/p4_combine_resistance_profiles.py
+++ b/src/prebroad/prepare/p4_combine_resistance_profiles.py
@@ -1,13 +1,10 @@
-import os
-import sys
+import sys,os
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_res_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_res_io_utils
+from src.drsoft.structs import resistance_profile
 
 profile_clusters = {
 "Fluoroquinolones":["Gatifloxacin","Ofloxacin","Moxifloxacin","Levofloxacin","Ciprofloxacin"],
@@ -17,21 +14,21 @@ profile_clusters = {
 
 if __name__ == '__main__':
     print("p4_combine_resistance_profiles.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     input_dir = parameters["PREBROAD_DIR"]
     output_dir = parameters["PREBROAD_OUTPUT_DIR"]
 
     input_fh = open(output_dir + "/strains.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
     
     strains_list = strains.allStrains()
     k = len(strains_list)
     
     input_fh = open(output_dir + "/res_profiles_ret.txt")
-    res_profiles = readResistanceProfiles(input_fh, strains_list=strains.allStrains(), load_int=True)
+    res_profiles = gwamar_res_io_utils.readResistanceProfiles(input_fh, strains_list=strains.allStrains(), load_int=True)
     input_fh.close()
     
 
@@ -42,7 +39,7 @@ if __name__ == '__main__':
     res_profiles_comb = []
 
     for cluster_id in profile_clusters:
-        cluster_drp = ResistanceProfile(cluster_id, count = k)
+        cluster_drp = resistance_profile.ResistanceProfile(cluster_id, count = k)
 
         for drug_name in profile_clusters[cluster_id]:
             drp = res_profiles_map.get(drug_name, None)
@@ -83,7 +80,7 @@ if __name__ == '__main__':
   #  for drp in 
 
     output_fh = open(output_dir + "/res_profiles.txt", "w")
-    saveResistanceProfiles(output_fh, res_profiles_comb, strains_list, compress=True)
+    gwamar_res_io_utils.saveResistanceProfiles(output_fh, res_profiles_comb, strains_list, compress=True)
     output_fh.close()
 #    
     print("p4_combine_resistance_profiles.py. Finished.")
diff --git a/src/prebroad/prepare/p5_save_point_mutations_aa.py b/src/prebroad/prepare/p5_save_point_mutations_aa.py
index ae36210..70ff35c 100644
--- a/src/prebroad/prepare/p5_save_point_mutations_aa.py
+++ b/src/prebroad/prepare/p5_save_point_mutations_aa.py
@@ -1,29 +1,22 @@
-import sys
-import os
-import copy
-from multiprocessing import Pool
-import multiprocessing
+import sys,os
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_muts_io_utils
 
 if __name__ == '__main__':
     print("p5_save_point_mutations_aa.py. Start.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     input_dir = parameters["PREBROAD_DIR"]
     input_download_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
     output_dir = parameters["PREBROAD_OUTPUT_DIR"]
 
     input_fh = open(output_dir + "/strains.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     gene_anns = {}
@@ -121,7 +114,7 @@ if __name__ == '__main__':
         input_fh.close()
             
     output_fh = open(output_dir + "/point_mutations.txt", "w")
-    savePointMutations(output_fh, mutations_map, gene_names, gene_anns, ref_states, strains_list, compress=True)
+    gwamar_muts_io_utils.savePointMutations(output_fh, mutations_map, gene_names, gene_anns, ref_states, strains_list, compress=True)
     output_fh.close()        
 
     print("p5_save_point_mutations_aa.py. Finished.")
diff --git a/src/prebroad/tree/t0_save_point_mutations_nt.py b/src/prebroad/tree/t0_save_point_mutations_nt.py
index 7048d76..66cb7e6 100644
--- a/src/prebroad/tree/t0_save_point_mutations_nt.py
+++ b/src/prebroad/tree/t0_save_point_mutations_nt.py
@@ -1,35 +1,28 @@
-import sys
-import os
-import copy
-from multiprocessing import Pool
-import multiprocessing
+import sys,os
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_utils, gwamar_muts_io_utils
 
 if __name__ == '__main__':
     print("t0_save_point_mutations_nt.py. Start.")
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     input_dir = parameters["PREBROAD_DIR"]
     input_download_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
     output_dir = parameters["PREBROAD_OUTPUT_DIR"]
 
     input_fh = open(output_dir + "/strains.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     snps_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
     phylo_dir = parameters["PREBROAD_TREE_DIR"]
     
-    ensure_dir(phylo_dir)
+    gwamar_utils.ensure_dir(phylo_dir)
     gene_anns = {}
 
     # input_fh = open(input_dir + "/ref_annotation.txt")
@@ -137,7 +130,7 @@ if __name__ == '__main__':
         input_fh.close()
             
     output_fh = open(phylo_dir + "/point_mutations_nt.txt", "w")
-    savePointMutations(output_fh, mutations_map, gene_names, gene_anns, ref_states, strains_list, compress=True)
+    gwamar_muts_io_utils.savePointMutations(output_fh, mutations_map, gene_names, gene_anns, ref_states, strains_list, compress=True)
     output_fh.close()        
 
     print("t0_save_point_mutations_nt.py. Finished.")
diff --git a/src/prebroad/tree/t1_prepare_alignments.py b/src/prebroad/tree/t1_prepare_alignments.py
index 9902d2e..1fa2aa2 100644
--- a/src/prebroad/tree/t1_prepare_alignments.py
+++ b/src/prebroad/tree/t1_prepare_alignments.py
@@ -1,16 +1,9 @@
-import sys
-import os
-import copy
-from multiprocessing import Pool
-import multiprocessing
+import sys,os
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_params_utils, gwamar_utils, gwamar_ann_utils,\
+  gwamar_strains_io_utils, gwamar_muts_io_utils
 
 def savePHYLIPalignements(alns, output_fh, sorting = None):
     if not "OUTSTRAIN" in alns:
@@ -35,11 +28,11 @@ def savePHYLIPalignements(alns, output_fh, sorting = None):
         for strain_id in strains_ord:
             if i < 50: 
                 if strain_id != "OUTSTRAIN":
-                    combined_lines[strain_id] = shift(strain_id[:10], 10) + " "
+                    combined_lines[strain_id] = gwamar_utils.shift(strain_id[:10], 10) + " "
                 else:
-                    combined_lines[strain_id] = shift("OUTSTRAIN", 10) + " "
+                    combined_lines[strain_id] = gwamar_utils.shift("OUTSTRAIN", 10) + " "
             else:
-                combined_lines[strain_id] = shift(" ", 10) + " "
+                combined_lines[strain_id] = gwamar_utils.shift(" ", 10) + " "
             combined_lines[strain_id] += alns[strain_id][i:min(i+10, aln_len)] + " "
             if i+10 > aln_len:
                 continue
@@ -63,8 +56,8 @@ def savePHYLIPalignements(alns, output_fh, sorting = None):
 if __name__ == '__main__':
     print("t1_prepare_alignments.py. Start.")
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     m_type = parameters["PREBROAD_SUB"]
     input_download_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
@@ -73,18 +66,18 @@ if __name__ == '__main__':
     
     if os.path.exists(input_dir + "/cluster_gene_ref_ids.txt"):
         cluster_fh = open(input_dir + "/cluster_gene_ref_ids.txt")
-        cluster_ids, cluster_ids_rev = readClusterGeneIDs(cluster_fh)
+        cluster_ids, cluster_ids_rev = gwamar_ann_utils.readClusterGeneIDs(cluster_fh)
         cluster_fh.close()
     else:
         cluster_ids = {} 
         cluster_ids_rev = {}
         
     input_fh = open(input_dir + "/strains.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
         
     input_fh = open(phylo_dir + "point_mutations_nt.txt")
-    gene_profiles = readPointMutations(input_fh, cluster_ids, cluster_ids_rev, gene_subset=None, m_type="a")
+    gene_profiles = gwamar_muts_io_utils.readPointMutations(input_fh, cluster_ids, cluster_ids_rev, gene_subset=None, m_type="a")
     input_fh.close()
     
     mutations_seqs = [""]*strains.count()
diff --git a/src/prebroad/tree/t2_compute_subset_tree.py b/src/prebroad/tree/t2_compute_subset_tree.py
index bb8d835..14eabae 100644
--- a/src/prebroad/tree/t2_compute_subset_tree.py
+++ b/src/prebroad/tree/t2_compute_subset_tree.py
@@ -1,25 +1,23 @@
 import sys
 import os
-import copy
 import shutil
-from multiprocessing import Pool
+import platform
 import multiprocessing
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils
 
 def ensure_rem(filename):
     if os.path.exists(filename):
         os.remove(filename)
 
-def ensure_rem(filename):
-    if os.path.exists(filename):
-        os.remove(filename)
+def checkToolPathExists(path):
+  if not os.path.exists(path):
+    print("Indicated path '" + path + "' to external tool does not exist.")
+    print("Make sure your configuration in gwamar/config/config_tools.txt file is correct")
+    print("Exiting.")
+  sys.exit(-1)
 
 def computeTreePHYLIP(phylip_path, phylip_exe, input_fn, output_fn, sufix = "_phylip"):
     abs_phylip_path = phylip_path
@@ -176,18 +174,18 @@ def computeTreePROML(input_fn, outfile_fn, outtree_fn, sufix = ""):
 if __name__ == '__main__':
     print("t2_compute_subset_tree.py. Start.")
 
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
-    
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters(inc_tools = True)
+
     input_download_dir = parameters["PREBROAD_DOWNLOAD_DIR"]
     phylo_dir = parameters["PREBROAD_TREE_DIR"]
     input_dir = parameters["PREBROAD_OUTPUT_DIR"]
     m_type = parameters["PREBROAD_SUB"]
     phylip_path = parameters["PHYLIP_PATH"]
-    tree_soft = parameters.get("TREE_SOFT", "PHYML")
+    tree_soft = parameters.get("DEFAULT_TREE_SOFT", "PHYML")
 
     input_fh = open(input_dir + "/strains.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     strains_ord = sorted(strains.allStrains())
@@ -202,16 +200,19 @@ if __name__ == '__main__':
 
         raxml_path = parameters["RAXML_PATH"]
         raxml_exe = parameters["RAXML_EXE"]
-
+        
+        checkToolPathExists(raxml_exe)
         computeTreeRAXML(raxml_path, raxml_exe, input_fn, raxml_rep=raxml_rep)
         computeConsensusRAXML(raxml_path, raxml_exe, output_fn,raxml_type=raxml_type)
     elif tree_soft.upper() == "PHYML":
         phyml_path = parameters["PHYML_PATH"]
         phyml_exe = parameters["PHYML_EXE"]
+        checkToolPathExists(phyml_exe)
         computeTreePHYML(phyml_path, phyml_exe, input_fn, output_fn)
     elif tree_soft.upper() == "PHYLIP":
         phylip_path = parameters["PHYLIP_PATH"]
         phylip_exe = parameters["PHYLIP_EXE"]
+        checkToolPathExists(phylip_exe)
         computeTreePHYLIP(phylip_path, phylip_exe, input_fn, output_fn)
     else:
         print("Unsupported phylogeny software: " + tree_soft)
diff --git a/src/prebroad/tree/t3_resolve_clusters.py b/src/prebroad/tree/t3_resolve_clusters.py
index 7e9eb91..008a59b 100644
--- a/src/prebroad/tree/t3_resolve_clusters.py
+++ b/src/prebroad/tree/t3_resolve_clusters.py
@@ -1,20 +1,9 @@
-import sys
-import os
-import copy
-import time
-from collections import deque
-from StringIO import StringIO
-from multiprocessing import Pool
-import multiprocessing
+import sys,os
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
-from drsoft.structs.resistance_profile import ResistanceProfile
+from src.drsoft.utils import gwamar_tree_io_utils, gwamar_params_utils
+from src.drsoft.structs import res_tree
 
 thr = 0.000000001
 
@@ -26,7 +15,7 @@ def transformTree(tree, clusters_map):
             leaf_node.node_id = strains_tmp[0]
         else:
             for strain_id in strains_tmp:
-                new_leaf = PhyloTreeNode(strain_id)
+                new_leaf = res_tree.ResTreeNode(strain_id)
                 new_leaf.e_len = 0.00001
                 new_leaf.label = strain_id
                 leaf_node.addChild(new_leaf)
@@ -35,16 +24,14 @@ def transformTree(tree, clusters_map):
 if __name__ == '__main__':
     print("t3_resolve_clusters.py. Start.")
     
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     m_type = parameters["PREBROAD_SUB"]
     phylo_dir = parameters["PREBROAD_TREE_DIR"]
     input_dir = parameters["PREBROAD_OUTPUT_DIR"]
     
-    tree_soft = parameters["TREE_SOFT"]
-
-    print(tree_soft)
+    tree_soft = parameters["DEFAULT_TREE_SOFT"]
 
     cluster_strains = []
     clusters_map = {}
@@ -59,7 +46,7 @@ if __name__ == '__main__':
     output_fn = phylo_dir + 'tree'+tree_soft.upper()+".txt"
     input_fh = open(input_fn)
     output_fh = open(output_fn, "w")
-    trees = readPhyloTrees(input_fh, strains_list=cluster_strains, strains_map = {})
+    trees = gwamar_tree_io_utils.readPhyloTrees(input_fh, strains_list=cluster_strains, strains_map = {})
     tree = trees[0]
     tree = transformTree(tree, clusters_map)
     flat_tree = tree.flatten(thr)
diff --git a/src/prebroad/tree/t4_save_strains_ordered.py b/src/prebroad/tree/t4_save_strains_ordered.py
index 8073124..83b13d3 100644
--- a/src/prebroad/tree/t4_save_strains_ordered.py
+++ b/src/prebroad/tree/t4_save_strains_ordered.py
@@ -1,30 +1,21 @@
 import sys
 import os
-import copy
-import time
-from collections import deque
-from StringIO import StringIO
-from multiprocessing import Pool
-import multiprocessing
 
-sys.path.append("../../")
+sys.path += [os.path.abspath(os.curdir)]
 
-from drsoft.utils.gwamar_params_utils import *
-from drsoft.utils.gwamar_utils import *
-from drsoft.utils.gwamar_muts_io_utils import *
-from drsoft.utils.gwamar_tree_io_utils import *
-from drsoft.utils.gwamar_strains_io_utils import *
+from src.drsoft.utils import gwamar_params_utils, gwamar_strains_io_utils,\
+  gwamar_tree_io_utils
 
 if __name__ == '__main__':
     print("t4_save_strains_ordered.py. Start.")
-    parameters = overwriteParameters(sys.argv)
-    parameters = readParameters()
+    gwamar_params_utils.overwriteParameters(sys.argv)
+    parameters = gwamar_params_utils.readParameters()
     
     phylo_dir = parameters["PREBROAD_TREE_DIR"]
     input_dir = parameters["PREBROAD_OUTPUT_DIR"]
   
     input_fh = open(input_dir + "/strains.txt")
-    strains = readStrains(input_fh)
+    strains = gwamar_strains_io_utils.readStrains(input_fh)
     input_fh.close()
 
     output_fn = input_dir + "strains_ordered.txt"
@@ -39,7 +30,7 @@ if __name__ == '__main__':
         input_fh = open(input_fn)
         tree_line = input_fh.readline()
         input_fh.close()
-        strains_list = getTreeStrainList(tree_line)
+        strains_list = gwamar_tree_io_utils.getTreeStrainList(tree_line)
     else:
         strains_list = strains.allStrains()
 
diff --git a/src/visR/accuracy/auc_simmat.R b/src/visR/accuracy/auc_simmat.R
new file mode 100644
index 0000000..59aaefe
--- /dev/null
+++ b/src/visR/accuracy/auc_simmat.R
@@ -0,0 +1,314 @@
+#install.packages(
+require(graphics); require(grDevices);
+library(vioplot)
+#data_fn = paste(species_id, "_out/r_subset/", drug_name, ".txt", sep = "")
+colors_sorted = c("lightgreen", "lightblue","peachpuff","azure2","red")
+
+library(sm)
+
+my.vioplot <- function(x,...,range=1.5,h=NULL,ylim=NULL,names=NULL, horizontal=FALSE,
+  col="magenta", border="black", lty=1, lwd=1, rectCol="black", colMed="white", pchMed=19, at, add=FALSE, wex=1,
+  drawRect=TRUE)
+{
+    # process multiple datas
+    datas <- list(x,...)
+    n <- length(datas)
+
+    if(missing(at)) at <- 1:n
+
+    # pass 1
+    #
+    # - calculate base range
+    # - estimate density
+    #
+
+    # setup parameters for density estimation
+    upper  <- vector(mode="numeric",length=n)
+    lower  <- vector(mode="numeric",length=n)
+    q1     <- vector(mode="numeric",length=n)
+    q3     <- vector(mode="numeric",length=n)
+    med    <- vector(mode="numeric",length=n)
+    base   <- vector(mode="list",length=n)
+    height <- vector(mode="list",length=n)
+    baserange <- c(Inf,-Inf)
+
+    # global args for sm.density function-call
+    args <- list(display="none")
+
+    if (!(is.null(h)))
+        args <- c(args, h=h)
+
+    for(i in 1:n) {
+        data<-datas[[i]]
+
+        # calculate plot parameters
+        #   1- and 3-quantile, median, IQR, upper- and lower-adjacent
+        data.min <- min(data)
+        data.max <- max(data)
+        q1[i]<-quantile(data,0.25)
+        q3[i]<-quantile(data,0.75)
+        med[i]<-median(data)
+        iqd <- q3[i]-q1[i]
+        upper[i] <- min( q3[i] + range*iqd, data.max )
+        lower[i] <- max( q1[i] - range*iqd, data.min )
+
+        #   strategy:
+        #       xmin = min(lower, data.min))
+        #       ymax = max(upper, data.max))
+        #
+
+        est.xlim <- c( min(lower[i], data.min), max(upper[i], data.max) )
+
+        # estimate density curve
+        smout <- do.call("sm.density", c( list(data, xlim=est.xlim), args ) )
+
+        # calculate stretch factor
+        #
+        #  the plots density heights is defined in range 0.0 ... 0.5
+        #  we scale maximum estimated point to 0.4 per data
+        #
+        hscale <- 0.4/max(smout$estimate) * wex
+
+        # add density curve x,y pair to lists
+        base[[i]]   <- smout$eval.points
+        height[[i]] <- smout$estimate * hscale
+
+        # calculate min,max base ranges
+        t <- range(base[[i]])
+        baserange[1] <- min(baserange[1],t[1])
+        baserange[2] <- max(baserange[2],t[2])
+
+    }
+
+    # pass 2
+    #
+    # - plot graphics
+
+    # setup parameters for plot
+    if(!add){
+      xlim <- if(n==1)
+               at + c(-.5, .5)
+              else
+               range(at) + min(diff(at))/2 * c(-1,1)
+
+      if (is.null(ylim)) {
+         ylim <- baserange
+      }
+    }
+    if (is.null(names)) {
+        label <- 1:n
+    } else {
+        label <- names
+    }
+
+    boxwidth <- 0.05 * wex
+
+    # setup plot
+    if(!add)
+      plot.new()
+    if(!horizontal) {
+      if(!add){
+        plot.window(xlim = xlim, ylim = ylim)
+        axis(2)
+        axis(1,at = at, label=label )
+      }
+
+      box()
+      for(i in 1:n) {
+          # plot left/right density curve
+          polygon( c(at[i]-height[[i]], rev(at[i]+height[[i]])),
+                   c(base[[i]], rev(base[[i]])),
+                   col = col[i %% length(col) + 1], border=border, lty=lty, lwd=lwd)
+
+          if(drawRect){
+            # plot IQR
+            lines( at[c( i, i)], c(lower[i], upper[i]) ,lwd=lwd, lty=lty)
+
+            # plot 50% KI box
+            rect( at[i]-boxwidth/2, q1[i], at[i]+boxwidth/2, q3[i], col=rectCol)
+
+            # plot median point
+            points( at[i], med[i], pch=pchMed, col=colMed )
+         }
+      }
+
+    }
+    else {
+      if(!add){
+        plot.window(xlim = ylim, ylim = xlim)
+        axis(1)
+        axis(2,at = at, label=label )
+      }
+
+      box()
+      for(i in 1:n) {
+          # plot left/right density curve
+          polygon( c(base[[i]], rev(base[[i]])),
+                   c(at[i]-height[[i]], rev(at[i]+height[[i]])),
+                   col = col[i %% length(col) + 1], border=border, lty=lty, lwd=lwd)
+
+          if(drawRect){
+            # plot IQR
+            lines( c(lower[i], upper[i]), at[c(i,i)] ,lwd=lwd, lty=lty)
+
+            # plot 50% KI box
+            rect( q1[i], at[i]-boxwidth/2, q3[i], at[i]+boxwidth/2,  col=rectCol)
+
+            # plot median point
+            points( med[i], at[i], pch=pchMed, col=colMed )
+          }
+      }
+    }
+    invisible (list( upper=upper, lower=lower, median=med, q1=q1, q3=q3))
+}
+
+args <- commandArgs(trailingOnly = TRUE)
+
+if (length(args) >=1) {
+	dataset = args[1]
+} else {
+	#dataset="sau461"
+	#dataset = "mtu173"
+	dataset = "mtu_broad"
+}
+
+if (length(args) >= 2) {
+	mut_type = args[2]
+} else {
+	mut_type = "P"
+}
+
+if (length(args) >= 3) {
+	subset = args[3]
+} else {
+	subset = "sel3"
+}
+
+if (length(args) >= 4) {
+	prefix = args[4]
+} else {
+	if (Sys.info()["sysname"] == "Linux") {
+		prefix = "/home/misias/gwamar/"
+	} else {
+		prefix = "D:/Dropbox/Dropbox/gwamar/"
+	}
+}
+
+if (length(args) >= 5) {
+	scores_arg = args[5]
+} else {
+	scores_arg = "mi,or,lh,ws_yPHYML,r.tgh_yPHYML"
+}
+
+scoreFullName <- function(score) {
+	score_full = score
+	if (score == "mi") {
+		score_full = "mutual information";
+	} else if (score == "or") {
+		score_full = "odds ratio";
+	} else if (score == "lh") {
+		score_full = "hypergeometric";
+	} else if (score %in% c("r-tgh","r.tgh")) {
+		score_full = "TGH"
+	} else if (score == "ws"){
+		score_full = "weighted support"
+	} else if(score == "ws+lh+r-tgh+mi+or") {
+		score_full = "combined"
+	} else if(score == "ts") {
+		score_full = "tree score"
+	} else if (score %in% c("r-tgh_yPHYML","r.tgh_yPHYML")) {
+		score_full = "TGH (PHYML)"
+	} else if (score == "ws_yPHYML") {
+		score_full = "weighted support (PHYML)"
+	} else if (score == "ws_yRAXML") {
+		score_full = "weighted support (RAXML)"
+	} else if (score == "r-tgh_yRAXML") {
+		score_full = "TGH (RAXML)"
+	}
+	return(score_full);
+}
+
+scoreFullNameShort <- function(score) {
+	score_full = score
+	if (score == "mi") {
+		score_full = "MI";
+	} else if (score == "or") {
+		score_full = "OR";
+	} else if (score == "lh") {
+		score_full = "H";
+	} else if (score %in% c("r-tgh","r.tgh")) {
+		score_full = "TGH"
+	} else if (score == "ws"){
+		score_full = "WS"
+	} else if(score == "ws+lh+r-tgh+mi+or") {
+		score_full = "combined"
+	} else if(score == "TS") {
+		score_full = "tree score"
+	} else if (score %in% c("r-tgh_yPHYML","r.tgh_yPHYML")) {
+		score_full = "TGH"
+	} else if (score == "ws_yPHYML") {
+		score_full = "WS"
+	} else if (score == "ws_yRAXML") {
+		score_full = "WS (RAXML)"
+	} else if (score == "r-tgh_yRAXML") {
+		score_full = "TGH (RAXML)"
+	}
+	return(score_full);
+}
+
+
+
+outdir = paste(prefix,"datasets/paper/", sep="")
+dir.create(outdir, showWarnings = FALSE)
+
+output_fn = paste(outdir, "/auc_vio_", subset, ".pdf", sep="")
+
+pdf(output_fn, width=18,height=10)
+par(mfrow=c(1,2), las=2, mar=c(7,6,2,1))
+
+
+for (dataset in c("mtu173", "mtu_broad")) {
+
+  input_fn = paste(prefix, "datasets/", dataset, "/ex", mut_type, "/comparison/stats/", subset, ".txt", sep="")
+  data = read.table(input_fn, header=TRUE, sep="\t")
+
+  input_data_pn = paste(prefix,"datasets/",dataset,"/ex",mut_type,"/comparison/stats/",subset,"/stats_pn.txt", sep="")
+  data_pn = read.table(input_data_pn, header=TRUE, sep="\t")
+  positives = data_pn[,"ps"]
+  negatives = data_pn[,"ns"]
+
+
+  main_txt = paste("AUC barplots; ", dataset, " dataset; positives: ", toString(positives), "; negatives: " , toString(negatives), sep="")
+
+  print(scores_arg)
+  scores_sel = strsplit(scores_arg, "[,]")[[1]]
+  print("scores_sel")
+  print(scores_sel)
+  cnames = colnames(data)
+  print("cnames")
+  print(cnames)
+
+  cnames_int_full = c()
+  cnames_int = c()
+
+  for (cname in scores_sel) {
+    if (cname %in% cnames) {
+      cnames_int = c(cnames_int, cname)
+      cnames_int_full = c(cnames_int_full, scoreFullNameShort(cname))
+    }
+  }
+
+  end_point = 0.5 + 2*length(cnames_int_full)-1 
+	x1 = data[, cnames_int[[1]]]
+	x2 = data[, cnames_int[[2]]]
+	x3 = data[, cnames_int[[3]]]
+	x4 = data[, cnames_int[[4]]]
+	x5 = data[, cnames_int[[5]]]
+
+	my.vioplot(x1,x2,x3,x4,x5,
+		col=colors_sorted,
+		names=cnames_int_full
+			)
+}
+
+dev.off()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/gwamar.git



More information about the debian-med-commit mailing list