Skip to main content

Python bindings for the GuppyClient library.

Project description

ont-pyguppy-client-lib

ont-pyguppy-client-lib provides python bindings for connecting to a Guppy basecall server. It allows you to interact with the server to do anything you could normally do using the guppy basecall client. This includes:

  • Basecalling

  • Barcoding / demultiplexing

  • Alignment

For example:

>>> from pyguppy_client_lib.pyclient import PyGuppyClient
>>> caller = PyGuppyClient(
    "127.0.0.1:5555",
    "dna_r9.4.1_450bps_fast",
    alignment_index_file="/path/to/index.mmi",
    bed_file="/path/to/targets.bed"
)
>>> caller.connect()

Getting started

ont-pyguppy-client-lib is available on PyPI and may be installed via pip:

pip install ont-pyguppy-client-lib

ont-pyguppy-client-lib requires an instance of the Guppy basecall server is running. Guppy may be obtained from the Oxford Nanopore Community

The version of ont-pyguppy-client-lib should exactly match the version of Guppy being used. You can find your Guppy version like this:

$ <location of guppy_basecall_server>/guppy_basecall_server --version

For example, this Guppy basecall server is version 4.2.2:

$ ./ont-guppy/bin/guppy_basecall_server --version
: Guppy Basecall Service Software, (C) Oxford Nanopore Technologies,  Limited. Version 4.2.2+effbaf8, client-server API version 3.2.0

Install a specific version of ont-pyguppy-client-lib like this:

pip install ont-pyguppy-client-lib==<version>

Dependencies

ont-pyguppy-client-lib requires numpy in order to run. In order to use included helper functions for reading data from fast5 files it is also necessary to manually install ont-fast5-api:

pip install ont-fast5-api

Documentation and help

Information on the methods available may be viewed through Python’s help command::

>>> from pyguppy_client_lib import pyclient
>>> help(pyclient)
>>> from pyguppy_client_lib import client_lib
>>> help(client_lib)

Interface / Examples

ont-pyguppy-client-lib comprises three Python modules:

  1. pyclient A user-friendly wrapper around guppy_client. This is what you should use to interact with a Guppy basecall server.

  2. guppy_client A compiled library which provides direct Python bindings to Guppy’s C++ API.

  3. helper_functions A set of functions for running a Guppy basecall server and loading reads from fast5 files.

Starting a basecall server

There must be a Guppy basecall server running in order to communicate with it. On most Oxford Nanopore devices a basecall server is always running on port 5555. On other devices, or if you want to run a separate basecall server, you must start one yourself:

from pyguppy_client_lib import helper_functions

# A basecall server requires:
#  * A location to put log files (on your PC)
#  * An initial config file to load
#  * A port to run on
server_args = ["--log_path", "/home/myuser/guppy_server_logs",
               "--config", "dna_r9.4.1_450bps_fast.cfg",
               "--port", 5556]
# The second argument is the directory where the
# guppy_basecall_server executable is found. Update this as
# appropriate.
helper_functions.run_server(server_args, "/home/myuser/ont-guppy/bin")

See the Guppy protocol for more information on server arguments.

Create a client and connect to a server

from pyguppy_client_lib.pyclient import PyGuppyClient

client = PyGuppyClient(
    "127.0.0.1:5555",
    "dna_r9.4.1_450bps_fast"
)
client.connect()

Basecall all the reads in a folder

Note that the helper_functions module requires that ont-fast5-api is installed.:

from pyguppy_client_lib import helper_functions

# Using the client generated in the previous example
results = helper_functions.basecall_with_pyguppy(
    caller,
    <input_folder>
)

Glossary of Terms:

Guppy - Oxford Nanopore Technologies’ production basecaller, which translates electrical signals measured from nanopores into DNA or RNA bases.

Fast5 - an implementation of the HDF5 file format, with specific data schemas for Oxford Nanopore Technologies sequencing data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ont_pyguppy_client_lib-5.1.15-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

ont_pyguppy_client_lib-5.1.15-cp38-cp38-macosx_10_11_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.8macOS 10.11+ x86-64

ont_pyguppy_client_lib-5.1.15-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7mWindows x86-64

ont_pyguppy_client_lib-5.1.15-cp37-cp37m-macosx_10_11_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.7mmacOS 10.11+ x86-64

ont_pyguppy_client_lib-5.1.15-cp36-cp36m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.6mWindows x86-64

ont_pyguppy_client_lib-5.1.15-cp36-cp36m-macosx_10_11_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.6mmacOS 10.11+ x86-64

ont_pyguppy_client_lib-5.1.15-cp35-cp35m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.5mWindows x86-64

