使用CARD(由CARD开发)的ARO本体对抗生素抗性基因(ARGs)的结果进行归一化。
项目描述
argNorm:将ARG注释归一化到ARO
什么是argNorm?
argNorm是一个工具,通过将抗生素抗性基因(ARGs)映射到抗生素抗性本体(ARO)(由CARD数据库创建)来归一化抗生素抗性基因。
argNorm还通过提供抗生素抗性基因赋予耐药性的药物的药物分类来增强抗生素抗性基因注释。
为什么需要argNorm?
目前,存在许多用于在基因组学和宏基因组学中注释ARGs的工具。然而,每个工具都会有不同的输出格式。
hAMRonization包可以归一化文件格式,但每个工具都会使用不同的名称/标识符(例如,TetA
或TETA
或tet(A)
或tet-A
都是表示同一基因名称的不同方式)。
对于少量隔离基因组,用户可以手动评估输出结果。然而,在宏基因组学中,尤其是大规模项目中,这变得不可行。因此,argNorm通过将它们映射到相同的本体(ARO)来规范化ARG注释工具的输出词汇。
除了执行规范化之外,argNorm还提供抗生素耐药基因赋予耐药性的药物分类。
例如,PBP2b
(ARO:3003042
)基因赋予对药物类别阿莫西林
的耐药性。《阿莫西林》随后被分类到更广泛的β-内酰胺类抗生素
类别。
argNorm提供了这方面的支持,并将confers_resistance_to
和resistance_to_drug_classes
列添加到ARG注释中。
confers_resistance_to
列将包含基因赋予耐药性的所有药物类别的ARO编号(例如,上一个例子中的阿莫西林
的ARO:0000064
)。
resistance_to_drug_classes
列将包含confers_resistance_to
列中药物类别的更广泛类别的ARO编号(例如,上一个例子中的β-内酰胺类抗生素
的ARO:3000007
)。
argNorm概述
argNorm的一般概述。(a)基因组与宏基因组可以使用ARG注释工具进行注释。argNorm可以直接接受这些ARG注释工具的输出,或者在输出经过hAMRonization处理以执行ARO规范化和药物分类后接受。(b)argNorm工作流程包括:将ARG注释输出中的基因名称映射到使用RGI和人工校对构建的ARO注释表中的ARO访问号;将基因ARO访问号映射到药物和药物类别。(c)在药物分类中,argNorm报告ARO中“抗生素分子”节点的直接子节点
argNorm工作流程
通过Resfinder输出示例的argNorm工作流程示意图:将ARG注释输出中的基因名称映射到ARO映射ARG数据库中的基因名称,并添加相应的药物分类,即来自ARO本体文件的“赋予直接药物类别”和“药物类别总体类别”。
支持的工具
- DeepARG(v1.0.2)
- ARGs-OAP(v3)
- ABRicate(v1.0.1)与NCBI(v3.6)、ResFinder(v4.1.11)、MEGARes(v2.0)、ARG-ANNOT(v5)、ResFinderFG(v2)
- ResFinder(v4.0)
- AMRFinderPlus(v3.10.30)
- GROOT(v1.1.2)
安装
可以使用pip安装argNorm
pip install argnorm
argNorm也可以通过conda安装
conda install bioconda::argnorm
argNorm也作为nf-core模块提供。如果使用nf-core管道,可以使用以下命令安装argNorm
nf-core modules install argnorm
教程视频
基本用法
所需的位置参数只有一个,即tool
,可以是
deeparg
argsoap
abricate
resfinder
amrfinderplus
groot
可用的选项包括
-h
或--help
:显示可用选项并退出。--db
:用于执行ARG注释的数据库。支持的数据库包括- SARG(
sarg
) - NCBI(
ncbi
) - ResFinder(
resfinder
) - DeepARG(
deeparg
) - MEGARes(
megares
) - ARG-ANNOT(
argannot
) groot-core-db
、groot-db
、groot-resfinder
、groot-argannot
、groot-card
- SARG(
--hamronized
:如果输入已通过hAMRonization处理,则使用此选项-i
或--input
:注释结果路径-o
或--output
:保存规范化结果的文件
使用 argnorm -h
或 argnorm --help
查看可用的选项。
>argnorm -h
usage: argnorm [-h]
[--db {sarg,ncbi,resfinder,deeparg,megares,argannot,resfinderfg,groot-argannot,groot-resfinder,groot-db,groot-core-db,groot-card}]
[--hamronized] [-i INPUT] [-o OUTPUT]
{argsoap,abricate,deeparg,resfinder,amrfinderplus,groot}
argNorm normalizes ARG annotation results from different tools and databases to the same ontology, namely ARO (Antibiotic Resistance Ontology).
positional arguments:
{argsoap,abricate,deeparg,resfinder,amrfinderplus,groot}
The tool you used to do ARG annotation.
optional arguments:
-h, --help show this help message and exit
--db {sarg,ncbi,resfinder,deeparg,megares,argannot,resfinderfg,groot-argannot,groot-resfinder,groot-db,groot-core-db,groot-card}
The database you used to do ARG annotation.
--hamronized Use this if the input is hamronized (processed using the hAMRonization tool)
-i INPUT, --input INPUT
The annotation result you have
-o OUTPUT, --output OUTPUT
The file to save normalization results
以下是对调用 argNorm 的基本概述。
argnorm [tool] -i [original_annotation.tsv] -o [annotation_result_with_aro.tsv]
示例 1:argNorm 作为命令行工具
以下是在命令行上运行 argNorm 的快速演示。
步骤 1:安装 argNorm
安装 argNorm 并检查安装
pip install argnorm
argnorm -h
argnorm -h
或 argnorm --help
将显示运行 argNorm 所需的所有可用选项。
> argnorm -h
usage: argnorm [-h]
[--db {sarg,ncbi,resfinder,deeparg,megares,argannot,resfinderfg}]
[--hamronized] [-i INPUT] [-o OUTPUT]
{argsoap,abricate,deeparg,resfinder,amrfinderplus}
argNorm normalizes ARG annotation results from different tools and databases to the same ontology, namely ARO (Antibiotic Resistance Ontology).
positional arguments:
{argsoap,abricate,deeparg,resfinder,amrfinderplus}
The tool you used to do ARG annotation.
optional arguments:
-h, --help show this help message and exit
--db {sarg,ncbi,resfinder,deeparg,megares,argannot,resfinderfg}
The database you used to do ARG annotation.
--hamronized Use this if the input is hamronized (processed using
the hAMRonization tool)
-i INPUT, --input INPUT
The annotation result you have
-o OUTPUT, --output OUTPUT
The file to save normalization results
步骤 2:创建工作目录并下载样本数据
argNorm 将 ARO 映射和药物类别作为附加列添加到 ARG 注释工具的输出中。
在此示例中,我们将使用来自 ResFinder 工具(附带 ResFinder 数据库)的 ARG 注释输出运行 argNorm。
创建一个名为 argNorm_tutorial
的文件夹,并将下载的数据文件存储在其中。进入 argNorm_tutorial
文件夹。
mkdir argNorm_tutorial
cd argNorm_tutorial
点击 这里 下载输入数据。
如果你在 Linux 上
wget https://raw.githubusercontent.com/BigDataBiology/argNorm/main/examples/raw/resfinder.resfinder.orfs.tsv
步骤 3:运行 argNorm
以下是大多数 argNorm 命令的基本概述
argnorm [tool] -i [original_annotation.tsv] -o [argnorm_result.tsv] [--hamronized]
在这里,tool
指的是使用的 ARG 注释工具(在本例中为 ResFinder)。original_annotation.tsv
是输入数据的路径,argnorm_result.tsv
是 argNorm 结果表存储的输出文件的路径。--hamronized
是一个选项,用于指示输入数据是否是使用 hAMRonization 包 的结果。在我们的示例中,输入数据不是使用 hAMRonization 包的结果,因此可以省略 --hamronized
选项。
要在终端中运行 argNorm,请使用以下命令
argnorm resfinder -i ./resfinder.resfinder.orfs.tsv -o ./resfinder.resfinder.orfs.normed.tsv
argNorm 结果将存储在文件 resfinder.resfinder.orf.normed.tsv
中。
示例 2:argNorm 作为 Python 库
代码
将此段 Python 代码保存到名为 argnorm_tutorial.py
的文件中
# Import from argNorm
from argnorm.lib import map_to_aro
from argnorm.drug_categorization import confers_resistance_to, drugs_to_drug_classes
# Creating a list of input genes to be mapped to the ARO
list_of_input_genes = ['sul1_2_U12338', 'sul1_3_EU855787', 'sul2_1_AF542061']
# The database from which the `list_of_input_genes` was created is the ResFinder database
database = 'resfinder'
# Looping through `list_of_input` genes and mapping each gene to the ARO
# Storing each ARO mapping in the `list_of_aros` list
list_of_aros = []
for gene in list_of_input_genes:
# Using `id` attribute to get ARO number
# `name` attribute can be used to get name of gene in ARO
list_of_aros.append(map_to_aro(gene, database).id)
print(list_of_aros)
# Looping through `list_of_aros` and finding the drugs to which the each ARO confers resistance to
# Storing each drug in the `list_of_drugs` list
list_of_drugs = []
for aro in list_of_aros:
list_of_drugs.append(confers_resistance_to(aro))
print(list_of_drugs)
# Looping through `list_of_drugs` and finding the superclass/drug class of each drug
# Storing each superclass/drug class in the `list_of_drug_classes` list
list_of_drug_classes = []
for drug in list_of_drugs:
list_of_drug_classes.append(drugs_to_drug_classes(drug))
print(list_of_drug_classes)
说明
要使用 argNorm 作为库,我们首先必须在 Python 文件中导入它
from argnorm.lib import map_to_aro
from argnorm.drug_categorization import confers_resistance_to, drugs_to_drug_classes
lib
模块包含一个名为 map_to_aro
的函数,该函数将返回特定抗生素耐药基因的 ARO 编号。包含 confers_resistance_to
和 drugs_to_drug_classes
函数的 drug_categorization
模块。函数 confers_resistance_to
返回基因赋予抗性的药物。函数 drugs_to_drug_classes
返回特定药物所属的药物类别。
map_to_aro
函数接受两个参数:gene
和 database
。gene
是抗生素耐药基因的名称。database
是从中获取 gene
的数据库。
在此示例中,使用 ResFinder 数据库中的基因列表,并将列表中的每个基因映射到 ARO 术语。
ARO 术语的 ARO 编号也存储在 list_of_aros
列表中。可以通过 ARO 术语的 id
属性访问 ARO 编号。可以通过 ARO 术语的 name
属性访问 ARO 术语的基因名称。
database = 'resfinder'
list_of_aros = []
for gene in list_of_input_genes:
list_of_aros.append(map_to_aro(gene, database).id)
print(list_of_aros)
一旦为每个基因创建了一个 ARO 编号的列表,就可以使用 confers_resistance_to
函数对每个 ARO 编号进行操作,以创建每个基因/ARO 赋予抗性的药物列表
list_of_drugs = []
for aro in list_of_aros:
list_of_drugs.append(confers_resistance_to(aro))
print(list_of_drugs)
现在,可以使用 drugs_to_drug_classes
函数将 list_of_drugs
中的每个药物分类到更广泛的药物类别
list_of_drug_classes = []
for drug in list_of_drugs:
list_of_drug_classes.append(drugs_to_drug_classes(drug))
print(list_of_drug_classes)
输出
List of ARO numbers
['ARO:3000410', 'ARO:3000410', 'ARO:3000412']
Confers resistance to
[['ARO:3000324', 'ARO:3000325', 'ARO:3000327', 'ARO:3000329', 'ARO:3000330', 'ARO:3000683', 'ARO:3000684', 'ARO:3000698', 'ARO:3000699'], ['ARO:3000324', 'ARO:3000325', 'ARO:3000327', 'ARO:3000329', 'ARO:3000330', 'ARO:3000683', 'ARO:3000684', 'ARO:3000698', 'ARO:3000699'], ['ARO:3000324', 'ARO:3000325', 'ARO:3000327', 'ARO:3000329', 'ARO:3000330', 'ARO:3000683', 'ARO:3000684', 'ARO:3000698', 'ARO:3000699']]
Resistance to drug classes
[['ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282'], ['ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282'], ['ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282', 'ARO:3000282']]
作者
- Vedanth Ramji vedanth.ramji@gmail.com*
- Hui Chong huichong.me@gmail.com
- Svetlana Ugarcina Perovic svetlana.ugarcina@gmail.com
- Finlay Maguire finlaymaguire@gmail.com
- Luis Pedro Coelho luis@luispedro.org
*: 当前维护者
项目详情
下载文件
下载适合您平台文件的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源分布
构建分布
argnorm-0.6.0.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 85b54bff237943af418a4f6fedd83c1c67c14522f9ef81e1b750bbd5aec2051b |
|
MD5 | 15d4714a1e95c9d7c0d848f4f7769f79 |
|
BLAKE2b-256 | d09c2da4be41757b1ab2293d49de358010e93aea72bfa0fb2bdc687a6e5097dd |
argnorm-0.6.0-py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 912997884e84b8f3935716d08c9939f87d1bdac6c25f22644aeb1d92f17af30f |
|
MD5 | 492ef5e0afaa38f2b1bd59311e482916 |
|
BLAKE2b-256 | 1a86cc0ed3413521c8c141c834b17929cb8b4f600828f05317a0d8548fe86e5c |