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
Hashes for ont_pyguppy_client_lib-5.1.11-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3aeebe81a5521d6b265c1d7993c6455053bd128405d46711c52d2fa3c72c87b |
|
MD5 | 940f18285a242e43504b4ed67c8fbe15 |
|
BLAKE2b-256 | 1f192a5fd759ff016fba9ad0243735ce24cc0d86e75e66f9a6bcd863c4dec65a |
Hashes for ont_pyguppy_client_lib-5.1.11-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44a89dd9be4b9b323a95978f0e435b2968218345dd09cf0208dd6bfd877bb44a |
|
MD5 | 8146cec9c440b525054b00a2e643e487 |
|
BLAKE2b-256 | 86414a395898395a9e1c2a8327daf3fc0fb5578ad490d9999dd91da85920e253 |
Hashes for ont_pyguppy_client_lib-5.1.11-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b54d8fc3930dd0c6f78215e6eeab2cbcbf9e496630d6b8429cf0225cf6d99dff |
|
MD5 | 14a86c7b28519b13b93db2f0cc599201 |
|
BLAKE2b-256 | 04478ad5c8572ef7da44e3ef9968e850d5fec2394f4cf692a6d59392a8ec899a |
Hashes for ont_pyguppy_client_lib-5.1.11-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 542123187d553786648fd30c576b0a84b1fb1ba32aa60649ac3a231f83e1d59e |
|
MD5 | 602b450b158668ae18452ccc5126a2a2 |
|
BLAKE2b-256 | 4a17962ac3a2bd7de45ce330fc2a2ace3a2df86265066ef11d0f1e7c007e9a15 |
Hashes for ont_pyguppy_client_lib-5.1.11-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d07ec683607d31095efdf98f06c72e52afe452397d6f5c407e32e25c721b432 |
|
MD5 | 10c53a1741269e097d56e4fb988e686f |
|
BLAKE2b-256 | 80c27c2605854dd9c951534ee39afbd80431c1c467597a3443cfc5667017f3a8 |
Hashes for ont_pyguppy_client_lib-5.1.11-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f6520a332cc2eeff98291dd9623713762e28141698c53646e34877903639adc |
|
MD5 | dc0c7d26048a3a2a47f25d7d84b6d7e4 |
|
BLAKE2b-256 | 74a86464b596aa389a5671ddad9a75a9b80d3916e68d12a801dcad558b1420c3 |
Hashes for ont_pyguppy_client_lib-5.1.11-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c58c9d956c66a63162629d3d13b33063e978532024ccaec9de597c9ec2dcf568 |
|
MD5 | ceab9b2657e17516c3cc36286a47496a |
|
BLAKE2b-256 | f05337ab1d001760a716cb3ce988d269702c132c045fb05bf4ad56380445e1cf |
Hashes for ont_pyguppy_client_lib-5.1.11-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6f9803b9b7c69d5cc564d7bf74a2229412d1e0e8853f4f3d1d827911dc0eec9 |
|
MD5 | a43d22dcf53744aeb6cc6c657023f4e3 |
|
BLAKE2b-256 | a0ac5b339af7c145de6b2c2ededba0128ca55cd2e50d93d86f9bf11f6a7c8bf6 |
Hashes for ont_pyguppy_client_lib-5.1.11-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82c01dd045953875d81916a9473b9fe98174845cf5a6c2253abccd0d74c604c6 |
|
MD5 | c48b02582ff36382c2fbb5597e774cdb |
|
BLAKE2b-256 | 6dc264a6010612ea3b7422646159ef6cf346056b3d62b17453a7d3ea4f2f50bc |
Hashes for ont_pyguppy_client_lib-5.1.11-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bf4e0daacdcf4b004804b4b6cfa294b7775e9008beb90a381602d4d56331169 |
|
MD5 | d4391a62d4fd5f086893b9c80f3e99fa |
|
BLAKE2b-256 | f860a1447aae7977b2170a755b92b8e76264af34453e2cb729c772b95dc99198 |
Hashes for ont_pyguppy_client_lib-5.1.11-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a8562d0922165a0ea6c0263472e841fb7beeff2e595f992ceabeb4f3431edbe |
|
MD5 | 876381779a9471fce4bdcddc8778bfb0 |
|
BLAKE2b-256 | 93e79b233793f028927f5de3b6c7f5b99eec23b8d4fbe8751493de878d366993 |
Hashes for ont_pyguppy_client_lib-5.1.11-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2889c3ed72ca95f6f2cac5d0c31edb7bbe5523bc4b816731dce65ac43456c1f1 |
|
MD5 | 5005f7696e619c95fcc0347106742bf5 |
|
BLAKE2b-256 | a10d3365baefbd954cc488a6eeebc7527c18c7a17c270fd19967a46b167c491f |
Hashes for ont_pyguppy_client_lib-5.1.11-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5b35f298b4c7897c4be7319acdacf270d8436f98234db12502e26626b58635 |
|
MD5 | f42a21dcc8f9321d62d11877aa5cd29e |
|
BLAKE2b-256 | f03f6a2e733eb8c703c7d88b12bd058dc27b81bf937011add17edd66779a770b |