Skip to content

rebasecalling after a run using the api #84

@svennd

Description

@svennd

Hey,

Is it possible to start basecalling after a run has finished ? I tried to (using chatgpt/copilot) but it doesn't seem to find a solution.

As I understand these should be the steps :

  1. connect to MinKNOWN manager
  2. get the basecaller endpoint
  3. connect to basecaller service and start a basecall run ?
import grpc
from minknow_api.manager import Manager
from minknow_api.basecaller_service import Basecaller

manager = Manager(host="localhost", port=9501)

# 2. Discover available basecaller API ports
api_endpoints = manager.basecaller() 
# in my case returned server:localhost port:9504 

# 3. Connect to the basecaller service
channel = grpc.insecure_channel(f"{basecaller_host}:{basecaller_port}")
basecaller = Basecaller(channel)

# 4. Start basecalling
response = basecaller.start_basecalling(
    input_reads_directories=["/path/pod5_skip"],
    output_reads_directory="/path/basecalls",
    configuration="[email protected]"
)

This however doesn't seem the way as its giving me : status = StatusCode.UNAVAILABLE

Did I miss something ? Is there an example somewhere ? I checked start_protocol.py but that needs to connect to a position, which I don't have cause its a server not connected to ONT device directly. (its after the run)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions