HerbiV(Bidirectional and Visible Database of Herb)既是一个数据库,又是一个强大的数据分析平台,集成了50多万条方剂、中药、成分、靶点数据, 以及经过检验的中药和中药组合对疾病靶点潜在作用的评价模型和中药及复方组合的优化模型,旨在推动中医药现代化进程。
可以使用pip安装herbiv。
pip install herbiv
此外还需要安装依赖库pandas。
pip install pandas或conda install pandas
herbiv.analysis中提供了3个进行网络药理学分析的pipeline函数。
经典的正向网络药理学分析的pipeline函数。使用它仅需使用命令
from herbiv import analysis
analysis.from_tcm_or_formula(
tcm_or_formula,
score,
out_graph,
out_for_cytoscape,
re,
path
)它需要一个必需形参tcm_or_formula:任何可以使用in判断一个元素是否在其中的组合数据类型,存储拟分析的中药或复方的ID,
如['HVM0367', 'HVM1695']。
它的可选形参有
score: int类型,HerbiV_chemical_protein_links数据集中仅combined_score大于等于score的记录会被筛选出,默认为990;out_for_cytoscape: boolean类型,是否输出用于Cytoscape绘图的文件,默认为True;out_graph: boolean类型,是否输出基于ECharts的html格式的网络可视化图,默认为True;re: boolean类型,是否返回原始分析结果(复方(仅输入的tcm_or_formula为HVPID时)、中药、化合物(中药成分)、蛋白(靶点)及其连接信息), 默认为True。若re为True,则函数将返回运行结果formula、formula_tcm_links、tcm、tcm_chem_links、chem、chem_protein_links和proteins(formula、formula_tcm_links仅在输入的tcm_or_formula为HVPID时返回), 它们均为pd.DataFrame类型,分别存储了复方信息、复方-中药连接信息、中药信息、中药-化合物(中药成分)连接信息、化合物(中药成分)信息、 化合物(中药成分)-蛋白(靶点)连接信息和蛋白(靶点)信息;path: str类型,存放结果的路径,默认为results/。若无此路径,将自动建立相应的目录。
逆向网络药理学分析的pipeline函数。使用它仅需使用命令
from herbiv import analysis
analysis.from_proteins(
proteins,
score,
random_state,
num,
tcm_component,
formula_component,
out_for_cytoscape,
re,
path
)它需要一个必需形参proteins,这是一个任何可以使用in判断一个元素是否在其中的组合数据类型,存储拟分析蛋白(靶点)在STITCH中的Ensembl_ID,
如['ENSP00000381588', 'ENSP00000252519']。
它的可选形参有
score: int类型,HerbiV_chemical_protein_links数据集中仅combined_score大于等于score的记录会被筛选出,默认为0;random_state: int类型,指定优化模型使用的随机数种子,默认为None,即不指定随机数种子;num: int类型,指定优化时需生成的解的组数,默认为1000;tcm_component: boolean类型,是否进行中药组合优化,默认为True;formula_component: boolean类型,是否进行复方组合优化,默认为True;out_for_cytoscape: boolean类型,是否输出用于Cytoscape绘图的文件,默认为True;re: boolean类型,是否返回原始分析结果(复方、中药、化合物(中药成分)、蛋白(靶点)及其连接信息),默认为True。若re为True, 则函数将返回运行结果formula、formula_tcm_links、tcm、tcm_chem_links、chem、chem_protein_links、proteins、tcms和formulas,它们均为pd.DataFrame类型,分别存储了复方信息、复方-中药连接信息、中药信息、中药-化合物(中药成分)连接信息、 化合物(中药成分)信息、化合物(中药成分)-蛋白(靶点)连接信息、蛋白(靶点)信息、优化模型得到的中药组合信息(中药组合中各中药的ID、 组合对疾病相关靶点集合的潜在作用、组合前后潜在作用的提升量)和优化模型得到的复方组合信息(复方组合中各复方的ID、组合对疾病相关靶点集合的潜在作用、 组合前后潜在作用的提升量);path: str类型,存放结果的路径,默认为result/。若无此路径,将自动建立相应的目录。
herbiv-cli 是对 herbiv 的命令行封装,用法如下
- 查看帮助文档
python herbiv-cli.py -h- 给定 tcm 分析
python herbiv-cli.py --function tcm --tcms HVM0367 HVM1695 --path result- 给定 formula 分析
python herbiv-cli.py --function formula --formulas HVP1625 --path result- 给定 tcm 和 protein 分析
python herbiv-cli.py --function tcm_protein --tcms HVM0367 HVM1695 --proteins ENSP00000043402 --path result- 给定 formula 和 protein 分析
python herbiv-cli.py --function formula_protein --formulas HVP1625 --protein ENSP00000043402 ENSP00000223366 --path result- 给定 protein 分析
python herbiv-cli.py --function protein --proteins ENSP00000381588 --score 500如果您在研究中使用了本项目,请按以下格式引用:
@misc{herbiv_2023,
author = {HerbiV Team},
title = {HerbiV},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
url = {https://github.com/MLi-lab-Bioinformatics-NJUCM/HerbiV}
}项目成员(按姓名完整拼音排序):
- 陈晨
- 陈雪
- 戴欣露
- 丁皓康
- 胡钰奕
- 李梦圆
- 林文钰
- 陆茵
- 缪雨桐
- 沈天威
- 王涵琪
- 王皓阳
- 燕晨宇
- 章晋
- 张天然
- 周航
- 周唯叶