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.10-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 152a00187e30a3ce8b54f9f87d5627e94c5ae977d6b6eae42ccefe7ba6c6fd9e |
|
MD5 | c5951c25b7beab856a9c843d0424643e |
|
BLAKE2b-256 | d18ce683e4ca6e548b9db911597359de23d28303345b9c32f1ef7d78e71bc0fa |
Hashes for ont_pyguppy_client_lib-5.0.10-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bda1a9126f29a00d0ccd2888be9e75ba72a54f09beffe5e4515bff9ad2ad8d48 |
|
MD5 | 60e6dafdf64708f4a57b990cd14ca0ed |
|
BLAKE2b-256 | 20c3f0dc9b36f118ca75007792dd2f795e6b2e96b3548d1d2ed174b9fb8d8ef8 |
Hashes for ont_pyguppy_client_lib-5.0.10-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296329c50dcf5712ba949dcf3350a256b1e8a4abb0b52fcbaaa06c30c5770829 |
|
MD5 | fc5216f29d23023088f75c56ab898ef8 |
|
BLAKE2b-256 | d708df555cbc783419872aafe48e114181f0710e42fd5e4b0264970c8f0c5c87 |
Hashes for ont_pyguppy_client_lib-5.0.10-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ebffcc3760aa447c890fae8c9aefdcc902782bbf431b95bd9a618a294f45664 |
|
MD5 | e43941144757ce8e686309a67ec8f6a3 |
|
BLAKE2b-256 | f26008a49be9ead661bec444062b98b1c21d05cc81c8d1f76b6b86ffe293a075 |
Hashes for ont_pyguppy_client_lib-5.0.10-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4291bc5afadcd05ba76f1cc33bf0f4dd5b94db19722d7b6380c7d4d87902c0b8 |
|
MD5 | 5b9b9fb43e29cab1c74634c81383ad10 |
|
BLAKE2b-256 | d51a6473153f97a0b233b4b86d6c96f6154868e6d1b4aeccb0d7dacc8257ab63 |
Hashes for ont_pyguppy_client_lib-5.0.10-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 155abb58fcfb7461df7694f2b99b9cbe0d9250c38c2dcf4a2b0473e7f1b1fdd2 |
|
MD5 | 84674a5b30bd1a39e663b5552d0cfb84 |
|
BLAKE2b-256 | 7ae6fdde90f1729221fd100c9473bdf73596bbc8e8c7789743e6b98a4879334b |
Hashes for ont_pyguppy_client_lib-5.0.10-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd57a52d0239a4f2538ceb73e63fc1a5af08ee1c14bb571860300822fdf265c3 |
|
MD5 | 547adb713a92aa4cb58893300b0126e2 |
|
BLAKE2b-256 | 7e8439c38223479468abe3c7b7e5a6e8c8ebd4fac594d2bec80a67f63530c9ce |
Hashes for ont_pyguppy_client_lib-5.0.10-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6141ff72c8cf94ce96ec838a1fd4fe7119f8ca7d8219cc2f6ac10194ab15bc50 |
|
MD5 | 4982046f8dc304efd0a3f60cd339b50c |
|
BLAKE2b-256 | dce3e16b83f48d604a0f71728d42391eedaf88492fcc62970ed336673699411c |
Hashes for ont_pyguppy_client_lib-5.0.10-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76fae5f64799ab2151919882722c0154530654ff4f4bb9b6bd88fb84a1b788ac |
|
MD5 | 020863f2a5ef7d27a3fe28a7e10e5643 |
|
BLAKE2b-256 | 125a816f8003340870fc7ebe412488811ab99cb44e72149514e54fb18a5f253e |
Hashes for ont_pyguppy_client_lib-5.0.10-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0996b471490365ab6999fdb4848339163aa91cdd0367393779775ab91874ea1 |
|
MD5 | 36101f651f6f6c248d67293bd88df4b9 |
|
BLAKE2b-256 | 35e60f1279dae9a6147db94bea30532f63f546e600c1153c7fa0e5874ef1d7d4 |
Hashes for ont_pyguppy_client_lib-5.0.10-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b131a74a69ae33609d8c052a662e13e14287bf11e516b3cbc63875b361c251a |
|
MD5 | 44450961dbbff8e9945bd2130a4e34a3 |
|
BLAKE2b-256 | c966734b8c4b425035e2a1993d84f54d33a523c7e56c4e59fe93b1af9a313ef7 |
Hashes for ont_pyguppy_client_lib-5.0.10-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05a3db52042a7d6b87cf3e0433087e7f59332f8981b9bc5d343ebffaec00c005 |
|
MD5 | 35ccd1029a1107623156e0714a7c585f |
|
BLAKE2b-256 | 06a7cbf884a98b24f3dd5ef7aad6b45bf1cd4c177dc51289adb555d45a8acd06 |