Skip to main content

Copy number variation toolkit: Infer copy number from targeted DNA sequencing.

Project description

A command-line toolkit and Python library for detecting copy number variants and alterations genome-wide from targeted DNA sequencing.

Read the full documentation at: http://cnvkit.readthedocs.org

Questions, comments, help and discussion on SeqAnswers: http://seqanswers.com/forums/showthread.php?t=47910

https://travis-ci.org/etal/cnvkit.svg?branch=master Code Health

Try it

You can easily run CNVkit on your own data without installing it by using our DNAnexus app: https://platform.dnanexus.com/app/cnvkit_batch

A Galaxy tool is also available for testing (but requires CNVkit installation, see below): https://testtoolshed.g2.bx.psu.edu/view/etal/cnvkit

Installation

From a Python package repository

Reasonably up-to-date CNVkit packages are available on PyPI and can be installed using conda (preferred on Mac OS X, and a solid choice on Linux too):

conda install cnvkit

Or pip (usually works on Linux if the dependencies are installed, see below):

pip install cnvkit

In either case, to run the recommended segmentation algorithms CBS and Fused Lasso, you will need to also install the R dependencies DNAcopy and PSCBS (see below).

From source

The script cnvkit.py requires no installation and can be used in-place. Just install the dependencies.

To install the main program, supporting scripts and cnvlib Python library, use setup.py as usual:

python setup.py build
python setup.py install

Python dependencies

Install these via pip or conda:

On Ubuntu or Debian Linux:

sudo apt-get install python-numpy python-matplotlib python-reportlab python-pip
sudo pip install biopython pysam pyvcf --upgrade

On Mac OS X you may instead find it much easier to first install the Python package manager Miniconda, or the full Anaconda distribution, which includes most of the dependencies. Then install the rest of CNVkit’s dependencies:

conda install numpy matplotlib reportlab biopython pysam pyvcf

Otherwise, we recommend using Homebrew to install an up-to-date Python (e.g. brew install python) and as many of the Python packages as possible (primarily NumPy, SciPy and matplotlib). Then, proceed with pip:

sudo pip install numpy matplotlib reportlab biopython pysam pyvcf

R dependencies

Copy number segmentation currently depends on R packages.

In CRAN:

  • PSCBS

  • matrixStats (for pruneByHClust in PSCBS)

PSCBS depends on the package DNAcopy which part of Bioconductor, and cannot be installed through CRAN directly. To use it, you must first install Bioconductor, then DNAcopy, then the PSCBS package as shown below.

Within R:

> source("http://bioconductor.org/biocLite.R")
> biocLite("DNAcopy")
> install.packages(c("PSCBS", "matrixStats", "cghFLasso"))

Testing

You can test your installation by running the CNVkit pipeline on the example files in the test/ directory. The pipeline is implemented as a Makefile and can be run with the make command (standard on Unix/Linux/Mac OS X systems):

cd test/
make

If this pipeline completes successfully (it should take less than a minute), you’ve installed CNVkit correctly.

To run the pipeline on additional, larger example file sets (named TR and EX), do this:

make all

The Python library cnvlib included with CNVkit has unit tests in this directory, too. To run the test suite:

python test_cnvlib.py

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

CNVkit-0.3.5.tar.gz (74.4 kB view details)

Uploaded Source

File details

Details for the file CNVkit-0.3.5.tar.gz.

File metadata

  • Download URL: CNVkit-0.3.5.tar.gz
  • Upload date:
  • Size: 74.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for CNVkit-0.3.5.tar.gz
Algorithm Hash digest
SHA256 145b4741ebfdcec5bbd59517da5d5829ea073103cfba91c347e96c038d9d8726
MD5 c95ddad501dd76161af64e19b1261f15
BLAKE2b-256 b0213cce6c5788ede1207866fce30a54222bd45803f97100bc042c65ec7f7006

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