Ejemplo n.º 1
0
    def __init__(self, nodeid, alg_fasta_file, alg_phylip_file, conf):
        GLOBALS["citator"].add(JMODELTEST_CITE)
        
        self.conf = conf
        base_args = {
            '-d': alg_fasta_file, 
            }
        args = self.conf["jmodeltest"]
        if args.get("-t", "ML") == "ML":
            task_type = "tree"
        else:
            task_type = "mchooser"
            
        ModelTesterTask.__init__(self, nodeid, task_type, "Jmodeltest",
                                 base_args, self.conf[confname])

        # set app arguments and options
        self.alg_fasta_file = alg_fasta_file
        self.alg_phylip_file = alg_phylip_file
        self.seqtype = "nt"
        self.models = "see jmodeltest params"

        self.init()
        self.best_model_file = os.path.join(self.taskdir, "best_model.txt")
        if task_type == "tree":
            self.tree_file = os.path.join(self.taskdir, "final_tree.nw")
        else:
            self.tree_file = None
Ejemplo n.º 2
0
 def __init__(self, nodeid, alg_fasta_file, alg_phylip_file,
              constrain_tree, conf, confname):
     GLOBALS["citator"].add(PHYML_CITE)
     
     self.alg_phylip_file = alg_phylip_file
     self.alg_fasta_file = alg_fasta_file
     self.confname = confname
     self.conf = conf
     self.lk_mode = conf[confname]["_lk_mode"]
     if self.lk_mode == "raxml":
         phyml_optimization = "n"
     elif self.lk_mode == "phyml":
         phyml_optimization = "lr"
     else:
         raise ValueError("Choose a valid lk_mode value (raxml or phyml)")
     
     base_args = {
         "--datatype": "aa",
         "--input": self.alg_phylip_file,
         "--bootstrap": "0",
         "-o": phyml_optimization,
         "--model": None, # I will iterate over this value when
                          # creating jobs
         "--quiet": ""
         }
     self.models = conf[confname]["_models"]
     task_name = "Prottest-[%s]" %','.join(self.models)
     ModelTesterTask.__init__(self, nodeid, "mchooser", task_name, 
                   base_args, conf[confname])
     
     self.best_model = None
     self.seqtype = "aa"
     self.init()
Ejemplo n.º 3
0
    def __init__(self, nodeid, alg_fasta_file, alg_phylip_file,
                 constrain_tree, conf):
        self.alg_phylip_file = alg_phylip_file
        self.alg_fasta_file = alg_fasta_file
        self.alg_basename = basename(self.alg_phylip_file)
        self.conf = conf
        self.lk_mode = self.conf["prottest"]["_lk_mode"]
        if self.lk_mode == "raxml":
            phyml_optimization = "n"
        elif self.lk_mode == "phyml":
            phyml_optimization = "lr"
        else:
            raise ValueError("Choose a valid lk_mode value (raxml or phyml)")

        base_args = {
            "--datatype": "aa",
            "--input": self.alg_basename,
            "--bootstrap": "0",
            "-o": phyml_optimization,
            "--model": None, # I will iterate over this value when
                             # creating jobs
            "--quiet": ""
            }

        ModelTesterTask.__init__(self, nodeid, "mchooser", "Prottest", 
                      base_args, conf["prottest"])

        self.best_model = None
        self.seqtype = "aa"
        self.models = self.conf["prottest"]["_models"]
        self.init()
        self.post_init()