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.7-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5361cf50cb648975092bc148f1b5b5c589682be8613d925bf4d947a1c6f4b989 |
|
MD5 | 2baf8b0e1897eda44b71e062799f67e7 |
|
BLAKE2b-256 | f17b54108994c948ae5c6aa0c1320609f81ecf55963ba0957dcb498cffa4d14e |
Hashes for ont_pyguppy_client_lib-6.0.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8e432b463055ceae82fa4baf1631d635b5f5ac71dae3110c6af612d470d790d |
|
MD5 | b5817f298b96023c66b9ac8308f0de8a |
|
BLAKE2b-256 | d89186f2dbd80afaf07eeb9521d803d7b0505c62fa0c2c1437675f48bc987e33 |
Hashes for ont_pyguppy_client_lib-6.0.7-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52334910a491963b0a41fbfa3ea7c43b6a5293229283cfc4ccd4b6c91a497c85 |
|
MD5 | 3f3857213dd668f983072c75b2e58935 |
|
BLAKE2b-256 | ce4f56ee67c79210779f5f8aa4e2d4eb9a1008cb8f17b68ba5cca3745b774737 |
Hashes for ont_pyguppy_client_lib-6.0.7-cp38-cp38-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d64b519a8ba8e6cc611120500766e62645ae3bbf743dd801ed0cfb87bb8923 |
|
MD5 | d14c9ce4fa4a32aa9b38797dd6e16f6d |
|
BLAKE2b-256 | 434f53c2142428155f7106d22077f6771379bf493527149b327b9e1177aa54e2 |
Hashes for ont_pyguppy_client_lib-6.0.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 885606c54d4bbaa387d19bb6ebe9dafbcbfab2d738db5ce2686a9ef7598670b0 |
|
MD5 | e3b8ad1897ea531e5a2e622d6ce9a942 |
|
BLAKE2b-256 | 1da8ae9d7389210b93e05bc6347da80d6b98d2d1131433aa9253a27b1dcc6a7d |
Hashes for ont_pyguppy_client_lib-6.0.7-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0ce257132d6291246ebe8b2155c0e2a6ebdc32a4429271103259dfbe95f2b25 |
|
MD5 | cc331385b1891c38274dbd6f7c2a1697 |
|
BLAKE2b-256 | cb4ca5ff4273c74a6745ebc885857a23551780074b8de1f6442582b64d4fe65a |
Hashes for ont_pyguppy_client_lib-6.0.7-cp37-cp37m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cc28248dcb2e403a58a2a1c4c7c84ddd726e4e72eba443aaf6bdceb86cb60b7 |
|
MD5 | b5f10dd99c63e5de5fba69f3e7a14200 |
|
BLAKE2b-256 | b050c33ec14578a4ad8c6a8a2df9b4937679dc401bbf379153f3188a21892629 |
Hashes for ont_pyguppy_client_lib-6.0.7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d95b74dbd4d093b1f78f3c811d85ba15d32629e1417d092c738f8117d9af5b00 |
|
MD5 | 08776c8b3bf220f5aa3ab285b3c20adf |
|
BLAKE2b-256 | 84df5a39d49914e1a4f5800de23211f48e5c6579330381b3915e21f82849ea4b |
Hashes for ont_pyguppy_client_lib-6.0.7-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53402d2f849d7cb1bb92ebca4c09a8794a6cc678b0b4083642f440bc282a058e |
|
MD5 | e1e8c5f840a3a40cdb831947f5c822a4 |
|
BLAKE2b-256 | ad5594189d25c2abfb94cfed7073a7fbb5eae27acea1f388f7e91f194ebbcfad |
Hashes for ont_pyguppy_client_lib-6.0.7-cp36-cp36m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af1c7cd4055987604745188a39f2bd143893566f2d7360ece3f923d0ea5047b |
|
MD5 | 0a1c0d79943ebf2d9efec79177bb8461 |
|
BLAKE2b-256 | 1ce75110a0dd8248e7c2ded66389ac861d2d515db198e9c92fc7a4c232041a34 |
Hashes for ont_pyguppy_client_lib-6.0.7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 046fd5f564052acf8d205ff6a65fb0081d86864eb9b89afdf2835eb2c2037f4c |
|
MD5 | 9aa77514d6a97322338e234dd53b58a7 |
|
BLAKE2b-256 | 4ebdbfde4b457d161173a9417ff8c53c241b725a7a8f868da761621f5e5ced28 |
Hashes for ont_pyguppy_client_lib-6.0.7-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eafcc3484cd568496d37c10e96d826b55c50aa7d8c8dfcba96a1abc5af1c340 |
|
MD5 | f3244847eca0cb1cd38c822878c16621 |
|
BLAKE2b-256 | b185e9e05511f495ea3582ef723c83207ea6ee66aee91266fc051b836686e211 |
Hashes for ont_pyguppy_client_lib-6.0.7-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45a07cee5d45d2f2ad4c0586bb20414c78449bf43fab7f57c1d08f808eea6e64 |
|
MD5 | 6dd2ab270ae7799648bf75bd8285910f |
|
BLAKE2b-256 | d9c3439bd5a893609f24cb88d0a31b2ba37622bffc13db6b298d9851e3562fbc |