Skip to main content

I-Impute: a coherent strategy to impute singlecell RNA sequencing data

Project description

I-Impute: a coherent strategy to impute singlecell RNA sequencing data

I-Impute is a coherent method to impute scRNA-seq data. I-Impute leverages continuous similarities and dropout probabilities and refines the data iteratively to make the final outputself-consistent. I-Impute exhibits robust imputation ability and follows the coherent principle. It offers perspicacity to uncover the underlying cell subtypes in real scRNA-Seq data.

Pre-requirements

  • python3
  • numpy>=1.16.1
  • pandas>=0.23.4,<0.24
  • scipy>=1.3.0
  • scikit-learn>=0.21.1
  • tasklogger>=0.4.0

install requirements

pip install -r requirements.txt

Installation

Installation with pip

To install with pip, run the following from a terminal:

pip install i-impute

Installation from Github

To clone the repository and install manually, run the following from a terminal:

git clone https://github.com/xikanfeng2/I-Impute.git
cd I-Impute
python setup.py install

Usage

Quick start

The following code runs MAGIC on simulation data located in the I-Impute repository.

import iimpute
import pandas as pd

# read your reads count or RPKM or TPM data
data = pd.read_csv('simluation-data/sim-counts.csv', index_col=0)

# create I-Impute object
iimpute_operator = iimpute.IImpute(normalize=False)

# impute
imputed_data = iimpute_operator.impute(data)

# store result to a file
imputed_data.to_csv('your file name')

# iterative mode
iimpute_operator = iimpute.IImpute(normalize=False, iteration=True)

# impute
imputed_data = iimpute_operator.impute(data)

# store result to a file
imputed_data.to_csv('your file name')

Parameters

IImpute(n=20, c_drop=0.5, p_pca=0.4, alpha=0.01, normalize=True, iteration=False, verbose=1)

Parameters

  • n : int, optional, default: 20

    The nth of nearest neighbors on which to build kernel when calculating affinity matrix.

  • c_drop : float, optional, default: 0.5

    Dropout event cutoff. For entry whose dropout probability is less than c_drop, we consider it as a real observation, its original value will remain. Otherwise, we conduct the imputation with the aid of information from similar cells.

  • p_pca : float, optional, default: 0.4

    Percentage of variance explained by the selected components of PCA. It determines the nmumber of PCs used to calculate the distance between cells.

  • alpha : float, optional, default: 0.01

    L1 penalty for Lasso regression.

  • normalize : boolean, optional, default: True

    By default, I-Impute takes in an unnormalized matrix and performs library size normalization during the denoising step. However, if your data is already normalized or normalization is not desired, you can set normalize=False.

  • iteration : boolean, optional, default: False

    The imputation process only performs once when False (it is equivalent to C-Impute described in our paper). The imputation process will iterate n times to achieve self-constistent imputation matrix.

  • verbose : int or boolean, optional, default: 1

    If True or > 0, print status messages

Cite us

TBD

Help

If you have any questions or require assistance using I-Impute, please contact us with xikanfeng2@gmail.com.

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

i-impute-1.0.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

i_impute-1.0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file i-impute-1.0.1.tar.gz.

File metadata

  • Download URL: i-impute-1.0.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for i-impute-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6f0be58675dfd8ea0e732a350b1e5a154d3e782e7d46d5b7fb778b81ec4e8b69
MD5 7e2ce48b45d370d775b2be22e88a7f43
BLAKE2b-256 6059dc7f8dfb0cb5ac4431236c90c19ed5c0768c19b6b436302b51b44ce220b6

See more details on using hashes here.

File details

Details for the file i_impute-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: i_impute-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for i_impute-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74cb703e95e0dc6998cb403385d2c1274247cfa9cc0b746abbb739d945df83a2
MD5 9204f6c568c7fd14308eb04fe097db54
BLAKE2b-256 220e1a57f4fdac0cce4e9e4b224b484cdcd735f9afc51a1678ee11b1827dc27a

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