Example #1
0
@author: smirarab
'''
from sepp.algorithm import AbstractAlgorithm
from sepp.config import options
from sepp.tree import PhylogeneticTree
from sepp.alignment import MutableAlignment, ExtendedAlignment,\
    hamming_distance
from sepp.problem import SeppProblem
from dendropy.datamodel.treemodel import Tree
from sepp.jobs import HMMBuildJob, HMMSearchJob, HMMAlignJob, PplacerJob,\
    MergeJsonJob
from sepp.scheduler import JobPool, Join
from sepp import get_logger
from sepp.math_utils import lcm

_LOG = get_logger(__name__)


def get_placement_job_name(chunk_number):
    return "pplacer_%d" % chunk_number


class JoinSearchJobs(Join):
    '''
    After all search jobs have finished on tips, we need to figure out which
    fragment goes  to which subset and start aligning fragments.
    This join takes care of that step.
    '''
    def __init__(self):
        Join.__init__(self)
Example #2
0
'''
from sepp.config import options
from abc import abstractmethod, ABCMeta
from sepp.scheduler import JobPool
from sepp.filemgr import directory_has_files_with_prefix, get_temp_file
from sepp.alignment import MutableAlignment
from sepp.tree import PhylogeneticTree
import dendropy
from sepp import get_logger
import sys
import os
from sepp.problem import SeppProblem
import time
from sepp.checkpointing import CheckPointManager

_LOG = get_logger(__name__)
    

class AbstractAlgorithm(object):
    '''
    This class provides the interface for an abstract algorithm. All different
    ways of implementing SEPP are considered to be different 'algorithms'.
    
    New algorithms should be implemented by extending AbastractAlgorithm and 
    implementing its abstract methods.    
    '''

    __metaclass__ = ABCMeta
    
    def __init__(self):
        '''