Skip to main content

No project description provided

Project description

pyft: python bindings for fibertools-rs

Documentation Status PyPI version

pyft provides a python API for the rust library fibertools-rs. The inspiration for this API is to make analysis in python easier and faster; therefore, only extraction of data from a fiberseq bam is supported and not writing.

Install

pip install pyft

Example

import pyft
# bam file with ~3X coverage of chr20
bam_f = "../tmp.bam"
fiberdata = pyft.FiberdataFetch(bam_f, "chr20", 0, 10_000_000)
for idx, fiber in enumerate(fiberdata):
    if idx < 10:
        # print some info about the fiber
        print(fiber)
    # the number of ccs passes
    fiber.ec
    # the mps start positions
    fiber.msp.starts
    # print the nuc reference starts
    fiber.nuc.reference_starts
    # lift query (fiber) positions to reference positions
    fiber.lift_query_positions([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
    # lift reference positions to query (fiber) positions
    fiber.lift_reference_positions([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
    # aligned blocks between query (fiber) and reference 
    fiber.get_aligned_blocks_as_ranges()

Documentation

The documentation for pyft can be found on readthedocs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyft-0.1.5.tar.gz (8.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyft-0.1.5-cp310-cp310-macosx_10_7_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 10.7+ x86-64

File details

Details for the file pyft-0.1.5.tar.gz.

File metadata

  • Download URL: pyft-0.1.5.tar.gz
  • Upload date:
  • Size: 8.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.1.0

File hashes

Hashes for pyft-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8db8f5c6d2b08de0b0ccdeb40c894ea16eeb71ebe99c08623c658e3ccbf62c52
MD5 cffea653a5fee8a15aab1b932e0700c2
BLAKE2b-256 0293e6e05f3380af83b5c4b010925934d31dba5527b59d0f256aef8bd6b6b0d1

See more details on using hashes here.

File details

Details for the file pyft-0.1.5-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for pyft-0.1.5-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f8d0ab81259e324e554d49b8586fd2157461d06fffb9dde8f6ef51992778a6c2
MD5 c53d49c74388619d21f73aa1c0ce3783
BLAKE2b-256 b3d8e0bcc1d4dda64ccb39a697d7a2cf2f0afc1edddea2f97aa3b7351ada002d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page