This application is used to predict resistome(s) from protein or nucleotide data based on homology and SNP models. The application uses data from CARD database.
- License
- Requirements
- Install dependencies
- Install RGI from project root
- Running RGI tests
- Help menu
- Usage
- Load card.json
- Check database version
- Run RGI
- Run RGI using GNU parallel
- Running RGI with short contigs to predict partial genes
- Clean previous or old databases
- RGI Heatmap
- Run RGI from docker
- Tab-delimited results file
- Support & Bug Reports
Use or reproduction of these materials, in whole or in part, by any non-academic organization whether or not for non-commercial (including research) or commercial purposes is prohibited, except with written permission of McMaster University. Commercial uses are offered only pursuant to a written license and user fee. To obtain permission and begin the licensing process, see CARD website
- pip3 install biopython
- pip3 install filetype
- pip3 install pandas
- pip3 install pytest
- pip3 install mock
pip3 install .
or
python3 setup.py build
python3 setup.py test
python3 setup.py install
cd tests
pytest -v -rxs
rgi --help
usage: rgi <command> [<args>]
commands are:
main Runs rgi application
tab Creates a Tab-delimited from rgi results
parser Creates categorical JSON files RGI wheel visualization
load Loads CARD database JSON file
clean Removes BLAST databases and temporary files
galaxy Galaxy project wrapper
database Information on installed card database
heatmap Heatmap for multiple analysis
---------------------------------------------------------------------------------------
bwt Metagenomics resistomes (Experimental)
card_annotation Create fasta files with annotations from card.json (Experimental)
wildcard_annotation Create fasta files with annotations from variants (Experimental)
baits_annotation Create fasta files with annotations from baits (Experimental)
remove_duplicates Removes duplicate sequences (Experimental)
kmer_build Build CARD*kmer database (Experimental)
kmer_query Query sequences through CARD*kmers (Experimental)
Resistance Gene Identifier - <version_number>
positional arguments:
command Subcommand to run
optional arguments:
-h, --help show this help message and exit
Use the Resistance Gene Identifier to predict resistome(s) from protein or
nucleotide data based on homology and SNP models. Check
https://card.mcmaster.ca/download for software and data updates. Receive email
notification of monthly CARD updates via the CARD Mailing List
(https://mailman.mcmaster.ca/mailman/listinfo/card-l)
local or working directory
rgi load --afile /path/to/card.json --local
system wide
rgi load --afile /path/to/card.json
local or working directory
rgi database --version --local
system wide
rgi database --version
local or working directory
rgi main --input_sequence /path/to/protein_input.fasta --output_file /path/to/output_file --input_type protein --local
system wide
rgi main --input_sequence /path/to/nucleotide_input.fasta --output_file /path/to/output_file --input_type contig
system wide and writing log files for each input file. (Note add code below to script.sh then run with ./script.sh /path/to/input_files)
#!/bin/bash DIR=`find . -mindepth 1 -type d` for D in $DIR; do NAME=$(basename $D); parallel --no-notice --progress -j+0 'rgi main -i {} -o {.} -n 16 -a diamond --clean --debug > {.}.log 2>&1' ::: $NAME/*.{fa,fasta}; done
local or working directory
rgi main --input_sequence /path/to/nucleotide_input.fasta --output_file /path/to/output_file --local --low_quality
system wide
rgi main --input_sequence /path/to/nucleotide_input.fasta --output_file /path/to/output_file --low_quality
local or working directory
rgi clean --local
system wide
rgi clean
Default Heatmap
rgi heatmap --input /path/to/rgi_results_json_files_directory/
Heatmap with AMR Gene Family categorization
rgi heatmap --input /path/to/rgi_results_json_files_directory/ --category gene_family
Heatmap with AMR Gene Family categorization and fill display
rgi heatmap --input /path/to/rgi_results_json_files_directory/ --category gene_family --display fill
Heatmap with AMR Gene Family categorization and coloured y-axis labels display
rgi heatmap --input /path/to/rgi_results_json_files_directory/ --category gene_family --display text
Heatmap with frequency display enabled
rgi heatmap --input /path/to/rgi_results_json_files_directory/ --frequency
Heatmap with drug class category and frequency enabled
rgi heatmap --input /path/to/rgi_results_json_files_directory/ --category drug_class --frequency --display text
Heatmap with samples and genes clustered
rgi heatmap --input /path/to/rgi_results_json_files_directory/ --cluster both
Heatmap with resistance mechanism categorization and clustered samples
rgi heatmap --input /path/to/rgi_results_json_files_directory/ --cluster samples --category resistance_mechanism --display fill
First you you must either pull the docker container from dockerhub (latest CARD version automatically installed)
docker pull finlaymaguire/rgi
Or Alternatively, build it locally from the Dockerfile (latest CARD version automatically installed)
git clone https://github.com/arpcard/rgi docker build -t arpcard/rgi rgi
Then you can either run interactively (mounting a local directory called rgi_data in your current directory to /data/ within the container
docker run -i -v $PWD/rgi_data:/data -t arpcard/rgi bash
Or you can directly run the container as an executable with $RGI_ARGS being any of the commands described above. Remember paths to input and outputs files are relative to the container (i.e. /data/ if mounted as above).
docker run -v $PWD/rgi_data:/data arpcard/rgi $RGI_ARGS
|
Open Reading Frame identifier (internal to RGI) |
|
Source Sequence |
|
Start co-ordinate of ORF |
|
End co-ordinate of ORF |
|
Strand of ORF |
|
RGI Detection Paradigm |
|
STRICT detection model bitscore value cut-off |
|
Bitscore value of match to top hit in CARD |
|
ARO term of top hit in CARD |
|
Percent identity of match to top hit in CARD |
|
ARO accession of top hit in CARD |
|
CARD detection model type |
SNPs_in_Best_Hit_ARO |
Mutations observed in the ARO term of top hit in CARD (if applicable) |
Other_SNPs |
Mutations observed in ARO terms of other hits indicated by model id (if applicable) |
|
ARO Categorization |
|
ARO Categorization |
|
ARO Categorization |
|
ORF predicted nucleotide sequence |
|
ORF predicted protein sequence |
|
Protein sequence of top hit in CARD |
Percentage Length of Reference Sequence |
Calculated as percentage (length of ORF protein / length of CARD reference protein) |
|
HSP identifier (internal to RGI) |
|
CARD detection model id |
Please log an issue on github issue.
You can email the CARD curators or developers directly at [email protected], via Twitter at @arpcard.