Skip to content

3. Implementation (specs)

Giulio Caravagna edited this page Jun 14, 2018 · 2 revisions

To implement REVOLVER we used different types of S3 objects. These brief descriptions might help you if you want to modify, improve or debug our current implementation.

  • class rev_phylo: every tree (phylogenetic tree from CCF, or mutation tree from binary data) belongs to this class. Every such object stores the tree structure, a copy of the data specific to this patient (this might not have been a perfect design choice, if you have really large datasets), the information transfer and the score of the tree. An object of this class has the following methods:

    • print.rev_phylo: prints to console the tree in a 70s layout, plus other information (annotation, score etc.);
    • summary.rev_phylo: it first uses print.rev_cohort, and then reports also some statistics computed by stat_phylo;
    • plot.rev_phylo: it plots the tree, optionally with some stats.
  • class rev_cohort: it represents a cohortcreated from a dataframe in REVOLVER's input format. A cohort can be filled in with objects of class rev_phylo when the patients' trees are created from scratch, or included manually; this creates a list x$phylogenies in the original object x. An object of this class has the following methods:

    • print.rev_cohort: prints to console cohort, and some basic reports (annotations, number of patients, drivers etc.);
    • summary.rev_cohort: just like print.rev_cohort;
    • plot.rev_cohort: it plots the cohort, in particular for each patient it plots its data, its binarized data, the distribution of the scores for each tree (coloured by combinations of information transfer) and a number of the trees available for each patient.
  • class rev_cohort_fit: it represents a cohort that has been fit, this is created from a preliminary object of class rev_cohort. This object has a list x$fiton top of the original objectx. This object is also describing a cohort with clustering results; in this case clustering results are stored in a list x$clusters`.

    • print.rev_cohort_fit: prints to console the cohort, and besides basic reports it annotates also information about the fit;
    • summary.rev_cohort_fit: just like print.rev_cohort;
    • plot.rev_cohort_fit: it plots the cohort fit, in particular for each patient it plots its fit tree, its fit tree where the nodes have been expanded in the second step of the algorithm and the information transfer annotated with the multinomial values.
Clone this wiki locally