Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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