Use case"

knitr::opts_chunk$set(collapse = TRUE, fig.width = 7, fig.height = 7, 
                      fig.align = "center",
                      fig.dpi = 96)

QuantumClone and QuantumCat

R package available on CRAN or on github

Maintainer: Paul Deveau (paul.deveau at

Clonal Reconstruction from High-Throughput Sequencing data

QuantumClone is an algorithm that is designed to reconstruct clonal populations (i.e. group of cells with the same genetic background) based on high throughput sequencing data (either whole exome or whole genome) It takes into account information from variants (reads supporting the alternative allele and depth at the position), as well as information from copy number : number of alleles at locus (a normal diploid region would be written as "AB") Additional information, such as the contamination, is also used.


QuantumClone is looking for clones in your samples assuming that there is an evolutionary logic between samples, so you should use data from the same patient for one analysis (either different timepoints, or spatially separated samples, or biological replicates).

Input data

QuantumClone requires few informations in the input file:

We show below an example created by the QuantumCat function, and that can be accessed from the data:

    # Example was generated calling:
   Input_Example<-QuantumCat(number_of_clones = 4,
                             number_of_mutations = 100,
                             ploidy = "AB",depth = 150,
                             number_of_samples = 2,
                             contamination = c(0,0))

Any additional column will not be taken into account for the analysis

While the input file can be as large as you want, the computation time will exponentially grow with the number of variants to be studied. In order to keep computation time reasonable (from a minute to an hour), a reasonable set of mutation is between 100 to 1000 variants.


The QuantumClone package is divided in two:

Clonal reconstruction

One_step_clustering() has several parameters required (some have default configuration):

  One_step_clustering(SNV_list = Input_Example, FREEC_list = NULL, contamination = c(0,0),
  nclone_range = 2:5, clone_priors = NULL, prior_weight = NULL,
  Initializations = 1 , preclustering = "Flash", 
  simulated = FALSE, epsilon = 5 * (10^(-3)),
  save_plot = TRUE, ncores = 1, = FALSE, output_directory = NULL)

The output should look like this:




Output from clustering can be represented thanks to the plot_QC_out(), or plot_with_margins_densities (if 1 or two samples)



If more than one sample (here we reuse sample 1 in the plot, to illustrate plot possibilities, not clustering):

plot_QC_out(QC_output3s, Sample_names=c("Diag","Rel","Metastasis"), simulated = FALSE,sample_selected = 1:3))

    QuantumClone::plot_QC_out(modQCout,Sample_names=c("Diag","Rel","Metastasis"),sample_selected = 1:3)



For time series, using evolution_plot() is recommanded. It enables the plot of the cellularity of each clone in a single plot, with the width of a line being proportional to the fraction of mutations in the clone.

evolution_plot(QC_output,Sample_names = c("Timepoint_1","Timepoint_2"))

`````r QuantumClone::evolution_plot(QuantumClone::QC_output,Sample_names = c("Timepoint_1","Timepoint_2"))

#### Recreate phylogenetic tree (when possible)

Output of Tree_generation is a list of dataframes and probabilities, as this:


Each row (i) corresponds to a clone. The last two columns are the cellularity of the clone in the sample. For the other columns (j) there is a 1 if clone j is a progeny of clone (i)

Plot all possible phylogenetic trees:

`````r QuantumClone::multiplot_trees(Tree,d = 4)


Clonal simulation

This part is about generating data to test clonal reconstruction algorithms. Its core is the QuantumCat function. It will generate data for a single cancer that can be sequenced multiple times (either spatially separated or different timepoints). It thus assumes that there is an evolutionary history between samples. The "Chr" columns stores the information of the clonal attribution.

QuantumCat(number_of_clones, number_of_mutations, ploidy = 2, depth = 100, number_of_samples = 2, Random_clones = F, contamination = NULL)

For multiple testings, and calculation of the Normalized Mutual Information (NMI), see Multitest() and statistics_on_Multitest()


Many thanks to the contributors of this work: my supervisors, Elodie for the features improvement and Linux debugging, Matahi for the OSX feedback, and more generally to the U830 & U900 people. This work had been funded by the Ministere de l'Enseignement Superieur de la Recherche (AMX grant).

Try the QuantumClone package in your browser

Any scripts or data that you put into this service are public.

QuantumClone documentation built on May 2, 2019, 3:03 a.m.