How to use the pomoxis.provider.replayfast5.ReplayFast5 function in pomoxis

To help you get started, we’ve selected a few pomoxis examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nanoporetech / pomoxis / pomoxis / provider / replayfast5.py View on Github external
def replay_server(fast5, channels, port, good_class, time_warp=1):
    """Create an RPC server to replay data from a .fast5 file.

    :param fast5: input .fast5 file for simulation.
    :param channels: list of channels to simulate.
    :param port: port on which to listen for clients.
    :param good_class: read classification name of desirable reads.
    
    :returns: instance of :class:`ReplayFast5`.
    """
    server = yield from rpc.serve_rpc(
        ReplayFast5(fast5, channels, good_class=good_class, time_warp=time_warp),
        bind='tcp://127.0.0.1:{}'.format(port),
        translation_table=translation_table,
    )
    return server