Skip to main content

Library of Python utilities for PacBio Genomes Analysis

Project description

PBGA

PacBio Genome Analysis Python toolkit.

Install

The code is available at PyPi, therefore you can install it with pip.

pip install pbga

Connect to PBGA database

The PBGA database is a H2 database, therefore primarily meant to be used with Java. We can connect to the database from Python, if:

  • Java is installed on the local machine
  • the local machine runs UNIX-like OS (sorry, Windows users)

Then:

from pbga import H2DbManager

with H2DbManager("path/to/sv_database.mv.db", 
                 user="sa", 
                 password="sa") as h2:
    with h2.get_connection() as conn:
        with conn.cursor() as cur:
            # do whatever you want
            cur.execute('SELECT * FROM PBGA.CLINGEN_TRIPLOSENSITIVITY;')
            for i, x in zip(range(5), cur.fetchall()):
                # print first 5 lines 
                print(x)

Use Jannovar VariantEffects

We can access values of Jannovar VariantEffect enum:

import pbga.effects as pe 

ve = pe.VARIANT_EFFECTS #  get tuple with all variant effects

p = pe.get_priority('MISSENSE_VARIANT') # returns 21

Quick setup of Python logging framework

Setting up of Python logging framework might be tedious. Here's a small helper function:

from pbga.utils import setup_logging

# set level to INFO, create a `main.log` file use nice log message format  
setup_logging()  

Limitations

  • tested with python>=3.6.8

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

pbga-0.0.6.tar.gz (2.1 MB view details)

Uploaded Source

Built Distributions

pbga-0.0.6-py3.6.egg (2.1 MB view details)

Uploaded Source

pbga-0.0.6-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file pbga-0.0.6.tar.gz.

File metadata

  • Download URL: pbga-0.0.6.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pbga-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0810bb2b4e0a7e223cd24d099a5c4f8998ef142db3bb7f01bc1469afb75507b6
MD5 75c379bf3e14509a5090c3358446e2d1
BLAKE2b-256 dca022a1b6b39fe7c1da4ca8ae5f3a4ee33ce448bc1e6573ee863073d3386338

See more details on using hashes here.

File details

Details for the file pbga-0.0.6-py3.6.egg.

File metadata

  • Download URL: pbga-0.0.6-py3.6.egg
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pbga-0.0.6-py3.6.egg
Algorithm Hash digest
SHA256 4c11b2bb77ccf33a9e2a08c5fed66ec97c345eef38a4ba98338ac25673fd1b27
MD5 f818544b944f20b7f0da22fe39c8b825
BLAKE2b-256 6f88a4252de11a06ed91aaa56070d5ee8472bfdc55b52317346c326cb508508c

See more details on using hashes here.

File details

Details for the file pbga-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pbga-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pbga-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1ec632d7fa4527daea8c4000b1eaf8cb43fc0ebede4be76218a1261cb76dba1d
MD5 af78c574967fb050d7faeb73038bda1b
BLAKE2b-256 469852e3fdf33cce753b6d6baca3899d2a3c4642aee0377143f3aa81e5faf820

See more details on using hashes here.

Supported by

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