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-4.5.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6ac17d89d83e62e021c1248577a145328dda02d4abf0048022f035c3aaf46ae |
|
MD5 | 1c023c50cd9822e2d9de77e6405c7f55 |
|
BLAKE2b-256 | 30b56083bdb81eef99bb00f31e8830a788b3c2b1dbc7c8275cdabe79783b8bc1 |
Hashes for ont_pyguppy_client_lib-4.5.4-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca0de0e606d31eded1cf909b6ab8f53102f30955cd9ffe2407ca4f86efcb1ca2 |
|
MD5 | 5045e978d34b26e64ee2e9d7cf5ae441 |
|
BLAKE2b-256 | 1e3cefbda3a78b11a8ce3349733a340ae3c907be05338c42103df56573ddc9a4 |
Hashes for ont_pyguppy_client_lib-4.5.4-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21a4a6dfb1060014514f7653ed0bd8f71cc0f8566d2465f8ab2f312364adf961 |
|
MD5 | c2d9be03be714fbafbbfacd8e1574fb1 |
|
BLAKE2b-256 | d94b48e5d94487b9e88a38dbce742173549bf5299142b5b297ccae7d20caa76e |
Hashes for ont_pyguppy_client_lib-4.5.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c25647e7c63ac59c6ebc19c157abea7f8969af7d67cf77b3a6004da9b2cc6c00 |
|
MD5 | d630f37fa5428b0ba676a66caaa042a7 |
|
BLAKE2b-256 | 518c5174c6eb410b2d5361834cde2c9b79a5d7bcf7c63fc57a4c435882c9d788 |
Hashes for ont_pyguppy_client_lib-4.5.4-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf87e57a8c4a8fb196f8777168bbb7cd6b4e010945f57dd5b3d2f3be0c41006d |
|
MD5 | 374418033cf50a53f292c9f598e74c9f |
|
BLAKE2b-256 | 4c3999ac3252b545f3e9f7064a9bc7c27d4766675e19af3294637a4fec3f4494 |
Hashes for ont_pyguppy_client_lib-4.5.4-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41994fcf0228301f7712dd1e8dabfd23e31c12853d0174c47af8e1f9148c655a |
|
MD5 | 054ef32f4c01f25cb779d58db869fcc0 |
|
BLAKE2b-256 | bb77f642b13aaadd471185ae03c911886455c024d96446062b15792715c000f1 |
Hashes for ont_pyguppy_client_lib-4.5.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f950c15c4c9e47ed3158e6e11ad2559548ec7b5c122f9a85a272fd785c54e6 |
|
MD5 | d44c13851f0acd7d27f9dfc259402694 |
|
BLAKE2b-256 | c42b559d2bcce4862d1c6056c3b0d7eb59ef2b416846de81504a0e215fd42e3e |
Hashes for ont_pyguppy_client_lib-4.5.4-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ea403977bad3afe18dc406c9b1d6d1cb2b9719b8cc850b975ad7d0b375fbdcc |
|
MD5 | 52189037fff9c2cbff09747c7b1e6026 |
|
BLAKE2b-256 | 45388b2b16cbeddb901aec53dcfc5120d2229d42c0b2921d3463a76be87263ca |
Hashes for ont_pyguppy_client_lib-4.5.4-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d6cefdbcd77f332146259bcb7a896fce69284c15880de3f8d2faafa3c9bb8fb |
|
MD5 | 71b87cdd19537f4a88f3e7c409461ace |
|
BLAKE2b-256 | 4e8779997713132e4af042e8a817942cf72050303282201d673fcb8e8a8543fb |
Hashes for ont_pyguppy_client_lib-4.5.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e1d94c80a54e58163bab4dfe753896a99ebf472f021361d6dd5ddc13bea2f1f |
|
MD5 | 494b986176cb8a736d6d07f1489253f9 |
|
BLAKE2b-256 | 3e420f430b7be61b703c7fdc12f8bcfc2ad74fc93d2f719dff9aaf695e86615d |
Hashes for ont_pyguppy_client_lib-4.5.4-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee560ca195df1bc81c306ba50abdc2796c58f0742a97db3c0c03d2b1de329760 |
|
MD5 | 1bfcc9b9d6b7e70103c8f4cf59ee4fa1 |
|
BLAKE2b-256 | c796c81693dfc227a597a8009bab97efd047cad03e51a55e1cb22d28dd7ea555 |
Hashes for ont_pyguppy_client_lib-4.5.4-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7de8abdde35a35f79b8bc7104ffaec134def408fa5fb493d1d449102c9790b5e |
|
MD5 | 40ef8ee3e94f0778c526fa1ff850b88e |
|
BLAKE2b-256 | cbc588e013f8cfbc41ff907f1aea753cfbc70d55f7dd69da7489517ace915e32 |