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-6.0.4-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b8a12d84bcd57ddfb791035d4ba626c685e86a4d41c4497f321ee4e3def717d |
|
MD5 | b3ff43b2c95bd6c2c0ad8f507d20b996 |
|
BLAKE2b-256 | 52fe58f39c82808ffd73429cdd3237d902126772c6ce26bd62bf112a7a4970a5 |
Hashes for ont_pyguppy_client_lib-6.0.4-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5697c6d9a34f2ce4b723e170fdb63289fdfea6deb6043db077f476a12a967c40 |
|
MD5 | 1a90598cf328334f8d95650d95b7b800 |
|
BLAKE2b-256 | eb7e7a85f7883014228f61ccde41c7ef5961a517c5c65c480dd39a6706292bfc |
Hashes for ont_pyguppy_client_lib-6.0.4-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d9d655aa577d4832f52bbc6b10b8778af0f54d8e57a547bceb2b65af638999 |
|
MD5 | c26f418f8badba0ddfc3a90b09fd4a72 |
|
BLAKE2b-256 | e3119f24ccef188b909fa0b4cc3e1ca432020e6e3c4a1fbd5776bce4370be7ff |
Hashes for ont_pyguppy_client_lib-6.0.4-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 860d754fae5a5e9a7aecb09a27100ae30059f7eae3e57d0d049e23de1329294a |
|
MD5 | 761dba7822d67ac3fde4c5ac097f08e2 |
|
BLAKE2b-256 | b2916b948b51ab7e542e16f858245baf8b3b6ef7fc774cc75e34d976a6089d10 |
Hashes for ont_pyguppy_client_lib-6.0.4-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53fdf181cf21271a1af1147b3dbf2d25d7a1d6ee8ea5c7dd2282e3c6c52c96b8 |
|
MD5 | 6ece8f69594fa66057f8ece3bcf28e3c |
|
BLAKE2b-256 | 3caa5096a912446ec51ec59fc563ba1881956122bf4875783e528748c0b2c212 |
Hashes for ont_pyguppy_client_lib-6.0.4-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4070c23c3210bdeb36a1b1cb582d18e8ff0e3122a01f471d938ad4264fa8f504 |
|
MD5 | 2c3b58de045c10b97d7643ecba4a7313 |
|
BLAKE2b-256 | b7864ca1512d29cec493cde08a667a6824d600f563a16689a5d7eda7a6339ea2 |
Hashes for ont_pyguppy_client_lib-6.0.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9c872740fb3605b2036b4b772df5d9ef96b2ce04229095a30151cebfd6fcbfc |
|
MD5 | 836cab05909523cbf52db647d7b06cc5 |
|
BLAKE2b-256 | 8defce421ca27917424d1c4996bbfbc17e31649b4bd80bc073c863c8edd2b1e6 |
Hashes for ont_pyguppy_client_lib-6.0.4-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0ae780e44af59dd3bf65ce3dcb050142de3e0ee1673b7f7a0ac79d46d840180 |
|
MD5 | 7859653e4948daefebd5279e16a77d64 |
|
BLAKE2b-256 | ea0a66f6552966e99b7eb8b4b895890823e0bd0e044057e90d87214c27d6b432 |
Hashes for ont_pyguppy_client_lib-6.0.4-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eb5c8375ac2c8dabddf1b1b61eb08ff8834492d1e6d7000ef578d24c15c4f47 |
|
MD5 | e05d71dcfa867ac5dfe5a73b7fc889c3 |
|
BLAKE2b-256 | 571816038f22c26e8ec7092e04343496c3f2ebf2d00e02e8496cfe2d821d97a0 |
Hashes for ont_pyguppy_client_lib-6.0.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d2927eadb2d7e82caf76a2d6340231e934fe801cf24a2d23bd986cdf43afe78 |
|
MD5 | c6713537b735479065907be7c04893f9 |
|
BLAKE2b-256 | 78f0e7b884ecaebfa734681be0c48f3f4baf257dc8d5bae96196caa91065739b |
Hashes for ont_pyguppy_client_lib-6.0.4-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 572c90e7c2ae3e1bd812e461ef2b77a03a2e232c86846587771221b2a0b914bf |
|
MD5 | a368a33d8080f351c604a38260bc5b81 |
|
BLAKE2b-256 | c4e000eedc04c3b4fcd9ef3db6becf2d76920bf64c7f705bf910abe47c68404c |
Hashes for ont_pyguppy_client_lib-6.0.4-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bf98db75427379aa519ccac4666f180735d454d412ac09f352cf981e166715b |
|
MD5 | c0dd4bf4e12f3fe1da4fdaa6581e485a |
|
BLAKE2b-256 | bacecef9200373f13e56c93061f7fe9556d84c1d5a53b6f9e9f2806b1de3b51a |