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.0.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71fcf78a44711019e61f74a59e00968874efb712ed65d957268cf3c70792ad0e |
|
MD5 | 42d5aef6aa8fef25e52f8af156a4b9e8 |
|
BLAKE2b-256 | 77ed7381bc47ebabc59d7c8f3a6ac56d851b01d0f1dd15a1f88131534eae48d2 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8495015f6bd1af094136a11546bbcdc8235cec876240568ee21748c39ecf6a38 |
|
MD5 | f6bd8b76930c78381e241d5aefb4b35b |
|
BLAKE2b-256 | ae396a46e650a8c8cf7d960583cc8fe5d1800531d662fd3415c204e07044f7fe |
Hashes for ont_pyguppy_client_lib-6.0.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99dd6265b289f2e0012e3cf92db9bf7fa608300ec054b262ec38c93e26e824e5 |
|
MD5 | bb3d1ad824c50bd0404283031eb20edc |
|
BLAKE2b-256 | 17baaa0470d05f9f583c54046e752c28db4e6a41d224348d5f7660ed5522d927 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f0ca77371c2859014e51e9903f022dfcb48bd331b62018c8d853de51511ece7 |
|
MD5 | ecb7ac868890486c271923602185a938 |
|
BLAKE2b-256 | a0978360faf7cd24bcbec28c8061a1e298200020d48e902309020eaa6bab0721 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96736dfdcfbcc5a33059782e24797aef922099a488b272c767af4d622c692d4c |
|
MD5 | 82e8adf6e9461d397ac0bcecd46943be |
|
BLAKE2b-256 | 66e3fd4f7afe32a7671a8a84a359cd2c22dcd33a9513b2db991afe95dd89c33f |
Hashes for ont_pyguppy_client_lib-6.0.1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2679c8be507b409648f41a02a0e2003882bd4509b3d66d14636ebb6557344ba7 |
|
MD5 | 6c54d318cf537abb85e2162aeb9168db |
|
BLAKE2b-256 | b73bb618efb813f43a64d3e3485efbebb27d79092fa070ad8b9f9487d2116e5a |
Hashes for ont_pyguppy_client_lib-6.0.1-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 334f16ec920f65441b0f2f8b12903929732ffd3375b210daf708a0ff2176e64d |
|
MD5 | fa5c6da4ae3f41b0d09aa09d137d031d |
|
BLAKE2b-256 | 5b79e1a643e561545d6413c8f306f9550b1f6878ad25b143b3a8e88919d24228 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72022b2074f2e4c23eadd448d9fe315147dc9fa30ac67f2a944d4ff2c93004d6 |
|
MD5 | 0177ce808a8e06e2daf2d16f01a13d84 |
|
BLAKE2b-256 | 51680f9df31607085c17008d80740946f84b6130404bb479533b1c886a0e2b41 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3f0c5930bcaa7d5183ff66427aa5317d6d22e4bfb9dd43fcf817e0c23cd6f50 |
|
MD5 | 543a5320e0028977cf62deaa9e39b7e0 |
|
BLAKE2b-256 | ae580139f98d621950dd41290e447c96798ed6e004e1b042d98c0c96e26fba27 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e6a48f73de684d37a414a36cadcdec9d860605c1f940101ee725b6904e6bc38 |
|
MD5 | 0a97710f1fb828704ae6a139b93a939e |
|
BLAKE2b-256 | 3a9e64501d20b8fb3bbaf9f9149efe720658db878c1e3db9d73b4597f76b3630 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fa535fb64a71372dad80368f4bd3a735ca8a8689b436583b0cc2334974e666a |
|
MD5 | defb755eb22e459d62c62a8a9f858629 |
|
BLAKE2b-256 | 9812c6766881643b2460bcda87038d70e1e84987d08fda87fd7c21b3efd11183 |
Hashes for ont_pyguppy_client_lib-6.0.1-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03a393167873aba5d0e5ea88073f6acdf2724c6e899686f7053eb967ad374aff |
|
MD5 | 8c8e791dd74891935ce39a5c19d46eb7 |
|
BLAKE2b-256 | 95dfbf2dc006105c803ea7f02091b4e6f0d40a57b29c98517bdddbf323e8622e |
Hashes for ont_pyguppy_client_lib-6.0.1-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c75f56905a7ebab29b79da06c731d614cde35b9ab7be0b380bedde5c453076cd |
|
MD5 | b4c08e3f3f9be5256548a7752253d17a |
|
BLAKE2b-256 | 2de77c96dc1ae9455de38af3ae761e11f06e4adee69b3c607a20fca3461a25df |