- Notifications
You must be signed in to change notification settings - Fork1
Wrapper to read fast5, slow5, blow5 and pod5 files.
License
NotificationsYou must be signed in to change notification settings
rnajena/read5
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- Read5 is a python wrapper to read fast5, slow5/blow5 and pod5 files using the same overloaded functions from different APIs.
- Read5_ont is a python wrapper to read fast5 and pod5 files using the same overloaded functions from different APIs.
pip install read5
Pod5 is now available viaconda (19.07.2023).
conda create -n read5 -c jannessp read5conda 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.
fromread5importread# or from read5.Reader import readr5=read(my_file)# file with one of these extensions: .fast5, .slow5, .blow5, .pod5forreadidinr5:signal=r5.getSignal(readid)# returns raw integer values stored in the filepA_signal=r5.getpASignal(readid)# returns pA signalnorm_signal=r5.getZNormSignal(readid)# returns normalized read signal: norm_signal = (signal - median(signal)) / mad(signal)polyAstdSignal=r5.getPolyAStandardizedSignal(readid,polyAstart,polyAend)# returns polyA standardized read signal# default polyAMean : float = 108.901413, polyAStdev : float = 2.676522, this can be changed using the parameterschannel=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:
fromread5.Fast5ReaderimportFast5Reader# contains the Fast5 Reader classfromread5.Slow5ReaderimportSlow5Reader# contains the Slow5 Reader class - !not available in read5_ont!fromread5.Pod5ReaderimportPod5Reader# contains the Pod5 Reader class
fromread5.AbstractFileReaderimportAbstractFileReader
fromread5.ExceptionsimportUnknownFileFormatException,UnknownNormalizationMode
- UnknownFileFormatException: is raised, when the file extension does not match one of ['.fast5', '.slow5', '.blow5', '.pod5'] (or ['.fast5', '.pod5'] inread5_ont)
- UnknownNormalizationMode: is raised, when an unknown mode is provided for the signal normalization function
About
Wrapper to read fast5, slow5, blow5 and pod5 files.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.