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.0.17-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59c59308744c054bf9ffcd62f52e2411dc6c14b84d5151725588779f2db16e10 |
|
MD5 | 1320da70edf18404548757bf36c29b39 |
|
BLAKE2b-256 | 928ca7e3312681e152f0e51a76e8876c00fc0c80bfa99f7ab84d9bf6d50028c5 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1fbf92fe399408ea10d2097696cbfef4758559ca90c2784ec6d794fff50324d |
|
MD5 | 2b1f151965d8515283dc680509940ffb |
|
BLAKE2b-256 | e7ce364bde5ff28e7e060cacc86c48beb343cbd2de9f31ad4ccbb5bc24fca252 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c87d62d5f71f476f4469652d434952cac50b377eeb4ab8c513630231b6ffdc8 |
|
MD5 | f1ef3ba8babe425237c582986d290fc0 |
|
BLAKE2b-256 | bb0122a447904c7c5198a9104fc2f72943bc04d9f7acad83275d86b57d476c3a |
Hashes for ont_pyguppy_client_lib-5.0.17-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 234bb3ce2a37f4f8ae0ea20704604cb9eede6ca872ecfad03ce5d2e2048336c1 |
|
MD5 | 558d716774ca7c3bf7d383a6b4163bdb |
|
BLAKE2b-256 | 6b5d6c57656901ac1f9eb802c5c6f6eab4c70a114da192ef910a814e0e0c96a6 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f12b9c8d199782339404e0d8f3433821ecb5bbd26ccac92adcc55ad88d5ee70 |
|
MD5 | 33e72552c139186e037e42a4828e3e11 |
|
BLAKE2b-256 | 3eefad3767535ce903cd9863457df34d43270021744aff665f0843efe8ef9bf2 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e796ac3f137b7a7d910389f8c955fdde737eb624eee308963bf626931f507237 |
|
MD5 | f434e071319a3d664c0918b789df18cd |
|
BLAKE2b-256 | 999b15da3e10c39d4fd1bf43b9f858d1f7638d20f589655b47c8957c64b7fe65 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c85a81711a3b7c00c5608a9b5c1bdf40893e913ca3a18bba5b4201827c58751 |
|
MD5 | b7b729f68cd743a359f435d23dc0df82 |
|
BLAKE2b-256 | a0fb5d74972d21f00d363d65898eefb3e4e32ce945dec625dafb80a048a1dd49 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfa8e68f6702acea361ee35aad4b5cb0e90297fca78077aa866c9e30decfb16d |
|
MD5 | 6f3858bfc841b61c7a3b6e3536d6005a |
|
BLAKE2b-256 | 6b4b7197a27c0a7178ff2f66ee02946b73f8109609c90fed3589a17acc7209ca |
Hashes for ont_pyguppy_client_lib-5.0.17-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69d794d054d111fdc82191c7f7444e6d5ee1eeeb86a221152831b9ea6fc08c06 |
|
MD5 | dfc8b3e9c61b8ec8a26069b94720c44d |
|
BLAKE2b-256 | 8070438c848968f5d35c2d6495121031a621c1bd6388ce144e97911018992627 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38d93e29914721c99f70f897030396d63b3a46416c1a2e3c198f3d23cd09aa3d |
|
MD5 | 5a844d3c122d2f36b98541294353dd1a |
|
BLAKE2b-256 | 0e92a1d17257c184af5ed9e244b501eb6928b59333af9fcb21c8f965dd66e5a2 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cbfd442b9b35be7684bf60a75a1f632021995e1bb4757bd4dc02f1fb69a0a5b |
|
MD5 | a28c01cfa8a5d11471ee92a8d77ddc1b |
|
BLAKE2b-256 | 9bc3c80008c80c7b2bd110a1498335b5d65a83f61b9565bddacb6b5ee4bc59b3 |
Hashes for ont_pyguppy_client_lib-5.0.17-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 103fea034de5f38ac725be28284648e0b294c7263a248afc32f51ea9b229e581 |
|
MD5 | cda1fe4184f09bc27b877ca49db10842 |
|
BLAKE2b-256 | c0f6e68eee641e6a117e73a6174a552c62708028c8cadf847a22565e02ec125f |