infercnvpy: Scanpy plugin to infer copy number variation (CNV) from single-cell transcriptomics data
Infercnv is a scalable python library to infer copy number variation (CNV) events from single cell transcriptomics data. It is heavily inspired by InferCNV, but plays nicely with scanpy and is much more scalable.
The results look similar, but not identical, to those of R inferCNV. We are happy about feedback and contributions.
Please refer to the documentation. In particular, the
You need Python 3.13 or newer. There are several options to install infercnvpy:
- Install the latest release of
infercnvpyfrom PyPI:
pip install infercnvpy- Install the latest development version:
pip install git+https://github.com/scverse/infercnvpy.git@mainTo (optionally) run the copyKAT algorithm, you need a working R installation
and the copykat package installed. Usually, if R is in your PATH, rpy2 automatically
detects your R installation. If you get an error message while importing infercnvpy,
try setting the R_HOME environment variable before importing infercnvpy:
import os
os.environ["R_HOME"] = "/usr/lib/R"
import infercnvpySee the release notes on GitHub.
For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.
See the citation page of the documentation.
