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.15-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d0f16490675b5a1015fdc814cc2895466695959fc2f484a8857b62b7b4a0aa |
|
MD5 | abdbc0e7bc934cf4bc261bfe25db6cc4 |
|
BLAKE2b-256 | 0e565e45676b72569dd5c7224ecc514d5605b2905df82dcd5180074ed39a03d7 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c4df3859a7407f1fe3f6a8e0153ad66f10d70ca4099cdd191db7ecabd36bc45 |
|
MD5 | 2eb0d31c012468d6afa8de97d0151648 |
|
BLAKE2b-256 | 10f4e47a2c79145346f270fdfc75637f869c115b773e430aa3ffa77c11a658f3 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0697d8b84f009318674fbf41813b1a1e9ecc8a006ca0dfa512ef73233a01d29c |
|
MD5 | 1cae4eef939bf29d6bcbaa3c4773f9c4 |
|
BLAKE2b-256 | cf90d082a95b642c2a51e8c33ba361d1971eaee883d085079669775e9ca7b091 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 030cf9fb230e09669aaf75e776fdf57e221d662db383aedca22842b373cf34f6 |
|
MD5 | 5b5e7462da377d67885e034b4fa84f11 |
|
BLAKE2b-256 | 732f926beea8ca6c5b5ff244fb9583770c25bab3960dafcae931a7eeac699958 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 141a0d33012748bcf4150eff2d194f404694cf6e44237b0706b6bc5a9a421b38 |
|
MD5 | a51fbf50d8059d211d35f1cca43b392a |
|
BLAKE2b-256 | 4618ad8419adde27187fbfc2681897518e8fd6e154bdb8583be1eb17aaec0587 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e3660b662b9d9ac7e5fe065efd7485fd8b1493a43c53715f9dcfb8ee4f13e7 |
|
MD5 | f0fb6c8ce83c1774ba3f9f199f87dedc |
|
BLAKE2b-256 | 4b5cb1acff890169eead6ccc3df41e4d9f38a874cee246ddb83c3f8dc7e07d05 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebc7abda860887e0c3522df4099fc46f75ef4ed11afdd6644a02f32b74043eea |
|
MD5 | 3c542fd1f687c4a80d9ba7e6d4261956 |
|
BLAKE2b-256 | 3846c429d158cfc6d64f2363e54c9f06bacc03a19568bb89a8c0b8a8ffa3ff57 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3853c1e0c6a1dbc07715e21317d69ba683cf97c7c271ac7e7754421d8caae05 |
|
MD5 | 669a68ce35b8382028014ddabe409b80 |
|
BLAKE2b-256 | 746ba5bcb6481db902d51e4dcc232359e65d4e5668c2df1a2032b6fcb791e0f7 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e505b8b7691f79de36f1efc2f52164b6221606d677e6e9f8c6770b641af2175a |
|
MD5 | 8a2859bc3bc00d2336c1d40c692874ae |
|
BLAKE2b-256 | b67708d5a061272ccc3bc660f66fbc8635c1f4f3a000fbec9690c3292ebbe011 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43589a12159f009691edfede8df8214c95efab4186cbec87ab6743df84c70a8f |
|
MD5 | fe791dfa0a27ba0f6f74e3ab66c98bce |
|
BLAKE2b-256 | 639fdf848e975b12a59e903b3690d29e11b8491758206b483a4d5a03dda14786 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f261302ffabbd78f5d20427d9a43d4cec98d29f34587eb4c6f820807c335e903 |
|
MD5 | a60b830538b496c85a7a79894202e3df |
|
BLAKE2b-256 | 1b3fc693010883a0a341fa3743051bd5aa2055663888bc220784c67f41b9a9c6 |
Hashes for ont_pyguppy_client_lib-5.0.15-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cd64edf4dc8427dd3382a8868aade10ab35a5e65b2a72f86e82cca6eb6c56d9 |
|
MD5 | f1bc80a0b243051acc8f7fadbdb9383b |
|
BLAKE2b-256 | 582bf22403b1f24454f6394718fc09b11d81b5689d86ecafafe803c8b4b36e38 |