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.9-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b1ecb656b190ead416db44d49a8373eecfb15dfc2f51a0ec33142b9b918c86 |
|
MD5 | bd5e4f959cc2dd2154a349406d686ee9 |
|
BLAKE2b-256 | 826e579ca33e607cc2440070ebc10229bcdd17a33d59798710282d468f233a23 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c2554e547e1e2f85d542b5e23702b77bf08017b9feb0f0fa4ee2eedbc7df93d |
|
MD5 | e7a0e38642c8445b262cebae03e8cd00 |
|
BLAKE2b-256 | 3fcbd8cf346720351ac56ff00a16dbfb53484c538c983d099b5da80936436dd3 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edbc0c5f3ea3a84764772619022c95c27b7f3ca2c34d7451191d64cc60f525c8 |
|
MD5 | 7f25dc7600c4981c2cf812168544534c |
|
BLAKE2b-256 | e53e650c83054508da0757fc7919c93a12f04e0f22194d41145f9f5e0db05694 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4595bf2734fcd0becac05fb59f971694ec22dcd3e4a8c1c7f54de82f7eadde70 |
|
MD5 | 46a40ea315d98b7188a0c35aef36ce4f |
|
BLAKE2b-256 | 6e3ca6771626e585eb47cf8f6ff6fdbc5d44928251a7248e5ac962cab76e7216 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edef3854fed98728d9111b829dbe6b3cba324bf597821e63fd4ff95ce9206b28 |
|
MD5 | db3c59ab7417ba02b933058870837848 |
|
BLAKE2b-256 | 77e6ecd76a2510bedeee745e7ca49045c1e5baaf3cd62a6cfa07b2eed0e974d3 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44ee7acd7eb62506441e4183b88ad9832c5f4c07ec5da6fa8da99df934d3254 |
|
MD5 | cd816526062efb34457665f0b753762c |
|
BLAKE2b-256 | 4efcdfa60f1e0e653501c30c97f576dd6a48eb20f0be6259c00305433131e775 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e478acbd46d938a500df9aaedeff983ba07cd05132a9197ada50c99157319fbf |
|
MD5 | 858b195089ad720052983beedde3369c |
|
BLAKE2b-256 | 3b527ed8bcf6b632b094e77d8a8ff5fbcd3235b7eb4945ce43a4dd923cd16e6d |
Hashes for ont_pyguppy_client_lib-5.1.9-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 650ae7f9309cbbbe2d7ebc3c1cda7911aa1514845451d1a266e88902a4792ed4 |
|
MD5 | d8aa987a67bab3f89cf1f54ce9b6e99d |
|
BLAKE2b-256 | 8b1165caa4ececf01859b7d81dde4f0de0a4fd620d4996c9299ddc70f51d1ada |
Hashes for ont_pyguppy_client_lib-5.1.9-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea900174430676eb13525f12d92a6170be7551dca24b1bf6256970bb50c438aa |
|
MD5 | e1403ea5b6d9510c72df86d8edbc6eb9 |
|
BLAKE2b-256 | 9e39829f497ac318beb31262069ec709c3bae8f96d0bf83dd3bfa5da5bfeaef8 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 444e4d9259883a30ea52d953012f4d9d7082be5e349914f4dfbfc146598bf5a7 |
|
MD5 | 9011882f2aedd951a69e54b5784cb14d |
|
BLAKE2b-256 | 9b31b24cdabc53de4665982ed68396abad585e24457af84f724d01b560a91466 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c77679d1db52fb962a0fce2228cfa540f6557f07759a47624a028949fe08f04 |
|
MD5 | 89b8e4f161e45d2dde04d799ca9c6027 |
|
BLAKE2b-256 | 95e88c59f8c5d314e706821fd6cfc3c883723bdc76975a78b1b6bc6d905a2df0 |
Hashes for ont_pyguppy_client_lib-5.1.9-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 295dc75844076f9efce3ca6bb0e9af693a48a72f272f87f962c7d0147f38b5d6 |
|
MD5 | 81630f469c6682875596024637f6e806 |
|
BLAKE2b-256 | db35b7235458f5a19f990d8fd8b7b8571111ba3026084cb2e9d36043bdbaa55a |
Hashes for ont_pyguppy_client_lib-5.1.9-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ece5d98357068994516d0d97630c6bf15e78ccec79c823286761159758859ac |
|
MD5 | c4a1be30355c3d8f0e13116e4dfef86c |
|
BLAKE2b-256 | da3ced189700091bee81db459aff6050f0e64f0a102f0e4b7261b53a3635f01b |