From CBG
Revision as of 13:01, 23 December 2009 by Armand (talk | contribs) (Usage)
Jump to: navigation, search

Deletion, insertion and duplication events giving rise to copy number variations (CNVs) have been found genome-wide in the humans and other species. Such genomic aberrations were identified already more than a decade ago using array-based comparative hybridization. They can also be detected using data from SNP genotyping arrays, typically by combining the intensities of the two probes for a given SNP and comparing to the same SNP from other arrays (thus deriving a copy number ratio). Significant shift from the baseline (unit ratio or zero log ratio) reflects copy number changes. Such changes can be identified in many ways, for example, one can use segmentation algorithms to partition the signal then try to classify such segments into gain, copy neutral and loss status. Yet, for large datasets, one can take advantage of the signal distribution at each SNP, and cluster each individual from the distribution into a component that would reflect a given copy number change.

We developped a Gaussian Mixture Model, which detect copy number variation from the distribution of copy number ratios. From the data, it will fit one component for each of the following copy number states: deletion, copy-neutral, 1 and 2 additional copy; with a constraint on the difference between the mixture means. Then for a given individual, it will determine the probabilities for each copy number state and compute the expected copy number (dosage).


The GMM algorithm is licensed under the GNU General Public License, version 2 or later. For details, see


The GMM can be applied to identify CNVs from any rectangular matrix of copy number ratio.

Format is like : chr pos sample1 sample2 ...

Fields should be tab-delimited and it assumes data (within chromosome) are sorted by position.

An example input file is available within the (see Download section).

For Matlab users, download the source code and use the callCNVs.m script.

Users without Matlab, can use the compiled version and the Matlab Component Runtime (MCR). (Please note, we are only providing a compiled Linux x86_64 version for now).

Then you can use (and edit according to your need) the shell script called ""

sh path_to_the_MCR/v79/


If you have the MATLAB software, you can directly use the source code.

Otherwise, you will need to download the Matlab Component Runtime to use the executables (see Download section).


Description File Name Size md5sum
MCR for 64-bit Linux 224M 451c54a811b3e01402b6a46a1b814c4d
Linux Executables (+ example input file) 556k bd579f39c340a50de2bb80a649643be3
Source code 16k 3cb7799bf3e180b33a6742ef382b105e
Example output files 460k 6b621a6a8e279697f610db35810777ce

Frequently Ask Questions

* What are the default component the model will try to fit?

The current implementation models deletion, copy neutral, 3 copies and more than 3 copies.

* What happen if the model fails to fit the data ?

You will model will move to the next SNP to process and you will simply get the warning :

Exiting: Maximum number of iterations has been exceeded - increase MaxIter option.

Missing data will be set as 0.

* I am getting :

Exiting: Maximum number of iterations has been exceeded - increase MaxIter option.

What does this mean? The model could not find the component separation before reaching its maximal iteration limit. This can be due to noisy data, or distribution where no such separation exists. Try increasing : MAX_FUN_CALL=10000; # nb of optimization function call MAX_FUN_ITER=5000; # nb of iterations for each optimization function call But note, this can significantly increase the runtime.

* Can I apply some extra normalization before fitting the Gaussian Mixture Model?

Yes, by default a Loess smoothing is applied. (This step can be skipped by setting DO_LOESS_SMOOTH=0 in the shell script or setting DO_LOESS=0; in callCNVs.m).

It is also recommended that adequate normalization is applied and that such normalized ratios are provided in the matrix input file.

* I am getting this error :

error while loading shared libraries: cannot open shared object file: No such file or directory

what does it mean?

Most likely your LD_LIBRARY_PATH is not pointing correctly to the MCR. The run_[appName].sh script should do it for you.

sh /path-to-my-MCR/v79 test.dat # i.e. for compiled distrib with Matlab 2008, build v79