MAGIC
Project description
Markov Affinity-based Graph Imputation of Cells (MAGIC) is an algorithm for denoising and imputation of single cells applied to single-cell RNA sequencing data, as described in Van Dijk D et al. (2018), Recovering Gene Interactions from Single-Cell Data Using Data Diffusion, Cell https://www.cell.com/cell/abstract/S0092-8674(18)30724-4.
For R and MATLAB implementations of MAGIC, see https://github.com/KrishnaswamyLab/MAGIC.
Magic reveals the interaction between Vimentin (VIM), Cadherin-1 (CDH1), and Zinc finger E-box-binding homeobox 1 (ZEB1, encoded by colors).
Installation
Installation with pip
To install with pip, run the following from a terminal:
pip install --user git+git://github.com/KrishnaswamyLab/MAGIC.git#subdirectory=python
Installation from GitHub
To clone the repository and install manually, run the following from a terminal:
git clone git://github.com/KrishnaswamyLab/MAGIC.git cd MAGIC/python python setup.py install --user
Usage
Example data
The following code runs MAGIC on test data located in the MAGIC repository:
import magic import pandas as pd import matplotlib.pyplot as plt X = pd.read_csv("MAGIC/data/test_data.csv") magic_operator = magic.MAGIC() X_magic = magic_operator.fit_transform(X, genes=['VIM', 'CDH1', 'ZEB1']) plt.scatter(X_magic['VIM'], X_magic['CDH1'], c=X_magic['ZEB1'], s=1, cmap='inferno') plt.show() magic.plot.animate_magic(X, gene_x='VIM', gene_y='CDH1', gene_color='ZEB1', operator=magic_operator)
Interactive command line
We have included two tutorial notebooks on MAGIC usage and results visualization for single cell RNA-seq data.
EMT data notebook: http://nbviewer.jupyter.org/github/KrishnaswamyLab/magic/blob/master/python/tutorial_notebooks/emt_tutorial.ipynb
Bone Marrow data notebook: http://nbviewer.jupyter.org/github/KrishnaswamyLab/magic/blob/master/python/tutorial_notebooks/bonemarrow_tutorial.ipynb
Help
If you have any questions or require assistance using MAGIC, please contact us at https://krishnaswamylab.org/get-help.
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 magic-impute-1.4.0.tar.gz
.
File metadata
- Download URL: magic-impute-1.4.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 958aadfb67f70e3dc571a62134142711ea267c6327632872d531d52010688401 |
|
MD5 | 6008fc093e84a1600de3005a5d6f5d8a |
|
BLAKE2b-256 | f43f41d29e280c0971289823c31183dd60a96fcea380527c89ed49a96449e48c |
File details
Details for the file magic_impute-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: magic_impute-1.4.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3d4a8011ed7f38ffb12aa904fd898fa857a6b0be71850e09d9ce3692725679b |
|
MD5 | ea8c7007bdf5acaaef10ffed57ffa345 |
|
BLAKE2b-256 | 3d3e8f76838e07d4c5a5a7aaa9429dcabd941818d35c884e96eb9034b3f43251 |