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.16-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98b8c04505c2f5f674b9ea132b86544a8e5cfe778c4772d6bcd2455866e629c8 |
|
MD5 | 46d4812dcfab616ebd29828e7c3d55d1 |
|
BLAKE2b-256 | bcf08350fca19e6eeaf6de32200334ed08447f3cf3b92bcc95db87904a123643 |
Hashes for ont_pyguppy_client_lib-5.0.16-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e89cccb2d3943ee5d6e9a6cd55e1cc8700656201d1a411b638919560bbb0772 |
|
MD5 | d112ee1f25f4c789b091b870fede2859 |
|
BLAKE2b-256 | 4956077f2f59bb262672ce86c2c0bcfa7dd5070647b40bead66a394641081676 |
Hashes for ont_pyguppy_client_lib-5.0.16-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c9b0fd97c29275315fef288cf7a766f46eb9c2163ccfc553a434f575d93746a |
|
MD5 | 1133b4625913276e3bec02522d57aead |
|
BLAKE2b-256 | 894abe1965d08c97228cfb1affcd4be2605a70ef910bfd60ab593e34dcfe369e |
Hashes for ont_pyguppy_client_lib-5.0.16-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e6039ee4f5b264d655e6e0629d804ce5b1ee915de14c4e7786e6afd5ab4a70 |
|
MD5 | 5af545a08d0ef2037bd5024f0b540cae |
|
BLAKE2b-256 | 5bc4508e1fb6188b2f791e09e2b8eb6d90ec920b33f86bb62277ce22c0e7294e |
Hashes for ont_pyguppy_client_lib-5.0.16-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc7983ed08d98d93d9fd52bfba210df82c2d8e19f983d07a9d072943a509f652 |
|
MD5 | 0b557962e9c2834b9f7f6d951ad215e6 |
|
BLAKE2b-256 | 322a1ab5b79e6b7214eeca7669f4f997f33edf23e1903b4cd6b85ab46d97020f |
Hashes for ont_pyguppy_client_lib-5.0.16-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01e887f6cde8b015d17e19bc804dafb0fe1e47805b1f2c25f9f9661e221ecbe0 |
|
MD5 | 918fa17addbd18a7fffaf3b7f623acca |
|
BLAKE2b-256 | b2fd27fe5df6ead081c4dd85d0702bdf28ac97b13df60e4ccea6e772b24f43de |
Hashes for ont_pyguppy_client_lib-5.0.16-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01fa6a885505ed6a5ae8f5ce56b59b0bef3c7b758c9642072f9968328b873b41 |
|
MD5 | 0cb0fe25af7ced93c7df778546375fd7 |
|
BLAKE2b-256 | c58ff9e6a270ab17aa8c0e392c238394fb146c33b7694543aad06cda042ce358 |
Hashes for ont_pyguppy_client_lib-5.0.16-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 834fd2223dfd446f4316f5e1bc2b5863addc766ea4569580fcc91c553cd0e0fb |
|
MD5 | 6e89cb30c464120b12316f0a06c9cd9b |
|
BLAKE2b-256 | f1edbc1deb1b4e555d4aba6955b711bddd30a064f8802c3929355a5f545be35d |
Hashes for ont_pyguppy_client_lib-5.0.16-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d974d42eda7e887fcab88bee91974cdb693983b0e20de10989bd89be183571f |
|
MD5 | bc52b8360e647ee248cf4506a96fde0b |
|
BLAKE2b-256 | 07161461cf963e97843bb9bb7eb5b599c7fd3d96e82fe9d94dbbc979556de80e |
Hashes for ont_pyguppy_client_lib-5.0.16-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 007783fb2071f708c6c8dc988152bae80c3bacb7eece6e7cea35af091b9f9b03 |
|
MD5 | dcf9af5cd7363e9e1201942ff236c9c7 |
|
BLAKE2b-256 | 284859fe3aa5db18b0fb478ab9ec472346524e62432e654a72a6583a33c05ca0 |
Hashes for ont_pyguppy_client_lib-5.0.16-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11a5e25ad187c8e891fad8a3245be49905088115d31bf175c887bf52a85c9517 |
|
MD5 | 76b903ab4c18e0b5dc4c83856b7ceb65 |
|
BLAKE2b-256 | 71ac5517c9d9b7fad9b9f2a0cfe18a5cd84f525ba71a2b3695aaef3658fb7739 |
Hashes for ont_pyguppy_client_lib-5.0.16-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b136e6a229673194d7b08ab6a82d0edb28c8d9a180b13ad906c85ac7131073c |
|
MD5 | 790d144898b16884e4ea0f6014bf5dbe |
|
BLAKE2b-256 | bb8786df968cdbef27d256ede40b40c29a65f9ef2d5ec0a671064343442771ad |