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.12-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 253d8aed2c398047975a1988192e3fbf2925811dae43cc6d7dea2c1963c89240 |
|
MD5 | 67d7467712845ca6c3e78e41630fec03 |
|
BLAKE2b-256 | f21a233345b69e6daec9cbc6d690391e098083dd225780eb4d1293e6282313c3 |
Hashes for ont_pyguppy_client_lib-5.1.12-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34299e540034379db4f98243ebef3d0c48b2234eca3cd2e32fd9cf30b712bd4b |
|
MD5 | b36022226d4915481a92b894d1187949 |
|
BLAKE2b-256 | eba906ce185e1ae576448b1a4dd9eba8c92280436d4403b7233ada10078e648e |
Hashes for ont_pyguppy_client_lib-5.1.12-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 714eac7643bc52fa1ff13d486a8a58e12b090970fff36dedb1c9e96aa0cf7389 |
|
MD5 | cc0a6845e436cba1384a038fb486cb5e |
|
BLAKE2b-256 | e166bcf1e62bb598b92fa3c02a3fb0945b609989017cfdcdbd9de7e258755c1f |
Hashes for ont_pyguppy_client_lib-5.1.12-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 638ce19648b56c2c407bfe4c28b3e4d00fed0c4545aa4af581921e2999a7f522 |
|
MD5 | 850ec9e7c4d9968ab215a506f1eae1c4 |
|
BLAKE2b-256 | 482c89b0bab14031d759f4e29b2a883bf2e299941f539dbe940fdefbcc1615ff |
Hashes for ont_pyguppy_client_lib-5.1.12-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba82dc09e61c45f38d5b48454affc0c460423f7476f630ed7c058898516faf5d |
|
MD5 | 3fd0182fa209b5b9469821959796b417 |
|
BLAKE2b-256 | 56a12d5f0059381fdedc316e9f20e6a48929d03deea26416a0552dac42cc5b3b |
Hashes for ont_pyguppy_client_lib-5.1.12-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47cea8a609f4c6ec89e1f4d14912d386f010c94281c899e5342cf14bc67b1a89 |
|
MD5 | 1611a7d39bfac5175647bd75f73cad7b |
|
BLAKE2b-256 | b662efd68a59ec128d910a616e0ac572b356ad988a4e9345c26ddfffc88b948d |
Hashes for ont_pyguppy_client_lib-5.1.12-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3f580165497409a065c078a9385e2bfca88df1a7c8bbc570bc3603101ade2e0 |
|
MD5 | 0aa9895e6d7676cf5f6cd18d30c5fe73 |
|
BLAKE2b-256 | 79defeea6934c7a839f6db1348f8830b7a9b422a11fcb0e962f0e88df11673f5 |
Hashes for ont_pyguppy_client_lib-5.1.12-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03667616d98f442bf80abe3d1d624606518ce00d81ce6a67dc68c09cfe105862 |
|
MD5 | 2fd5c85cfe62c1b463444d177d2c8d0a |
|
BLAKE2b-256 | fd13718e19f925158735dd604bdf5643e409fb6851e7b2609fdf9def4cd46c12 |
Hashes for ont_pyguppy_client_lib-5.1.12-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 877598fc9acd866d27d01a15107d45736444c651079650ba9989c472656e913b |
|
MD5 | 0bd0bb4d5ab00762571e7f5e4bed7d3f |
|
BLAKE2b-256 | 05ed5ee8f405dea1c61acac079d3ca81c3247bbd205ff6eb7e144ec65bf56c93 |
Hashes for ont_pyguppy_client_lib-5.1.12-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bc7d52a88babe6a33510218828343dd3e093a1f91805728193518916b6502d8 |
|
MD5 | 362307891d404226d022e98110c0617e |
|
BLAKE2b-256 | 08de938562e65521d9deaa9fdc476c9cdd4f6928b964aded94dad9bcee14b1f2 |
Hashes for ont_pyguppy_client_lib-5.1.12-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce2e924a76f090e06f4c06146646083f7fe99e4253264d22092e1c48990e60ce |
|
MD5 | 10c33cd660ede80de820f37131b16575 |
|
BLAKE2b-256 | 4dcd8f08972d1e358be551bafa9ee5f9d4ccbc03772e01d2512fc0885802dfe5 |
Hashes for ont_pyguppy_client_lib-5.1.12-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fe537b19d2b9af8a2b7685cf3ebbbc5acac75e4682ead2682d3dc5aa5fe3a3b |
|
MD5 | 5aa79f2830f230185af4325096b342b6 |
|
BLAKE2b-256 | 980ea3523c090734ab823f6ef1e997efaa4dbedf39d5f6a7c236c6794ed7d669 |
Hashes for ont_pyguppy_client_lib-5.1.12-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b8bd2190b7cf87a7857311bfc085ef790a456b570e3fb9794664a5abb553085 |
|
MD5 | 47202fa5ca0bfcf1c8da4e3a2047733c |
|
BLAKE2b-256 | 29710f8f648394dff1e39660628ddbc0d2cf5c0b3ca7c35a04ae4957d4ed8a4f |