예제 #1
0
def __load_chunk_operators_from_dir(path):
    import pbsmrtpipe.pb_io as IO

    operators = []

    for x in os.listdir(path):
        if x.endswith(".xml"):
            p = os.path.join(path, x)
            operator = IO.parse_operator_xml(p)
            operators.append(operator)

    return {op.idx: op for op in operators}
예제 #2
0
def __load_chunk_operators_from_dir(path):
    import pbsmrtpipe.pb_io as IO

    operators = []

    for x in os.listdir(path):
        if x.endswith(".xml"):
            p = os.path.join(path, x)
            operator = IO.parse_operator_xml(p)
            operators.append(operator)

    return {op.idx: op for op in operators}
예제 #3
0
def _load_xml_chunk_operators_from_python_module_name(name):
    import pbsmrtpipe.pb_io as IO
    m = importlib.import_module(name)
    d = os.path.dirname(m.__file__)

    operators = []
    for x in os.listdir(d):
        if x.endswith(".xml"):
            p = os.path.join(d, x)
            operator = IO.parse_operator_xml(p)
            operators.append(operator)

    log.debug("Loaded {o} operators from {n} -> {d}".format(o=len(operators), n=name, d=d))
    return {op.idx: op for op in operators}
예제 #4
0
def _load_xml_chunk_operators_from_python_module_name(name):
    import pbsmrtpipe.pb_io as IO
    m = importlib.import_module(name)
    d = os.path.dirname(m.__file__)

    operators = []
    for x in os.listdir(d):
        if x.endswith(".xml"):
            p = os.path.join(d, x)
            operator = IO.parse_operator_xml(p)
            operators.append(operator)

    log.debug("Loaded {o} operators from {n} -> {d}".format(o=len(operators), n=name, d=d))
    return {op.idx: op for op in operators}