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
License: GPL v3
install with bioconda
Container ready
codecov

Contents

Installation

There are a number of ways to install chado-tools and details are provided below. If you encounter an issue when installing chado-tools please contact your local system administrator. If you encounter a bug please log it here or email us at path-help@sanger.ac.uk.

Required dependencies

  • Python 3.6 or higher
  • PostgreSQL 9.6 or higher

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 the settings for an existing PostgreSQL database server to which you can connect.

Then run the tests:

python3 setup.py test

If the tests all pass, install:

python3 setup.py install

Using pip

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

pip install 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.

Using Bioconda

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

conda install -c bioconda chado-tools

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
query query a CHADO database and export the result into a text file
execute execute a function defined in a CHADO database
extract run a pre-compiled query against 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 data from file into the CHADO database
export export data from the CHADO database to file
admin perform admin tasks, such as creating or dumping a CHADO database

Examples

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

chado admin create eukaryotes
chado admin setup -s gmod eukaryotes

Dump this database into an archive called eukaryotes.dump:

chado admin dump eukaryotes eukaryotes.dump

List all organisms in the eukaryotes database:

chado extract 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.

License

chado-tools is free software, licensed under GPLv3.

Feedback/Issues

Please report any issues to the issues page or email path-help@sanger.ac.uk.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

chado_tools-0.2.2-py3.6.egg (302.1 kB view details)

Uploaded Source

chado_tools-0.2.2-py3-none-any.whl (128.7 kB view details)

Uploaded Python 3

File details

Details for the file chado_tools-0.2.2-py3.6.egg.

File metadata

  • Download URL: chado_tools-0.2.2-py3.6.egg
  • Upload date:
  • Size: 302.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.2.2-py3.6.egg
Algorithm Hash digest
SHA256 cc43c0cf355911bea942a1ae262097edcd7837a850be9f88c99ecf3242eb6521
MD5 b1b3862c974ae5aad2fd0a7e07a632cf
BLAKE2b-256 56f82c5a3b65df4d96e36bb8cb099bfe7a4390db1c946144204ce4a5b6b8830b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chado_tools-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 128.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.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bcd04cdd4fae21c2c09c788d1399f0f206a55e05595a8cbd58aaedb472c6dab
MD5 02d8364419260e0fa6488dcb04311588
BLAKE2b-256 34dd62c653a41672da8b16672c0991b841ad434e3f960321ba625b9224b0056a

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