Esempio n. 1
0
 def finish(self):
     # Once executed, alignment is converted into relaxed
     # interleaved phylip format.
     alg = SeqGroup(os.path.join(self.jobs[0].jobdir, "alg.fasta"))
     fasta = alg.write(format="fasta")
     phylip = alg.write(format="iphylip_relaxed")
     AlgTask.store_data(self, fasta, phylip)
Esempio n. 2
0
File: uhire.py Progetto: jhcepas/npr
 def finish(self):
     # Once executed, alignment is converted into relaxed
     # interleaved phylip format. 
     final_job = self.jobs[2]
     alg = SeqGroup(os.path.join(final_job.jobdir, "alg.fasta"))
     alg.write(outfile=self.alg_fasta_file, format="fasta")
     alg.write(outfile=self.alg_phylip_file, format="iphylip_relaxed")
     AlgTask.finish(self)
Esempio n. 3
0
 def finish(self):
     # Once executed, alignment is converted into relaxed
     # interleaved phylip format.
     alg_file = os.path.join(self.jobs[0].jobdir, "alg.fasta")
     # ClustalO returns a tricky fasta file
     alg = read_fasta(alg_file, header_delimiter=" ")
     fasta = alg.write(format="fasta")
     phylip = alg.write(format="iphylip_relaxed")
     AlgTask.store_data(self, fasta, phylip)
Esempio n. 4
0
    def __init__(self, nodeid, multiseq_file, seqtype, conf, confname):
        self.confname = confname
        self.conf = conf
        # Initialize task
        AlgTask.__init__(self, nodeid, "alg", "Meta-Alg", 
                         OrderedDict(), self.conf[self.confname])

        self.seqtype = seqtype
        self.multiseq_file = multiseq_file
        self.size = conf["_nodeinfo"][nodeid].get("size", 0)
        self.all_alg_files = None
        self.init()
Esempio n. 5
0
    def finish(self):
        # Once executed, alignment is converted into relaxed
        # interleaved phylip format.
        alg = SeqGroup(os.path.join(self.jobs[0].jobdir, "mcoffee.fasta"))
        fasta = alg.write(format="fasta")
        phylip = alg.write(format="iphylip_relaxed")

        alg_list_string = '\n'.join([pjoin(GLOBALS["input_dir"],
                                           aname) for aname in self.all_alg_files])
        db.add_task_data(self.taskid, DATATYPES.alg_list, alg_list_string)
        
        AlgTask.store_data(self, fasta, phylip)
Esempio n. 6
0
File: mafft.py Progetto: jhcepas/npr
    def __init__(self, nodeid, multiseq_file, seqtype, conf, confname):
        GLOBALS["citator"].add(MAFFT_CITE)
        
        self.confname = confname
        self.conf = conf
        # Initialize task
        AlgTask.__init__(self, nodeid, "alg", "Mafft", 
                      OrderedDict(), self.conf[confname])

        self.seqtype = seqtype
        self.multiseq_file = multiseq_file     
        self.init()
Esempio n. 7
0
    def __init__(self, nodeid, multiseq_file, seqtype, conf, confname):
        GLOBALS["citator"].add(DIALIGN_CITE)

        # fixed options for running this task
        base_args = OrderedDict({"": None})
        # Initialize task
        self.confname = confname
        self.conf = conf
        AlgTask.__init__(self, nodeid, "alg", "DialignTX", base_args, self.conf[self.confname])

        self.seqtype = seqtype
        self.multiseq_file = multiseq_file
        self.init()
Esempio n. 8
0
File: uhire.py Progetto: jhcepas/npr
    def __init__(self, nodeid, multiseq_file, seqtype, conf):
        # Initialize task
        AlgTask.__init__(self, nodeid, "alg", "Usearch-Uhire", 
                      OrderedDict(), conf["uhire"])

        self.conf = conf
        self.seqtype = seqtype
        self.multiseq_file = multiseq_file

        self.init()

        self.alg_fasta_file = os.path.join(self.taskdir, "final_alg.fasta")
        self.alg_phylip_file = os.path.join(self.taskdir, "final_alg.iphylip")
Esempio n. 9
0
 def __init__(self, nodeid, seqtype, all_alg_files, conf, confname, parent_ids):
     GLOBALS["citator"].add(MCOFFEE_CITE)
     base_args = OrderedDict({
             "-output": "fasta",
             })
     # Initialize task
     self.confname = confname
     self.conf = conf
     AlgTask.__init__(self, nodeid, "alg", "Mcoffee", 
                      base_args, self.conf[confname])
     self.all_alg_files = all_alg_files
     self.parent_ids = parent_ids
     self.seqtype = seqtype
     self.init()
Esempio n. 10
0
 def finish(self):
     if self.conf[self.confname]["_alg_trimming"]:
         # If trimming happened after mcoffee, let's save the
         # resulting output
         trim_job = self.jobs[-1]
         alg = SeqGroup(pjoin(trim_job.jobdir, trim_job.alg_fasta_file))
         fasta = alg.write(format="fasta")
         phylip = alg.write(format="iphylip_relaxed")
         AlgTask.store_data(self, fasta, phylip)
     else:
         # If no post trimming, output is just what Mcoffee
         # produced, so we can recycle its data ids.
         mc_task = self.jobs[-1]
         fasta_id = db.get_dataid(mc_task.taskid, DATATYPES.alg_fasta)
         phylip_id = db.get_dataid(mc_task.taskid, DATATYPES.alg_phylip)
         db.register_task_data(self.taskid, DATATYPES.alg_fasta, fasta_id)
         db.register_task_data(self.taskid, DATATYPES.alg_phylip, phylip_id)
Esempio n. 11
0
    def __init__(self, nodeid, multiseq_file, seqtype, conf, confname):
        GLOBALS["citator"].add(MUSCLE_CITE)

        # fixed Muscle options
        base_args = OrderedDict({
                '-in': None,
                '-out': None,
                })
        self.confname = confname
        self.conf = conf
        # Initialize task
        AlgTask.__init__(self, nodeid, "alg", "Muscle", 
                      base_args,  self.conf[confname])

        self.seqtype = seqtype
        self.multiseq_file = multiseq_file
        self.init()
Esempio n. 12
0
    def __init__(self, nodeid, multiseq_file, seqtype, conf, confname):
       
        GLOBALS["citator"].add(CLUSTALO_CITE)
       
        
        base_args = OrderedDict({
                '-i': None,
                '-o': None,
                '--outfmt': "fa",
                })
        self.confname = confname
        self.conf = conf
        # Initialize task
        AlgTask.__init__(self, nodeid, "alg", "Clustal-Omega", 
                      base_args, self.conf[self.confname])


        self.seqtype = seqtype
        self.multiseq_file = multiseq_file
        self.init()
Esempio n. 13
0
 def init_output_info(self):
     self.alg_list_file = "%s.%s" %(self.taskid, DATATYPES.alg_list)
     AlgTask.init_output_info(self)
Esempio n. 14
0
 def finish(self):
     alg = SeqGroup(os.path.join(self.jobs[0].jobdir, "alg.fasta"))
     fasta = alg.write(format="fasta")
     phylip = alg.write(format="iphylip_relaxed")
     AlgTask.store_data(self, fasta, phylip)