Git Product home page Git Product logo

read5_ont's Introduction

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_ont

Conda

Pod5 is now available via conda (19.07.2023).

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

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.

read5_ont's People

Contributors

jannessp avatar

Watchers

 avatar

Forkers

q1134269149

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.