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.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854deb11018e7a8175cab3d230b3e4682c79a574870216cb1243eeade00daa2b |
|
MD5 | e2051aab4d6cf402777d2ebb02b36f8a |
|
BLAKE2b-256 | 337ee17b561373054c38a6ad677fc02c6e6dbe5624b5e1fdd32da5f4d4f3c159 |
Hashes for ont_pyguppy_client_lib-6.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95c208fb365baa2294af668855c9382243f56b572cc000ee212e6c886de82b02 |
|
MD5 | 6eb8d7cca4a583846596e97f42f3b75a |
|
BLAKE2b-256 | 3ed2ef4db33d0a5a36930310f91a19321a844415a16cda0546e29a6bfe1c7cd7 |
Hashes for ont_pyguppy_client_lib-6.0.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05ee3040ad2e5c94c1d1ce2f1e965f0f4e84de2be4e0cd0a12c6f70616ecd6d2 |
|
MD5 | 96557ca66fa15f903be6dd33b860f44e |
|
BLAKE2b-256 | 741eeb3a13ae6efaa4613d07b7f8a3062513c8971451981a19592387335e4ea9 |
Hashes for ont_pyguppy_client_lib-6.0.0-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54fae6c7e90ed778deb79c7ff2ce4e5b49eef5ff0904f76274609635608fd52d |
|
MD5 | dae867ed9c2a78b08d96179b996ca739 |
|
BLAKE2b-256 | 869c084286ee4696692d980a1416479e9fd40c3ee6b01c3109959682d9640a6b |
Hashes for ont_pyguppy_client_lib-6.0.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95c79a708993d24bf59293d951062316c35d10cbc78eac20e15ce6fbd3d6c5ff |
|
MD5 | a550bf6e07a8ef0d087c522fe0626627 |
|
BLAKE2b-256 | c7657cbbb1737722c427de2cc1eea2507fed8a8917657d4edbf534f83b143c1d |
Hashes for ont_pyguppy_client_lib-6.0.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a3859baff2ce1f79ee73c513e70ef8c21bae8691ae96da0553d12d489f809a3 |
|
MD5 | d5bc65b4f373b7c0528ec3819a16fc87 |
|
BLAKE2b-256 | c5323e377a8faa293aa3b4cd65fa5c644b72c3e6408a5b97cb037572b66acd90 |
Hashes for ont_pyguppy_client_lib-6.0.0-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8db25aba44230be2d87bfb71230441fdb3c63be26ae4ad382bfb5b2bc5dea597 |
|
MD5 | 537ac590c1e27f742a6fc266ea823793 |
|
BLAKE2b-256 | 5a182c1cd59c89fb0d21ee600eea520d85780df9ec526b46489c278095cb3d2e |
Hashes for ont_pyguppy_client_lib-6.0.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6297b04eb277be35f74fee7b330d9656fb9983db07388b42f1d645d6f653e9dc |
|
MD5 | c6f31972022eeaa6866a6cd7bc9c66d2 |
|
BLAKE2b-256 | 5c957a43776f43e4507f800514e71a5cdbb7f5bffff343c7778057dead389327 |
Hashes for ont_pyguppy_client_lib-6.0.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 178076e66a765693097383ad0ad0147ed4ea196d15450b97a69bcdb8242451fa |
|
MD5 | c899d2c45845f90d664ecd109cac508e |
|
BLAKE2b-256 | b52af2b21e2d99c88553c0ec497081ee178a733c29e0f9b355df90425dc8ffae |
Hashes for ont_pyguppy_client_lib-6.0.0-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48624d269296e649afb540d32e612da9489c7bafb19aed1914a9969f3139a8ce |
|
MD5 | 48c7da6b39693befc05741f7b972bd68 |
|
BLAKE2b-256 | 4c71319f195e954fb79d4a1a69aca0e3363021730b6d33bf10577bf27b8c3e2c |
Hashes for ont_pyguppy_client_lib-6.0.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8d24cbfd9c21fe9c72593767d54228129ca0e69c4c6bf262a54f5a2129b6fbb |
|
MD5 | 255b8f22d417de10f86146c08e645c9a |
|
BLAKE2b-256 | 6b34d8b1988eacfb3a9c4834bc7a1d9bfe62b31443c829712f5f33f7adce3357 |
Hashes for ont_pyguppy_client_lib-6.0.0-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc764d4c43046b02b2c5ae711ae25c89d9147a4d6905d4e87f8625cc1c7438b1 |
|
MD5 | ceb3b365907ef4823daffa9998f8f34b |
|
BLAKE2b-256 | 68dd22a82d3f3b7308c49aa54137253a7adb8d1eeef002682f0649072014967b |
Hashes for ont_pyguppy_client_lib-6.0.0-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bc6dc090209b239c58901c48611a7f479881f1b1a0ad1e917988b4c3c417b97 |
|
MD5 | 87260f029e4b0b35aa27f14886a42077 |
|
BLAKE2b-256 | 14e7d0cf925bb47eb58c4872fd1eb350bfccd0126c7add8019877f1a6e8ec0e2 |