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.5.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 818d8dcb14d19d44cafcdae515144f23ebde509c81060b6a52657c00ed3141d0 |
|
MD5 | 20ff3253d6bc29e541f4f92878e525bf |
|
BLAKE2b-256 | d28c249519fd2d675867a419ae08c81affffcc5e2724f02d3cc265be49628e15 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34aad186efb97f237e2fd16c1d988ee9b19834892d1686510c06614ee2ad38f7 |
|
MD5 | 032b32856a07eedea78874aa43937a19 |
|
BLAKE2b-256 | a2fd2912377d6071e05fca9d7c97c11e2a8831bab9f311a2fb68e83fe99f1bc0 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 825a310b3d20f900cce6cbf3c4bde122a7ee3172af3d90b59e88d9ebf75eaf76 |
|
MD5 | cbfa025517802ebbaf1c842a41913b9e |
|
BLAKE2b-256 | 76d40b91497c293fcd4a55bb213e000ee62d2d535d754285aeab97c59eac22dd |
Hashes for ont_pyguppy_client_lib-6.5.7-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e80c00674651420610574b3695ce3d02dc6eb56f96de2f8719fe9bcb57fb1651 |
|
MD5 | f463346b1c8c526f41bb78d639fbf3e7 |
|
BLAKE2b-256 | c8fc804290db844ef7b4715aaf80ec1d5baf0654d9ab6ea2a3da4f331e57b4a8 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2a803cc6c7b2fd5be8eb412bad58370dea5e0dd48e34d8d9a7b6ae32f09c5a0 |
|
MD5 | 67659d2092bec9aef19ea57c56bcd354 |
|
BLAKE2b-256 | e7c0036f8f61e20e60444711562aecd548d0a41a7989a389bb5194bdf6aa0003 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 172d0afa4a4ac2384da77ea7c3e0c27404f3ebf6c1835e826bdd32da84f60209 |
|
MD5 | 6aec521052fbe4eade4f5a64ce938cf5 |
|
BLAKE2b-256 | d197531661060d14e33de3c621a7da48c7d4cfcde7ee0c2f37a02e558f588476 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69e3f54dd95da41a4b0a1b85a58d93e1259f2d427a9c9c8ec5d34116b63d4603 |
|
MD5 | 8c0cdf2d3f1b8eca90c83d124f6ba197 |
|
BLAKE2b-256 | 200b57c8a66ded4dc7135e261237b8275e536ada83536ca9f7581709438b56b5 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfe017b0fbae7a2a832401416b37f9257657b30339dadf72e81cd7b2c599a360 |
|
MD5 | a2d87a51d61952c48afb251c65fbe6c2 |
|
BLAKE2b-256 | 5e4ce79a31884d6b84e8a39df61e0e1a7decb5f9db8638259151073b553c68ca |
Hashes for ont_pyguppy_client_lib-6.5.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5272e7de4808fbe5b6f1e4cac6cbb3a3657b7a9932ce0b27e28f21a1835a927d |
|
MD5 | d7a515d17517842c31f7df7c4907ee46 |
|
BLAKE2b-256 | 3ea190d2b4fb029294038158a5269fc509ec315efeffe5478b11fc921823a647 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7759fd484ec2a3822dfd9e3d8e1af86e88cc0a63c7ace4655ba18e58e9d1cc6 |
|
MD5 | 9c3ec8fe19c50dc936a95253777a8e16 |
|
BLAKE2b-256 | c9e46b24ded5577e6c5ba113295ff99a919234813fee983b6e323a65d1b8d562 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1032aafb06c533bd8f03bfb2ec1d32c3166c5f7e7e6707fc36f1fac40844cc20 |
|
MD5 | afe3d00bb5af0ec27d99d9c2d03fafdf |
|
BLAKE2b-256 | 6f6eff65f3395a8d071098644b289aa029139ba9348016e48b8ae0196ce4049b |
Hashes for ont_pyguppy_client_lib-6.5.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a25bce061cb61cff79d7f22f5f5817fe47e176421756184f373b59f5d31ce6bb |
|
MD5 | f7e74e8854cad9a2564b6b5d416ca1b1 |
|
BLAKE2b-256 | 6b73df5b43a9a3424540a05fa1112ccb4540346d3507c569b13b90ffaed94a60 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 983908ff6d876ebcd927219034ac8aa85b22b1cb3cf7ab8acb0008912a74e53b |
|
MD5 | 652df7d8d49d86410426af1aaea7551a |
|
BLAKE2b-256 | 6ed10bbaca58f7228303c33624a275ccd9d4da3c169f3d5a3730c3abfa797fae |
Hashes for ont_pyguppy_client_lib-6.5.7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de86558ecf36412805c41d0e818c995dc93070a5d2f58f7e996e599fcc5ebe96 |
|
MD5 | 7395502d02cc9fc6b201dc99ade8f7d1 |
|
BLAKE2b-256 | f90c50c2945ab6ef49b613cec8b6c0964254375c3e5b01a1e7e0c2327b6a6d22 |
Hashes for ont_pyguppy_client_lib-6.5.7-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e04e2a0c9bc929b80549d242cd9f0d0184e604f48a1182461cedc64ce6e039f |
|
MD5 | 4b394289172fa2858bf6c6e4cb17e19c |
|
BLAKE2b-256 | c958d516bf7855538c4557aa6ed6d051229c50cc3931ccb3fab97d8af370986f |
Hashes for ont_pyguppy_client_lib-6.5.7-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 523a8df0d14d75f40530ecc19cebb4539da5762ca820ebf87dec5b6eaa0b8033 |
|
MD5 | 4fecf0d9f8fa1235ae1d7c95d606cfb8 |
|
BLAKE2b-256 | cc82c2ad62551c6ee20493dcf948752f0a39a7b2f507d480f9f00a2f6254238c |