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.6-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba1f7e7aa02830d1d4760f7871710b1d097a7ab9e5412b127c00474974c271fa |
|
MD5 | 19dd21294e7b00957bb767ecd365cd8e |
|
BLAKE2b-256 | 464fae9e8dbc39aa3f2f2df5d7ba17b31a71cf39d4495ee715f4dc209ab036e2 |
Hashes for ont_pyguppy_client_lib-6.0.6-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d92d64104c23701c8e99b5cf77e907bfea51bd7c344270dfc3395a2fb7d9faee |
|
MD5 | 7bbb27576af879c776485bf574126d5c |
|
BLAKE2b-256 | 403c1787170c2e96a7a61937bedf82dcf0de0ba8b9012d2232d92fe754b4bdf5 |
Hashes for ont_pyguppy_client_lib-6.0.6-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07386433ce21213480d9e4528eb4c6d6884181dbffe2f2d631a13dd8d6cf7dd6 |
|
MD5 | ec82e93068040220ad2eed03a518ab25 |
|
BLAKE2b-256 | 7c8fc3e34104c01eb8aac2f5112b78cb48974396e04c5ab00c123c2207ec5079 |
Hashes for ont_pyguppy_client_lib-6.0.6-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15733167dc2af97b0b2bf4cfb939f5ff0ad30eeb5059b891a96e232b9ca5c7f |
|
MD5 | 0ab50e6949547f0aa93dd6507fdd4418 |
|
BLAKE2b-256 | 4489262825712c64ae7b122822fc49027d845eb798789266ceeaec8f51447baa |
Hashes for ont_pyguppy_client_lib-6.0.6-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02caef985db6b45d1339b92f147245120a64fa484326245502c318a653bbf37d |
|
MD5 | 15a98698603558568dff0903b30cb949 |
|
BLAKE2b-256 | 970d8acd47355082b02b5dbfda2e8f3959d235f3cbcf2fa106c493e0768a8547 |
Hashes for ont_pyguppy_client_lib-6.0.6-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f65cd76069cd92e5facdf9a56f587fe3d45005b9b4dc012d8c8ef5b68fb68e75 |
|
MD5 | e31566f6eb8547e84733f703f19d605e |
|
BLAKE2b-256 | aecb8ffda7d273aecf8baddd720f397c5958f1043a94733dbdc1f4de212b9894 |
Hashes for ont_pyguppy_client_lib-6.0.6-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80aabb8674d04d8e5dd0e14a3a28f7266cafc72cd81a7bb15711c826651f29d6 |
|
MD5 | b71208f4ca161c8d9af78973c6e83d46 |
|
BLAKE2b-256 | 8d35ab1e2ce9ebac90dfb753934ef27ad0dd2c461aff2c42e39f36839b106cfc |
Hashes for ont_pyguppy_client_lib-6.0.6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64974da16708140935efeef5026dba3ccb538aa875bf3afe94d2b35afb347ed6 |
|
MD5 | e1c81dccb6ca10b5586bca1339882e6d |
|
BLAKE2b-256 | 6067b265187102d0dc66df4e22a31173d61b0587732b5115de57ca6dac274cdb |
Hashes for ont_pyguppy_client_lib-6.0.6-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc50853a84235929ea18968a8cda53cd9e718890536475d782dc425abda3f9df |
|
MD5 | cf655f126bdd329728e15f1cdad0ee99 |
|
BLAKE2b-256 | f0ba8559ecf06f980628f93798ec4b2c1140adda0deb4c06305ed63733ee0a69 |
Hashes for ont_pyguppy_client_lib-6.0.6-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c05389eaa8ad79af2616278d9ab511a96fa19091ab0911204ffa4990880c31a8 |
|
MD5 | 6b5219e973ea9b479f9e510594e0aa15 |
|
BLAKE2b-256 | b9a83364aad0d08071c12197f51ac105799631f9081ce16b6af987bf81c8b10d |
Hashes for ont_pyguppy_client_lib-6.0.6-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48eac924ed88163e531eb746677f415c0135b98b46b9257176deaae3040b8df4 |
|
MD5 | b882e8a550c0e47c7cf57044f84f3d12 |
|
BLAKE2b-256 | d7d386b425ff9afc18a92b995ff22b17cf54733606e90c0cba8dfdb1612ef95a |
Hashes for ont_pyguppy_client_lib-6.0.6-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d16dc78a2bffc9055d70ca96141fa285ddc82b3d8a9cbbab5a73f2f1e3aa0488 |
|
MD5 | 5a58fdcadd0e031df25ec617ad7a8a6b |
|
BLAKE2b-256 | 9e08fd810a38a31f0af3d2bec66ae02b328e83d4c40ce8e748de87ec780336d1 |
Hashes for ont_pyguppy_client_lib-6.0.6-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 926386890dbdead1b1ce249be6a44d2401b45821482daf40e63969480ac8309b |
|
MD5 | 92a0df043a4ba76c97c3f2de6ec0d57e |
|
BLAKE2b-256 | 529043bdb57485e46500d0fab5d107cb597fd826ae27d4307d720e0afe54cba5 |