Giter Site home page Giter Site logo

amr-meta's Introduction

AMR-meta

AMR-meta is a machine-learning method to predict class-specific antimicrobial resistance (AMR) in metagenomics short read pairs (FASTQ). AMR-meta is an ensemble of AMR class-specific models based on MEGARes classes. AMR-meta is developed in Linux, ad utilizes Bash, C++, and R.

Considered AMR Classes

  • Aminoglycosides
  • Betalactams
  • Drug and biocide resistance
  • Fluoroquinolones
  • Glycopeptides
  • Lipopeptides
  • MLS
  • Multi-biocide resistance
  • Multi-drug resistance
  • Multi-metal resistance
  • Phenicol
  • Sulfonamides
  • Tetracyclines

Principles

AMR-meta is based on multiple binary models, one per AMR class. Each class has two models

  • one based on k-mers and LASSO logistic regression
  • one based on metafeatures (obtained by k-mers matrix factorization) and ridge logistic regression

Installation

Makefile

To install AMR-meta, download this repository and run:

make

AMR-meta uses the following R packages: Matrix, stringr, glmnet. AMR-meta will check if these R packages are installed before running.

Singularity

AMR-meta is available as a Singularity container, downloadable from http://genome.ufl.edu/download/amrmeta.sif.

Usage

./AMR-meta.sh -a FASTQ_R1 -b FASTQ_R2 -o OUT_DIR -p NCORES
	-a	short read R1 file [fastq]
        -b	short read R2 file [fastq]
        -o	output directory, defaults to output
        -p	# of cores for parallel computing, defaults to 1
        
Singularity:
singularity run amrmeta.sif -a FASTQ_R1 -b FASTQ_R2 -o OUT_DIR -p NCORES

        examples of use:
        ./AMR-meta.sh -a data/example/example_R1.fastq \
                -b data/example/example_R2.fastq \
                -o output \
                -p 4
                
        singularity run amrmeta.sif -a data/example/example_R1.fastq \
                -b data/example/example_R2.fastq \
                -o output \
                -p 4

Output

For each short read pair, AMR-meta will output a probability for each model of the read pair of being labeled as resistant. An example of output file is the following:

Aminoglycosides betalactams Drug and biocide resistance Fluoroquinolones Glycopeptides Lipopeptides MLS Multi-biocide resistance Multi-drug resistance Multi-metal resistance Phenicol Sulfonamides Tetracyclines
0.302 0.065 0.494 0.017 0.392 0.251 0.434 0.398 0.474 0.488 0.120 0.546 0.194
0.302 0.065 0.494 0.040 0.322 0.251 0.434 0.398 0.091 0.211 0.167 0.530 0.308
0.999 0.382 0.001 0.012 0.000 0.051 0.001 0.015 0.800 0.678 0.104 0.003 0.275
0.302 0.065 0.496 0.040 0.392 0.511 0.434 0.398 0.474 0.678 0.104 0.003 0.275
0.302 0.065 0.494 0.040 0.385 0.717 0.117 0.434 0.398 0.678 0.104 0.003 0.275
0.302 0.065 0.494 0.063 0.392 0.007 0.965 0.251 0.434 0.398 0.474 0.488 0.137

Here, each line corresponds to a read pair in the input fastq files (same order).

References:

A thank you note

The AMR-meta team is deeply thankful to Alberto Riva and UF ICBR for kindly hosting the AMR-meta Singularity image.

MIT License

Copyright (c) [2021] [Simone Marini et al.]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

amr-meta's People

Contributors

smarini avatar dibig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.