MetaCompare is a computational pipeline for prioritizing resistome risk by estimating the potential for ARGs to be disseminated into human pathogens from a given environmental sample based on metagenomic sequencing data.
These instructions will get you a copy of the project up and running on your local machine or server.
- git installed
- Python3 with
pandas
andbiopython
package installedpip install pandas
pip install biopython
- Blast 2.2.8 or higher version installed
Step 1: Change the current working directory to the location where you want the cloned MetaCompare
directory to be made.
Step 2: Clone the repository using git command
~$ git clone https://github.com/minoh0201/MetaCompare
Step 3: Make directory BlastDB
under MetaCompare
directory and change the woring directory to it.
~$ cd MetaCompare
~/MetaCompare$ mkdir BlastDB
~/MetaCompare$ cd BlastDB
~/MetaCompare/BlastDB$
Step 4: Download the compressed Blast Database file from the web server (25 GB) and uncompress it.
~/MetaCompare/BlastDB$ wget http://bench.cs.vt.edu/ftp/data/metacomp/BlastDB.tar.gz
~/MetaCompare/BlastDB$ tar -zxvf BlastDB.tar.gz
Note: If you are encountering ERROR: cannot verify bench.cs.vt.edu's certificate
, execute wget command with --no-check-certificate
option (wget http://bench.cs.vt.edu/ftp/data/metacomp/BlastDB.tar.gz --no-check-certificate
).
Step 5: Get back to working directory MetaCompare
and run metacmp.py
~/MetaCompare/BlastDB$ cd ..
~/MetaCompare$ ./metacmp.py
MetaCompare requires two FASTA files as inputs, one for the assembled contigs generated by IDBA-UD and the other for predicted gene list derived from the assembled contigs using prodigal.
If you have raw reads you can submit them to MetaStorm (http://bench.cs.vt.edu/MetaStorm/) and run assembly pipeline to get assembled contigs and predicted gene list. MetaStorm's assembly pipeline uses trimmomatic for quality control of raw reads, IDBA-UD for assembly, and prodigal for gene prediction.
The input files we need can be downloaded from MetaStorm by clicking Scaffolds
button (for assembled contigs) and Genes
button (for predicted genes) in the assembled sample page.
You can directly install and run trimmomatic (https://github.com/timflutre/trimmomatic), IDBA-UD (https://github.com/loneknightpy/idba) and prodigal (https://github.com/hyattpd/Prodigal) to process your raw reads in order to get the inputs.
Suppose you have the assembled contigs file, S1.fa
, and predicted gene list S1_genes.fa
(These files are already in your working directory).
The following command runs MetaCompare with 128 threads.
~$ ./metacmp.py -c S1.fa -g S1_genes.fa -t 128
The output should be look like as follows:
Running blastn on ACLAME
Running blastx on CARD
Running blastn on PATRIC
Reading files...
Computing resistome risk score..
Resistome risk score: 38.64014990951873
You can see detailed description for command line options by using -h
option.
~$ ./metacmp.py -h
MIT License
Copyright (c) 2018 Min Oh ([email protected])
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.
Oh, M., Pruden, A., Chen, C., Heath, L. S., Xia, K., & Zhang, L. (2018). MetaCompare: A computational pipeline for prioritizing environmental resistome risk. FEMS microbiology ecology.