Exemplo n.º 1
0
 def finish(self):
     # Once executed, alignment is converted into relaxed
     # interleaved phylip format. 
     alg = SeqGroup(self.jobs[0].stdout_file)
     fasta = alg.write(format="fasta")
     phylip = alg.write(format="iphylip_relaxed")
     AlgTask.store_data(self, fasta, phylip)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
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)
Exemplo n.º 5
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)
Exemplo n.º 6
0
    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")
Exemplo n.º 7
0
    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()
Exemplo n.º 8
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()
Exemplo n.º 9
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)
Exemplo n.º 10
0
    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")
Exemplo n.º 11
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()
Exemplo n.º 12
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()
Exemplo n.º 13
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)
Exemplo n.º 14
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()
Exemplo n.º 15
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()
Exemplo n.º 16
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()
Exemplo n.º 17
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()
Exemplo n.º 18
0
 def init_output_info(self):
     self.alg_list_file = "%s.%s" %(self.taskid, DATATYPES.alg_list)
     AlgTask.init_output_info(self)
Exemplo n.º 19
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)