ont_pyguppy_client_lib-5.1.15-cp35-cp35m-macosx_10_11_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.5mmacOS 10.11+ x86-64

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ddf7fe65270d91fcb41f504924decad79c29c9eeaec26c770c6fd85291f5c47
MD5 18551778bc185cf74e8ba58911b7d5a5
BLAKE2b-256 955c5428ea31593a5e8d46a7aae26cde9c761245bea83cb3280f3b52a1bda50b

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 dddbf8ca306ab568ae5ffcf9b0e9bc4da5400e2413fab8b8100cd90e4865cfc0
MD5 4aff63e5297bd99456a76a6d42154491
BLAKE2b-256 45350a1610f27c48f2becf12e62a1664e79b075612a0b703d329bc67f91fa7fc

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 620e83d9dba20a24780d3c1df4369a1fc23ce2c8e878c51ec9b6ed390ecf337d
MD5 084134abd7b7116a6375279b1c2b2899
BLAKE2b-256 d181454da89554a659338c2c11e16e6e47d7dd3b6902ba194d109362c001a395

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp38-cp38-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp38-cp38-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 3089464f1f9c7956fabad3fbf830181b90b1cb42e18aaa7a3990de071b472204
MD5 00e342d3a91326135a32dc12d1b2bdf0
BLAKE2b-256 deb601f910beecf803719fa3a2d54c81bf5b5257eae04ea8dc9131bc78ae1c19

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b7ca580ed878eb1fe5de33a8b1a958725ec54a111ceb117f38c8ad2775414530
MD5 16f561344d64b16c5b4b1efb50c2cc52
BLAKE2b-256 a7389a06885aa6e7d505c0bf89bd4f64f7ed1db383df38c4609def2eedb67c71

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5085e20e4fd19c59b632ab1d1a05b15f2c1e8d7ee5b730019d7ea96fc7ab0a1c
MD5 53da47d278d6afd2ee4e2526b4b88d25
BLAKE2b-256 9e26de1ff21ca4b103bc038617f86042d1e33ea400793d8141d3b28d7ffc765f

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp37-cp37m-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp37-cp37m-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.7m, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 3e5080870d846af738f8ebc3fe7437e40532ce3ab917387f00539134f1b7e597
MD5 21a6692b827660001cb4ffb1118cbeff
BLAKE2b-256 b3841f8cc3833a924a5c60a667ee6d62a0ac65db1b31a2122527cca4455684ea

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7dd26be672c1b4c5c67be6ce49afb459a98272a7f589920e5958c36bd426a755
MD5 7bc3fdc9b5d6a130e75a1b93634cbe33
BLAKE2b-256 46e1c66661e6858693cd9bee5bd39fd1da55d8543bcb9ea47acafd289cbc4386

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cbf42bedb7c20cdb80b653fad0f28be06b367ae9ce2f8acb18f3f0a05f11d72a
MD5 e5a83f41291ad602bc96828c0f113f28
BLAKE2b-256 7723c7cea21605dd4ecbfd9139373ed9bb635a4e3e7fa9f7eb0ab5a4f25d5533

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp36-cp36m-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp36-cp36m-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.6m, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 62965b9ca62fa4b3a4b204ce9970abc4d721f6324a14c06ce33357f3de6cd035
MD5 317ae146ae7927222e26ba6dcca9cfcd
BLAKE2b-256 cb763f18218c3ef12af229a785fa7f9c610200609309713ee41338ce92acb40f

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 2fe4cbd8e441910e9c5764e0a90f9ec71ea0d76b170ddebe3d735f69182281c8
MD5 199558050af83cd0035c8c961329d613
BLAKE2b-256 586d0ef1e4bf4d6ac78c86f733e20cc7863cee600abcb2a7c96f830094dc70a1

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp35-cp35m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9871057955c67e2be22dd2a01a6e765a4917df4ed979ea949d35a2347a00179a
MD5 e5ee45b395bd28e434172897135d46c9
BLAKE2b-256 dd1e2e4bf0f1d2f38e818497922d6550dba8b27a77b2b4649cad85edddcf8212

See more details on using hashes here.

File details

Details for the file ont_pyguppy_client_lib-5.1.15-cp35-cp35m-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: ont_pyguppy_client_lib-5.1.15-cp35-cp35m-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.5m, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.5.2

File hashes

Hashes for ont_pyguppy_client_lib-5.1.15-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 321a1f84147962419aee191164e61ae0002fa471fff0b127914b2a67f6c396c9
MD5 12fc106b6f17074536078aef0d9a3fed
BLAKE2b-256 cd8064b947f6bd1c65cdd2c8026a4ed3725781745ab051a1a0eb119e170ede2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page