Package: MAGICR 1.0.0

MAGICR: Markov Affinity-Based Graph Imputation of Cells

Native R implementation of MAGIC (Markov Affinity-based Graph Imputation of Cells) for denoising and imputation of single-cell RNA sequencing data. MAGIC uses diffusion geometry to denoise single-cell data and fill in missing transcripts, as described in van Dijk et al. (2018) <doi:10.1016/j.cell.2018.05.061>. This package provides a pure R implementation with optional C++ acceleration, parallel computing support, and seamless integration with Seurat (v4 and v5) objects.

Authors:Zaoqu Liu [aut, cre], Krishnaswamy Lab [cph]

MAGICR_1.0.0.tar.gz
MAGICR_1.0.0.zip(r-4.7)MAGICR_1.0.0.zip(r-4.6)MAGICR_1.0.0.zip(r-4.5)
MAGICR_1.0.0.tgz(r-4.6-x86_64)MAGICR_1.0.0.tgz(r-4.6-arm64)MAGICR_1.0.0.tgz(r-4.5-x86_64)MAGICR_1.0.0.tgz(r-4.5-arm64)
MAGICR_1.0.0.tar.gz(r-4.7-arm64)MAGICR_1.0.0.tar.gz(r-4.7-x86_64)MAGICR_1.0.0.tar.gz(r-4.6-arm64)MAGICR_1.0.0.tar.gz(r-4.6-x86_64)
MAGICR_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
MAGICR/json (API)

# Install 'MAGICR' in R:
install.packages('MAGICR', repos = c('https://zaoqu-liu.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/zaoqu-liu/magicr/issues

Pkgdown/docs site:https://zaoqu-liu.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

openblascpp

3.45 score 1 stars 14 scripts 17 exports 13 dependencies

Last updated from:c6c90d3e0c (on main). Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK211
linux-devel-x86_64OK230
source / vignettesOK261
linux-release-arm64OK248
linux-release-x86_64OK227
macos-release-arm64OK117
macos-release-x86_64OK502
macos-oldrel-arm64OK160
macos-oldrel-x86_64OK293
windows-develOK188
windows-releaseOK186
windows-oldrelOK181
wasm-releaseOK200

Exports:animate_magiccompute_alpha_kernelGetMAGICDatahas_cpp_accelerationknnDREMIlibrary_size_normalizelog_transformmagicmagic_diffusion_operatormagic_imputemagic_knn_graphmagic_knnDREMImagic_optimal_tmagicr_configplot_magic_genesset_magicr_optionssqrt_normalize

Dependencies:codetoolsdigestfutureglobalsirlbalatticelistenvMatrixparallellyRANNRcppRcppArmadillorlang

Integration with Seurat
Overview | Prerequisites | Basic Workflow | Loading Data | Standard Preprocessing | Running MAGIC | Accessing MAGIC Results | Visualization Comparison | Gene Expression Before/After MAGIC | Gene-Gene Scatter Plots | Advanced Usage | Imputing Specific Genes | Using Automatic t Selection | Custom Parameters | Seurat v4 vs v5 Compatibility | Seurat v5 Layers | Integration with Downstream Analysis | Trajectory Analysis | Gene Regulatory Networks | Best Practices | When to Use MAGIC with Seurat | Memory Considerations | Troubleshooting | Common Issues | Session Info

Last update: 2026-01-25
Started: 2026-01-25

Introduction to MAGICR
Overview | Installation | Quick Start | Running MAGIC | Accessing Results | Visualizing Results | Before vs After Imputation | Gene-Gene Relationships | Parameter Tuning | Diffusion Time (t) | Key Parameters | Session Info

Last update: 2026-01-25
Started: 2026-01-25

MAGIC Algorithm: Mathematical Foundations
Introduction | The Dropout Problem in scRNA-seq | MAGIC: A Diffusion-Based Solution | Algorithm Steps | Step 1: Dimensionality Reduction (Optional) | Step 2: k-Nearest Neighbor Graph | Step 3: α-Decaying Kernel | Step 4: Markov Normalization | Step 5: Diffusion (Powering) | Automatic t Selection | Procrustes Disparity | Convergence Criterion | Solver Options | Exact Solver | Approximate Solver | Spectral Interpretation | Practical Recommendations | Parameter Selection Guidelines | When to Use MAGIC | References | Session Info

Last update: 2026-01-25
Started: 2026-01-25

Performance Benchmarking
Overview | Setup | Data Size Impact | Generating Test Data | Benchmarking Different Sizes | Visualization | Solver Comparison | Exact vs Approximate | Accuracy Comparison | Parameter Impact | Effect of t (Diffusion Time) | Effect of knn | Effect of npca | Memory Usage | Sparse vs Dense Input | Recommendations | Small Datasets (<1,000 cells) | Medium Datasets (1,000-10,000 cells) | Large Datasets (>10,000 cells) | Memory-Constrained Environments | Summary Table | Session Info

Last update: 2026-01-25
Started: 2026-01-25