arg-ranker


Namearg-ranker JSON
Version 3.7.2 PyPI version JSON
download
home_pagehttps://github.com/caozhichongchong/ARG_Ranker
SummaryRanking the risk of antibiotic resistance for genomes/metagenomes
upload_time2024-01-03 16:25:16
maintainer
docs_urlNone
authorAn-Ni Zhang
requires_python
licenseMIT
keywords antibiotic resistance risk one health clinical amr mobile amr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # arg_ranker
arg_ranker evaluates the risk of ARGs in genomes and metagenomes

## Install
experimental version using most updated ARG database (SARGv3)\
`pip install arg_ranker`\
Long term support version using the same ARG database in the publication (SARGv1)\
`pip install arg-ranker==3.0.2`
### Please make sure to install arg_ranker >= v3
To all users,\
We have noticed an error of arg_ranker.v2 when reporting the total ARG abundance in metagenomes.\
If the total abundance is used in your research, please update arg_ranker to v3 and re-run your metagenomes (`arg_ranker -i $INPUT -kkdb $KRAKENDB`).\
Alternatively, you can fix arg_ranker.v2 by replacing its original ARG_table.sum.py with [ARG_table.sum.py](https://github.com/caozhichongchong/arg_ranker/tree/v2.0/arg_ranker/bin_v2only/ARG_table.sum.py)\
and re-run the last two commands in arg_ranker.sh `python $PATH_to_arg_ranker/bin/ARG_table.sum.py -i ...` and `arg_ranker -i ...`.\
You can find the path to ARG_table.sum.py in arg_ranker.sh.\
Note that this [ARG_table.sum.py](https://github.com/caozhichongchong/arg_ranker/tree/v2.0/arg_ranker/bin_v2only/ARG_table.sum.py) is only meant for fixing arg_ranker.v2 and the results of arg_ranker.v2.\
Please do not replace ARG_table.sum.py in arg_ranker.v3 with this [ARG_table.sum.py](https://github.com/caozhichongchong/arg_ranker/tree/v2.0/arg_ranker/bin_v2only/ARG_table.sum.py).\
We are really sorry about this inconvenience.\
Please feel free to reach out to anniz44@mit.edu if you have any questions.

To check installed version `pip show arg_ranker`\
To upgrade `pip install arg_ranker --upgrade`

## Requirement
* python 3
* diamond: `conda install -c bioconda diamond=2.1.6` (https://github.com/bbuchfink/diamond)
* blast+: `conda install -c bioconda blast` (https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/)
* For metagenomes:
    * kraken2: `conda install -c bioconda kraken2`(https://github.com/DerrickWood/kraken2/wiki)
        * to compute the abundance of ARGs as copy number of ARGs per bacterial cell (recommended)
            * download the kraken2 standard database (50 GB of disk space): `kraken2-build --standard --db $KRAKENDB` \
            where $KRAKENDB is your preferred database name/location
            * MicrobeCensu: `git clone https://github.com/snayfach/MicrobeCensus && cd MicrobeCensus && python setup.py install` to estimate the average genome size for metagenomes.
            (https://github.com/snayfach/MicrobeCensus)
        * to compute the abundance of ARGs as copy number of ARGs per 16S
            * download the kraken2 16S database (73.2 MB of disk space): `kraken2-build --db $DBNAME --special greengenes`

## How to use it
* put all your genomes (.fa or .fasta) and metagenomes (.fq or .fastq) into one folder ($INPUT)
* run `arg_ranker -i $INPUT` (genomes only)
* run `arg_ranker -i $INPUT -kkdb $KRAKENDB` (genomes/metagenomes + kraken2 standard database)
    * or run `arg_ranker -i $INPUT -kkdb $KRAKENDB -kkdbtype 16S` (kraken2 16S database)
* run `sh arg_ranking/script_output/arg_ranker.sh`

## Output
* Sample_ranking_results.txt (Table 1)
    * arg_ranker = 3.4 (SARGv3)
    * python >= 3.5
    * diamond = 2.1.6 - recommended
    * blast = 2.13.0
    * kraken2 = 2.1.2 - 16Gb database

    |Sample|Rank_I_per|Rank_II_per|Rank_III_per|Rank_IV_per|Unassessed_per|Total_abu|Rank_code|Rank_I_risk|Rank_II_risk|Rank_III_risk|Rank_IV_risk|ARGs_unassessed_risk|note1|
    | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: |
    |WEE300_all-trimmed-decont_1.fastq|6.6E-02|2.1E-02|2.2E-01|6.9E-01|0.0E+00|5.5E+00|3.1-1.3-1.1-0.9-0.0|3.1|1.3|1.1|0.9|0.0|hospital_metagenome|
    |EsCo_genome.fasta|7.1E-02|0.0E+00|2.1E-01|7.1E-01|0.0E+00|1.4E+01|3.3-0.0-1.1-0.9-0.0|3.3|0.0|1.1|0.9|0.0|E.coli_genome|
* Sample_ranking_results.txt (Table 1)
    * arg_ranker = 3.0.2 (SARGv1)
    * python >= 3.5
    * diamond = 0.9.36 - not recommended
    * blast = 2.13.0
    * kraken2 = 2.1.2 - 16Gb database

    |Sample|Rank_I_per|Rank_II_per|Rank_III_per|Rank_IV_per|Unassessed_per|Total_abu|Rank_code|Rank_I_risk|Rank_II_risk|Rank_III_risk|Rank_IV_risk|ARGs_unassessed_risk|note1|
    | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: |
    |WEE300_all-trimmed-decont_1.fastq|4.6E-02|0.0E+00|6.8E-02|7.5E-01|1.3E-01|1.9E+00|1.5-0.0-0.4-1.7-0.4|1.5|0.0|0.4|1.7|0.4|hospital_metagenome|
    |EsCo_genome.fasta|0.0E+00|0.0E+00|2.4E-01|7.6E-01|0.0E+00|2.1E+01|0.0-0.0-1.6-1.7-0.0|0.0|0.0|1.6|1.7|0.0|E.coli_genome|
* Please note that minor changes within ~two-fold of the Total_abu caused by different diamond and kraken versions can be considered reasonable :)

1. Rank_I_per - Unassessed_per: percentage of ARGs of a risk Rank\
Total_abu: total abundance of all ARGs
2. For genomes, we output the copy number of ARGs detected in each genome.
3. For metagenomes, we compute the abundance of ARGs as the copy number of ARGs divided by the bacterial cell number or 16S copy number in the same metagenome.\
If you downloaded the kraken2 standard database, we compute the copy number of ARGs divided by the bacterial cell number.\
If you downloaded the kraken2 16S database, we compute the copy number of ARGs divided by the 16S copy number.\
The copy number of ARGs, 16S, and bacterial cells were computed as the number of reads mapped to them divided by their gene/genome length.
4. We compute the contribution of each ARG risk Rank as the average abundance of ARGs of a risk Rank divided by the average abundance of all ARGs\
Rank_I_risk - Unassessed_risk: the contribution of ARGs of a risk Rank\
Rank_code: a code of contribution from Rank I to Unassessed

* Sample_ARGpresence.txt:\
The abundance, the gene family, and the antibiotic of resistance of ARGs detected in the input samples

## Test
run `arg_ranker -i example -kkdb $KRAKENDB`\
run `sh arg_ranking/script_output/arg_ranker.sh`\
The arg_ranking/Sample_ranking_results.txt should look like Table 1 (using kraken2 standard database)

## Metadata for your samples (optional)
arg_ranker can merge your sample metadata into the results of ARG ranking (i.e. note1 in Table 1).\
Simply put all information you would like to include into a tab-delimited table\
Make sure that your sample names are listed as the first column (check example/metadata.txt).

## Copyright
Dr. An-Ni Zhang (MIT), Prof. Eric Alm (MIT), Prof. Tong Zhang* (University of Hong Kong)

## Citation
Zhang, AN., Gaston, J.M., Dai, C.L. et al. An omics-based framework for assessing the health risk of antimicrobial resistance genes. Nat Commun 12, 4765 (2021). https://doi.org/10.1038/s41467-021-25096-3
Correction: bacA is a bacitracin resistance gene, not a beta-lactamase (Fig 3).

## Contact
anniz44@mit.edu or caozhichongchong@gmail.com

## Acknowledgement
Special thanks to LeabaeL for their great help in testing various versions of arg_ranker and diamond!



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/caozhichongchong/ARG_Ranker",
    "name": "arg-ranker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "antibiotic resistance,risk,one health,clinical AMR,mobile AMR",
    "author": "An-Ni Zhang",
    "author_email": "anniz44@mit.edu",
    "download_url": "https://files.pythonhosted.org/packages/1b/2f/b0e15f352d9b32f7c0c63c1c1233d6b1af1c941086f5ec230c8d3c451421/arg_ranker-3.7.2.tar.gz",
    "platform": null,
    "description": "# arg_ranker\narg_ranker evaluates the risk of ARGs in genomes and metagenomes\n\n## Install\nexperimental version using most updated ARG database (SARGv3)\\\n`pip install arg_ranker`\\\nLong term support version using the same ARG database in the publication (SARGv1)\\\n`pip install arg-ranker==3.0.2`\n### Please make sure to install arg_ranker >= v3\nTo all users,\\\nWe have noticed an error of arg_ranker.v2 when reporting the total ARG abundance in metagenomes.\\\nIf the total abundance is used in your research, please update arg_ranker to v3 and re-run your metagenomes (`arg_ranker -i $INPUT -kkdb $KRAKENDB`).\\\nAlternatively, you can fix arg_ranker.v2 by replacing its original ARG_table.sum.py with [ARG_table.sum.py](https://github.com/caozhichongchong/arg_ranker/tree/v2.0/arg_ranker/bin_v2only/ARG_table.sum.py)\\\nand re-run the last two commands in arg_ranker.sh `python $PATH_to_arg_ranker/bin/ARG_table.sum.py -i ...` and `arg_ranker -i ...`.\\\nYou can find the path to ARG_table.sum.py in arg_ranker.sh.\\\nNote that this [ARG_table.sum.py](https://github.com/caozhichongchong/arg_ranker/tree/v2.0/arg_ranker/bin_v2only/ARG_table.sum.py) is only meant for fixing arg_ranker.v2 and the results of arg_ranker.v2.\\\nPlease do not replace ARG_table.sum.py in arg_ranker.v3 with this [ARG_table.sum.py](https://github.com/caozhichongchong/arg_ranker/tree/v2.0/arg_ranker/bin_v2only/ARG_table.sum.py).\\\nWe are really sorry about this inconvenience.\\\nPlease feel free to reach out to anniz44@mit.edu if you have any questions.\n\nTo check installed version `pip show arg_ranker`\\\nTo upgrade `pip install arg_ranker --upgrade`\n\n## Requirement\n* python 3\n* diamond: `conda install -c bioconda diamond=2.1.6` (https://github.com/bbuchfink/diamond)\n* blast+: `conda install -c bioconda blast` (https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/)\n* For metagenomes:\n    * kraken2: `conda install -c bioconda kraken2`(https://github.com/DerrickWood/kraken2/wiki)\n        * to compute the abundance of ARGs as copy number of ARGs per bacterial cell (recommended)\n            * download the kraken2 standard database (50 GB of disk space): `kraken2-build --standard --db $KRAKENDB` \\\n            where $KRAKENDB is your preferred database name/location\n            * MicrobeCensu: `git clone https://github.com/snayfach/MicrobeCensus && cd MicrobeCensus && python setup.py install` to estimate the average genome size for metagenomes.\n            (https://github.com/snayfach/MicrobeCensus)\n        * to compute the abundance of ARGs as copy number of ARGs per 16S\n            * download the kraken2 16S database (73.2 MB of disk space): `kraken2-build --db $DBNAME --special greengenes`\n\n## How to use it\n* put all your genomes (.fa or .fasta) and metagenomes (.fq or .fastq) into one folder ($INPUT)\n* run `arg_ranker -i $INPUT` (genomes only)\n* run `arg_ranker -i $INPUT -kkdb $KRAKENDB` (genomes/metagenomes + kraken2 standard database)\n    * or run `arg_ranker -i $INPUT -kkdb $KRAKENDB -kkdbtype 16S` (kraken2 16S database)\n* run `sh arg_ranking/script_output/arg_ranker.sh`\n\n## Output\n* Sample_ranking_results.txt (Table 1)\n    * arg_ranker = 3.4 (SARGv3)\n    * python >= 3.5\n    * diamond = 2.1.6 - recommended\n    * blast = 2.13.0\n    * kraken2 = 2.1.2 - 16Gb database\n\n    |Sample|Rank_I_per|Rank_II_per|Rank_III_per|Rank_IV_per|Unassessed_per|Total_abu|Rank_code|Rank_I_risk|Rank_II_risk|Rank_III_risk|Rank_IV_risk|ARGs_unassessed_risk|note1|\n    | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: |\n    |WEE300_all-trimmed-decont_1.fastq|6.6E-02|2.1E-02|2.2E-01|6.9E-01|0.0E+00|5.5E+00|3.1-1.3-1.1-0.9-0.0|3.1|1.3|1.1|0.9|0.0|hospital_metagenome|\n    |EsCo_genome.fasta|7.1E-02|0.0E+00|2.1E-01|7.1E-01|0.0E+00|1.4E+01|3.3-0.0-1.1-0.9-0.0|3.3|0.0|1.1|0.9|0.0|E.coli_genome|\n* Sample_ranking_results.txt (Table 1)\n    * arg_ranker = 3.0.2 (SARGv1)\n    * python >= 3.5\n    * diamond = 0.9.36 - not recommended\n    * blast = 2.13.0\n    * kraken2 = 2.1.2 - 16Gb database\n\n    |Sample|Rank_I_per|Rank_II_per|Rank_III_per|Rank_IV_per|Unassessed_per|Total_abu|Rank_code|Rank_I_risk|Rank_II_risk|Rank_III_risk|Rank_IV_risk|ARGs_unassessed_risk|note1|\n    | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: | :--------: |\n    |WEE300_all-trimmed-decont_1.fastq|4.6E-02|0.0E+00|6.8E-02|7.5E-01|1.3E-01|1.9E+00|1.5-0.0-0.4-1.7-0.4|1.5|0.0|0.4|1.7|0.4|hospital_metagenome|\n    |EsCo_genome.fasta|0.0E+00|0.0E+00|2.4E-01|7.6E-01|0.0E+00|2.1E+01|0.0-0.0-1.6-1.7-0.0|0.0|0.0|1.6|1.7|0.0|E.coli_genome|\n* Please note that minor changes within ~two-fold of the Total_abu caused by different diamond and kraken versions can be considered reasonable :)\n\n1. Rank_I_per - Unassessed_per: percentage of ARGs of a risk Rank\\\nTotal_abu: total abundance of all ARGs\n2. For genomes, we output the copy number of ARGs detected in each genome.\n3. For metagenomes, we compute the abundance of ARGs as the copy number of ARGs divided by the bacterial cell number or 16S copy number in the same metagenome.\\\nIf you downloaded the kraken2 standard database, we compute the copy number of ARGs divided by the bacterial cell number.\\\nIf you downloaded the kraken2 16S database, we compute the copy number of ARGs divided by the 16S copy number.\\\nThe copy number of ARGs, 16S, and bacterial cells were computed as the number of reads mapped to them divided by their gene/genome length.\n4. We compute the contribution of each ARG risk Rank as the average abundance of ARGs of a risk Rank divided by the average abundance of all ARGs\\\nRank_I_risk - Unassessed_risk: the contribution of ARGs of a risk Rank\\\nRank_code: a code of contribution from Rank I to Unassessed\n\n* Sample_ARGpresence.txt:\\\nThe abundance, the gene family, and the antibiotic of resistance of ARGs detected in the input samples\n\n## Test\nrun `arg_ranker -i example -kkdb $KRAKENDB`\\\nrun `sh arg_ranking/script_output/arg_ranker.sh`\\\nThe arg_ranking/Sample_ranking_results.txt should look like Table 1 (using kraken2 standard database)\n\n## Metadata for your samples (optional)\narg_ranker can merge your sample metadata into the results of ARG ranking (i.e. note1 in Table 1).\\\nSimply put all information you would like to include into a tab-delimited table\\\nMake sure that your sample names are listed as the first column (check example/metadata.txt).\n\n## Copyright\nDr. An-Ni Zhang (MIT), Prof. Eric Alm (MIT), Prof. Tong Zhang* (University of Hong Kong)\n\n## Citation\nZhang, AN., Gaston, J.M., Dai, C.L. et al. An omics-based framework for assessing the health risk of antimicrobial resistance genes. Nat Commun 12, 4765 (2021). https://doi.org/10.1038/s41467-021-25096-3\nCorrection: bacA is a bacitracin resistance gene, not a beta-lactamase (Fig 3).\n\n## Contact\nanniz44@mit.edu or caozhichongchong@gmail.com\n\n## Acknowledgement\nSpecial thanks to LeabaeL for their great help in testing various versions of arg_ranker and diamond!\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Ranking the risk of antibiotic resistance for genomes/metagenomes",
    "version": "3.7.2",
    "project_urls": {
        "Homepage": "https://github.com/caozhichongchong/ARG_Ranker"
    },
    "split_keywords": [
        "antibiotic resistance",
        "risk",
        "one health",
        "clinical amr",
        "mobile amr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1530e8a1d2dab172c724114b06d35c84556d5102e674596a1c07c2f6000abf6e",
                "md5": "b09244bbcddff3be24fcda8995b64e6a",
                "sha256": "dab54610f8c9a731db025520aa2c88e3e1f6b48aadff8f97c031ad19ca21c0c3"
            },
            "downloads": -1,
            "filename": "arg_ranker-3.7.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b09244bbcddff3be24fcda8995b64e6a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 89741562,
            "upload_time": "2024-01-03T16:24:57",
            "upload_time_iso_8601": "2024-01-03T16:24:57.386263Z",
            "url": "https://files.pythonhosted.org/packages/15/30/e8a1d2dab172c724114b06d35c84556d5102e674596a1c07c2f6000abf6e/arg_ranker-3.7.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b2fb0e15f352d9b32f7c0c63c1c1233d6b1af1c941086f5ec230c8d3c451421",
                "md5": "350164c5623be1f69de9083c130d42fa",
                "sha256": "87a98560651f04de91891095c3baaeaa28b01e7098aed385f67b1f6dd3bcadac"
            },
            "downloads": -1,
            "filename": "arg_ranker-3.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "350164c5623be1f69de9083c130d42fa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 89621086,
            "upload_time": "2024-01-03T16:25:16",
            "upload_time_iso_8601": "2024-01-03T16:25:16.467403Z",
            "url": "https://files.pythonhosted.org/packages/1b/2f/b0e15f352d9b32f7c0c63c1c1233d6b1af1c941086f5ec230c8d3c451421/arg_ranker-3.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-03 16:25:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "caozhichongchong",
    "github_project": "ARG_Ranker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "arg-ranker"
}
        
Elapsed time: 0.22614s