Skip to main content

Python tool to calculate the KendallTau correlation coefficients.

Project description

Description

The icikt package provides a Python tool to calculate an information-content-informed Kendall Tau correlation coefficient between arrays, while also handling missing values or values which need to be removed.

Full API documentation, user guide, and tutorial can be found on readthedocs

Installation

The icikt package runs under Python 3.4+. Use pip to install. Starting with Python 3.4, pip is included by default.

Install on Linux, Mac OS X

python3 -m pip install icikt

Install on Windows

py -3 -m pip install icikt

Upgrade on Linux, Mac OS X

python3 -m pip install icikt --upgrade

Upgrade on Windows

py -3 -m pip install icikt --upgrade

GitHub Package installation

Make sure you have git installed:

git clone https://github.com/MoseleyBioinformaticsLab/pythonICIKendallTau.git

Dependencies

icikt requires the following Python libraries:
  • numpy and scipy for mathmatical calculations.

  • docopt for a command line interface.

  • Cython for optimized performance.

To install dependencies manually:

pip3 install numpy
pip3 install scipy
pip3 install docopt
pip3 install cython

Basic usage

To use the icikt package, input a 2d array with n columns each representing an array of data for a variable. The iciktArray will return two n x n 2d arrays for correlations and p-values. Each element will correspond to the result of a combination of two columns in the input array. iciktArray can also be called from the command-line interface given the file path for the data along with several optional parameters(more in docs/tutorial).

Running through command line :

icikt iciktArray /path/to/file.tsv --data-format=tsv --replace=None

Running through python script :

import numpy as np
import icikt

dataArray = np.genfromtxt('/path/to/file.tsv', delimiter="\t")
# or with random values
dataArray = numpy.random.randn(100, 2)

# running just 2 arrays with icikt
corr, pVal, tMax = icikt.icikt(dataArray[:,0], dataArray[:,1])

# running all combinations with iciktArray
scaled, corrRaw, pVals, tauMax = icikt.iciktArray(dataArray)

License

A modified Clear BSD License

Copyright (c) 2021, Praneeth S. Bhatt, Robert M. Flight, Hunter N.B. Moseley All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

  • If the source code is used in a published work, then proper citation of the source code must be included with the published work.

NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY’S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

icikt-1.1.3.tar.gz (130.6 kB view details)

Uploaded Source

File details

Details for the file icikt-1.1.3.tar.gz.

File metadata

  • Download URL: icikt-1.1.3.tar.gz
  • Upload date:
  • Size: 130.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.7

File hashes

Hashes for icikt-1.1.3.tar.gz
Algorithm Hash digest
SHA256 1cf3b1dbac59a189544a5e4d389c34dfb9cfaa6ced1feaf8ba3dff7d6ab677e0
MD5 a63799ebc842c5330add0be5f06958d0
BLAKE2b-256 e9f76cdc17fd647abae6ea83b27ff2250da6857593b99f2bcaad35a91db2cfda

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