Skip to main content

kProcessor Python interface

Project description

Logo

@DIB-LAB/kProcessor

Ubuntu Open Issues Read the Docs GitHub PyPI - Wheel GitHub release (latest by date) Maintained PyPI - Python Version Bintray

📖 Table of Contents

-----------------------------------------------------

➤ Table of Contents

-----------------------------------------------------

➤ Introduction

kProcessor is a C++ API with a handy Python interface that enables easy handling of sequence kmer content. kProcessor stores kmers with their associated metadata in a virtual data structure called kDataframe. By default, kDataFrame stores the kmers with their counts in the input dataset. However, kDataFrame supports adding multiple other columns to store more information about these kmers in different data types. Users can easily merge multiple kDataFrames or apply different set functions (e.g. union, intersect and difference) on a group of kDataFrames. Colored kDataFrame is another core virtual data structure in kProcessor that allows the indexing of the kmers in a multi-sequence reference input. It is composed of a kDataFrame that replaces the kmer count with a key (aka color). This key connects the kmer to all sequences associated with this kmer.

-----------------------------------------------------

➤ Quick Installation (pip)

python -m pip install kProcessor

-----------------------------------------------------

➤ Build from source

Clone

git clone https://github.com/dib-lab/kProcessor.git
cd kProcessor/
git submodule update --init --recursive

Install dependencies

sudo apt-get install g++ swig cmake python3-dev zlib1g-dev libghc-bzlib-dev python3-distutils libboost-all-dev

Build

CMake options

Description Option Default
Build tests BUILD_TESTS OFF
Build documentation BUILD_DOCS OFF
Build everything! BUILD_ALL OFF

Build The kProcessor Library

# Run CMake configure
cmake -Bbuild

# Run make with parallel execution.
cmake --build build -j4 # -j4 = execute 4 recipes simultaneously.

Build Everything

cmake -Bbuild -DBUILD_ALL=1

cmake --build build -j4 # -j4 = execute 4 recipes simultaneously.
Build Docs Only

Output directory: build/doxygen/html

cmake -Bbuild -DBUILD_DOCS=1
cmake --build build --target GenerateDocs

Build Tests Only
cmake -Bbuild -DBUILD_TESTS=1
cmake --build build -j4

# Run tests
cd build/tests/kProcessorLibTests
./testKprocessorLib

-----------------------------------------------------

➤ Manually build the Python bindings

Python bindings are generated using SWIG. It's recommended to install swig=4.0.2 using Conda.

You can build the python bindings by executing build_wrapper.sh, or you can follow the next steps.

Generate bindings

  1. First, you need to follow the instructions in the Build from source.
  2. While pwd=kProcessor run: python setup.py bdist_wheel.
  3. Install the generated wheel package using: cd dist && python -m pip install kProcessor*.whl.

-----------------------------------------------------

➤ Contributors

Mostafa Shokrof You? Tamer Mansour
Mostafa Shokrof Mohamed Abuelanin Tamer Manosur

-----------------------------------------------------

➤ License

Licensed under BSD-3-Clause.

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

kProcessor-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

kProcessor-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

kProcessor-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

kProcessor-1.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

File details

Details for the file kProcessor-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kProcessor-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c4a7d2652035d02784e59143bb1da5d94dbaa79c241227318d98de3926ea3bf
MD5 1320a13a8e0fdd7fd41a98547c7eb664
BLAKE2b-256 fc788679482f9b7cfe87e23a004ea2d7f8cd3ed095cedcc1f9d1f158292e516b

See more details on using hashes here.

File details

Details for the file kProcessor-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kProcessor-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c9743a1c42d52cd2b139a8ff49d083b30412604f51b52e002a3d94eb74cb95a
MD5 03a845270740164ebb5640b3fe13bd72
BLAKE2b-256 e50cfa98dac45e6131c8e94fa32eda25c13003e2e5139f625ae90da10d898449

See more details on using hashes here.

File details

Details for the file kProcessor-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kProcessor-1.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 308be82324110fccfa951aa6ab370e62be7c7c7814d0b6d9ba2070eea6b0ff37
MD5 fa850e3f0ec1d7f7a4b213ad1e44208a
BLAKE2b-256 2501bd99e526d70e5af2e96be469a815d66bca2f85bf9a8226677761c2113d15

See more details on using hashes here.

File details

Details for the file kProcessor-1.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kProcessor-1.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f824e77948e91d6169ee4cf697fe54150b058edb5c6fc65674f52874c41f057f
MD5 37d485ab6a2c3af636c347d98397b422
BLAKE2b-256 d7f38852c59915309b62bcd4efbc0e40f6dd84977bb96e58e787816a5701eb9f

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