Example #1
0
    def setUp(self):
        #chdir('work/')	
        token = environ.get('KB_AUTH_TOKEN', None)
        config_file = environ.get('KB_DEPLOYMENT_CONFIG', None)
        config = {}
        config_p = ConfigParser()
        config_p.read(config_file)
        for nameval in config_p.items('Trimmomatic'):
            config[nameval[0]] = nameval[1]
        #wsURL = config['workspace-url']
        #wsClient = workspaceService(wsURL, token=token)

        self.token=token
        self.cc = Trimmomatic(config)
Example #2
0
def get_config():
    if not get_config_file():
        return None
    retconfig = {}
    config = ConfigParser()
    config.read(get_config_file())
    for nameval in config.items(get_service_name() or 'Trimmomatic'):
        retconfig[nameval[0]] = nameval[1]
    return retconfig


config = get_config()

from Trimmomatic.TrimmomaticImpl import Trimmomatic
impl_Trimmomatic = Trimmomatic(config)


class JSONObjectEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj, set):
            return list(obj)
        if isinstance(obj, frozenset):
            return list(obj)
        if hasattr(obj, 'toJSONable'):
            return obj.toJSONable()
        return json.JSONEncoder.default(self, obj)


sync_methods = {}
async_run_methods = {}