About Anaconda Help Download Anaconda

Wrapper to read fast5, slow5, blow5 and pod5 files.

Installers

  • linux-64 v1.2.4
  • osx-64 v1.2.4

conda install

To install this package run one of the following:
conda install jannessp::read5

Description

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

License: GPL v3 PyPI - Python Version

PyPI PyPI - Downloads PyPI - Status

Anaconda-Server Badge Conda Conda package Conda package

DOI

Twitter Follow


  1. Installation
  2. Usage
  3. Full Documentation

pip install read5

Pod5 is currently not available via conda (27.06.2023). Please install it using pip in your conda environment.

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

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.

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()

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
from read5.Pod5Reader import Pod5Reader # contains the Pod5 Reader class
from read5.AbstractFileReader import AbstractFileReader
from read5.Exceptions import UnknownFileFormatException, UnknownNormalizationMode
  • UnknownFileFormatException: is raised, when the file extension does not match one of
  • UnknownNormalizationMode: is raised, when an unknown mode is provided for the signal normalization function

Created with pdoc3. Can be found here.


© 2024 Anaconda, Inc. All Rights Reserved. (v4.0.6) Legal | Privacy Policy