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-4.5.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28f8185fb91feba85aeec08a0e1f5a858d0330aa7c011fbfc60e5337133bdb1f |
|
MD5 | 6d5e10d96e43a1185c18b95489765104 |
|
BLAKE2b-256 | f3d26412dccff288a934fa0f8ea71f1dab3f212e3c10cfd6afb0da513e16b759 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c42a37b14c1014cae4c7305886998c7a9b5029411dcd80f0065e5756391b47e |
|
MD5 | 90628065c09bb021b7f4ca6b2bde6e93 |
|
BLAKE2b-256 | d471a350470d001d198987d1b7921174255d8b43acf00559c78dbe6c1854c4bc |
Hashes for ont_pyguppy_client_lib-4.5.2-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f27d58b4510ea27aaa11750a608a3a4c52f642c1ab65fc36071608e36ea06b20 |
|
MD5 | 0114d22f7953105b168a57fb8cd92cb6 |
|
BLAKE2b-256 | 065e09371980894c08aa800ec259e307535f352e8861206bd8de42da12dcf7b8 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c3a4d5a39d1a9f6e18222c22263856d78d2b65dc76d56184a7f048302cc363 |
|
MD5 | c71154a6569a10a8fb7491553c46ae72 |
|
BLAKE2b-256 | 6a75ba7c72c8401212873b6ef8979d48014ec68eb825f049c4e5f771001b29c5 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00a95150b8015a07699b40f0fd406fd02a71a8724d7d5a07ca77126088597941 |
|
MD5 | 1945c54b66739caafea84bb60eb0ebea |
|
BLAKE2b-256 | cfaecd7df5f39f3d8c67ca6a7e643a2ee996e0879174f70baa530a2e001c8226 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cac485e56e03a3beb5dca9defdbc929464d98a5f3e854c42c1927e79f67f4fe |
|
MD5 | 25428ef0b81c571f1efae783b2a6c7d0 |
|
BLAKE2b-256 | 42575bde7c90b9ab40a1deae5012ca5aa354c111ddcc3d4d0fe88886aaba6494 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d12920c2ddc4a2dccce9c769f9ac9727ed6e69fddd8bb8cdecefe9959094c8e0 |
|
MD5 | c0f0aefe3bc86809eec9e59b80f20bae |
|
BLAKE2b-256 | a4da08bc12b219649d90eeff04acaec9f70e9aca240bc72c5f5b580f34cd4736 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d8524af1e297df6a7191742583fa2c8f9c56397e8a6843b77c09a05a5fc8e4a |
|
MD5 | 85f0d3bcd822c70e2f511b69f7f6751e |
|
BLAKE2b-256 | 4a0d0d0c3fded8aa2b02f0c0da7ca89dbaf808a9b215cfcc42651009a9ceefd3 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 748d9d7f2201ffd5f225a25ba6982862c2a17e43fcf00e9d35d4d3101fa3c831 |
|
MD5 | b56abe2cf3b3d8533dbf2c4d4e21b53b |
|
BLAKE2b-256 | 081fbfbf30d62442e97eab1dd7738559012041933ef118aeeddef9c5df906f28 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5361483346ca5c136ba25dd9506ba834aa6403e920833c453b3af0565989efd |
|
MD5 | 7ba2d55120e4ad05d48a8ff8aca0fcf7 |
|
BLAKE2b-256 | e8794c8a383bf536f5821786f513feb9ec13d052da3e886baca5bb810bfb4e18 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84efca84baa876d356eaafa6a7e80adf3b43219fd6c36d1c4d1ef4ba9c4b068a |
|
MD5 | 421ead7b71f518ff9aa357f2da329f11 |
|
BLAKE2b-256 | fb707348adfcc0d5b7ca2caa131846254dde2971645f06fb725fe1d1529b26b2 |
Hashes for ont_pyguppy_client_lib-4.5.2-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 363d7874330181363f77238d755829a898ea2ef7bf76bdaa15858b7102ab2096 |
|
MD5 | 30c1a930b7caddf847675303d1259c23 |
|
BLAKE2b-256 | 02860af2604bc58978516dbd0a78a7662d546199346b005695987b4fc088508d |