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:
pyclient A user-friendly wrapper around guppy_client. This is what you should use to interact with a Guppy basecall server.
guppy_client A compiled library which provides direct Python bindings to Guppy’s C++ API.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp39-cp39-manylinux2014_x86_64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e741687d9fd38887625cadafc00fdb924d5dda536d37bd0b008a8b381160e8e
|
|
| MD5 |
4b0972efdf297597b082b0f6638f5df3
|
|
| BLAKE2b-256 |
b2a8bd32d79d6319cf6a6b25b24ac91dd0b549e4e0ded171692437473718f820
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef65db3ae727b2b17b4b36b39baa61fd4f67a16f39efc0652030195c97783069
|
|
| MD5 |
b10e543a0d9224a9b5aec203e0b75b8f
|
|
| BLAKE2b-256 |
a0d7439502faa257ec60d50aca4ee43bea17deb22d22bc7fd2765f329e11385c
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp38-cp38-manylinux2014_x86_64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
071084146b6014600fc9c70ae9296999663465f7a173540746e23b720a7f79d2
|
|
| MD5 |
90f61abcf1439016d0556281cc50b6f0
|
|
| BLAKE2b-256 |
f73a49c6ea2b096f868946950c71dc68aced5cc92bdb8f9fef564c9041ee0cc3
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp38-cp38-macosx_10_14_x86_64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90c0a6dc2e2fdae206bcd5dbb72e53f7602ee834ac518f4c9ccc02d6fa4d4aaa
|
|
| MD5 |
a62ad2184f11b91fca656a6da96e41d6
|
|
| BLAKE2b-256 |
46856de9f5d52126c61fae959d05bd314d710b3685e00cf929e7c1b3ff170b83
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a443dc4f72c7199eeb251eebba7f334cd3808ac5165efdaab4adf9d811405415
|
|
| MD5 |
d56e17034370e3d49facc9b3b986bce8
|
|
| BLAKE2b-256 |
2ff9b59904f99738d71d80ac2684356c33a3ab4773cfb9f0e12a985dcf54bbfc
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp37-cp37m-manylinux2014_x86_64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp37-cp37m-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30d0462e6c13b66b9ae2764d1396097e1884e9b057b9a04341964a470916a17b
|
|
| MD5 |
076f196270f2cd8846cc682e9f67de4f
|
|
| BLAKE2b-256 |
2885bfd4e730bba3c8386aa8e1412fa01ddb63f7d32d33496d5a84c2aeacd506
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp37-cp37m-macosx_10_14_x86_64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00e1879bd6d83e6c2f8c9dd00df905c54c1b381fb119314387f7bc4357e915aa
|
|
| MD5 |
838a34f727dff5fb68ada3efc11ccc0e
|
|
| BLAKE2b-256 |
6fc60bf5c2d47fdd741bf0d2fa680bcec30eb6cd6e02aa211b933f55b086ce51
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp36-cp36m-win_amd64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
507120ea87c645a9bf5f7496c86b281ef3a32e02fd50ec31ee1c233a59870fbc
|
|
| MD5 |
22c9cf695bb09c4aeef5b5c8a4099db5
|
|
| BLAKE2b-256 |
b66629cc21c0b28ba175ee9506edbf47e19c789e20933d03f8da505001db00c3
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp36-cp36m-manylinux2014_x86_64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp36-cp36m-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec7d1ec153438f541461dccbb2d3d25091f36ef633a86309e99e6cf2c76755d
|
|
| MD5 |
bce6b2b27569d0ecd0a3f055f27d3f33
|
|
| BLAKE2b-256 |
2278b77621066da3dfd01779037589a864f723a396e7268a787752c2da3c66ab
|
File details
Details for the file ont_pyguppy_client_lib-6.2.1-cp36-cp36m-macosx_10_14_x86_64.whl.
File metadata
- Download URL: ont_pyguppy_client_lib-6.2.1-cp36-cp36m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.6m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de35ac3210431bb315e23f9fa553c3963e660e0cb07da4109721354a08a207a
|
|
| MD5 |
1e349a152e6747d47e6f8159bfc8c41a
|
|
| BLAKE2b-256 |
10f8b5e2717ce641223020db9c12701da29adf43a7d3a78fe55d9255c85e824d
|