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.13-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2e196c6bbb748301e2bccaddcb55035c92c56f55a768540f9ad897b6142f71c |
|
MD5 | 9fdb6145971755fd536f199ffb702a7f |
|
BLAKE2b-256 | fa62c683ef86dc68e513d532651eabcf53dcae156896607907c5d32200345bf6 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfe603c5973463287be21fd075083f06eeaf787fbd68dd36ef6af9671d5f1c3f |
|
MD5 | 1418814991fac15a66335e65461f849d |
|
BLAKE2b-256 | 74d87d3029e6746fb0305c4f5bc662e42d26c7d1a261a869f1a78f8f6c731015 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397d68d676458c7db265a3fc88ec0d8a12919e8de1d6a4dd535e337786fbc4b5 |
|
MD5 | a3b528e41a66796707cbfd18b96e1cad |
|
BLAKE2b-256 | c55cb999547d3d53eef5a42d9966f94a7855edd154f8cd15727877c3ad4ba02a |
Hashes for ont_pyguppy_client_lib-5.1.13-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bd46caf86a24255bd63141397b2d5021c7057bae1d15d5b42fd440f0dc2b8c4 |
|
MD5 | 5d3e5f3f22e14177edcb4b828c58af28 |
|
BLAKE2b-256 | e7fa63d59247678f9b5333f16218162eec31026c9aebf5d52450245977a8c9bc |
Hashes for ont_pyguppy_client_lib-5.1.13-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b0b6de481e1888e5885de0c75a7fef4b8af5e15f9d7e2162ba979cd8ea89731 |
|
MD5 | b9da97ba562dd20be247edd570ff7b13 |
|
BLAKE2b-256 | 15d9fa127eabbc65b0acc1607813d99a8edd49d755084507482b1041d53e3608 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42697ee8a380a1fe17b5a3764c0953997db416f55ef3636fb1a8552698469a47 |
|
MD5 | e2ac4e192096ebd2b67e526e238f8c88 |
|
BLAKE2b-256 | b74db4715880cdccfeaeb950beeba8f2ecfa0c203bf5819ef2ff4d9b78e95215 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b89f01adeff8865478a54d44078d618f164ef745ecbe16b244ea5c1846e6ea7 |
|
MD5 | ea899cec9f437db3d5765461bba9f0f3 |
|
BLAKE2b-256 | 0ab27a0c1a89e7258fb614afa71e68c7d8afafc1f93e66d29e14ef06520fd7e5 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28f0360d05a85b5c40a12d98943045f977edeef23df3f00f197c62a4f7598c3d |
|
MD5 | 56df3370dcc6682154b9033718e010ca |
|
BLAKE2b-256 | b683a42191b187d1f6e11195b582cbedd464bf92dbe11fe9dadb31d5b33e9e47 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d4cc0a9625af5eae76855b2f54327e6f92b8fa6fce1cc7d4b1d9ee1f40d1afb |
|
MD5 | cd7b6e38f4ef3e14a8845dc8d6ffa640 |
|
BLAKE2b-256 | b4830a67a0bd3d2c461f8cdd9d217b66820b89ce04c5b7c9cdafe1905dbe92b5 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224c09a47cbcf84211f400f5001434edf09370c69590811828d56995f7fcf770 |
|
MD5 | e9d91d9d179e20470137f5f2f4881e24 |
|
BLAKE2b-256 | aca0fbc455860d0b7b0f126c905903ff07fa583f4c6b5302d707c0bfafcb4417 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46357572c7f9704b85be4cc26e53dcbf4cd44c0f9d5e96ea03f09cd88dfc290b |
|
MD5 | 9f1e903d9513025753c2b3976b86c0e0 |
|
BLAKE2b-256 | 27eeb65cda5294360b51655480de58f4b7b8f6b0949423ca7c269b5d9c73b035 |
Hashes for ont_pyguppy_client_lib-5.1.13-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a9ca588d3c5965b36c60bbf1459e610c3c993b40df4973773e7029156960194 |
|
MD5 | 734b7c1922cabe8cd0ced74027d4b541 |
|
BLAKE2b-256 | 975c2b5216b847cbcaac5eaab462f479850a630dda1a7e45810fadfdfe1f24ce |
Hashes for ont_pyguppy_client_lib-5.1.13-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 638a2d11fce58d8c2503a4e662bb5320514b26affdc94efee32eccbdf3652a2d |
|
MD5 | 74756b1f89ad96c053b6ee235e22a637 |
|
BLAKE2b-256 | 4a54efea705b47d8a0dfd2d26b5473ede9b452ebeb211c812eb90c8ea366968e |