Skip to main content

Python tools to work with Pharmvar data.

Project description

Introduction

Set of tools to work with pharmvar data.

Installation (Linux)

python3 -m venv
source venv/bin/activate
pip install -r requirements.txt

Installation (Windows)

  1. Install Windows subsystem for Linux (WSL).
wsl --install
  1. Navigate to the repository and install the Linux/Python dependencies.
cd /mnt/c/[path]/pharmvar-tools

sudo apt update
sudo apt upgrade
sudo apt install python3.10-venv python-is-python3 python3-pip

sudo python -m venv venv
source ./venv/bin/activate
python -m pip install -r requirements.txt

Data requirements

For each gene of interest the sequence fasta of the NC and the NG should be downloaded (from the NCBI) into the data/ directory, e.g., data/NC_000022.11.fasta and data/NG_008376.4.fasta for CYP2D6.

In addition, for the check functionality, also the complete download zipfile from pharmvar is required. It needs to be unzipped in the data directory, e.g., the fasta file for CYP2D6 should be located in data/pharmvar-5.2.19/CYP2D6/CYP2D6.haplotypes.fasta.

Usage

Pharmvar data consistency check

python check.py --gene CYP2D6 --all

Calculating relations between alleles and variants based on variant algebra

python compare.py --gene CYP2D6 > data/pharmvar_5.2.19_CYP2D6_relations.txt

Visualizing relations

Requires graphviz (sudo apt install graphviz).

python to_dot.py --gene CYP2D6 < data/pharmvar_5.2.19_CYP2D6_relations.txt | fdp -Tpdf > /tmp/CYP2D6.pdf

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

pharmvar_tools-0.5.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

pharmvar_tools-0.5.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file pharmvar_tools-0.5.0.tar.gz.

File metadata

  • Download URL: pharmvar_tools-0.5.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pharmvar_tools-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e9d01f895a603596b6fc1088fe82ec4adfd10b53d2f0f5020881dc89aef9d512
MD5 4cf7d7d463a732719a5d06aa283b1ff9
BLAKE2b-256 7c85916f8f40ecb8b33996c37fd24de46bb52824dca1d57f30b75eec497dc589

See more details on using hashes here.

File details

Details for the file pharmvar_tools-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pharmvar_tools-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d73e52d1e93eb4f1963012b81fdffe95d705d9b6c3cc3f0ea6adfe707bf9c8c
MD5 d5fec163ade238034726e3543bc8c4c5
BLAKE2b-256 f0000c572a112b25e504754476ff9694538bbde4e945665ee9e6ca6d22bed162

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