I-Impute: a self-consistent method to impute single cell RNA sequencing data
I-Impute is a “self-consistent” method method to impute scRNA-seq data. I-Impute leverages continuous similarities and dropout probabilities and refines the data iteratively to make the final output "self-consistent". I-Impute exhibits robust imputation ability and follows the “self-consistency” 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 I-Impute 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 :
intorboolean, optional, default: 1If
Trueor> 0, print status messages
Cite us
Feng, X., Chen, L., Wang, Z., & Li, S. C. (2019). I-Impute: a self-consistent method to impute single cell RNA sequencing data. bioRxiv, 772723. doi: https://doi.org/10.1101/772723.
Help
If you have any questions or require assistance using I-Impute, please contact us with xikanfeng2@gmail.com.
Metadata
Release files for i-impute 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| i-impute-1.0.6.tar.gz | 7.2 kB | Without provenance | Details for i-impute-1.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| i_impute-1.0.6-py3-none-any.whl | Python 3 | none | any | Details for i_impute-1.0.6-py3-none-any.whl |
Total release size: 15.6 kB
Release files / i-impute-1.0.6.tar.gz
| Download URL | i-impute-1.0.6.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b51506dc697f23ac859cf4063559143f27293d8f67f8d7131c589eb2bd6eca9b
|
|
BLAKE2b-256 checksum How to use checksums |
4eb1e1ec5e409cd900670445a0ea9e5953d6708991f67220cc363bad29dc6fcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / i_impute-1.0.6-py3-none-any.whl
| Download URL | i_impute-1.0.6-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52596d56a4014b15b39ac2370ec8c6e7317a4e70afb26645248fe6b76431d3e8
|
|
BLAKE2b-256 checksum How to use checksums |
d18605327fc107f2aa63e4a6873164e0e5391e6f4a4889a9903a0f7d24c16528
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for i-impute 1.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.