跳转到主要内容

Python PacBio Genomes 分析实用工具库

项目描述

PBGA

PacBio 基因组分析 Python 工具包。

安装

代码可在PyPi找到,因此您可以使用pip进行安装。

pip install pbga

连接到PBGA数据库

PBGA数据库是H2数据库,因此主要用于与Java一起使用。如果本地计算机上已安装Java,并且本地计算机运行类UNIX操作系统(抱歉,Windows用户),则我们可以从Python连接到数据库。

  • Java已安装在本地计算机上
  • 本地计算机运行类UNIX操作系统(抱歉,Windows用户)

然后

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)

使用Jannovar VariantEffect函数

我们可以访问Jannovar VariantEffect枚举的值

import pbga.effects as pe 

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

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

快速设置Python logging框架

设置Python logging框架可能有些繁琐。这里有一个小的辅助函数

from pbga.utils import setup_logging

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

限制

  • python>=3.6.8下进行了测试

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装软件包的更多信息。

源代码分发

pbga-0.0.6.tar.gz (2.1 MB 查看散列值)

上传时间: 源代码

构建分发

pbga-0.0.6-py3.6.egg (2.1 MB 查看散列值)

上传时间: 源代码

pbga-0.0.6-py3-none-any.whl (2.1 MB 查看哈希值)

上传时间: Python 3

支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面