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.0.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c6eb3c2550ee54fc0a564ba4d36730abb3f349b57f4a29f112da33458c13947 |
|
MD5 | 48f946e0cd171d697c3d5e2232d39cde |
|
BLAKE2b-256 | 2d5d98156ccfab18f726b8f10851eab7ffa607c3036db1e7adb1ff2cef81611f |
Hashes for ont_pyguppy_client_lib-5.0.7-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e18d0a67e71bda39571e536cb2574fe2eb9e77db3da88faf112d17960c13b191 |
|
MD5 | 069300e1eef14a7f463249cd74292e96 |
|
BLAKE2b-256 | 8949ad41bc6a5aaaa782f2bf908b04aa0ca1d8902dad1b15577ba2b9a86847f8 |
Hashes for ont_pyguppy_client_lib-5.0.7-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d903f61e548fa26ec8fd0b253741b0ace4986ba6f85ad4316f80fe7852bc47a3 |
|
MD5 | f6cf3683d05806b54d2f74beac838054 |
|
BLAKE2b-256 | 1e64b67d4d289b77468b404795e325ce572a3bc0c9507248e0501d50f4697124 |
Hashes for ont_pyguppy_client_lib-5.0.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7235bddc2db0a609690697a4b2c9961caaaf8be5479ac5673d3b49ecf8f00315 |
|
MD5 | dbf6016ef5c13f9f5e5eefd7138bc583 |
|
BLAKE2b-256 | 693c2a9fce6384f995f0c8da79c6366614727827a59cf3046f0b33fa40234083 |
Hashes for ont_pyguppy_client_lib-5.0.7-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a1ffc5246ee60e8fb4c528b122bae99c1b3f609a049b33cfaa502c5c834fd1 |
|
MD5 | 913a304def1a1ba753c01aa86cae2edf |
|
BLAKE2b-256 | ef98b0ed8299e919014829852d844f312416225b01d8e5db8ed7e1869813a85e |
Hashes for ont_pyguppy_client_lib-5.0.7-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2ad2fc620521b4121945c85ca1be598f12f93743098c50d31df1a303d64627f |
|
MD5 | d27cd11029bcd71a16f25cc5e44b0911 |
|
BLAKE2b-256 | dd38cbb5378ee576535f54ce26520e31ca9b2642395d6167143e81afe070899f |
Hashes for ont_pyguppy_client_lib-5.0.7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b21bfae4b5d44061faa7f66f53817fad2835bca4e97ff8ea7136ae2fd638199 |
|
MD5 | 6e10bdf1ab648e56aefa4a809ba04287 |
|
BLAKE2b-256 | b3bc9cf009d10c3daff5bfb19aa582f07fae4df202041c0b2211fca4abd9ac5d |
Hashes for ont_pyguppy_client_lib-5.0.7-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 220e1f30d9e98ace8faa339fc66e47eae37f85f5737686ad4d2dc1ae12b008b2 |
|
MD5 | 290e6445053359d9665eb2047833f4d6 |
|
BLAKE2b-256 | 41ddeacb526cd244fc632cc8959dfe675cd12c1b72c7e21a0a9093162270735c |
Hashes for ont_pyguppy_client_lib-5.0.7-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b492356c2618dfdfa206ae203ca81e085e0c370cf05825b7b45d510c848fdfea |
|
MD5 | 3cfe9231af2031c02f53a19a61a76fbe |
|
BLAKE2b-256 | cd92d9ffde32cc265b19886e7e7fd09fb5a55539c30f9dd20bff1ab6d05070b9 |
Hashes for ont_pyguppy_client_lib-5.0.7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 443eecad768bfdd624d5f5a9f2152e4cb866c48527e1196d1b3eea7eabc22484 |
|
MD5 | 31b82d9342aa4ff4691d0990afc42b1d |
|
BLAKE2b-256 | 0589d2c92368013314371ce39261a5dd73a9e059e7091cdd274dbe966ce900f2 |
Hashes for ont_pyguppy_client_lib-5.0.7-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3eab327e43198dc49db2b781845ee1e241652c613bbdca52089c8a272358db6 |
|
MD5 | 64643b20d2a5ac71fadcc8f1fd3c7340 |
|
BLAKE2b-256 | 483a85effc31d385264e9ed94919c25c0881e0338487d3d844ff006c53e98822 |
Hashes for ont_pyguppy_client_lib-5.0.7-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5abeaa0430454328b8e4e92ee6c0451d0e2914689d4680609120bee4e95189bd |
|
MD5 | 0ed2d8420dc4ece53a7fd90bdc4d0e9d |
|
BLAKE2b-256 | 5d509c69aa5825b82d3ba6d43bf7fd7c01b2884961757e943fee5bb3b21eb1a0 |