Skip to main content

fast5_rekindler

PyPI PyPi Downloads CI/CD PyPI - Python Version PyPI - License


Documentation: https://adnaniazi.github.io/fast5_rekindler

Source Code: https://github.com/adnaniazi/fast5_rekindler

PyPI: https://pypi.org/project/fast5_rekindler/


Collates information from BAM and POD5 files and generates FAST5 files for use in legacy tools such as tailfindr.

Installation

1. Create Python 3.10 or 3.11 environment.

conda create -n f5r python=3.11

2. Activate the environment.

conda activate f5r

3. Install FAST5 Rekindler.

pip install fast5_rekindler

Usage

FAST5 rekindler needs:

1. A BAM file with moves table in it.

You can generate it using Dorado:

dorado basecaller /path/to/basecalling/model \
  /pod5/dir/path \
  --recursive  \
  --emit-sam  \
  --emit-moves  \
  --device "cpu"  \ # or "cuda:all"
  --reference /path/to/alginment/reference > /path/to/calls.sam

2. Convert Doarado's output SAM file to a BAM file.

samtools view -bS /path/to/calls.sam > /path/to/calls.bam

3. Sort the BAM file.

samtools sort /path/to/calls.bam -o /path/to/sorted.calls.bam

4. Use FAST5 Rekindler to convert POD5 files to FAST5 files.

fast5_rekindler /path/to/sorted.calls.bam  \
  /path/to/pod5_dir \
  /path/to/output_dir \
  --num_processes 100

To invoke help for FAST5 Rekindler, just type:

fast5_rekindler --help

Development

  • Clone this repository
  • Requirements:
  • Create a virtual environment and install the dependencies
poetry install
  • Activate the virtual environment
poetry shell

Testing

pytest

Documentation

The documentation is automatically generated from the content of the docs directory and from the docstrings of the public signatures of the source code. The documentation is updated and published as a Github project page automatically as part each release.

Releasing

Trigger the Draft release workflow (press Run workflow). This will update the changelog & version and create a GitHub release which is in Draft state.

Find the draft release from the GitHub releases and publish it. When a release is published, it'll trigger release workflow which creates PyPI release and deploys updated documentation.

Pre-commit

Pre-commit hooks run all the auto-formatters (e.g. black, isort), linters (e.g. mypy, flake8), and other quality checks to make sure the changeset is in good shape before a commit/push happens.

You can install the hooks with (runs for each commit):

pre-commit install

Or if you want them to run only for each push:

pre-commit install -t pre-push

Or if you want e.g. want to run all checks manually for all files:

pre-commit run --all-files

Metadata

Release files for fast5_rekindler 0.0.6

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

Source distribution (sdist)

Source distribution for fast5_rekindler 0.0.6
File Size Uploaded
fast5_rekindler-0.0.6.tar.gz 16.7 kB Details

Built distribution (wheel)

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

Total release size: 36.1 kB

Release files / fast5_rekindler-0.0.6.tar.gz

Download URL fast5_rekindler-0.0.6.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6bf1483287eeb8bc3663cb6bf22e0a52a3799976a2ca5c5928c0249b3ab0f9bb
BLAKE2b-256 checksum
How to use checksums
acc8d942bde17e852626973ca31318a5b89b9935eca282c352a79ecf42c15fd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure

Release files / fast5_rekindler-0.0.6-py3-none-any.whl

Download URL fast5_rekindler-0.0.6-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e31d4ef8d48bce3b417bcda81dafa692f28683c55d142ffd78d6c894b217acf9
BLAKE2b-256 checksum
How to use checksums
0cc610ce0aa51413876b55b2889500d205326f42bf5f2ec83a0663b1891dc386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

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