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.13-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ce0e2e6a82d59b864edd08925923a27e1b5e1742de460cded47734ab7a8b28e |
|
MD5 | 4f91b041c12d6ed24c8c60c36a2fbe75 |
|
BLAKE2b-256 | 7fe11956e3d90d5e63c456f96f2832019f68acffbff0a008aa181866511261e9 |
Hashes for ont_pyguppy_client_lib-5.0.13-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82fcadc7c3e33c20321db13ba424989daa1d4d0fbbe4d4c13f3f6ba2849e34a4 |
|
MD5 | f451701d3ff918fc1ae55703a59957ab |
|
BLAKE2b-256 | bfba29e548b9ef5d104615fcb82b58695927a9b4426b54f3f7421a8840e5c54f |
Hashes for ont_pyguppy_client_lib-5.0.13-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c004a1d3956b6cd637a9be11af88a6d385bdcc6fb31e35466b8772db69b23ecf |
|
MD5 | 935bcb50d477ee4680421b5898e055a0 |
|
BLAKE2b-256 | 3eff7aafd9ba99fd04995ccf8210bf86d26226bb5b7b6dfd103dc2ad08d09e79 |
Hashes for ont_pyguppy_client_lib-5.0.13-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ba5b310ffd2faf4933799c4a6826fd6626dc27fffd7be2e77ce09e46147c444 |
|
MD5 | 45e8ea3a91737e74baf77de390a88c98 |
|
BLAKE2b-256 | 24a69bd0312f3804cf033235a890fb88695fc569065201bb4cd47d80038fdd2e |
Hashes for ont_pyguppy_client_lib-5.0.13-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e5a72c204550694a3f0a127879067a57871f7c821bd3499a5507e9960b2ced |
|
MD5 | 14116781ed1c1a20e41b487a9ccfc270 |
|
BLAKE2b-256 | 0ba1f08a4fb299bfb04dc8ede7cf80a94d3dad071890a307b220009f01c534b3 |
Hashes for ont_pyguppy_client_lib-5.0.13-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318662b2cb3ce97381a6928b1e4bb09c8c521817d90d471f3f59318008228b1e |
|
MD5 | cf8127f970c600ab7891fe153ebf2c04 |
|
BLAKE2b-256 | ebcbeb5049ae80f9586e90428b8a0b08222bdf85f69b18e437ba247ecedcfb65 |
Hashes for ont_pyguppy_client_lib-5.0.13-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22ea10fb79b3a7c3aeb5926d911ad1464db16827a1e20f620b1b812de716ada6 |
|
MD5 | 9ac0b08f13390394521e79bcd7302e1f |
|
BLAKE2b-256 | 5f060890fbafe91cb57e9c5c1748f5db3dabcd24a73fdacf9d666c6107576ff6 |
Hashes for ont_pyguppy_client_lib-5.0.13-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a9cb3bae10d72db0918119791eebe4495cfe83cc1024e3792c0195a3793e2e0 |
|
MD5 | 8b2e4fac5e418998a501a7c335f05acd |
|
BLAKE2b-256 | 0bd61cbafbed4363d601d32b4e5b9eb960736ebd13722e4309004a44dd26bf6c |
Hashes for ont_pyguppy_client_lib-5.0.13-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8af32441471f3e8ce4b8502643a9467af0e342dd259dc8c867dd586f2030a4f |
|
MD5 | 183c8218347fd6992ba40492e296f431 |
|
BLAKE2b-256 | c1c7f587d0f3c838d2319f1ec862c6be52bf5f2b94dd47f072a546e947c1033c |
Hashes for ont_pyguppy_client_lib-5.0.13-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e37efc9ce9371eb55764a12274cad033c13b0e931b8871916544af4a6de9b78 |
|
MD5 | 2b293644ffacdffbd8651545b40b8b0c |
|
BLAKE2b-256 | b11f9299e3624c1c1afeebef0120774253b3de1c0aa29810937d4a53f1ab7699 |
Hashes for ont_pyguppy_client_lib-5.0.13-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dd77b456191b6196a68d709bcb811014232d23c35c68fe3c77e31d8b1475873 |
|
MD5 | 9902181febdce77cd78636d909ac37dd |
|
BLAKE2b-256 | 85aa691a3022e088e34e9518045d27971359168451eda1f58ab1bf260b332813 |
Hashes for ont_pyguppy_client_lib-5.0.13-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d6bd5d62892694dd3b8e206141062a212a119929f285b54be8e90a24fdc754 |
|
MD5 | 06f888ec2412f7e1bb3d86d2605a0f46 |
|
BLAKE2b-256 | 706b426b74a1f428c7b642715a9fbb8f00f24f2359ee112e4f7d13dfd10b7f25 |