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.16-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c6840746df846916d790fee234824327a74aa47274e53168489fe05ddeec57e |
|
MD5 | a10e8b8e4d8de60bd7c84df3ef49bea6 |
|
BLAKE2b-256 | 074fdb1ca65428cd37e19468e71b88ef6ad1ca969d2fc2f9fdc5e78a04cedb17 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb3bf9f0da3e670441eb54bea37703b8a31344712dcef628ee18863f0a728813 |
|
MD5 | 6a5138d71f4fce7fda482210b8e6be75 |
|
BLAKE2b-256 | fb2991fea03d5f1bc0c4f26b3f65700e59605d1e8fec7b78ca080d509891a407 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ac66fa23f0a05c6796ecdf56e4508c8561971b3fdf3fd81fb25acd797e85291 |
|
MD5 | fc96d51bdc6b52f0502c82580303a806 |
|
BLAKE2b-256 | 045a95a0d458935f6b9c313bd3bb69fee27464b806ead67e522c62d05e43727b |
Hashes for ont_pyguppy_client_lib-5.1.16-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d44b1b5f8a73dbdbcef1eccbe35388832ad46761c14cb0fde2cdfb125869f19b |
|
MD5 | bc741c801d0ad73cd6ce40b00806735b |
|
BLAKE2b-256 | 2eefb8bc1f5caf51bbfabdd2ee3498c2c7542edb4e7223ef400eeedd499ef6e3 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5589a95d7cb4cc17ae18694c078cdd85ba12b4b6574cd2a20d6cc05e652f9bdb |
|
MD5 | 4848624287dd7d0d61d78ce2449ba46a |
|
BLAKE2b-256 | c3d001763f35ae5f4a5b9a1d7f2e01ff5e1bc824e9dac893dbc98e0a004fa700 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ff7128d2396e5420641dc6124ecb72547880545a85dfbe517185931c68920e3 |
|
MD5 | 60744d7e6623c70b9f86d64050e8a4c8 |
|
BLAKE2b-256 | 82ea08865d87df949cecc5f6dcf88c1d8726e9b9e98c084ee2b1358e01f96f11 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 933b79eaacbf09ac7d5bac58c1d6ffd577361fcd92976878390e41bf2ff0fe9d |
|
MD5 | 2077725ac2c1cfe63f9266193bfe03d4 |
|
BLAKE2b-256 | 8c7e4f64d2494c6fc4a129b31d5e63a25e15b01ed58ad1cb084fb885778bf9ff |
Hashes for ont_pyguppy_client_lib-5.1.16-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c932ba89caf355f774614f0bb60066ffd9df39266ebf2bbd706ecfd02d17a05b |
|
MD5 | b7788e154dcf87caf8322b35051358b2 |
|
BLAKE2b-256 | 74f4161fb8e540efec3cea8127eadb93910392373662e6dc0751b1e27cfcfc04 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 507385b6559a915c0b306e6bfe121be4e2adb5b99941e4ec905c8f12b6687e8e |
|
MD5 | 9621251704d5fd9045423ec2b1a16586 |
|
BLAKE2b-256 | 21b0f2f91dc84f521ab87541eb0bd8989960c5de2fc5be21832ad993bf2b80e4 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ce96c3192dfa196cc60a24c2a864eb197c36b22b942cc498e9afbba14605d09 |
|
MD5 | 13a7d09f50ff94053cd2d78535efe3ba |
|
BLAKE2b-256 | 0b35aba755d614fafeaa47d85415d9ea05b9f5f79f33119941f497b43c94f889 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79379db361c4dfc170e4266d32d970db0dd4ff4a95705549066c4eaefbc44616 |
|
MD5 | 2bca200166311824ecd2273fe4b3d817 |
|
BLAKE2b-256 | ed0aeb4b47bbcba4c8bb8b153fe81fbe520089f209f2b609d48f0933f2dab23a |
Hashes for ont_pyguppy_client_lib-5.1.16-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b90af5855a6859148d324180c74bf67c31c7332be70025cbc487c6abc29d3ddb |
|
MD5 | 0b34d63968af7fef51cad916dc12aae0 |
|
BLAKE2b-256 | 9184a8baffdd7a0da7e15ac32aaa2742f83851b863f901d1994d5414bd46aab6 |
Hashes for ont_pyguppy_client_lib-5.1.16-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac7f46f605a5f6ff33e52ee88ae1e8e0a9b8742e8de0bfa8dd4de870af8013c6 |
|
MD5 | 069191cb0980163d65352a0be2713ff9 |
|
BLAKE2b-256 | 9793ed531bbdddae33929399d146fdeae5135577748fe35a258ab8a6ede6b2e6 |