Wrapper to read fast5, slow5, blow5 and pod5 files.
Project description
Installation
Pypi/pip
pip install read5
Conda
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
pip install pod5 # needed as no pod5 conda package available yet
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
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)
norm_signal = r5.getZNormSignal(readid) # returns normalised read signal: norm_signal = (signal - median(signal)) / mad(signal)
channel = r5.getChannelNumber(readid)
sampleid = r5.getSampleID(readid)
runid = r5.getSampleID(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
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’]
UnknownNormalizationMode: is raised, when an unknown mode is provided for the signal normalization function
Full Documentation
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file read5-1.2.0.tar.gz.
File metadata
- Download URL: read5-1.2.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f15c8ac93e1fa518c48844782b468b16f9c73ffab15aa8536153f4285f4c7189
|
|
| MD5 |
27edf187fa0fd65df2a31b34c3795b10
|
|
| BLAKE2b-256 |
eecf17ff87d2c080ed2f8a8b8c929d8611f22d330917a20880d89bd34284ff82
|
File details
Details for the file read5-1.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: read5-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e7968b8e12cb50e0e6766f90070bc92edd7853a5718896395f9bde836c16bcf
|
|
| MD5 |
5d372e7f7e7298f65790e53b956c23fa
|
|
| BLAKE2b-256 |
a0820bb5e93c99fd41884b9829657982cc975d1f56027f8c0ddfc002af34f312
|