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.14-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6873e1bf8ac3b3747101bd3bb58956abf3ceda7d66eed3a278708a35a99c7ab |
|
MD5 | cbfd183247bad0dbe9f3197f21b662c8 |
|
BLAKE2b-256 | 7d7dc9d0999a87203f085fd40fb9578007428f636b04ace12ace325f69b3bf10 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd256b90b56c233dcbff2f14844c370b6ea0d7dff7297f71add08d850fc9919f |
|
MD5 | 5add1e817474d7981238449d1ca0d705 |
|
BLAKE2b-256 | a0a2959726af28e9bef6090fd35122c49581be4dc789c34d9c3a8e93bb5a29e9 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d7d96300621b61e77bb7fecb67b688984a636d8f85394eaec72fef399ce767c |
|
MD5 | b9041a651a76eb6503cc21d6e3110f15 |
|
BLAKE2b-256 | fa7dcd1219ce0a0c0038b01b3c18dcb046f3135b42bf7bedc893bfde1da28442 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc283625b3cb8419df761d26fcb5a10f2d5c1caa5250f1a5e625ef7d854119b |
|
MD5 | 3969ad3aeadfd33921aeabc24233fdf2 |
|
BLAKE2b-256 | 2b721154ea034abb4ef1343389567d5e8cf68639db9b7bf5164a6ebd2230d87b |
Hashes for ont_pyguppy_client_lib-5.0.14-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6e7f5fae11d352ce45b2cfe8d1e543dcdaeef2680e124f52878b1f628faea57 |
|
MD5 | ef89381395878e7eddcdd78e5499ffd1 |
|
BLAKE2b-256 | 90b0303d8aeafd6724c557ad9dc46f9dbc02a38a59b4e96ab702ae75ff62bb4f |
Hashes for ont_pyguppy_client_lib-5.0.14-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea058f2b2e897b590a715c5b8230874465a9ee2966fbe9ec9e870cab090fd64b |
|
MD5 | 94df0eb2050c39818da6e6bd4c950157 |
|
BLAKE2b-256 | 4725bec779070e64a9a2a1013fb6e9244c6dab8845759b01a9a2b06af5dd1083 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f93bd73ac3f0ff68cacce72d05ed9075d8f3caf90810497a17f06acc16a19d2d |
|
MD5 | 0a74757147b75d61a6802c9d5d849d91 |
|
BLAKE2b-256 | 899ad96607690c99deee1f04e9ffb48740e3ed02910a9dd8d54a255d55e5c2d0 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3696b3362b7c47c82442706c11dc30f92dec9049d480091e1e94f6994bbda9eb |
|
MD5 | fdde40cdc01ad78ed806548297a5dbf5 |
|
BLAKE2b-256 | f4effd782818b0a289dc89deb0c44e1075b1ad855ba6222055c7557c4a18aed9 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6024d2328aa927dc4d32671d629f740a6927639f58672a83b9325e615220f1da |
|
MD5 | 36142720afa23603cde23f529c8b050b |
|
BLAKE2b-256 | ad199d7cbf33d9340425e930c7a380394332850939dc04a2ddd82839780ea3a7 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f21a96339c91394f763ad7e5e4b4afc805d71d5deaa15105774a24a026ab1f2c |
|
MD5 | d0cb3de977a394ec741e95a9a07f3872 |
|
BLAKE2b-256 | 2a21c2fac9cee058f87b953848e1cbaa3ce7302fb9acd5d36dedef8ac532f090 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeb6fdde1bb98035570ddb53f5de24fada0797c0f7b14749fd46dea32a51a5b8 |
|
MD5 | bb0f2d185ecd3d5d201723496f71be89 |
|
BLAKE2b-256 | ce84f2671497775f1a204114e1b4948b37460dd3dd3e0561f32a7633fcfc5407 |
Hashes for ont_pyguppy_client_lib-5.0.14-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb67deaa901403c3f5e3b9e6c8fb9ba9278bdb2bb6e76db65c63823d256fbb1b |
|
MD5 | 3ad7ad066e8901902268ee858e2b7c4c |
|
BLAKE2b-256 | 3d5bd3610624e135927897df1674b6a20886605349887132e3d5d2f6ece90311 |