Skip to main content

HerbiV(Bidirectional and Visible Database of Herb)既是一个数据库,又是一个强大的数据分析平台,集成了50多万条方剂、中药、成分、靶点数据,以及经过检验的数据挖掘模型。HerbiV is far more than a database, which is also a powerful data analysis platform that integrates more than 500,000 prescriptions, traditional Chinese medicine, ingredients and target data. Moreover, two tested data mining models are contained in HerbiV.

Project description

中文 | English

Downloads

HerbiV(Bidirectional and Visible Database of Herb)既是一个数据库,又是一个强大的数据分析平台,集成了50多万条方剂、中药、成分、靶点数据,以及经过检验的中药和中药组合对疾病靶点潜在作用的评价模型和中药及复方组合的优化模型,旨在推动中医药现代化进程。

安装

可以使用pip安装herbiv

pip install herbiv

此外还需要安装依赖库pandas

pip install pandasconda install pandas

使用

herbiv.analysis中提供了3个进行网络药理学分析的pipeline函数。

from_tcm

经典的正向网络药理学分析的pipeline函数。使用它仅需使用命令

from herbiv import analysis
from_tcm(tcm, score, out_for_cytoscape, re, path)

它需要一个必需形参tcm,任何可以使用in判断一个元素是否在其中的组合数据类型,存储拟分析的中药的中文名称,如['柴胡', '黄芩']

它的可选形参有

  • score: int类型,仅combined_score大于等于score的记录会被筛选出,默认为900
  • out_for_cytoscape: boolean类型,是否输出用于Cytoscape绘图的文件,默认为True
  • re: boolean类型,是否返回原始分析结果,默认为True。若reTrue
  • 则函数将返回运行结果tcmtcm_chem_linkschemchem_protein_linksproteins, 它们均为pd.DataFrame类型, 分别存储了中药信息、中药-化合物(中药成分)连接信息、 化合物(中药成分)信息、化合物(中药成分)-蛋白质(靶点)连接信息和蛋白质(靶点)信息;
  • path: str类型,存放结果的路径,默认为result/。若无此路径,将自动建立相应的目录。

from_proteins

逆向网络药理学分析的pipeline函数。使用它仅需使用命令

from herbiv import analysis
analysis.from_proteins(proteins, score, out_for_cytoscape, re, path)

它需要一个必需形参proteins,这是一个任何可以使用in判断一个元素是否在其中的组合数据类型,存储拟分析蛋白质(靶点)在STITCH中的Ensembl_ID, 如['ENSP00000381588', 'ENSP00000252519']

它的可选形参有

  • score: int类型,仅combined_score大于等于score的记录会被筛选出,默认为0
  • out_for_cytoscape: boolean类型,是否输出用于Cytoscape绘图的文件,默认为True
  • re: boolean类型,是否返回原始分析结果,默认为True。若reTrue
  • 则函数将返回运行结果tcmtcm_chem_linkschemchem_protein_linksproteins, 它们均为pd.DataFrame类型, 分别存储了中药信息、中药-化合物(中药成分)连接信息、 化合物(中药成分)信息、化合物(中药成分)-蛋白质(靶点)连接信息和蛋白质(靶点)信息;
  • path: str类型,存放结果的路径,默认为result/。若无此路径,将自动建立相应的目录。

from_tcm_protein

同时对中药和靶点进行检索的pipeline函数。使用它仅需使用命令

from herbiv import analysis
analysis.from_proteins(tcm, proteins, score, out_for_cytoscape, re, path)

它需要2个必需形参tcmproteins,它们都是任何可以使用in判断一个元素是否在其中的组合数据类型, 分别存储拟分析的中药的中文名称(如['柴胡', '黄芩'])和 拟分析蛋白质(靶点)在STITCH中的Ensembl_ID (如['ENSP00000381588', 'ENSP00000252519'])。

它的可选形参有

  • score: int类型,仅combined_score大于等于score的记录会被筛选出,默认为0
  • out_for_cytoscape: boolean类型,是否输出用于Cytoscape绘图的文件,默认为True
  • re: boolean类型,是否返回原始分析结果,默认为True。若reTrue
  • 则函数将返回运行结果tcmtcm_chem_linkschemchem_protein_linksproteins, 它们均为pd.DataFrame类型, 分别存储了中药信息、中药-化合物(中药成分)连接信息、 化合物(中药成分)信息、化合物(中药成分)-蛋白质(靶点)连接信息和蛋白质(靶点)信息;
  • path: str类型,存放结果的路径,默认为result/。若无此路径,将自动建立相应的目录。

更新日志

0.0.1a1

  • 横空出世

0.1a1(2023.3.28)

  • 使用本项目自己的数据集进行分析,不再使用其他数据库的公共数据集,更新了整个分析架构,大大加快了分析速度;
  • 加入了基于朴素贝叶斯的中药重要性评价模型。

0.1a2(2023.3.29)

  • 数据集随herbiv库下载,无需指定数据集存放路径。

0.1a3(2023.4.9)

  • 重构了代码,增加了经典的正向网络药理学分析的功能。

0.1a4(2023.4.14)

  • 增加了pipline函数from_tcm_protein,可同时检索中药和靶点;
  • 增加HerbiV_proteins数据集。

0.1a5(2023.4.19)

  • 不会输出游离于网络的节点,提高了稳定性;
  • 统一了函数的调用方法。

0.1a6(2023.5.27)

  • output中增加了vis函数,可以输出基于ECharts的网络图;
  • pipline函数也做了相应的修改。

0.1a7(2023.6.29)

  • 增加过滤无效节点的函数,提高系统的稳定性。

0.1a8(2023.6.30)

  • vis函数绘制的网络图可为不同类节点赋予不同颜色。

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

herbiv-0.1a8.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

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

herbiv-0.1a8-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file herbiv-0.1a8.tar.gz.

File metadata

  • Download URL: herbiv-0.1a8.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for herbiv-0.1a8.tar.gz
Algorithm Hash digest
SHA256 fe508ac27be9eaaa41af865c4d59b21fa42790aeab54132c67f14d689818f6a5
MD5 ae2b2b99aae13d13475ecda12a0e71da
BLAKE2b-256 b1a30c4d0a833891dd672e929da795641058378de1509ea30741381075c4e31d

See more details on using hashes here.

File details

Details for the file herbiv-0.1a8-py3-none-any.whl.

File metadata

  • Download URL: herbiv-0.1a8-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for herbiv-0.1a8-py3-none-any.whl
Algorithm Hash digest
SHA256 611ada389b109910cb8fb8f12c232deb36bc2af23fd8aab429e8350ebae01b92
MD5 473bc236bf2ed9e6639f508be94f198f
BLAKE2b-256 300a89a7e84f1e956d199942a5efb869c11b260fec4a7427dde6e6015a880e1b

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