Here is a quick demo of running argNorm on the command line.
Install argNorm and check installation
pip install argnorm
argnorm -h
argnorm -h
or argnorm --help
will display all the available options to run argNorm with.
> argnorm -h
usage: argnorm [-h] [--db {sarg,ncbi,resfinder,deeparg,megares,argannot,resfinderfg,groot-argannot,groot-resfinder,groot-db,groot-core-db,groot-card}] [-i INPUT] [-o OUTPUT]
{argsoap,abricate,deeparg,resfinder,amrfinderplus,groot,hamronization}
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,hamronization}
The tool you used to do ARG annotation.
options:
-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.
-i INPUT, --input INPUT
The annotation result you have
-o OUTPUT, --output OUTPUT
The file to save normalization results
argNorm adds ARO mappings and drug categories as additional columns to the outputs of ARG annotation tools.
For this example, we will run argNorm on the ARG annotation output from the ResFinder tool (with the ResFinder database).
Create a folder called argNorm_tutorial
and store the downloaded data file in it. Navigate into the argNorm_tutorial
folder.
mkdir argNorm_tutorial
cd argNorm_tutorial
Click here to download the input data.
If you are on Linux:
wget https://raw.githubusercontent.com/BigDataBiology/argNorm/main/examples/raw/resfinder.resfinder.orfs.tsv
Here is a basic outline of most argNorm commands:
argnorm [tool] -i [original_annotation.tsv] -o [argnorm_result.tsv] [--db]
Here, tool
refers to the ARG annotation tool used (ResFinder in this case). original_annotation.tsv
is the path to the input data and argnorm_result.tsv
is the path to output file where the resulting table from argNorm will be stored. --db
is the ARG databases used along with tool
to perform annotation. ResFinder does not require a --db
(argNorm will automatically load up the ResFinder database), however, --db
is required for the ARG annotation tools groot
and abricate
.
To run argNorm on the input data, use this command in your terminal:
argnorm resfinder -i ./resfinder.resfinder.orfs.tsv -o ./resfinder.resfinder.orfs.normed.tsv
The argNorm result will be stored in the file resfinder.resfinder.orf.normed.tsv
.
Create a folder called argnorm_cli_tutorial
and download the sample data inside it.
mkdir argnorm_cli_tutorial
cd argnorm_cli_tutorial
Here is a basic outline of calling argNorm.
argnorm [tool] -i [original_annotation.tsv] -o [annotation_result_with_aro.tsv]
argnorm argsoap -i examples/raw/args-oap.sarg.reads.tsv -o outputs/raw/args-oap.sarg.reads.tsv
argnorm deeparg -i examples/raw/deeparg.deeparg.orfs.tsv -o outputs/raw/deeparg.deeparg.orfs.tsv
When using abricate, it is necessary to specify the database used:
argnorm abricate --db ncbi -i examples/raw/abricate.ncbi.tsv -o outputs/raw/abricate.ncbi.tsv
argnorm abricate --db megares -i examples/raw/abricate.megares.tsv -o outputs/raw/abricate.megarest.tsv
argnorm abricate --db argannot -i examples/raw/abricate.argannot.tsv -o outputs/raw/abricate.argannot.tsv
argnorm resfinder -i examples/raw/resfinder.resfinder.orfs.tsv -o outputs/raw/resfinder.resfinder.orfs.tsv
argnorm resfinder -i examples/raw/resfinder.resfinder.reads.tsv -o outputs/raw/resfinder.resfinder.reads.tsv
argnorm amrfinderplus -i examples/raw/amrfinderplus.ncbi.orfs.tsv -o outputs/raw/amrfinderplus.ncbi.orfs.tsv
argnorm groot -i examples/raw/groot.argannot.tsv -o outputs/raw/groot.argannot.tsv --db groot-argannot
argnorm groot -i examples/raw/groot.resfinder.tsv -o outputs/raw/groot.resfinder.tsv --db groot-resfinder
argnorm groot -i examples/raw/groot.card.tsv -o outputs/raw/groot.card.tsv --db groot-card
argnorm groot -i examples/raw/groot.groot-db.tsv -o outputs/raw/groot.groot-db.tsv --db groot-db
argnorm groot -i examples/raw/groot.groot-core-db.tsv -o ouptuts/raw/groot.groot-core-db.tsv --db groot-core-db
argnorm hamronization -i examples/hamronized/args-oap.sarg.reads.tsv -o outputs/hamronized/args-oap.sarg.reads.tsv
argnorm hamronization -i examples/hamronized/deeparg.deeparg.orfs.tsv -o outputs/hamronized/deeparg.deeparg.orfs.tsv
argnorm hamronization -i examples/hamronized/abricate.ncbi.tsv -o outputs/hamronized/abricate.ncbi.tsv
argnorm hamronization -i examples/hamronized/abricate.megares.tsv -o outputs/hamronized/abricate.megares.tsv
argnorm hamronization -i examples/hamronized/abricate.argannot.tsv -o outputs/hamronized/abricate.argannot.tsv
argnorm hamronization -i examples/hamronized/abricate.resfinder.tsv -o outputs/hamronized/abricate.resfinder.tsv
argnorm hamronization -i examples/hamronized/resfinder.resfinder.orfs.tsv -o outputs/hamronized/resfinder.resfinder.orfs.tsv
argnorm hamronization -i examples/hamronized/resfinder.resfinder.reads.tsv -o outputs/hamronized/resfinder.resfinder.reads.tsv
argnorm hamronization -i examples/hamronized/amrfinderplus.ncbi.orfs.tsv -o outputs/hamronized/amrfinderplus.ncbi.orfs.tsv
argnorm hamronization -i examples/hamronized/groot.argannot.tsv -o outputs/hamronized/groot.argannot.tsv
argnorm hamronization -i examples/hamronized/groot.resfinder.tsv -o outputs/hamronized/groot.resfinder.tsv
argnorm hamronization -i examples/hamronized/groot.card.tsv -o outputs/hamronized/groot.card.tsv
argnorm hamronization -i examples/hamronized/groot.groot-db.tsv -o outputs/hamronized/groot.groot-db.tsv
argnorm hamronization -i examples/hamronized/groot.groot-core-db.tsv -o outputs/hamronized/groot.groot-core-db.tsv