Clustering cellularities based on the most likely presence of a clone, using the pamk algorithm (fpc package). Clustering can be guided by toggling manual_clustering on and/or giving a range of number of clusters.

1 2 3 4 5 |

`Cell` |
Output from Return_one_cell_by_mut, list of cellularities (one list-element per sample) |

`Sample_names` |
Name of the sample |

`simulated` |
Was the data generated by QuantumCat? |

`save_plot` |
Should the clustering plots be saved? Default is True |

`contamination` |
The fraction of normal cells in the samples |

`clone_priors` |
If known a list of priors (cell prevalence) to be used in the clustering |

`prior_weight` |
If known a list of priors (fraction of mutations in a clone) to be used in the clustering |

`nclone_range` |
Number of clusters to look for |

`Initializations` |
Maximal number of independant initial condition tests to be tried |

`preclustering` |
The type of preclustering used for priors: "Flash","kmedoid" or NULL. NULL will generate centers using uniform distribution. |

`epsilon` |
Stop value: maximal admitted value of the difference in cluster position and weights between two optimization steps. |

`ncores` |
Number of CPUs to be used |

`output_directory` |
Directory in which to save results |

`model.selection` |
The function to minimize for the model selection: can be "AIC", "BIC", or numeric. In numeric, the function uses a variant of the BIC by multiplication of the k*ln(n) factor. If >1, it will select models with lower complexity. |

`optim` |
use L-BFS-G optimization from R ("default"), or from optimx ("optimx"), or Differential Evolution ("DEoptim") |

`keep.all.models` |
Should the function output the best model (default; FALSE), or all models tested (if set to true) |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.