Skip to main content

Alt text

  • Read5 is a python wrapper to read fast5, slow5/blow5 and pod5 files using the same overloaded functions from different APIs. PyPI - Python Version
  • Read5_ont is a python wrapper to read fast5 and pod5 files using the same overloaded functions from different APIs. PyPI - Python Version

License: GPL v3

PyPI PyPI - Downloads PyPI - Status

Anaconda-Server Badge Conda Conda package Conda package

DOI

Twitter Follow


Table of Content

  1. Installation
  2. Usage
  3. Full Documentation

Installation

Pypi/pip

pip install read5

Conda

Pod5 is now available via conda (19.07.2023).

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

Usage

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

my_file can be a fast5, slow5, blow5 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, .slow5, .blow5, .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.Slow5Reader import Slow5Reader # contains the Slow5 Reader class - !not available in read5_ont!
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', '.slow5', '.blow5', '.pod5'] (or ['.fast5', '.pod5'] in read5_ont)
  • UnknownNormalizationMode: is raised, when an unknown mode is provided for the signal normalization function

Full Documentation

Created with pdoc3. Can be found here.

Metadata

Release files for read5 1.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for read5 1.2.8
File Size Uploaded
read5-1.2.8.tar.gz 24.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for read5 1.2.8
File Interpreter ABI Platform
read5-1.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 52.2 kB

Release files / read5-1.2.8.tar.gz

Download URL read5-1.2.8.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
db1873ef836c62404a53ce4afd3babe7e1f78da1450f75e9ae511b2840013d4f
BLAKE2b-256 checksum
How to use checksums
e073ea82865f83263960a65202610d7f145d1f82a8178df80e600079bb9156e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / read5-1.2.8-py3-none-any.whl

Download URL read5-1.2.8-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
593718e79372d99243fd2c9218ed863449b6fb3bf89404f078f71b8e5fc5ecc9
BLAKE2b-256 checksum
How to use checksums
e143a9e74107f93fbc203a704743c71c41c99fdbc405d579eb369f8c79f51102
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

1.2.8 This release

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page