nanoporetech / minknow_api

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

restart position without the MiKNOW UI #35

Open zchatt opened 2 years ago

zchatt commented 2 years ago

Hello ONT,

We are trying to run our minion directly from the command line. For this we are using the start_protocol.py. We initially had an authentication issue (Issues #34), however we set "--no-tls True" as a workaround. Now when running we receive the following error:

`No flow cell present in position MN39033 (running)`

However, the flow cell is definitely inserted in the minion. I can see that "position_connection.device.get_flow_cell_info()" is used to obtain the flow cell information which is defined in minknow_api.device_service.DeviceService. Notably, using "position_connection = spec.position.connect()" I can see that the device is running:

    [FlowCellPosition('localhost', {name: "MN39033"
    state: STATE_RUNNING
    rpc_ports {
      secure: 8001
      insecure: 8000
      secure_grpc_web: 8002
    }
    })]

Also, using "position_connection.device.get_device_info()" I can return information on the device;

    device_info device_id: "MN39033"
    max_channel_count: 512
    max_wells_per_channel: 4
    digitisation: 8192

So cool, I can see the device, just not the flow cell. If restart the position using the MiKNOW UI the start_protocol.py script progresses (alas to another issue);

    Failed to find protocol for position MN39033 (running)
    Requested protocol:
      product-code: None
      kit: SQK-LSK109
      basecalling: False
      basecall_config: None
      barcode-kits: None
      barcoding: False

However, I can now retrieve the flow cell info using "position_connection.device.get_flow_cell_info()" after restarting the position with MiKNOW UI

          has_flow_cell: true
          channel_count: 126
          wells_per_channel: 1
          has_adapter: true
          adapter_id: "FA-05846"
          temperature_offset: 327.6700134277344
          asic_version: "IA02D"
          asic_id_str: "7735955"

So this leads to my question, how do we restart the position without the MiKNOW UI? I am probably missing something obvious and I apologize in advance. Thank you for any help.

0x55555555 commented 2 years ago

Hello,

https://github.com/nanoporetech/minknow_api/blob/master/proto/minknow_api/manager.proto#L54

reset_position will restart a position, from the manager service.

You shouldn't need to do this though... it is odd your device reports not having a flowcell - how does it display in the UI at the same time? Are you giving the device enough time to initialise - waiting for a flow cell to be detected?

Thanks,

zchatt commented 2 years ago

Thank you for your response. I have left the device for mins to hours but the message does not change. The MiKNOW UI displays "No flow cell detected" and this does not change not until I right click and "Restart position" . I have tried to reset the position using

manager.reset_position('MN39033')

however this does not return a response and does not result in a flow cell being detected as I am still receiving the error.

"No flow cell present in position MN39033 (running)"

I am using the latest MinION Release 21.11.8. Notably, using an older version (19.12.5) detects the flow cell immediately.

0x55555555 commented 2 years ago

It sounds like there may be issues with minknow outside of the API, if the UI also doesnt show a flowcell?

It may be best to get in contact with support, supply logs for the box you are running minknow on, and a description of the problem, and we can work to solve that issue first.

Hope that helps,

zchatt commented 2 years ago

So I have tried this on another machine (Ubuntu 20.04.3) and again the UI does not detect a flow cell unless I "Restart position". Once the flow cell is detected in the UI, the minknow_api can then detect a flow cell eg. "position_connection.device.get_flow_cell_info()"

However, I cannot reproduce "Restart position" of the UI to detect the flow cell using manager.reset_position(). Would this indicate the issue is with minknow_api ?

Happy to log a job with support. Very much appreciate your help.

0x55555555 commented 2 years ago

However, I cannot reproduce "Restart position" of the UI to detect the flow cell using manager.reset_position(). Would this indicate the issue is with minknow_api ?

No, still if the position does not display a flow call shortly after one is connected it seems like a more general hardware or software problem - best to contact support so we can sort that out first.

Thanks,