Skip to main content

MAGIC

Project description

Latest PyPi version Latest CRAN version Travis CI Build Read the Docs Cell Publication DOI Twitter GitHub stars

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).

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 magic-impute

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magic-impute-1.5.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distributions

magic_impute-1.5.0-py3.6.egg (41.1 kB view details)

Uploaded Source

magic_impute-1.5.0-py3.5.egg (41.5 kB view details)

Uploaded Source

magic_impute-1.5.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file magic-impute-1.5.0.tar.gz.

File metadata

  • Download URL: magic-impute-1.5.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.5

File hashes

Hashes for magic-impute-1.5.0.tar.gz
Algorithm Hash digest
SHA256 9149588f6d10876290393e49d11faffc3f7aa15e1d38fa266699279b38b412e1
MD5 e221b61ed412c4b6b5f1b6e83612ed34
BLAKE2b-256 b4beccecd0605c3644e9287473308c6575525335277237c0e6f8ba73e74f88d3

See more details on using hashes here.

File details

Details for the file magic_impute-1.5.0-py3.6.egg.

File metadata

  • Download URL: magic_impute-1.5.0-py3.6.egg
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.5

File hashes

Hashes for magic_impute-1.5.0-py3.6.egg
Algorithm Hash digest
SHA256 2ac001248090e5103a1239d186ef333e63a33804054d2f1a2fb5d40f3b8d9253
MD5 cc2c4e0df79b53eccfe81fca73f76c71
BLAKE2b-256 7b7f2ec214d9166ebcd393b7efd08bbd15f386ffcf06feaec58795781cb24b11

See more details on using hashes here.

File details

Details for the file magic_impute-1.5.0-py3.5.egg.

File metadata

  • Download URL: magic_impute-1.5.0-py3.5.egg
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.5

File hashes

Hashes for magic_impute-1.5.0-py3.5.egg
Algorithm Hash digest
SHA256 8717489aa6770560c948ab8f1b71afb41d64c47afec2901657d4720a0afe8bda
MD5 830b187a3554b3d9bce2bc000800617b
BLAKE2b-256 ad257de31762b41071053ac56b5916e2f29f04c3804cb06bab86e36d96b55b2a

See more details on using hashes here.

File details

Details for the file magic_impute-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: magic_impute-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 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.0.1 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.5

File hashes

Hashes for magic_impute-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76971601c212dcb6ba370af5d4bb5c956a64d80c0f30241aea7af20b3b28186b
MD5 d40086babb6703faace99e07408afbd1
BLAKE2b-256 7f36787e0faf550c22c78527838c65094821646ce59825cb4ff01d48dba0ece7

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