A Python interface for CD-HIT package.
Project description
py-cdhit
A Python package for CD-HIT, clustering protein or nucleotide sequences.
This package provides a Python interface for CD-HIT (Cluster Database at High Identity with Tolerance), which has programs for clustering biological sequences with a very fast speed. Specifically, this package contains functions that run commands and read the output files, thus reducing the overhead of switching between languages and writing parsing code when using Python in the data analysis workflows.
Read the documentation here.
Usage
A simple example on Linux is provided below. See the notebook for more details.
from pycdhit import cd_hit, read_clstr
res = cd_hit(
i="./docs/examples/apd.fasta",
o="./docs/examples/out",
c=0.7,
d=0,
sc=1,
)
df_clstr = read_clstr("./docs/examples/out.clstr")
Please visit CD-HIT's documentations for its installation and the options of commands.
Installation
First Install CD-HIT. Mamba is recommended. For example, to create an environment and install:
mamba create -n myenv python=3.10
mamba activate myenv
mamba install -c bioconda cd-hit cd-hit-auxtools
Then install this package from PyPI:
pip install py-cdhit
Development
Install from source after git clone:
cd py-cdhit
pip install -e '.[dev]'
pip install -r docs/requirements.txt
python -m pytest --cov-report term-missing --cov=pycdhit tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py_cdhit-1.1.4.tar.gz
.
File metadata
- Download URL: py_cdhit-1.1.4.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ed0babde59b8fa484f3d1c24987932b5984dbcb76abd6b7e6710b44a2039dac |
|
MD5 | 00683b92b1dde301b9d0426607e08a50 |
|
BLAKE2b-256 | 087ede330d08f404797e2b7a54eb9a8ea271d433481b7a09445cecc614e53ab7 |
File details
Details for the file py_cdhit-1.1.4-py3-none-any.whl
.
File metadata
- Download URL: py_cdhit-1.1.4-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9784c9d5e7bc54a1e83493e3f52f2f7459711660317c1d007699249c6e9c4d7c |
|
MD5 | d5feae8ee9bc8505125115b8d0d59cdb |
|
BLAKE2b-256 | a43d1d9d953c0a9208cb564e24577d6280d9fc8e437a58dfb916555a7598d4e8 |