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) https://card.mcmaster.ca/home

code: https://gitlab.com/cgps/card_trick

## Installation
This package requires Python3
```
pip3 install card-trick
```

## Usage
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
```

## Using in a python script or program
Examples
```
import card_trick
genes_conferring_resistance = card_trick.ontology_functions.search_antibiotics('tigecycline')
antibiotics = card_trick.ontology_functions.search_genes('ctx-m-15')
```


Project details


Download files

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

Source Distribution

card-trick-0.1.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

card_trick-0.1.2-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file card-trick-0.1.2.tar.gz.

File metadata

  • Download URL: card-trick-0.1.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for card-trick-0.1.2.tar.gz
Algorithm Hash digest
SHA256 50929e592fe4f38fe10f3feca85692ed68e1000b11f1c7e10a58c4fe4d2c15cb
MD5 f8bb593086e932b938de120ca4e857e6
BLAKE2b-256 f6314e9dc34f2cba46fea2accb03df0e2f3fd936894101f5051e7dfd865747f8

See more details on using hashes here.

File details

Details for the file card_trick-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: card_trick-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for card_trick-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4e7e9d4f0894fa103434fdbcfac555c75b1418a0f4006490df9cf0ae878f79ee
MD5 d18ad778efb5644f5e7b8e2b14c47be4
BLAKE2b-256 fdaf96b71900b45dbb9306f41f747632b77e311b3efcf67a24db39cf8802c83a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page