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.10-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0059270d43aa1aa99754dc2fd894b3526f62226a9176513dbbb53d0bd3a4b7c8 |
|
MD5 | 935c2c5b9f24d531a2898d42baa584a7 |
|
BLAKE2b-256 | a3d9adfeb533bb8c560354b1ff3363074526f4586cee5523e857b9227321df7f |
Hashes for ont_pyguppy_client_lib-5.1.10-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd8b75bd98e6f58b73438671ccef5de2cfdd3ad28392f1aae05a8d99252200da |
|
MD5 | e2a7a15030c33ec20a6fdf3d14e9154d |
|
BLAKE2b-256 | 838d79d6cd600defed69515aeb4674346e5a5acc89526e2459d81a1ad320015b |
Hashes for ont_pyguppy_client_lib-5.1.10-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ab66f91c8baefd8557ed9a08d7f5cad96f560c13e11ab7910437fbe73d89ad3 |
|
MD5 | b22506ffb815c50eb8f55ebc885534b2 |
|
BLAKE2b-256 | 7321c83fd8cbe66b6eae50cdd61dd8e7566b61ddd29350e140d785c943e3c672 |
Hashes for ont_pyguppy_client_lib-5.1.10-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efaf599d0f9eb7986bfd3b04ac9d5f53d4e53269ed64fb7bbec558da7780758d |
|
MD5 | 8b44ed71046ba513e68d2467d802aa36 |
|
BLAKE2b-256 | ca7bc0c7c7d2cd6725b76fc879e5b6643b9d9da873caec310835aeb5401af96b |
Hashes for ont_pyguppy_client_lib-5.1.10-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44d26de083d6951af9254dabb5d8be1579e1549a5948e1b6f7cf35c5f2869cd3 |
|
MD5 | 2601aa0def4f3e47f47a0fbb53662bae |
|
BLAKE2b-256 | 94afc8c495d6443f47454cc0ca004d4f20e130771e3d60683255c4cf281aae8d |
Hashes for ont_pyguppy_client_lib-5.1.10-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 307a06d354705aef801de1a23ac304da9ebc90f9441603b908e2d94da1bbd217 |
|
MD5 | 7086927d5cbda130da706e3c86d30153 |
|
BLAKE2b-256 | 1d2849a6e2c20ae2b2c490e49aed571710f31fc444202825e9c68c1fb46e81f5 |
Hashes for ont_pyguppy_client_lib-5.1.10-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 868e67a2cce986075155bfbf1c85c96bd83ac1c8eee1b0c93f560bf84d0c775f |
|
MD5 | 486d93efd8d2fe1f0fe5ceeaf91b8752 |
|
BLAKE2b-256 | a0614bb4cc337dcd0927c1d4b3b84dd91011d0086f48f1f05ce89cd4422c76b3 |
Hashes for ont_pyguppy_client_lib-5.1.10-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3cdc7143853c269bb848a4187e8bbb619951f3a7a52e005703d7bbcf1dd2cca |
|
MD5 | 65f13f0109c15086e1515bca6435788c |
|
BLAKE2b-256 | d8988bf98f325f08e84b7f65e802289c549a250122af93462ff799f70a6a101b |
Hashes for ont_pyguppy_client_lib-5.1.10-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baf86747217aeb91419963aa39b4bb88e21deacc52c6405ed64e00f53ace1aae |
|
MD5 | deb1091fafef658525455690097a93a5 |
|
BLAKE2b-256 | aeaf3723cf0bc6146e3202ea1ff22b277a1a032babcebd1bc6e64ffebfb6413d |
Hashes for ont_pyguppy_client_lib-5.1.10-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6ab2a52df1cd0f79486f8d4ad0de0fe16d8722892f1943c1329166ca06fc4b |
|
MD5 | 24d73b4cc2dd4e02cfda362df26043e7 |
|
BLAKE2b-256 | 3a4420ba7cc4212c4b6be4c8c36b825fd2a20b606b9f3df845dfbccf469ebeb9 |
Hashes for ont_pyguppy_client_lib-5.1.10-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 526abd66e25cc43058ec15ce2dd2ef148b6d84b45e8d44a18897041adaea4614 |
|
MD5 | 3900bf1025345a60d1e04b23803ea60f |
|
BLAKE2b-256 | 3e64d905ce33e48fb2454f3bfc96d919ae434375200a6a535f417f851f2f5dbe |
Hashes for ont_pyguppy_client_lib-5.1.10-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed90fa69a3ebe226568a64467835b662d0beafc9e746e810a18485e71e49f502 |
|
MD5 | 60d6c1501f025f3b0f7b57fd8d566772 |
|
BLAKE2b-256 | 6fe83a650e87da3e6719f1d7cd5b22c342d3596deee74ea615b1587a04042b5b |
Hashes for ont_pyguppy_client_lib-5.1.10-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 683ed22db7cbbf66fb1215c4dfe7d16247e47ec7a0c749d3d146a9946fc0a36f |
|
MD5 | ae2e7a7d5ef4322c8bf201611b5863a6 |
|
BLAKE2b-256 | 4a267b7d460d78bd3363162f4d16a66018d6fa3ac5507c4762e2674510375245 |