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.11-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0eddb068afd8b3d01aa4cb79283bbd7a85930d36ccd7890a04d0df57b519d4c |
|
MD5 | 8441ef60fde351bf99c434b4d356b8ac |
|
BLAKE2b-256 | d5d84f1b74dc416999d9c88c15fd12a0713e9604f650ed52d7ec86ee4f363f40 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29ca3ee358118665817fce2fb2f2d93e1e8e2c408e8c6a7ca92160560c27a55c |
|
MD5 | a5be238b2667fc8d6d7d3b45f181931d |
|
BLAKE2b-256 | dd1ec7d4247da326fadb6066f6045891109726053c78d2ad15ec274e2dddc8ba |
Hashes for ont_pyguppy_client_lib-5.0.11-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24fe70f658b4b9007ede95cf1253fdba3a4c459c48c06ce674b65e03109b1765 |
|
MD5 | 97a8609e55dc169dd9090377d6efd9d1 |
|
BLAKE2b-256 | c96b4520f781e3c191754664283b57f1ba56f9bd651072a144cdabda76f677c2 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeade7a8af826f7c5d8a363679f63007584c286ecb182673ac2de25c2ef4fc0e |
|
MD5 | 01cf63450455568347129a23cee7a4fe |
|
BLAKE2b-256 | 323ce74def0b72adfe7f3385530402c6a7f0f23d4908fdaf555594a1e128f981 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c3a8497030b990082e64d18d76da8de66f24709bc60e8bb1413e671fd183afb |
|
MD5 | befcf1acda37ded057f797c6c23d6cd7 |
|
BLAKE2b-256 | 31aa23391bc94ab451f81f6966f351c46144f0e1e7cecc0444a2d21288e55d0a |
Hashes for ont_pyguppy_client_lib-5.0.11-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3628fc729b690066f1258b4241b587b0a16ecf3e6369d710c5ed245e31b86931 |
|
MD5 | 690702ae87f1326a16a9052bda57e13b |
|
BLAKE2b-256 | aad9c9ee43c0adf7b215908483064fb18e06143a3d044dab6f95f4fdb7ddc148 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8372b6441223d28414b00b50edf087e41c812613d34b6e2db3d4b3842040dc1 |
|
MD5 | 84c0831e86fa89491fd2fa4b319edc76 |
|
BLAKE2b-256 | 090fd21637266e27261c06f8bf59def4dde0103cb4697a8a809ac8b62fc50968 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58ad169c310fac4eb9a568f241c6a28c978c79a913da91fefb2c65c2f1cb890a |
|
MD5 | 2b72426b7fe6b400e33cb0e47c2ccaf4 |
|
BLAKE2b-256 | 0374b77668861e2de9334e8113473f2f8cb46262a73c4487717b5097483a2e86 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 743b43130866aa8319b5f29b972386a9450d913d1263ba62d407b20dfa536998 |
|
MD5 | ae440d3018cc864a551d4f2a9cd38536 |
|
BLAKE2b-256 | adcd2e312432f5b9e2fd9055257c03c12969f5460b306f549655ca78c58ea907 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d7814207c721f7a7754c91a37719b94b6c25839280bb5ef30a37a99b63b7e1 |
|
MD5 | 3350486f4a4041ab4c6b6a2f3e7872e1 |
|
BLAKE2b-256 | 9f47592848c9518d87a9a625750960633936c1153d82eae0d6a1d59a41aa6334 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0934b5dbcafa552f6ef3be5d7f8617fae065d48b1e467507b0ca4edc46acffec |
|
MD5 | d2b3668e1d080e0bbd331665978bed2f |
|
BLAKE2b-256 | 64b1b0ffadd3438a26c5cfdc06fa02d25d837bf521369468fe4b2b448485dc80 |
Hashes for ont_pyguppy_client_lib-5.0.11-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c614051c9c280d20f093e636430b884aa7a630d287676f4069fa2e3aca1e99aa |
|
MD5 | 730c9bba8ba10c764405eb3838fc52fa |
|
BLAKE2b-256 | d850220599b8c39296407aa217d3a768cf37b271a7e2345f80a7de992d3a0b41 |