Skip to main content

Tools to access CHADO databases

Project description

chado-tools

Python3 command line script providing various tools for accessing CHADO databases

Build Status

Prerequisites

  • Python 3.6 or higher
  • PostgreSQL 9.6 or higher
  • SQLite (for testing only)

Installation from source

Download the latest release from this github repository, or clone the repository to obtain the most recent updates.

Modify the file with default connection settings such that it contains an existing PostgreSQL database to which you can connect. Note: This database is only used for housekeeping purposes, it will never be changed or removed by chado-tools. You can thus simply use one of the built-in PostgreSQL databases, such as postgres.

Then run the tests:

python3 setup.py test

If the tests all pass, install:

python3 setup.py install

Alternative installations

You can install the program from the Python Package Index (PyPI) using the command

pip install chado-tools

The program is also available as Bioconda package. Install it with the command

conda install -c bioconda chado-tools

Now change the default connection parameters by running chado init. You can always reset them to the original state by running chado reset.

Usage

The installation will put a single script called chado in your PATH. The usage is:

chado <command> [options]
  • To list the available commands and brief descriptions, just run chado -h or chado --help.
  • To display the version of the program, type chado -v or chado --version.
  • Use chado <command> -h or chado <command> --help to get a detailed description and the usage of that command.

Available commands


Command Description
init set the default connection parameters
reset reset the default connection parameters to factory settings
connect connect to a CHADO database for an interactive session
create create a new instance of the CHADO schema
dump dump a CHADO database into an archive file
restore restore a CHADO database from an archive file
query query a CHADO database and export the result into a text file
stats obtain statistics to updates in a CHADO database
list list all entities of a specified type in the CHADO database
insert insert a new entity of a specified type into the CHADO database
delete delete an entity of a specified type from the CHADO database
import import entities of a specified type into the CHADO database

Examples

Create a new CHADO database called eukaryotes according to the current GMOD schema:

chado create eukaryotes

Dump this database into an archive called eukaryotes.dump:

chado dump eukaryotes eukaryotes.dump

List all organisms in the eukaryotes database:

chado list organisms eukaryotes

Query the database to check the meaning of a certain cvterm_id:

chado query -q "SELECT name FROM cvterm WHERE cvterm_id = 25" eukaryotes

Note

Unless explicitly specified by the flag -c, all commands employ the default connection settings. You can change these by running chado init.

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

chado-tools-0.1.0.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

chado_tools-0.1.0-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

Details for the file chado-tools-0.1.0.tar.gz.

File metadata

  • Download URL: chado-tools-0.1.0.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for chado-tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b01292cb036241adfa3e0bc6bcf1e21edbea2e3822858b65640471e47a3481b
MD5 5ec3f7722da423786493cb73cf467ea8
BLAKE2b-256 a686b6b8538e789aa4343944004ccf8fb3cfa6aa8ab241972445bb2dea05fde7

See more details on using hashes here.

File details

Details for the file chado_tools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: chado_tools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 60.7 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.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for chado_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62960a3ead3e6af449150545b4645e02d303e63206d3141b487888c3fd2042a9
MD5 b077ecb2f8c02623dfc3c925d8ee0217
BLAKE2b-256 0a22bb1bc210c779340f71aefa20ca7403681fbb277f3cdb4dd052ed707969e8

See more details on using hashes here.

Supported by

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