Skip to main content

A python package to interact with NCBI taxonomy

Project description

pyphy

Python library that interacts with NCBI taxonomy

This is the Python implementation of the blog post http://dgg32.blogspot.com/2013/07/pyphy-wrapper-program-for-ncbi-sqlite.html.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

sqlite

Preparing the backend database

Notice: please perform this step periodically to stay up to date with the NCBI Taxonomy.

Download the taxdmp.zip from ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/ and unzip it.

python prepyphy.py [ncbi_download_folder] [db_path]

This step will set up the "db_path" in pyphy.config automatically.

If you move the database afterwards, please don't forget to refresh db_path in pyphy.config.

Using the library

Install the library via pip

pip install pyphy

Then you can import the pyphy library in your Python code by

import pyphy

pyphy provides the following queries inside the NCBI taxonomy:

Taxonomy name <-> NCBI TaxID

NCBI TaxID -> Full lineage

NCBI TaxID -> Taxonomic rank

NCBI TaxID -> all children

For code examples and documentation please refer to documentations.

Authors

  • Sixing Huang - Concept and Coding

License

This project is licensed under the MIT License - see the LICENSE file for details

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

pyphy-1.0.4.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file pyphy-1.0.4.tar.gz.

File metadata

  • Download URL: pyphy-1.0.4.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for pyphy-1.0.4.tar.gz
Algorithm Hash digest
SHA256 6233cf73ab8a4244aeb4a393b3a465a3a7ebe34199fe43b7fb17fc78c442aa9d
MD5 146598013a08b4376399cf6e8d3ae006
BLAKE2b-256 5fe9476e027972f1cfc08722be93633cfbb93870b96503b9e3c437445b48bdd8

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