nanoporetech / minknow_api

Protobuf and gRPC specifications for the MinKNOW API
Other
50 stars 12 forks source link

minknow_api.examples.manage_simulated_devices does not enable adding a Flongle #61

Open patbohn opened 7 months ago

patbohn commented 7 months ago

Hi,

First, I want to thank you for having this powerful API Open Source. It enables so many cool use cases! However, we realized that while it would be possible to replay previously recorded batch files from MinIon flow cells by addition of a simulated MinIon, there is currently no implementation to add a Flongle Adapter, and so batch files from Flongle sequencing runs cannot be replayed without having a real Minion + Flongle adapter plugged into the computer. Specifically, when attempting to replay a Flongle batch file on a Minion position, the error in the bream log is:

[bream4.toolkit.procedure_components.command.phase_management: 186] - 2023-11-23 11:06:14,919 -    ERROR - 
Traceback (most recent call last):
  File "C:\Program Files\OxfordNanopore\MinKNOW\conf\package\sequencing\sequencing.py", line 581, in <module>
    sys.exit(main(config=args.config))
  File "C:\Program Files\OxfordNanopore\MinKNOW\conf\package\sequencing\sequencing.py", line 515, in main
    setup_playback(device, settings["simulation"])
  File "C:\Program Files\OxfordNanopore\MinKNOW\ont-python\lib\site-packages\bream4\utility\simulation.py", line 49, in setup_playback
    device.connection.device.set_calibration(
  File "C:\Program Files\OxfordNanopore\MinKNOW\ont-python\lib\site-packages\minknow_api\device_service.py", line 610, in set_calibration
    return run_with_retry(self._stub.set_calibration,
  File "C:\Program Files\OxfordNanopore\MinKNOW\ont-python\lib\site-packages\minknow_api\device_service.py", line 97, in run_with_retry
    result = MessageWrapper(method(message, timeout=timeout), unwraps=unwraps)
  File "C:\Program Files\OxfordNanopore\MinKNOW\ont-python\lib\site-packages\grpc\_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "C:\Program Files\OxfordNanopore\MinKNOW\ont-python\lib\site-packages\grpc\_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.INVALID_ARGUMENT
    details = "last_channel must be 512"

Could you add the ability to add a simulated Flongle position?

Thank you in advance!