Skip to main content

Utility package to find gene - drug relationships within CARD

Project description

Card trick

A software package that extracts confers_resistance_to_drug relationships from The Comprehensive Antibiotic Resistance Database (CARD)



This package requires Python3

pip3 install card-trick


usage: card-trick [-h] [-v] {update,search} ...

positional arguments: {update,search} The following commands are available. Type contig_tools <COMMAND> -h for more help on a specific commands update Get latest CARD ontology search search CARD ontology

optional arguments: -h, --help show this help message and exit -v, --version display the version number

Update ontology database

The software comes preloaded with version 3.0.0 of the database (October 2018 release). The update command card-trick update will download the latest version of the database and store it in your home directory in the .card-trick directory

Search ontology database

This will return matches to the STDOUT in either tsv (default) or json format. To write to a file just append > OUTPUT_FILE to the command

Specify a full or partial gene name with the -g argument to search for antibiotics resistance to which is conferred by the specified gene e.g

card-trick search -g ctx

This will return the following output

gene	antibiotics
CTX-M-3	cefalotin,ceftazidime,ceftriaxone
CTX-M-15	ceftazidime
CTX-M-27	cefalotin,ceftazidime
CTX-M-55	ceftazidime,ceftriaxone

Specify a full or partial antibiotic name with the -a argument to search for genes who confer resistance to the specified antibiotic

card-trick search -a tigecycline

This will return the following output

antibiotic	genes
tigecycline	AcrAB-TolC,AdeABC,mepA,oqxAB,tet(A),tetX

Specify a full aro term to search for antibiotics assosiated directly with that term

card-trick search --aro_name ARO:3003032

This wil return the following output

aro antibiotics
ARO:3003032 acriflavine,amikacin,chloramphenicol,ciprofloxacin,erythromycin,gentamicin C,meropenem,norfloxacin,ofloxacin,tetracycline,tobramycin

Using in a python script or program


import card_trick
genes_conferring_resistance = card_trick.ontology_functions.search_antibiotics('tigecycline')
antibiotics = card_trick.ontology_functions.search_genes('ctx-m-15')
antibiotics = card_trick.ontology_functions.search_aros('ARO:3003032')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for card-trick, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size card_trick-0.1.3-py3-none-any.whl (48.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size card-trick-0.1.3.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page