Skip to main content

Wrapper to read fast5 and pod5 files.

Project description

Installation

Pypi/pip

pip install read5_ont

Conda

Pod5 is now available via conda (19.07.2023).

conda install mamba
mamba create -n read5_ont -c jannessp read5_ont
conda activate read5_ont

Alternatively you can create the environment using the conda.recipe/env.yml file.

conda install mamba
mamba env create -f conda.recipe/env.yml
conda activate read5_ont

Usage

Click here to see a full documentation about the classes and function.

my_file can be a fast5 or pod5 file. The wrapper detects the file format depending on the file extension.

Small example:

from read5 import read # or from read5.Reader import read

r5 = read(my_file) # file with on of these extensions: .fast5, .pod5
for readid in r5:
    signal = r5.getSignal(readid) # returns raw integer values stored in the file
    pA_signal = r5.getpASignal(readid) # returns pA signal
    norm_signal = r5.getZNormSignal(readid) # returns normalised read signal: norm_signal = (signal - median(signal)) / mad(signal)
    polyAstdSignal = r5.getPolyAStandardizedSignal(readid, polyAstart, polyAend) # returns polyA standardized read signal
    channel = r5.getChannelNumber(readid)
    sampleid = r5.getSampleID(readid)
    runid = r5.getRunID(readid)

readid_list = r5.getReads()

File Reader Classes

If you want to use the file readers you can import the corresponding class like this:

from read5.Fast5Reader import Fast5Reader # contains the Fast5 Reader class
from read5.Pod5Reader import Pod5Reader # contains the Pod5 Reader class

Abstract File Reader Class

from read5.AbstractFileReader import AbstractFileReader

Possible Exceptions

from read5.Exceptions import UnknownFileFormatException, UnknownNormalizationMode
  • UnknownFileFormatException: is raised, when the file extension does not match one of [‘.fast5’, ‘.pod5’]

  • UnknownNormalizationMode: is raised, when an unknown mode is provided for the signal normalization function

Full Documentation

Created with pdoc3. Can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

read5_ont-1.2.4.tar.gz (703.3 kB view details)

Uploaded Source

Built Distribution

read5_ont-1.2.4-py2.py3-none-any.whl (25.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file read5_ont-1.2.4.tar.gz.

File metadata

  • Download URL: read5_ont-1.2.4.tar.gz
  • Upload date:
  • Size: 703.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for read5_ont-1.2.4.tar.gz
Algorithm Hash digest
SHA256 4e5deea1f3fc30a9a30638e8cb69c09b8caf21082705e5f201b1c2d1a9d5f79e
MD5 45386a29f1f34336336a09431fb7be56
BLAKE2b-256 dcb96b095a76d1aae1e120082e239b5a225e7ef101ce287b30f24bedafcee51c

See more details on using hashes here.

File details

Details for the file read5_ont-1.2.4-py2.py3-none-any.whl.

File metadata

  • Download URL: read5_ont-1.2.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for read5_ont-1.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b22ee51e07e0f88cbcab39007dc3b89dcf1c7cc80fa5eb05dc68562e141e7889
MD5 bf32bc4286d3ce7db5723152eca68bc6
BLAKE2b-256 07113aa46a487d750a718ef9fc4a544ba97819cfdc3b45c90757924c805d4748

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page